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


PHP wpseo_description_test函数代码示例

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


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

示例1: wpseo_description_test

                    }
                } else {
                    wpseo_description_test();
                    $msg .= '<span class="warning">' . __('Earlier found meta description was not found in file. Renewed the description test data.', 'wordpress-seo') . '</span>';
                }
                add_settings_error('yoast_wpseo_dashboard_options', 'error', $msg, 'updated');
            }
        }
    }
    // Clean up the referrer url for later use.
    if (isset($_SERVER['REQUEST_URI'])) {
        $_SERVER['REQUEST_URI'] = remove_query_arg(array('nonce', 'fixmetadesc'), $_SERVER['REQUEST_URI']);
    }
}
if (!isset($options['theme_has_description']) || (isset($options['theme_has_description']) && $options['theme_has_description'] === true || $options['theme_description_found'] !== '') || isset($_GET['checkmetadesc']) && check_admin_referer('wpseo-check-metadesc', 'nonce')) {
    wpseo_description_test();
    // Renew the options after the test.
    $options = get_option('wpseo');
}
if (isset($_GET['checkmetadesc'])) {
    // Clean up the referrer url for later use.
    if (isset($_SERVER['REQUEST_URI'])) {
        $_SERVER['REQUEST_URI'] = remove_query_arg(array('nonce', 'checkmetadesc'), $_SERVER['REQUEST_URI']);
    }
}
$yform = Yoast_Form::get_instance();
$yform->admin_header(true, 'wpseo');
do_action('wpseo_all_admin_notices');
if (is_array($options['blocking_files']) && count($options['blocking_files']) > 0) {
    echo '<p id="blocking_files" class="wrong">';
    echo '<a href="javascript:wpseoKillBlockingFiles(\'', esc_js(wp_create_nonce('wpseo-blocking-files')), '\')" class="button fixit">', __('Fix it.', 'wordpress-seo'), '</a>';
开发者ID:designomx,项目名称:DMXFrmwrk,代码行数:31,代码来源:dashboard.php

示例2: wpseo_update_theme_complete_actions

/**
 * Abuse a filter to check if the current theme was updated and if so, test the updated theme
 * for the title and meta description tag
 *
 * @since 1.4.14
 *
 * @param   array           $update_actions Updated actions set.
 * @param   WP_Theme|string $updated_theme  Theme object instance or stylesheet name.
 *
 * @return  array  $update_actions    Unchanged array
 */
function wpseo_update_theme_complete_actions($update_actions, $updated_theme)
{
    $options = get_option('wpseo');
    // Break if admin_notice already in place.
    if ((isset($options['theme_has_description']) && $options['theme_has_description'] === true || $options['theme_description_found'] !== '') && $options['ignore_meta_description_warning'] !== true) {
        return $update_actions;
    }
    $theme = get_stylesheet();
    if (is_object($updated_theme)) {
        /*
        Bulk update and $updated_theme only contains info on which theme was last in the list
           of updated themes, so go & test
        */
        // Commented out? wpseo_title_test(); R.
        wpseo_description_test();
    } elseif ($updated_theme === $theme) {
        /*
        Single theme update for the active theme
        */
        // Commented out? wpseo_title_test(); R.
        wpseo_description_test();
    }
    return $update_actions;
}
开发者ID:Friends-School-Atlanta,项目名称:Deployable-WordPress,代码行数:35,代码来源:wpseo-non-ajax-functions.php

示例3: wpseo_update_theme_complete_actions

/**
 * Abuse a filter to check if the current theme was updated and if so, test the updated theme
 * for the meta description tag
 *
 * @since 1.4.14
 *
 * @return  array  $update_actions    Unchanged array
 */
function wpseo_update_theme_complete_actions($update_actions, $updated_theme)
{
    $options = get_option('wpseo');
    // Break if admin_notice already in place
    if (isset($options['meta_description_warning']) && true === $options['meta_description_warning']) {
        return $update_actions;
    }
    $theme = get_stylesheet();
    if (is_object($updated_theme)) {
        /* Bulk update and $updated_theme only contains info on which theme was last in the list
           of updated themes, so go & test */
        wpseo_description_test();
    } else {
        if ($updated_theme === $theme) {
            /* Single theme update for the active theme */
            wpseo_description_test();
        }
    }
    return $update_actions;
}
开发者ID:jeetututeja,项目名称:Ingenia,代码行数:28,代码来源:wpseo-non-ajax-functions.php

示例4: initialize

 /**
  * Initialize some options on first install/activate/reset
  *
  * @static
  * @return void
  */
 public static function initialize()
 {
     /* Make sure title_test and description_test function are available even when called
        from the isolated activation */
     require_once WPSEO_PATH . 'inc/wpseo-non-ajax-functions.php';
     //			wpseo_title_test();
     wpseo_description_test();
     /* Force WooThemes to use WordPress SEO data. */
     if (function_exists('woo_version_init')) {
         update_option('seo_woo_use_third_party_data', 'true');
     }
 }
开发者ID:johnreytepacia,项目名称:etarticles,代码行数:18,代码来源:class-wpseo-options.php

示例5: maybe_upgrade


//.........这里部分代码省略.........
             update_option('wpseo_xml', $xml_opt);
         }
         unset($xml_opt);
         // Clean up other no longer used settings
         unset($options['wpseodir'], $options['wpseourl']);
     }
     if (version_compare($current_version, '1.0.2.2', '<')) {
         $opt = (array) get_option('wpseo_indexation');
         unset($opt['hideindexrel'], $opt['hidestartrel'], $opt['hideprevnextpostlink'], $opt['hidewpgenerator']);
         update_option('wpseo_indexation', $opt);
     }
     if (version_compare($current_version, '1.0.4', '<')) {
         $opt = (array) get_option('wpseo_indexation');
         $newopt = array('opengraph' => isset($opt['opengraph']) ? $opt['opengraph'] : '', 'fb_adminid' => isset($opt['fb_adminid']) ? $opt['fb_adminid'] : '', 'fb_appid' => isset($opt['fb_appid']) ? $opt['fb_appid'] : '');
         update_option('wpseo_social', $newopt);
         unset($opt['opengraph'], $opt['fb_pageid'], $opt['fb_adminid'], $opt['fb_appid']);
         update_option('wpseo_indexation', $opt);
     }
     if (version_compare($current_version, '1.2', '<')) {
         $opt = get_option('wpseo_indexation');
         $metaopt = get_option('wpseo_titles');
         $metaopt['noindex-author'] = isset($opt['noindexauthor']) ? $opt['noindexauthor'] : '';
         $metaopt['disable-author'] = isset($opt['disableauthor']) ? $opt['disableauthor'] : '';
         $metaopt['noindex-archive'] = isset($opt['noindexdate']) ? $opt['noindexdate'] : '';
         $metaopt['noindex-category'] = isset($opt['noindexcat']) ? $opt['noindexcat'] : '';
         $metaopt['noindex-post_tag'] = isset($opt['noindextag']) ? $opt['noindextag'] : '';
         $metaopt['noindex-post_format'] = isset($opt['noindexpostformat']) ? $opt['noindexpostformat'] : '';
         $metaopt['noindex-subpages'] = isset($opt['noindexsubpages']) ? $opt['noindexsubpages'] : '';
         $metaopt['hide-rsdlink'] = isset($opt['hidersdlink']) ? $opt['hidersdlink'] : '';
         $metaopt['hide-feedlinks'] = isset($opt['hidefeedlinks']) ? $opt['hidefeedlinks'] : '';
         $metaopt['hide-wlwmanifest'] = isset($opt['hidewlwmanifest']) ? $opt['hidewlwmanifest'] : '';
         $metaopt['hide-shortlink'] = isset($opt['hideshortlink']) ? $opt['hideshortlink'] : '';
         update_option('wpseo_titles', $metaopt);
         delete_option('wpseo_indexation');
         wpseo_title_test();
     }
     // Clean up the wrong wpseo options
     if (version_compare($current_version, '1.2.3', '<')) {
         $opt = get_option('wpseo');
         if (is_array($opt)) {
             foreach ($opt as $key => $val) {
                 if (!in_array($key, array('ignore_blog_public_warning', 'ignore_tour', 'ignore_page_comments', 'ignore_permalink', 'ms_defaults_set', 'version', 'disableadvanced_meta', 'googleverify', 'msverify', 'alexaverify'))) {
                     unset($opt[$key]);
                 }
             }
             update_option('wpseo', $opt);
             unset($opt);
         }
     }
     // Fix wrongness created by buggy version 1.2.2
     if (version_compare($current_version, '1.2.4', '<')) {
         $options = get_option('wpseo_titles');
         if (is_array($options) && isset($options['title-home']) && $options['title-home'] == '%%sitename%% - %%sitedesc%% - 12345') {
             $options['title-home'] = '%%sitename%% - %%sitedesc%%';
             update_option('wpseo_titles', $options);
         }
     }
     if (version_compare($current_version, '1.2.8', '<')) {
         $options = get_option('wpseo');
         if (is_array($options) && isset($options['presstrends'])) {
             $options['yoast_tracking'] = 'on';
             unset($options['presstrends']);
             update_option('wpseo', $options);
         }
     }
     if (version_compare($current_version, '1.2.8.2', '<')) {
         $options = get_option('wpseo');
         if (is_array($options) && isset($options['presstrends'])) {
             $options['yoast_tracking'] = 'on';
             unset($options['presstrends']);
         }
         if (is_array($options) && isset($options['presstrends_popup'])) {
             $options['tracking_popup'] = 'on';
             unset($options['presstrends_popup']);
         }
         update_option('wpseo', $options);
     }
     if (version_compare($current_version, '1.3.2', '<')) {
         $options = get_option('wpseo_xml');
         $options['post_types-attachment-not_in_sitemap'] = true;
         update_option('wpseo_xml', $options);
     }
     if (version_compare($current_version, '1.4.13', '<')) {
         wpseo_description_test();
     }
     if (version_compare($current_version, '1.4.15', '<')) {
         $this->schedule_rewrite_flush();
     }
     if (version_compare($current_version, '1.4.16', '<')) {
         $options = get_option('wpseo_permalinks');
         if (!is_array($options)) {
             $options = array();
         }
         $options['cleanslugs'] = 'on';
         update_option('wpseo_permalinks', $options);
     }
     $options = get_option('wpseo');
     $options['version'] = WPSEO_VERSION;
     update_option('wpseo', $options);
 }
开发者ID:bulats,项目名称:chef,代码行数:101,代码来源:class-admin.php


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