当前位置: 首页>>代码示例>>PHP>>正文


PHP WPSEO_Options::initialize方法代码示例

本文整理汇总了PHP中WPSEO_Options::initialize方法的典型用法代码示例。如果您正苦于以下问题:PHP WPSEO_Options::initialize方法的具体用法?PHP WPSEO_Options::initialize怎么用?PHP WPSEO_Options::initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WPSEO_Options的用法示例。


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

示例1: wpseo_activate

/**
 * Runs on activation of the plugin.
 */
function wpseo_activate()
{
    require_once WPSEO_PATH . 'inc/wpseo-functions.php';
    WPSEO_Options::get_instance();
    WPSEO_Options::initialize();
    flush_rewrite_rules();
    wpseo_add_capabilities();
    WPSEO_Options::schedule_yoast_tracking(null, get_option('wpseo'));
    // Clear cache so the changes are obvious.
    WPSEO_Options::clear_cache();
    do_action('wpseo_activate');
}
开发者ID:Ingenex,项目名称:redesign,代码行数:15,代码来源:wp-seo-main.php

示例2: wpseo_defaults

/**
 * Set the default settings.
 *
 * @deprecated 1.5.0
 * @deprecated use WPSEO_Options::initialize()
 * @see        WPSEO_Options::initialize()
 */
function wpseo_defaults()
{
    _deprecated_function(__FUNCTION__, 'WPSEO 1.5.0', 'WPSEO_Options::initialize()');
    WPSEO_Options::initialize();
}
开发者ID:jesusmarket,项目名称:jesusmarket,代码行数:12,代码来源:wpseo-non-ajax-functions.php

示例3: __construct

 /**
  * Class constructor
  *
  * @param boolean $replace
  */
 public function __construct($replace = false)
 {
     $this->replace = $replace;
     WPSEO_Options::initialize();
 }
开发者ID:goodbayscott,项目名称:wwr-temp,代码行数:10,代码来源:class-import-external.php

示例4: _wpseo_activate

/**
 * Runs on activation of the plugin.
 */
function _wpseo_activate()
{
    require_once WPSEO_PATH . 'inc/wpseo-functions.php';
    wpseo_load_textdomain();
    // Make sure we have our translations available for the defaults.
    WPSEO_Options::get_instance();
    if (!is_multisite()) {
        WPSEO_Options::initialize();
    } else {
        WPSEO_Options::maybe_set_multisite_defaults(true);
    }
    WPSEO_Options::ensure_options_exist();
    if (is_multisite() && ms_is_switched()) {
        delete_option('rewrite_rules');
    } else {
        add_action('shutdown', 'flush_rewrite_rules');
    }
    wpseo_add_capabilities();
    // Clear cache so the changes are obvious.
    WPSEO_Utils::clear_cache();
    do_action('wpseo_activate');
}
开发者ID:misfist,项目名称:missdrepants-network,代码行数:25,代码来源:wp-seo-main.php

示例5: check_admin_referer

 *
 * @todo [Yoast] The import for the RSS Footer plugin checks for data already entered via WP SEO,
 * the other import routines should do that too.
*/
global $wpseo_admin_pages;
$msg = '';
if (isset($_POST['import']) || isset($_GET['import'])) {
    check_admin_referer('wpseo-import');
    global $wpdb;
    $replace = false;
    $deletekw = false;
    if (isset($_POST['wpseo']['deleteolddata']) && $_POST['wpseo']['deleteolddata'] == 'on') {
        $replace = true;
    }
    if (isset($_POST['wpseo']['importwoo'])) {
        WPSEO_Options::initialize();
        $sep = get_option('seo_woo_seperator');
        $options = get_option('wpseo_titles');
        switch (get_option('seo_woo_home_layout')) {
            case 'a':
                $options['title-home-wpseo'] = '%%sitename%% ' . $sep . ' %%sitedesc%%';
                break;
            case 'b':
                $options['title-home-wpseo'] = '%%sitename%% ' . get_option('seo_woo_paged_var') . ' %%pagenum%%';
                break;
            case 'c':
                $options['title-home-wpseo'] = '%%sitedesc%%';
                break;
        }
        if ($replace) {
            delete_option('seo_woo_home_layout');
开发者ID:rinodung,项目名称:myfreetheme,代码行数:31,代码来源:import.php

示例6: _wpseo_activate

/**
 * Runs on activation of the plugin.
 */
function _wpseo_activate()
{
    require_once WPSEO_PATH . 'inc/wpseo-functions.php';
    wpseo_load_textdomain();
    // Make sure we have our translations available for the defaults
    WPSEO_Options::get_instance();
    if (!is_multisite()) {
        WPSEO_Options::initialize();
    } else {
        WPSEO_Options::maybe_set_multisite_defaults(true);
    }
    WPSEO_Options::ensure_options_exist();
    flush_rewrite_rules();
    wpseo_add_capabilities();
    WPSEO_Options::schedule_yoast_tracking(null, get_option('wpseo'));
    // Clear cache so the changes are obvious.
    WPSEO_Options::clear_cache();
    do_action('wpseo_activate');
}
开发者ID:UPMediaDesign,项目名称:vidaestudiantilip,代码行数:22,代码来源:wp-seo-main.php


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