Core_Command::modify_wp_config PHP Method

modify_wp_config() private static method

private static modify_wp_config ( $content )
    private static function modify_wp_config($content)
    {
        $wp_config_path = Utils\locate_wp_config();
        $token = "/* That's all, stop editing!";
        $config_contents = file_get_contents($wp_config_path);
        if (false === strpos($config_contents, $token)) {
            return false;
        }
        list($before, $after) = explode($token, $config_contents);
        $content = PHP_EOL . PHP_EOL . trim($content) . PHP_EOL . PHP_EOL;
        file_put_contents($wp_config_path, $before . $content . $token . $after);
        return true;
    }