コード例 #1
0
ファイル: init.php プロジェクト: ngdinhbinh/fine-interior
    // Prevent conflicts with old Pods UI plugin
    if (function_exists('pods_ui_manage')) {
        add_action('init', 'pods_deactivate_pods_ui');
    } else {
        global $pods, $pods_init, $pods_form;
        require_once PODS_DIR . 'includes/classes.php';
        require_once PODS_DIR . 'includes/data.php';
        require_once PODS_DIR . 'includes/general.php';
        if (!defined('PODS_MEDIA') || PODS_MEDIA) {
            require_once PODS_DIR . 'includes/media.php';
        }
        if (!defined('SHORTINIT') || !SHORTINIT) {
            if (pods_allow_deprecated()) {
                require_once PODS_DIR . 'deprecated/deprecated.php';
            }
            if (false !== pods_compatibility_check()) {
                $pods_form = pods_form();
                if (!is_network_admin()) {
                    $pods_init = pods_init();
                }
            }
        }
    }
}
/**
 * Deactivate Pods 1.x or other Pods plugins
 */
function pods_deactivate_pods_1_x()
{
    if (defined('PODS_VERSION') && defined('PODS_DIR') && file_exists(untrailingslashit(PODS_DIR) . '/init.php')) {
        if (!function_exists('deactivate_plugins')) {
コード例 #2
0
ファイル: init.php プロジェクト: erkmen/wpstartersetup
                $version = PODS_VERSION;
                if (isset($_GET['pods_force_refresh'])) {
                    $version = '0.1';
                }
                if ('update-selected' == pods_var('action') && (false !== strpos($_SERVER['REQUEST_URI'], $update) || false !== strpos($_SERVER['REQUEST_URI'], $update_network))) {
                    $version = '0.1';
                }
                $config = array('slug' => PODS_SLUG, 'proper_folder_name' => dirname(PODS_SLUG), 'api_url' => 'https://api.github.com/repos/' . $user . '/' . $repo, 'raw_url' => 'https://raw.github.com/' . $user . '/' . $repo . '/' . $branch, 'github_url' => 'https://github.com/' . $user . '/' . $repo, 'zip_url' => 'https://github.com/' . $user . '/' . $repo . '/zipball/' . $branch, 'sslverify' => false, 'requires' => '3.4', 'tested' => '3.6', 'version' => $version);
                new WPGitHubUpdater($config);
            }
        }
        if (!defined('SHORTINIT') || !SHORTINIT) {
            if (pods_allow_deprecated()) {
                require_once PODS_DIR . 'deprecated/deprecated.php';
            }
            if (false !== pods_compatibility_check() && !is_network_admin()) {
                $pods_form = pods_form();
                $pods_init = pods_init();
            }
        }
    }
}
/**
 * Deactivate Pods 1.x or other Pods plugins
 */
function pods_deactivate_pods_1_x()
{
    if (defined('PODS_VERSION') && defined('PODS_DIR') && file_exists(untrailingslashit(PODS_DIR) . '/init.php')) {
        if (!function_exists('deactivate_plugins')) {
            include_once ABSPATH . 'wp-admin/includes/plugin.php';
        }