/** * Class constructor */ public function __construct() { $this->options = WPSEO_Options::get_all(); $this->shown_images = array(); // Instantiate as empty array $this->twitter(); }
/** * Translate text strings for use in the meta box * * IMPORTANT: if you want to add a new string (option) somewhere, make sure you add that array key to * the main meta box definition array in the class WPSEO_Meta() as well!!!! */ public static function translate_meta_boxes() { /* translators: %s expands to the social network's name */ $title_text = __('If you don\'t want to use the post title for sharing the post on %s but instead want another title there, write it here.', 'wordpress-seo'); /* translators: %s expands to the social network's name */ $description_text = __('If you don\'t want to use the meta description for sharing the post on %s but want another description there, write it here.', 'wordpress-seo'); /* translators: %s expands to the social network's name */ $image_text = __('If you want to override the image used on %s for this post, upload / choose an image or add the URL here.', 'wordpress-seo'); /* translators: %1$s expands to the social network, %2$s to the recommended image size */ $image_size_text = __('The recommended image size for %1$s is %2$spx.', 'wordpress-seo'); $options = WPSEO_Options::get_all(); $social_networks = array('opengraph' => __('Facebook', 'wordpress-seo'), 'twitter' => __('Twitter', 'wordpress-seo'), 'googleplus' => __('Google+', 'wordpress-seo')); // Source: https://blog.bufferapp.com/ideal-image-sizes-social-media-posts. $recommended_image_sizes = array('opengraph' => '1200 x 628', 'twitter' => '1024 x 512', 'google-plus' => '800 x 1200'); foreach ($social_networks as $network => $label) { if (true === $options[$network]) { if ('googleplus' == $network) { $network = 'google-plus'; // Yuck, I know. } self::$meta_fields['social'][$network . '-title']['title'] = sprintf(__('%s Title', 'wordpress-seo'), $label); self::$meta_fields['social'][$network . '-title']['description'] = sprintf($title_text, $label); self::$meta_fields['social'][$network . '-description']['title'] = sprintf(__('%s Description', 'wordpress-seo'), $label); self::$meta_fields['social'][$network . '-description']['description'] = sprintf($description_text, $label); self::$meta_fields['social'][$network . '-image']['title'] = sprintf(__('%s Image', 'wordpress-seo'), $label); self::$meta_fields['social'][$network . '-image']['description'] = sprintf($image_text, $label) . ' ' . sprintf($image_size_text, $label, $recommended_image_sizes[$network]); } } }
/** * Class constructor. */ public function __construct() { $this->options = WPSEO_Options::get_all(); global $fb_ver; if (isset($fb_ver) || class_exists('Facebook_Loader')) { add_filter('fb_meta_tags', array($this, 'facebook_filter'), 10, 1); } else { add_filter('language_attributes', array($this, 'add_opengraph_namespace')); add_action('wpseo_opengraph', array($this, 'locale'), 1); add_action('wpseo_opengraph', array($this, 'type'), 5); add_action('wpseo_opengraph', array($this, 'og_title'), 10); add_action('wpseo_opengraph', array($this, 'site_owner'), 20); add_action('wpseo_opengraph', array($this, 'description'), 11); add_action('wpseo_opengraph', array($this, 'url'), 12); add_action('wpseo_opengraph', array($this, 'site_name'), 13); add_action('wpseo_opengraph', array($this, 'website_facebook'), 14); if (is_singular() && !is_front_page()) { add_action('wpseo_opengraph', array($this, 'article_author_facebook'), 15); add_action('wpseo_opengraph', array($this, 'tags'), 16); add_action('wpseo_opengraph', array($this, 'category'), 17); add_action('wpseo_opengraph', array($this, 'publish_date'), 19); } add_action('wpseo_opengraph', array($this, 'image'), 30); } remove_action('wp_head', 'jetpack_og_tags'); add_action('wpseo_head', array($this, 'opengraph'), 30); }
/** * Get Options * * @return array */ protected function get_options() { if (!isset(self::$options)) { self::$options = WPSEO_Options::get_all(); } return self::$options; }
/** * Class constructor */ function __construct() { $this->options = WPSEO_Options::get_all(); if (is_multisite()) { WPSEO_Options::maybe_set_multisite_defaults(false); } if ($this->options['stripcategorybase'] === true) { add_action('created_category', array($this, 'schedule_rewrite_flush')); add_action('edited_category', array($this, 'schedule_rewrite_flush')); add_action('delete_category', array($this, 'schedule_rewrite_flush')); } $this->page_gsc = new WPSEO_GSC(); $this->dashboard_widget = new Yoast_Dashboard_Widget(); // Needs the lower than default priority so other plugins can hook underneath it without issue. add_action('admin_menu', array($this, 'register_settings_page'), 5); add_action('network_admin_menu', array($this, 'register_network_settings_page')); add_filter('plugin_action_links_' . WPSEO_BASENAME, array($this, 'add_action_link'), 10, 2); add_action('admin_enqueue_scripts', array($this, 'config_page_scripts')); if ('0' == get_option('blog_public')) { add_action('admin_footer', array($this, 'blog_public_warning')); } if ((isset($this->options['theme_has_description']) && $this->options['theme_has_description'] === true || $this->options['theme_description_found'] !== '') && $this->options['ignore_meta_description_warning'] !== true) { add_action('admin_footer', array($this, 'meta_description_warning')); } if ($this->options['cleanslugs'] === true) { add_filter('name_save_pre', array($this, 'remove_stopwords_from_slug'), 0); } add_filter('user_contactmethods', array($this, 'update_contactmethods'), 10, 1); add_action('after_switch_theme', array($this, 'switch_theme')); add_action('switch_theme', array($this, 'switch_theme')); add_filter('set-screen-option', array($this, 'save_bulk_edit_options'), 10, 3); add_action('admin_init', array('WPSEO_Plugin_Conflict', 'hook_check_for_plugin_conflicts'), 10, 1); add_action('admin_init', array($this, 'import_plugin_hooks')); WPSEO_Utils::register_cache_clear_option('wpseo', ''); }
/** * Hooked into transition_post_status. Will initiate search engine pings * if the post is being published, is a post type that a sitemap is built for * and is a post that is included in sitemaps. * * @param string $new_status New post status. * @param string $old_status Old post status. * @param \WP_Post $post Post object. */ function status_transition($new_status, $old_status, $post) { if ($new_status != 'publish') { return; } wp_cache_delete('lastpostmodified:gmt:' . $post->post_type, 'timeinfo'); // #17455. $options = WPSEO_Options::get_all(); if (isset($options['post_types-' . $post->post_type . '-not_in_sitemap']) && $options['post_types-' . $post->post_type . '-not_in_sitemap'] === true) { return; } if (WP_CACHE) { wp_schedule_single_event(time() + 300, 'wpseo_hit_sitemap_index'); } /** * Filter: 'wpseo_allow_xml_sitemap_ping' - Check if pinging is not allowed (allowed by default) * * @api boolean $allow_ping The boolean that is set to true by default. */ if (apply_filters('wpseo_allow_xml_sitemap_ping', true) === false) { return; } // Allow the pinging to happen slightly after the hit sitemap index so the sitemap is fully regenerated when the ping happens. $excluded_posts = explode(',', $options['excluded-posts']); if (!in_array($post->ID, $excluded_posts)) { if (defined('YOAST_SEO_PING_IMMEDIATELY') && YOAST_SEO_PING_IMMEDIATELY) { wpseo_ping_search_engines(); } else { wp_schedule_single_event(time() + 300, 'wpseo_ping_search_engines'); } } }
/** * Class constructor */ public function __construct() { $this->options = WPSEO_Options::get_all(); WPSEO_Options::maybe_set_multisite_defaults(false); $this->init(); if (version_compare($this->options['version'], '1.5.0', '<')) { $this->upgrade_15($this->options['version']); } if (version_compare($this->options['version'], '2.0', '<')) { $this->upgrade_20(); } if (version_compare($this->options['version'], '2.1', '<')) { $this->upgrade_21(); } if (version_compare($this->options['version'], '2.2', '<')) { $this->upgrade_22(); } if (version_compare($this->options['version'], '2.3', '<')) { $this->upgrade_23(); } if (version_compare($this->options['version'], '3.0', '<')) { $this->upgrade_30(); } /** * Filter: 'wpseo_run_upgrade' - Runs the upgrade hook which are dependent on Yoast SEO * * @api string - The current version of Yoast SEO */ do_action('wpseo_run_upgrade', $this->options['version']); $this->finish_up(); }
/** * Class constructor */ public function __construct() { $this->options = WPSEO_Options::get_all(); add_action('wpseo_head', array($this, 'json_ld'), 90); add_action('wpseo_json_ld', array($this, 'website'), 10); add_action('wpseo_json_ld', array($this, 'organization_or_person'), 20); }
/** * Update the query vars with the redirect var when stripcategorybase is active * * @param array $query_vars Main query vars to filter. * * @return array */ function query_vars($query_vars) { $options = WPSEO_Options::get_all(); if ($options['stripcategorybase'] === true) { $query_vars[] = 'wpseo_category_redirect'; } return $query_vars; }
/** * @covers WPSEO_Rewrite::query_vars */ public function test_query_vars() { $this->assertEquals(array(), self::$class_instance->query_vars(array())); $options = WPSEO_Options::get_all(); $options['stripcategorybase'] = true; update_option(WPSEO_Option_Permalinks::get_instance()->option_name, $options); $this->assertEquals(array('wpseo_category_redirect'), self::$class_instance->query_vars(array())); }
/** * Add the inputs needed for SEO values to the User Profile page * * @param object $user */ public function user_profile($user) { if (!current_user_can('edit_users')) { return; } $options = WPSEO_Options::get_all(); wp_nonce_field('wpseo_user_profile_update', 'wpseo_nonce'); require_once 'views/user-profile.php'; }
/** * Generates the html for the snippet preview containing dynamically generated text components. * Those components are included as properties which are set in the constructor. * * @param object $post * @param string $title * @param string $description */ public function __construct($post, $title, $description) { $this->options = WPSEO_Options::get_all(); $this->post = $post; $this->title = esc_html($title); $this->description = esc_html($description); $this->set_date(); $this->set_url(); $this->set_content(); }
function ubik_seo_yoast_twitter_init() { if (is_singular() && class_exists('WPSEO_Options')) { $options = WPSEO_Options::get_all(); if ($options['twitter'] === true) { add_action('wpseo_head', 'ubik_seo_yoast_twitter_images', 41); add_filter('wpseo_twitter_image', '__return_empty_string'); // Completely hijack the output; necessary as Yoast's Twitter class privatizes the functions we need access to } } }
/** * Getting the posts from the database by doing a WP_Query. * * @param integer $paged The page. * * @return string */ private function get_posts($paged) { $post_query = new WP_Query(array_merge($this->query_fields, array('posts_per_page' => $this->posts_per_page, 'paged' => $paged, 'posts' => array()))); if ($posts = $post_query->get_posts()) { $this->options = WPSEO_Options::get_all(); $parsed_posts = $this->parse_posts($posts); $response = array('posts' => $parsed_posts, 'total_posts' => count($parsed_posts), 'next_page' => $paged + 1); return json_encode($response); } return ''; }
/** * Class constructor */ public function __construct() { $this->options = WPSEO_Options::get_all(); WPSEO_Options::maybe_set_multisite_defaults(false); $this->init(); if (version_compare($this->options['version'], '1.5.0', '<')) { $this->upgrade_15($this->options['version']); } if (version_compare($this->options['version'], '2.0', '<')) { $this->upgrade_20(); } $this->finish_up(); }
/** * Gets the items to recalculate * * @param int $paged The current page number. * * @return array Items that can be recalculated. */ public function get_items_to_recalculate($paged) { $return = array(); $paged = abs($paged); $this->options = WPSEO_Options::get_all(); $items = $this->get_items($paged); $return['items'] = $this->parse_items($items); $return['total_items'] = count($items); if ($return['total_items'] >= $this->items_per_page) { $return['next_page'] = $paged + 1; } return $return; }
/** * Class constructor */ public function __construct() { $this->options = WPSEO_Options::get_all(); $GLOBALS['wpseo_admin'] = new WPSEO_Admin(); $this->pagenow = $GLOBALS['pagenow']; $this->load_meta_boxes(); $this->load_taxonomy_class(); $this->load_admin_page_class(); $this->load_admin_user_class(); $this->load_yoast_tracking(); $this->load_tour(); $this->load_xml_sitemaps_admin(); }
/** * Class constructor */ function __construct() { if (!defined('ENT_XML1')) { define('ENT_XML1', 16); } add_action('template_redirect', array($this, 'redirect'), 9); add_filter('redirect_canonical', array($this, 'canonical')); add_action('wpseo_hit_sitemap_index', array($this, 'hit_sitemap_index')); // default stylesheet $this->stylesheet = '<?xml-stylesheet type="text/xsl" href="' . preg_replace('/(^http[s]?:)/', '', esc_url(home_url('main-sitemap.xsl'))) . '"?>'; $this->options = WPSEO_Options::get_all(); $this->max_entries = $this->options['entries-per-page']; $this->home_url = home_url(); }
/** * Class constructor */ public function __construct() { $this->options = WPSEO_Options::get_all(); $GLOBALS['wpseo_admin'] = new WPSEO_Admin(); $this->pagenow = $GLOBALS['pagenow']; add_action('admin_init', array($this, 'redirect_to_about_page'), 15); $this->load_meta_boxes(); $this->load_taxonomy_class(); $this->load_admin_page_class(); $this->load_admin_user_class(); $this->load_yoast_tracking(); $this->load_tour(); $this->load_xml_sitemaps_admin(); }
/** * Create the breadcrumb */ private function __construct() { $this->options = WPSEO_Options::get_all(); $this->post = isset($GLOBALS['post']) ? $GLOBALS['post'] : null; $this->show_on_front = get_option('show_on_front'); $this->page_for_posts = get_option('page_for_posts'); $this->filter_element(); $this->filter_separator(); $this->filter_wrapper(); $this->set_crumbs(); $this->prepare_links(); $this->links_to_string(); $this->wrap_breadcrumb(); }
function __construct() { $this->options = WPSEO_Options::get_all(); global $ect_wpseo_front, $easy_translation_manager_plugin; $default_languash = etm_tools_retrive_options('default_language'); if ($easy_translation_manager_plugin->show_lang_status and $easy_translation_manager_plugin->selectede_lang != $default_languash) { $this->selectede_lang = $easy_translation_manager_plugin->selectede_lang; } if ($this->selectede_lang != '') { add_action('wp_head', array($this, 'head'), 1); add_filter('wp_title', array($this, 'title'), 20, 3); add_filter('thematic_doctitle', array($this, 'title'), 20); } }
/** * Class constructor */ public function __construct() { $this->options = WPSEO_Options::get_all(); $GLOBALS['wpseo_admin'] = new WPSEO_Admin(); $this->pagenow = $GLOBALS['pagenow']; add_action('admin_enqueue_scripts', array($this, 'enqueue_dismissible')); add_action('admin_init', array($this, 'after_update_notice'), 15); $this->load_meta_boxes(); $this->load_taxonomy_class(); $this->load_admin_page_class(); $this->load_admin_user_class(); $this->ignore_tour(); $this->load_tour(); $this->load_xml_sitemaps_admin(); }
/** * Class constructor */ public function __construct() { add_action('add_meta_boxes', array($this, 'add_meta_box')); add_action('admin_enqueue_scripts', array($this, 'enqueue')); add_action('wp_insert_post', array($this, 'save_postdata')); add_action('edit_attachment', array($this, 'save_postdata')); add_action('add_attachment', array($this, 'save_postdata')); add_action('post_submitbox_start', array($this, 'publish_box')); add_action('admin_init', array($this, 'setup_page_analysis')); add_action('admin_init', array($this, 'translate_meta_boxes')); add_action('admin_footer', array($this, 'template_keyword_tab')); $this->options = WPSEO_Options::get_all(); // Check if on of the social settings is checked in the options, if so, initialize the social_admin object. if ($this->options['opengraph'] === true || $this->options['twitter'] === true || $this->options['googleplus'] === true) { $this->social_admin = new WPSEO_Social_Admin($this->options); } }
/** * Class constructor */ public function __construct() { add_action('after_setup_theme', array($this, 'reduce_query_load'), 99); add_action('pre_get_posts', array($this, 'redirect'), 1); add_action('wpseo_hit_sitemap_index', array($this, 'hit_sitemap_index')); add_action('wpseo_ping_search_engines', array(__CLASS__, 'ping_search_engines')); $options = WPSEO_Options::get_all(); $this->max_entries = $options['entries-per-page']; $this->timezone = new WPSEO_Sitemap_Timezone(); $this->router = new WPSEO_Sitemaps_Router(); $this->renderer = new WPSEO_Sitemaps_Renderer(); $this->cache = new WPSEO_Sitemaps_Cache(); $this->providers = array(new WPSEO_Post_Type_Sitemap_Provider(), new WPSEO_Taxonomy_Sitemap_Provider(), new WPSEO_Author_Sitemap_Provider()); if (!empty($_SERVER['SERVER_PROTOCOL'])) { $this->http_protocol = sanitize_text_field($_SERVER['SERVER_PROTOCOL']); } }
/** * Class constructor */ function __construct() { if (!defined('ENT_XML1')) { define('ENT_XML1', 16); } add_action('after_setup_theme', array($this, 'reduce_query_load'), 99); add_filter('posts_where', array($this, 'invalidate_main_query')); add_action('pre_get_posts', array($this, 'redirect'), 1); add_filter('redirect_canonical', array($this, 'canonical')); add_action('wpseo_hit_sitemap_index', array($this, 'hit_sitemap_index')); // default stylesheet $this->stylesheet = '<?xml-stylesheet type="text/xsl" href="' . preg_replace('/(^http[s]?:)/', '', esc_url(home_url('main-sitemap.xsl'))) . '"?>'; $this->options = WPSEO_Options::get_all(); $this->max_entries = $this->options['entries-per-page']; $this->home_url = home_url(); $this->charset = get_bloginfo('charset'); }
/** * Get set of sitemap link data. * * @param string $type Sitemap type. * @param int $max_entries Entries per sitemap. * @param int $current_page Current page of the sitemap. * * @return array */ public function get_sitemap_links($type, $max_entries, $current_page) { $options = WPSEO_Options::get_all(); $links = array(); if ($options['disable-author'] === true || $options['disable_author_sitemap'] === true) { return $links; } $steps = $max_entries; $offset = $current_page > 1 ? ($current_page - 1) * $max_entries : 0; // Initial query to fill in missing usermeta with the current timestamp. $users = get_users(array('who' => 'authors', 'meta_query' => array(array('key' => '_yoast_wpseo_profile_updated', 'value' => 'needs-a-value-anyway', 'compare' => 'NOT EXISTS')))); foreach ($users as $user) { update_user_meta($user->ID, '_yoast_wpseo_profile_updated', time()); } unset($users, $user); // Query for users with this meta. $users = get_users(array('who' => 'authors', 'offset' => $offset, 'number' => $steps, 'meta_key' => '_yoast_wpseo_profile_updated', 'orderby' => 'meta_value_num', 'order' => 'ASC')); /** * Filter the authors, included in XML sitemap. * * @param array $users Array of user objects to filter. */ $users = apply_filters('wpseo_sitemap_exclude_author', $users); // TODO deduplicate filter. R. if (empty($users)) { $users = array(); } // Ascending sort. usort($users, array($this, 'user_map_sorter')); foreach ($users as $user) { $author_link = get_author_posts_url($user->ID); if (empty($author_link)) { continue; } $url = array('loc' => $author_link, 'pri' => 0.8, 'chf' => WPSEO_Sitemaps::filter_frequency('author_archive', 'daily', $author_link), 'mod' => date('c', isset($user->_yoast_wpseo_profile_updated) ? $user->_yoast_wpseo_profile_updated : time())); /** This filter is documented at inc/sitemaps/class-post-type-sitemap-provider.php */ $url = apply_filters('wpseo_sitemap_entry', $url, 'user', $user); if (!empty($url)) { $links[] = $url; } } unset($user, $author_link, $url); return $links; }
/** * Class constructor */ public function __construct() { $this->options = WPSEO_Options::get_all(); $GLOBALS['wpseo_admin'] = new WPSEO_Admin(); $this->pagenow = $GLOBALS['pagenow']; add_action('admin_enqueue_scripts', array($this, 'enqueue_dismissible')); add_action('admin_init', array($this, 'after_update_notice'), 15); add_action('admin_init', array($this, 'tagline_notice'), 15); add_action('admin_init', array($this, 'ga_compatibility_notice'), 15); add_action('admin_init', array($this, 'recalculate_notice'), 15); add_action('admin_init', array($this, 'ignore_tour')); add_action('admin_init', array($this, 'load_tour')); add_action('admin_init', array($this, 'show_hook_deprecation_warnings')); $this->load_meta_boxes(); $this->load_taxonomy_class(); $this->load_admin_page_class(); $this->load_admin_user_class(); $this->load_xml_sitemaps_admin(); }
/** * Translate text strings for use in the meta box * * IMPORTANT: if you want to add a new string (option) somewhere, make sure you add that array key to * the main meta box definition array in the class WPSEO_Meta() as well!!!! */ public static function translate_meta_boxes() { $title_text = __('If you don\'t want to use the post title for sharing the post on %s but instead want another title there, write it here.', 'wordpress-seo'); $description_text = __('If you don\'t want to use the meta description for sharing the post on %s but want another description there, write it here.', 'wordpress-seo'); $image_text = __('If you want to override the image used on %s for this post, upload / choose an image or add the URL here.', 'wordpress-seo'); $options = WPSEO_Options::get_all(); foreach (array('opengraph' => __('Facebook', 'wordpress-seo'), 'twitter' => __('Twitter', 'wordpress-seo'), 'googleplus' => __('Google+', 'wordpress-seo')) as $network => $label) { if (true === $options[$network]) { if ('googleplus' == $network) { $network = 'google-plus'; // Yuck, I know. } self::$meta_fields['social'][$network . '-title']['title'] = sprintf(__('%s Title', 'wordpress-seo'), $label); self::$meta_fields['social'][$network . '-title']['description'] = sprintf($title_text, $label); self::$meta_fields['social'][$network . '-description']['title'] = sprintf(__('%s Description', 'wordpress-seo'), $label); self::$meta_fields['social'][$network . '-description']['description'] = sprintf($description_text, $label); self::$meta_fields['social'][$network . '-image']['title'] = sprintf(__('%s Image', 'wordpress-seo'), $label); self::$meta_fields['social'][$network . '-image']['description'] = sprintf($image_text, $label); } } }
/** * This function modifies the output for a single breadcrumb. * * The default output is not modified, instead a completely new output is generated. * If the default link output contains a rel attribute with the value 'v:url' (which is added by WordPress SEO for every but the last link), URL and text are output. * Otherwise it is the current page for which only the text is printed out. * * In this method the Schema.org markup for a single breadcrumb is added, and the link counter (class variable) is increased by 1 (for each link). * * @param string $link_output the default output created by the WordPress SEO plugin * @param array $link an array containing data for the breadcrumb link (with fields 'url' and 'text') * @return string the output for a single breadcrumb link */ public function modify_breadcrumb_element($link_output, $link) { $output = ''; if (isset($link['url']) && substr_count($link_output, 'rel="v:url"') > 0) { $output .= '<a href="' . esc_attr($link['url']) . '"><span itemprop="itemListElement">' . $link['text'] . '</span></a>'; } else { $opt = array(); if (class_exists('WPSEO_Options')) { $opt = WPSEO_Options::get_all(); } else { $opt = get_wpseo_options(); } if (isset($opt['breadcrumbs-boldlast']) && $opt['breadcrumbs-boldlast']) { $output .= '<strong class="breadcrumb_last" itemprop="itemListElement">' . $link['text'] . '</strong>'; } else { $output .= '<span class="breadcrumb_last" itemprop="itemListElement">' . $link['text'] . '</span>'; } } $this->breadcrumb_link_counter++; return $output; }
/** * Hooked into transition_post_status. Will initiate search engine pings * if the post is being published, is a post type that a sitemap is built for * and is a post that is included in sitemaps. */ function status_transition($new_status, $old_status, $post) { if ($new_status != 'publish') { return; } wp_cache_delete('lastpostmodified:gmt:' . $post->post_type, 'timeinfo'); // #17455 $options = WPSEO_Options::get_all(); if (isset($options['post_types-' . $post->post_type . '-not_in_sitemap']) && $options['post_types-' . $post->post_type . '-not_in_sitemap'] === true) { return; } if (WP_CACHE) { wp_schedule_single_event(time() + 300, 'wpseo_hit_sitemap_index'); } // Allow the pinging to happen slightly after the hit sitemap index so the sitemap is fully regenerated when the ping happens. if (WPSEO_Meta::get_value('sitemap-include', $post->ID) !== 'never') { if (defined('YOAST_SEO_PING_IMMEDIATELY') && YOAST_SEO_PING_IMMEDIATELY) { wpseo_ping_search_engines(); } else { wp_schedule_single_event(time() + 300, 'wpseo_ping_search_engines'); } } }