Parse current branch name from Git repository and conditionally set WordPress database name.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
|$git_head = file('.git/HEAD', FILE_USE_INCLUDE_PATH);|
|$git_head = $git_head; //get the string from the array|
|$git_head = explode("/", $git_head); //separate out by the "/" in the string|
|$branch_name = trim($git_head); //get the one that is always the branch name|
|if($branch_name == "master")|
|/** The name of the database for WordPress */|