/** * 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. * * @todo Potentially schedule a cron event instead so that pinging runs in the background. */ function status_transition($new_status, $old_status, $post) { if ($new_status != 'publish') { return; } wp_cache_delete('lastpostmodified:gmt:' . $post->post_type, 'timeinfo'); // #17455 $options = get_mervin_options(); if (isset($options['post_types-' . $post->post_type . '-not_in_sitemap']) && $options['post_types-' . $post->post_type . '-not_in_sitemap']) { return; } if (WP_CACHE) { wp_schedule_single_event(time(), 'zeo_hit_sitemap_index'); } if (zeo_get_value('sitemap-include', $post->ID) != 'never') { $this->ping_search_engines(); } }
function get_bc_title($id_or_name, $type = 'post_type') { $bctitle = zeo_get_value('bctitle', $id_or_name); return !empty($bctitle) ? $bctitle : strip_tags(get_the_title($id_or_name)); }