VersionPress\Utils\WordPressMissingFunctions::getWpConfigPath PHP Метод

getWpConfigPath() публичный статический Метод

public static getWpConfigPath ( )
    public static function getWpConfigPath()
    {
        $defaultWpConfigPath = realpath(ABSPATH . 'wp-config.php');
        $elevatedWpConfigPath = realpath(dirname(ABSPATH) . '/wp-config.php');
        if (is_file($defaultWpConfigPath)) {
            return $defaultWpConfigPath;
        }
        return $elevatedWpConfigPath;
    }

Usage Example

Пример #1
0
/**
 * Activates the plugin from a WordPress point of view. Note that for VersionPress
 * to become fully active, the Initializer needs to be run.
 *
 * @see Initializer
 */
function vp_activate()
{
    WpConfigSplitter::split(WordPressMissingFunctions::getWpConfigPath());
    set_transient('vp_just_activated', '1', 10);
}
All Usage Examples Of VersionPress\Utils\WordPressMissingFunctions::getWpConfigPath