• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wp_installing函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中wp_installing函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_installing函数的具体用法?PHP wp_installing怎么用?PHP wp_installing使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了wp_installing函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: is_disabled

 /**
  * Whether the entire automatic updater is disabled.
  *
  * @since 3.7.0
  * @access public
  */
 public function is_disabled()
 {
     // Background updates are disabled if you don't want file changes.
     if (defined('DISALLOW_FILE_MODS') && DISALLOW_FILE_MODS) {
         return true;
     }
     if (wp_installing()) {
         return true;
     }
     // More fine grained control can be done through the WP_AUTO_UPDATE_CORE constant and filters.
     $disabled = defined('AUTOMATIC_UPDATER_DISABLED') && AUTOMATIC_UPDATER_DISABLED;
     /**
      * Filters whether to entirely disable background updates.
      *
      * There are more fine-grained filters and controls for selective disabling.
      * This filter parallels the AUTOMATIC_UPDATER_DISABLED constant in name.
      *
      * This also disables update notification emails. That may change in the future.
      *
      * @since 3.7.0
      *
      * @param bool $disabled Whether the updater should be disabled.
      */
     return apply_filters('automatic_updater_disabled', $disabled);
 }
开发者ID:atimmer,项目名称:wordpress-develop-mirror,代码行数:31,代码来源:class-wp-automatic-updater.php


示例2: wp_schedule_update_global_counts

 function wp_schedule_update_global_counts()
 {
     if (!is_main_network() || !is_main_site()) {
         return;
     }
     if (!wp_next_scheduled('update_global_counts') && !wp_installing()) {
         wp_schedule_event(time(), 'twicedaily', 'update_global_counts');
     }
 }
开发者ID:felixarntz,项目名称:global-admin,代码行数:9,代码来源:ms-functions.php


示例3: schedule_events

 public function schedule_events()
 {
     if (!is_main_site()) {
         return;
     }
     if (!wp_next_scheduled('gmember_network_counts') && !wp_installing()) {
         wp_schedule_event(time(), 'daily', 'gmember_network_counts');
     }
 }
开发者ID:geminorum,项目名称:gmember,代码行数:9,代码来源:network.class.php


示例4: _wpcom_vip_maybe_clear_alloptions_cache

/**
 * Fix a race condition in alloptions caching
 *
 * See https://core.trac.wordpress.org/ticket/31245
 */
function _wpcom_vip_maybe_clear_alloptions_cache($option)
{
    if (!wp_installing()) {
        $alloptions = wp_load_alloptions();
        //alloptions should be cached at this point
        if (isset($alloptions[$option])) {
            //only if option is among alloptions
            wp_cache_delete('alloptions', 'options');
        }
    }
}
开发者ID:Automattic,项目名称:vip-mu-plugins-public,代码行数:16,代码来源:misc.php


示例5: create_object

 function create_object($args)
 {
     global $wpdb;
     $meta = isset($args['meta']) ? $args['meta'] : array('public' => 1);
     $user_id = isset($args['user_id']) ? $args['user_id'] : get_current_user_id();
     // temp tables will trigger db errors when we attempt to reference them as new temp tables
     $suppress = $wpdb->suppress_errors();
     $blog = wpmu_create_blog($args['domain'], $args['path'], $args['title'], $user_id, $meta, $args['site_id']);
     $wpdb->suppress_errors($suppress);
     // Tell WP we're done installing.
     wp_installing(false);
     return $blog;
 }
开发者ID:atimmer,项目名称:wordpress-develop-mirror,代码行数:13,代码来源:class-wp-unittest-factory-for-blog.php


示例6: test_update_theme

 public function test_update_theme()
 {
     $this->_setRole('administrator');
     $_POST['_ajax_nonce'] = wp_create_nonce('updates');
     $_POST['slug'] = 'twentyten';
     // Make the request.
     try {
         // Prevent wp_update_themes() from running.
         wp_installing(true);
         $this->_handleAjax('update-theme');
         wp_installing(false);
     } catch (WPAjaxDieContinueException $e) {
         unset($e);
     }
     // Get the response.
     $response = json_decode($this->_last_response, true);
     $expected = array('success' => false, 'data' => array('update' => 'theme', 'slug' => 'twentyten', 'errorMessage' => 'The theme is at the latest version.', 'newVersion' => '', 'debug' => array('The theme is at the latest version.')));
     $this->assertEqualSets($expected, $response);
 }
开发者ID:aaemnnosttv,项目名称:develop.git.wordpress.org,代码行数:19,代码来源:ManageThemes.php


示例7: wp_get_active_and_valid_plugins

function wp_get_active_and_valid_plugins()
{
    $plugins = array();
    $active_plugins = (array) get_option('active_plugins', array());
    // Check for hacks file if the option is enabled
    if (get_option('hack_file') && file_exists(ABSPATH . 'my-hacks.php')) {
        _deprecated_file('my-hacks.php', '1.5');
        array_unshift($plugins, ABSPATH . 'my-hacks.php');
    }
    if (empty($active_plugins) || wp_installing()) {
        return $plugins;
    }
    $network_plugins = is_multisite() ? wp_get_active_network_plugins() : false;
    foreach ($active_plugins as $plugin) {
        if (!validate_file($plugin) && '.php' == substr($plugin, -4) && file_exists(WP_PLUGIN_DIR . '/' . $plugin) && (!$network_plugins || !in_array(WP_PLUGIN_DIR . '/' . $plugin, $network_plugins))) {
            $plugins[] = WP_PLUGIN_DIR . '/' . $plugin;
        }
    }
    return $plugins;
}
开发者ID:AppItNetwork,项目名称:yii2-wordpress-themes,代码行数:20,代码来源:load.php


示例8: wp_get_available_translations

/**
 * Get available translations from the WordPress.org API.
 *
 * @since 4.0.0
 *
 * @see translations_api()
 *
 * @return array Array of translations, each an array of data. If the API response results
 *               in an error, an empty array will be returned.
 */
function wp_get_available_translations()
{
    if (!wp_installing() && false !== ($translations = get_site_transient('available_translations'))) {
        return $translations;
    }
    include ABSPATH . WPINC . '/version.php';
    // include an unmodified $wp_version
    $api = translations_api('core', array('version' => $wp_version));
    if (is_wp_error($api) || empty($api['translations'])) {
        return array();
    }
    $translations = array();
    // Key the array with the language code for now.
    foreach ($api['translations'] as $translation) {
        $translations[$translation['language']] = $translation;
    }
    if (!defined('WP_INSTALLING')) {
        set_site_transient('available_translations', $translations, 3 * HOUR_IN_SECONDS);
    }
    return $translations;
}
开发者ID:johnpbloch,项目名称:wordpress,代码行数:31,代码来源:translation-install.php


示例9: wp_remote_get

         * attempt to do no more than threshold value, with some +/- allowed.
         */
        if ($c <= 50 || $c > 50 && mt_rand(0, (int) ($c / 50)) == 1) {
            require_once ABSPATH . WPINC . '/http.php';
            $response = wp_remote_get(admin_url('upgrade.php?step=1'), array('timeout' => 120, 'httpversion' => '1.1'));
            /** This action is documented in wp-admin/network/upgrade.php */
            do_action('after_mu_upgrade', $response);
            unset($response);
        }
        unset($c);
    }
}
require_once ABSPATH . 'wp-admin/includes/admin.php';
auth_redirect();
// Schedule trash collection
if (!wp_next_scheduled('wp_scheduled_delete') && !wp_installing()) {
    wp_schedule_event(time(), 'daily', 'wp_scheduled_delete');
}
set_screen_options();
$date_format = __('F j, Y');
$time_format = __('g:i a');
wp_enqueue_script('common');
/**
 * $pagenow is set in vars.php
 * $wp_importers is sometimes set in wp-admin/includes/import.php
 * The remaining variables are imported as globals elsewhere, declared as globals here
 *
 * @global string $pagenow
 * @global array  $wp_importers
 * @global string $hook_suffix
 * @global string $plugin_page
开发者ID:yaoyonstudio,项目名称:WordPress,代码行数:31,代码来源:admin.php


示例10: wp_style_loader_src

/**
 * Administration Screen CSS for changing the styles.
 *
 * If installing the 'wp-admin/' directory will be replaced with './'.
 *
 * The $_wp_admin_css_colors global manages the Administration Screens CSS
 * stylesheet that is loaded. The option that is set is 'admin_color' and is the
 * color and key for the array. The value for the color key is an object with
 * a 'url' parameter that has the URL path to the CSS file.
 *
 * The query from $src parameter will be appended to the URL that is given from
 * the $_wp_admin_css_colors array value URL.
 *
 * @since 2.6.0
 * @global array $_wp_admin_css_colors
 *
 * @param string $src    Source URL.
 * @param string $handle Either 'colors' or 'colors-rtl'.
 * @return string|false URL path to CSS stylesheet for Administration Screens.
 */
function wp_style_loader_src($src, $handle)
{
    global $_wp_admin_css_colors;
    if (wp_installing()) {
        return preg_replace('#^wp-admin/#', './', $src);
    }
    if ('colors' == $handle) {
        $color = get_user_option('admin_color');
        if (empty($color) || !isset($_wp_admin_css_colors[$color])) {
            $color = 'fresh';
        }
        $color = $_wp_admin_css_colors[$color];
        $parsed = parse_url($src);
        $url = $color->url;
        if (!$url) {
            return false;
        }
        if (isset($parsed['query']) && $parsed['query']) {
            wp_parse_str($parsed['query'], $qv);
            $url = add_query_arg($qv, $url);
        }
        return $url;
    }
    return $src;
}
开发者ID:source-foundry,项目名称:code-corpora,代码行数:45,代码来源:script-loader.php


示例11: validate_current_theme

/**
 * Checks that current theme files 'index.php' and 'style.css' exists.
 *
 * Does not initially check the default theme, which is the fallback and should always exist.
 * But if it doesn't exist, it'll fall back to the latest core default theme that does exist.
 * Will switch theme to the fallback theme if current theme does not validate.
 *
 * You can use the 'validate_current_theme' filter to return false to
 * disable this functionality.
 *
 * @since 1.5.0
 * @see WP_DEFAULT_THEME
 *
 * @return bool
 */
function validate_current_theme()
{
    /**
     * Filter whether to validate the current theme.
     *
     * @since 2.7.0
     *
     * @param bool $validate Whether to validate the current theme. Default true.
     */
    if (wp_installing() || !apply_filters('validate_current_theme', true)) {
        return true;
    }
    if (!file_exists(get_template_directory() . '/index.php')) {
        // Invalid.
    } elseif (!file_exists(get_template_directory() . '/style.css')) {
        // Invalid.
    } elseif (is_child_theme() && !file_exists(get_stylesheet_directory() . '/style.css')) {
        // Invalid.
    } else {
        // Valid.
        return true;
    }
    $default = wp_get_theme(WP_DEFAULT_THEME);
    if ($default->exists()) {
        switch_theme(WP_DEFAULT_THEME);
        return false;
    }
    /**
     * If we're in an invalid state but WP_DEFAULT_THEME doesn't exist,
     * switch to the latest core default theme that's installed.
     * If it turns out that this latest core default theme is our current
     * theme, then there's nothing we can do about that, so we have to bail,
     * rather than going into an infinite loop. (This is why there are
     * checks against WP_DEFAULT_THEME above, also.) We also can't do anything
     * if it turns out there is no default theme installed. (That's `false`.)
     */
    $default = WP_Theme::get_core_default_theme();
    if (false === $default || get_stylesheet() == $default->get_stylesheet()) {
        return true;
    }
    switch_theme($default->get_stylesheet());
    return false;
}
开发者ID:idies,项目名称:escience-2016-wp,代码行数:58,代码来源:theme.php


示例12: load_default_textdomain

/**
 * Load default translated strings based on locale.
 *
 * Loads the .mo file in WP_LANG_DIR constant path from WordPress root.
 * The translated (.mo) file is named based on the locale.
 *
 * @see load_textdomain()
 *
 * @since 1.5.0
 *
 * @param string $locale Optional. Locale to load. Default is the value of {@see get_locale()}.
 * @return bool Whether the textdomain was loaded.
 */
function load_default_textdomain($locale = null)
{
    if (null === $locale) {
        $locale = get_locale();
    }
    // Unload previously loaded strings so we can switch translations.
    unload_textdomain('default');
    $return = load_textdomain('default', WP_LANG_DIR . "/{$locale}.mo");
    if ((is_multisite() || defined('WP_INSTALLING_NETWORK') && WP_INSTALLING_NETWORK) && !file_exists(WP_LANG_DIR . "/admin-{$locale}.mo")) {
        load_textdomain('default', WP_LANG_DIR . "/ms-{$locale}.mo");
        return $return;
    }
    if (is_admin() || wp_installing() || defined('WP_REPAIRING') && WP_REPAIRING) {
        load_textdomain('default', WP_LANG_DIR . "/admin-{$locale}.mo");
    }
    if (is_network_admin() || defined('WP_INSTALLING_NETWORK') && WP_INSTALLING_NETWORK) {
        load_textdomain('default', WP_LANG_DIR . "/admin-network-{$locale}.mo");
    }
    return $return;
}
开发者ID:s4mobile,项目名称:WordPressTech,代码行数:33,代码来源:l10n.php


示例13: get_transient

/**
 * Get the value of a transient.
 *
 * If the transient does not exist, does not have a value, or has expired,
 * then the return value will be false.
 *
 * @since 2.8.0
 *
 * @param string $transient Transient name. Expected to not be SQL-escaped.
 * @return mixed Value of transient.
 */
function get_transient($transient)
{
    /**
     * Filters the value of an existing transient.
     *
     * The dynamic portion of the hook name, `$transient`, refers to the transient name.
     *
     * Passing a truthy value to the filter will effectively short-circuit retrieval
     * of the transient, returning the passed value instead.
     *
     * @since 2.8.0
     * @since 4.4.0 The `$transient` parameter was added
     *
     * @param mixed  $pre_transient The default value to return if the transient does not exist.
     *                              Any value other than false will short-circuit the retrieval
     *                              of the transient, and return the returned value.
     * @param string $transient     Transient name.
     */
    $pre = apply_filters("pre_transient_{$transient}", false, $transient);
    if (false !== $pre) {
        return $pre;
    }
    if (wp_using_ext_object_cache()) {
        $value = wp_cache_get($transient, 'transient');
    } else {
        $transient_option = '_transient_' . $transient;
        if (!wp_installing()) {
            // If option is not in alloptions, it is not autoloaded and thus has a timeout
            $alloptions = wp_load_alloptions();
            if (!isset($alloptions[$transient_option])) {
                $transient_timeout = '_transient_timeout_' . $transient;
                $timeout = get_option($transient_timeout);
                if (false !== $timeout && $timeout < time()) {
                    delete_option($transient_option);
                    delete_option($transient_timeout);
                    $value = false;
                }
            }
        }
        if (!isset($value)) {
            $value = get_option($transient_option);
        }
    }
    /**
     * Filters an existing transient's value.
     *
     * The dynamic portion of the hook name, `$transient`, refers to the transient name.
     *
     * @since 2.8.0
     * @since 4.4.0 The `$transient` parameter was added
     *
     * @param mixed  $value     Value of transient.
     * @param string $transient Transient name.
     */
    return apply_filters("transient_{$transient}", $value, $transient);
}
开发者ID:kucrut,项目名称:wordpress,代码行数:67,代码来源:option.php


示例14: load_default_textdomain

/**
 * Load default translated strings based on locale.
 *
 * Loads the .mo file in WP_LANG_DIR constant path from WordPress root.
 * The translated (.mo) file is named based on the locale.
 *
 * @see load_textdomain()
 *
 * @since 1.5.0
 *
 * @param string $locale Optional. Locale to load. Default is the value of {@see get_locale()}.
 * @return bool Whether the textdomain was loaded.
 */
function load_default_textdomain($locale = null)
{
    if (null === $locale) {
        $locale = get_locale();
    }
    // Unload previously loaded strings so we can switch translations.
    unload_textdomain('default');
    $return = load_textdomain('default', WP_LANG_DIR . "/{$locale}.mo");
    if (is_admin() || wp_installing() || defined('WP_REPAIRING') && WP_REPAIRING) {
        load_textdomain('default', WP_LANG_DIR . "/admin-{$locale}.mo");
    }
    return $return;
}
开发者ID:7press,项目名称:7press,代码行数:26,代码来源:l10n.php


示例15: update_home_siteurl

/**
 * Flushes rewrite rules if siteurl, home or page_on_front changed.
 *
 * @since 2.1.0
 *
 * @param string $old_value
 * @param string $value
 */
function update_home_siteurl($old_value, $value)
{
    if (wp_installing()) {
        return;
    }
    flush_rewrite_rules();
}
开发者ID:7press,项目名称:7press,代码行数:15,代码来源:misc.php


示例16: wp_schedule_update_checks

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !wp_installing()) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !wp_installing()) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !wp_installing()) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
}
开发者ID:andylow,项目名称:WordPress,代码行数:17,代码来源:update.php


示例17: request_filesystem_credentials

/**
 * Displays a form to the user to request for their FTP/SSH details in order
 * to connect to the filesystem.
 *
 * All chosen/entered details are saved, Excluding the Password.
 *
 * Hostnames may be in the form of hostname:portnumber (eg: wordpress.org:2467)
 * to specify an alternate FTP/SSH port.
 *
 * Plugins may override this form by returning true|false via the
 * {@see 'request_filesystem_credentials'} filter.
 *
 * @since 2.5.
 *
 * @todo Properly mark optional arguments as such
 *
 * @global string $pagenow
 *
 * @param string $form_post    the URL to post the form to
 * @param string $type         the chosen Filesystem method in use
 * @param bool   $error        if the current request has failed to connect
 * @param string $context      The directory which is needed access to, The write-test will be performed on this directory by get_filesystem_method()
 * @param array  $extra_fields Extra POST fields which should be checked for to be included in the post.
 * @param bool   $allow_relaxed_file_ownership Whether to allow Group/World writable.
 * @return bool False on failure. True on success.
 */
function request_filesystem_credentials($form_post, $type = '', $error = false, $context = false, $extra_fields = null, $allow_relaxed_file_ownership = false)
{
    global $pagenow;
    /**
     * Filter the filesystem credentials form output.
     *
     * Returning anything other than an empty string will effectively short-circuit
     * output of the filesystem credentials form, returning that value instead.
     *
     * @since 2.5.0
     *
     * @param mixed  $output       Form output to return instead. Default empty.
     * @param string $form_post    URL to POST the form to.
     * @param string $type         Chosen type of filesystem.
     * @param bool   $error        Whether the current request has failed to connect.
     *                             Default false.
     * @param string $context      Full path to the directory that is tested for
     *                             being writable.
     * @param bool $allow_relaxed_file_ownership Whether to allow Group/World writable.
     * @param array  $extra_fields Extra POST fields.
     */
    $req_cred = apply_filters('request_filesystem_credentials', '', $form_post, $type, $error, $context, $extra_fields, $allow_relaxed_file_ownership);
    if ('' !== $req_cred) {
        return $req_cred;
    }
    if (empty($type)) {
        $type = get_filesystem_method(array(), $context, $allow_relaxed_file_ownership);
    }
    if ('direct' == $type) {
        return true;
    }
    if (is_null($extra_fields)) {
        $extra_fields = array('version', 'locale');
    }
    $credentials = get_option('ftp_credentials', array('hostname' => '', 'username' => ''));
    // If defined, set it to that, Else, If POST'd, set it to that, If not, Set it to whatever it previously was(saved details in option)
    $credentials['hostname'] = defined('FTP_HOST') ? FTP_HOST : (!empty($_POST['hostname']) ? wp_unslash($_POST['hostname']) : $credentials['hostname']);
    $credentials['username'] = defined('FTP_USER') ? FTP_USER : (!empty($_POST['username']) ? wp_unslash($_POST['username']) : $credentials['username']);
    $credentials['password'] = defined('FTP_PASS') ? FTP_PASS : (!empty($_POST['password']) ? wp_unslash($_POST['password']) : '');
    // Check to see if we are setting the public/private keys for ssh
    $credentials['public_key'] = defined('FTP_PUBKEY') ? FTP_PUBKEY : (!empty($_POST['public_key']) ? wp_unslash($_POST['public_key']) : '');
    $credentials['private_key'] = defined('FTP_PRIKEY') ? FTP_PRIKEY : (!empty($_POST['private_key']) ? wp_unslash($_POST['private_key']) : '');
    // Sanitize the hostname, Some people might pass in odd-data:
    $credentials['hostname'] = preg_replace('|\\w+://|', '', $credentials['hostname']);
    //Strip any schemes off
    if (strpos($credentials['hostname'], ':')) {
        list($credentials['hostname'], $credentials['port']) = explode(':', $credentials['hostname'], 2);
        if (!is_numeric($credentials['port'])) {
            unset($credentials['port']);
        }
    } else {
        unset($credentials['port']);
    }
    if (defined('FTP_SSH') && FTP_SSH || defined('FS_METHOD') && 'ssh2' == FS_METHOD) {
        $credentials['connection_type'] = 'ssh';
    } elseif (defined('FTP_SSL') && FTP_SSL && 'ftpext' == $type) {
        //Only the FTP Extension understands SSL
        $credentials['connection_type'] = 'ftps';
    } elseif (!empty($_POST['connection_type'])) {
        $credentials['connection_type'] = wp_unslash($_POST['connection_type']);
    } elseif (!isset($credentials['connection_type'])) {
        //All else fails (And it's not defaulted to something else saved), Default to FTP
        $credentials['connection_type'] = 'ftp';
    }
    if (!$error && (!empty($credentials['password']) && !empty($credentials['username']) && !empty($credentials['hostname']) || 'ssh' == $credentials['connection_type'] && !empty($credentials['public_key']) && !empty($credentials['private_key']))) {
        $stored_credentials = $credentials;
        if (!empty($stored_credentials['port'])) {
            //save port as part of hostname to simplify above code.
            $stored_credentials['hostname'] .= ':' . $stored_credentials['port'];
        }
        unset($stored_credentials['password'], $stored_credentials['port'], $stored_credentials['private_key'], $stored_credentials['public_key']);
        if (!wp_installing()) {
            update_option('ftp_credentials', $stored_credentials);
        }
//.........这里部分代码省略.........
开发者ID:nxty2011,项目名称:WordPress,代码行数:101,代码来源:file.php


示例18: test_update_plugin

 public function test_update_plugin()
 {
     $this->_setRole('administrator');
     $_POST['_ajax_nonce'] = wp_create_nonce('updates');
     $_POST['plugin'] = 'hello.php';
     $_POST['slug'] = 'hello-dolly';
     // Make the request
     try {
         // Prevent wp_update_plugins() from running
         wp_installing(true);
         $this->_handleAjax('update-plugin');
         wp_installing(false);
     } catch (WPAjaxDieContinueException $e) {
         unset($e);
     }
     // Get the response.
     $response = json_decode($this->_last_response, true);
     $expected = array('success' => false, 'data' => array('update' => 'plugin', 'slug' => 'hello-dolly', 'plugin' => 'hello.php', 'pluginName' => 'Hello Dolly', 'errorMessage' => 'Plugin update failed.', 'oldVersion' => 'Version 1.6', 'newVersion' => '', 'debug' => array('The plugin is at the latest version.')));
     $this->assertEqualSets($expected, $response);
 }
开发者ID:atimmer,项目名称:wordpress-develop-mirror,代码行数:20,代码来源:UpdatePlugin.php


示例19: wp_schedule_update_checks

/**
 * Schedule core, theme, and plugin update checks.
 *
 * @since 3.1.0
 */
function wp_schedule_update_checks()
{
    if (!wp_next_scheduled('wp_version_check') && !wp_installing()) {
        wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    }
    if (!wp_next_scheduled('wp_update_plugins') && !wp_installing()) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    }
    if (!wp_next_scheduled('wp_update_themes') && !wp_installing()) {
        wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    }
    if (wp_next_scheduled('wp_maybe_auto_update') > time() + HOUR_IN_SECONDS && !wp_installing()) {
        wp_clear_scheduled_hook('wp_maybe_auto_update');
    }
}
开发者ID:AndreyLanko,项目名称:perevorot-prozorro-wp,代码行数:20,代码来源:update.php


示例20: unset

                        return $data_to_save;
                    }
                }
            }
            if (!isset($data_to_save[$conditional_id]) || !$data_to_save[$conditional_id]) {
                unset($data_to_save[$field_id]);
            }
            return $data_to_save;
        }
    }
    /* End of class. */
    /**
     * Instantiate our class.
     *
     * {@internal wp_installing() function was introduced in WP 4.4. The function exists and constant
     * check can be removed once the min version for this plugin has been upped to 4.4.}}
     */
    if (function_exists('wp_installing') && wp_installing() === false || !function_exists('wp_installing') && (!defined('WP_INSTALLING') || WP_INSTALLING === false)) {
        add_action('plugins_loaded', 'cmb2_conditionals_init');
    }
    if (!function_exists('cmb2_conditionals_init')) {
        /**
         * Initialize the class.
         */
        function cmb2_conditionals_init()
        {
            $cmb2_conditionals = new CMB2_Conditionals();
        }
    }
}
/* End of class-exists wrapper. */
开发者ID:jrfnl,项目名称:cmb2-conditionals,代码行数:31,代码来源:cmb2-conditionals.php



注:本文中的wp_installing函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wp_is_large_network函数代码示例发布时间:2022-05-23
下一篇:
PHP wp_install_defaults函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap