/** * @return bool */ function is_page_included() { global $aioseop_options; if (is_feed()) { return false; } if (aioseop_mrt_exclude_this_page()) { return false; } $post = $this->get_queried_object(); $post_type = ''; if (!empty($post) && !empty($post->post_type)) { $post_type = $post->post_type; } if (empty($aioseop_options['aiosp_enablecpost'])) { $wp_post_types = get_post_types(array('_builtin' => true)); // Don't display meta if SEO isn't enabled on custom post types -- pdb. if (is_singular() && !in_array($post_type, $wp_post_types) && !is_front_page()) { return false; } } else { $wp_post_types = $aioseop_options['aiosp_cpostactive']; if (empty($wp_post_types)) { $wp_post_types = array(); } if (AIOSEOPPRO) { if (is_tax()) { if (empty($aioseop_options['aiosp_taxactive']) || !is_tax($aioseop_options['aiosp_taxactive'])) { return false; } } elseif (is_category()) { if (empty($aioseop_options['aiosp_taxactive']) || !in_array('category', $aioseop_options['aiosp_taxactive'])) { return false; } } elseif (is_tag()) { if (empty($aioseop_options['aiosp_taxactive']) || !in_array('post_tag', $aioseop_options['aiosp_taxactive'])) { return false; } } else { if (!in_array($post_type, $wp_post_types) && !is_front_page() && !is_post_type_archive($wp_post_types) && !is_404()) { return false; } } } else { if (is_singular() && !in_array($post_type, $wp_post_types) && !is_front_page()) { return false; } if (is_post_type_archive() && !is_post_type_archive($wp_post_types)) { return false; } } } $this->meta_opts = $this->get_current_options(array(), 'aiosp'); $aiosp_disable = $aiosp_disable_analytics = false; if (!empty($this->meta_opts)) { if (isset($this->meta_opts['aiosp_disable'])) { $aiosp_disable = $this->meta_opts['aiosp_disable']; } if (isset($this->meta_opts['aiosp_disable_analytics'])) { $aiosp_disable_analytics = $this->meta_opts['aiosp_disable_analytics']; } } if ($aiosp_disable) { if (!$aiosp_disable_analytics) { if (aioseop_option_isset('aiosp_google_analytics_id')) { remove_action('aioseop_modules_wp_head', array($this, 'aiosp_google_analytics')); add_action('wp_head', array($this, 'aiosp_google_analytics')); } } return false; } if (!empty($this->meta_opts) && $this->meta_opts['aiosp_disable'] == true) { return false; } return true; }
function wp_head() { if (is_feed()) { return; } if (aioseop_mrt_exclude_this_page()) { return; } static $aioseop_dup_counter = 0; $aioseop_dup_counter++; if ($aioseop_dup_counter > 1) { echo "\n<!-- Debug Warning: All in One SEO Pack Pro meta data was included again from " . current_filter() . " filter. Called {$aioseop_dup_counter} times! -->\n"; return; } if (is_home() && !is_front_page()) { $post = $this->get_blog_page(); } else { $post = $this->get_queried_object(); } global $wp_query; global $aioseop_options; $meta_string = null; $description = ''; if (is_single() || is_page()) { $aiosp_disable = htmlspecialchars(stripslashes(get_post_meta($post->ID, '_aioseop_disable', true))); if ($aiosp_disable) { return; } if (empty($aioseop_options['aiosp_enablecpost'])) { $wp_post_types = get_post_types(array('_builtin' => true)); // don't display meta if SEO isn't enabled on custom post types -- pdb if (!is_singular($wp_post_types) && !is_front_page()) { return; } } else { if (!empty($aioseop_options['aiosp_cpostadvanced'])) { $wp_post_types = $aioseop_options['aiosp_cpostactive']; if (empty($aioseop_options['aiosp_cpostactive'])) { return; } if (!is_singular($wp_post_types) && !is_front_page()) { return; } } } } $force_rewrites = 1; if (isset($aioseop_options['aiosp_force_rewrites'])) { $force_rewrites = $aioseop_options['aiosp_force_rewrites']; } if (!empty($aioseop_options['aiosp_rewrite_titles']) && $force_rewrites) { // make the title rewrite as short as possible if (function_exists('ob_list_handlers')) { $active_handlers = ob_list_handlers(); } else { $active_handlers = array(); } if (sizeof($active_handlers) > 0 && $this->strtolower($active_handlers[sizeof($active_handlers) - 1]) == $this->strtolower('All_in_One_SEO_Pack::output_callback_for_title')) { ob_end_flush(); } else { $this->log("another plugin interfering?"); // if we get here there *could* be trouble with another plugin :( $this->ob_start_detected = true; if (function_exists('ob_list_handlers')) { foreach (ob_list_handlers() as $handler) { $this->log("detected output handler {$handler}"); } } } } echo "\n<!-- All in One SEO Pack {$this->version} by Michael Torbert of Semper Fi Web Design"; if ($this->ob_start_detected) { echo "ob_start_detected "; } echo "[{$this->title_start},{$this->title_end}] "; echo "-->\n"; $is_front_page = is_front_page(); $is_front_page_keywords = $is_front_page && $aioseop_options['aiosp_home_keywords'] && !$this->is_static_posts_page() || $this->is_static_front_page(); $blog_page = $this->get_blog_page($post); if ($is_front_page_keywords) { $keywords = trim($this->internationalize($aioseop_options['aiosp_home_keywords'])); } elseif ($this->is_static_posts_page() && !$aioseop_options['aiosp_dynamic_postspage_keywords']) { // and if option = use page set keywords instead of keywords from recent posts $keywords = stripslashes($this->internationalize(get_post_meta($post->ID, "_aioseop_keywords", true))); } elseif (!empty($blog_page) && !$aioseop_options['aiosp_dynamic_postspage_keywords']) { $keywords = stripslashes($this->internationalize(get_post_meta($blog_page->ID, "_aioseop_keywords", true))); } else { $keywords = $this->get_all_keywords(); } if (is_category() && $this->show_page_description()) { $description = $this->internationalize(category_description()); } elseif (is_tag() && $this->show_page_description()) { $description = $this->internationalize(tag_description()); } elseif (is_tax() && $this->show_page_description()) { $description = $this->internationalize(term_description()); } elseif (is_author() && $this->show_page_description()) { $description = $this->internationalize(get_the_author_meta('description')); } else { if ($is_front_page) { $description = trim(stripslashes($this->internationalize($aioseop_options['aiosp_home_description']))); } else { if (is_single() || is_page() || is_home() || $this->is_static_posts_page()) { $description = $this->get_aioseop_description($post); } } } /* if ( $this->is_static_front_page() ) $description = trim( stripslashes( $this->internationalize( $aioseop_options['aiosp_home_description'] ) ) ); elseif ( !empty( $blog_page ) ) $description = $this->get_post_description( $blog_page ); if ( empty( $description ) && is_object( $post ) && !is_archive() && empty( $blog_page ) ) $description = $this->get_post_description( $post ); $description = apply_filters( 'aioseop_description', $description ); */ if (isset($description) && $this->strlen($description) > $this->minimum_description_length && !($is_front_page && is_paged())) { $description = trim(strip_tags($description)); $description = str_replace('"', '"', $description); // replace newlines on mac / windows? $description = str_replace("\r\n", ' ', $description); // maybe linux uses this alone $description = str_replace("\n", ' ', $description); if (!isset($meta_string)) { $meta_string = ''; } // description format $description_format = $aioseop_options['aiosp_description_format']; if (!isset($description_format) || empty($description_format)) { $description_format = "%description%"; } $description = str_replace('%description%', apply_filters('aioseop_description_override', $description), $description_format); $description = str_replace('%blog_title%', get_bloginfo('name'), $description); $description = str_replace('%blog_description%', get_bloginfo('description'), $description); $description = str_replace('%wp_title%', $this->get_original_title(), $description); if ($aioseop_options['aiosp_can'] && is_attachment()) { $url = $this->aiosp_mrt_get_url($wp_query); if ($url) { $matches = array(); preg_match_all('/(\\d+)/', $url, $matches); if (is_array($matches)) { $uniqueDesc = join('', $matches[0]); } } $description .= ' ' . $uniqueDesc; } $meta_string .= sprintf("<meta name=\"description\" content=\"%s\" />\n", $description); } $keywords = apply_filters('aioseop_keywords', $keywords); if (isset($aioseop_options['aiosp_togglekeywords'])) { $togglekeywords = $aioseop_options['aiosp_togglekeywords']; } else { $togglekeywords = 0; } if (isset($keywords) && $togglekeywords == 0 && !empty($keywords) && !(is_home() && is_paged())) { if (isset($meta_string)) { $meta_string .= "\n"; } $keywords = wp_filter_nohtml_kses(str_replace('"', '', $keywords)); $meta_string .= sprintf("<meta name=\"keywords\" content=\"%s\" />\n", $keywords); } $is_tag = is_tag(); $robots_meta = ''; if (is_category() && !empty($aioseop_options['aiosp_category_noindex']) || !is_category() && is_archive() && !$is_tag && (is_date() && !empty($aioseop_options['aiosp_archive_date_noindex']) || is_author() && !empty($aioseop_options['aiosp_archive_author_noindex'])) || $is_tag && !empty($aioseop_options['aiosp_tags_noindex']) || is_search() && !empty($aioseop_options['aiosp_search_noindex'])) { $robots_meta = 'noindex,follow'; } else { if (is_single() || is_page()) { $post_type = get_post_type(); $aiosp_noindex = htmlspecialchars(stripslashes(get_post_meta($post->ID, '_aioseop_noindex', true))); $aiosp_nofollow = htmlspecialchars(stripslashes(get_post_meta($post->ID, '_aioseop_nofollow', true))); $aiosp_noodp = htmlspecialchars(stripslashes(get_post_meta($post->ID, '_aioseop_noodp', true))); $aiosp_noydir = htmlspecialchars(stripslashes(get_post_meta($post->ID, '_aioseop_noydir', true))); if ($aiosp_noindex || $aiosp_nofollow || $aiosp_noodp || $aiosp_noydir || !empty($aioseop_options['aiosp_cpostnoindex']) || !empty($aioseop_options['aiosp_cpostnofollow'])) { $noindex = "index"; $nofollow = "follow"; $noodp = $noydir = ''; if ($aiosp_noindex == 'on' || $aiosp_noindex == '' && !empty($aioseop_options['aiosp_cpostnoindex']) && in_array($post_type, $aioseop_options['aiosp_cpostnoindex'])) { $noindex = "no" . $noindex; } if ($aiosp_nofollow == 'on' || $aiosp_nofollow == '' && !empty($aioseop_options['aiosp_cpostnofollow']) && in_array($post_type, $aioseop_options['aiosp_cpostnofollow'])) { $nofollow = "no" . $nofollow; } if ($aiosp_noodp) { $nofollow .= ',noodp'; } if ($aiosp_noydir) { $nofollow .= ',noydir'; } $robots_meta = $noindex . ',' . $nofollow; } } } $robots_meta = apply_filters('aioseop_robots_meta', $robots_meta); if (!empty($robots_meta)) { $meta_string .= '<meta name="robots" content="' . esc_attr($robots_meta) . '" />' . "\n"; } if ($is_front_page) { foreach (array('google' => 'google-site-verification', 'bing' => 'msvalidate.01', 'pinterest' => 'p:domain_verify') as $k => $v) { if (!empty($aioseop_options["aiosp_{$k}_verify"])) { $meta_string .= '<meta name="' . $v . '" content="' . trim(strip_tags($aioseop_options["aiosp_{$k}_verify"])) . '" />' . "\n"; } } } foreach (array('page_meta', 'post_meta', 'home_meta', 'front_meta') as $meta) { if (!empty($aioseop_options["aiosp_{$meta}_tags"])) { ${$meta} = html_entity_decode(stripslashes($aioseop_options["aiosp_{$meta}_tags"])); } else { ${$meta} = ''; } } if (is_page() && isset($page_meta) && !empty($page_meta) && (!$is_front_page || empty($front_meta))) { if (isset($meta_string)) { $meta_string .= "\n"; } $meta_string .= $page_meta; } if (is_single() && isset($post_meta) && !empty($post_meta)) { if (isset($meta_string)) { $meta_string .= "\n"; } $meta_string .= $post_meta; } $googleplus = $publisher = $author = ''; if (!empty($post) && isset($post->post_author) && empty($aioseop_options['aiosp_google_disable_profile'])) { $googleplus = get_the_author_meta('googleplus', $post->post_author); } if (empty($googleplus) && !empty($aioseop_options['aiosp_google_publisher'])) { $googleplus = $aioseop_options['aiosp_google_publisher']; } if ($is_front_page && !empty($aioseop_options['aiosp_google_publisher'])) { $publisher = $aioseop_options['aiosp_google_publisher']; } $publisher = apply_filters('aioseop_google_publisher', $publisher); if (!empty($publisher)) { $meta_string = '<link rel="publisher" href="' . esc_url($publisher) . '" />' . "\n" . $meta_string; } if (is_singular() && !empty($googleplus)) { $author = $googleplus; } else { if (!empty($aioseop_options['aiosp_google_publisher'])) { $author = $aioseop_options['aiosp_google_publisher']; } } $author = apply_filters('aioseop_google_author', $author); if (!empty($author)) { $meta_string = '<link rel="author" href="' . esc_url($author) . '" />' . "\n" . $meta_string; } if ($is_front_page && !empty($front_meta)) { if (isset($meta_string)) { $meta_string .= "\n"; } $meta_string .= $front_meta; } else { if (is_home() && !empty($home_meta)) { if (isset($meta_string)) { $meta_string .= "\n"; } $meta_string .= $home_meta; } } $prev = $next = ''; if (is_home() || is_archive() || is_paged()) { global $wp_query; $max_page = $wp_query->max_num_pages; $page = $this->get_page_number(); if ($page > 1) { $prev = get_previous_posts_page_link(); } if ($page < $max_page) { // $next = get_next_posts_page_link( $max_page ); $paged = $GLOBALS['paged']; if (!is_single()) { if (!$paged) { $paged = 1; } $nextpage = intval($paged) + 1; if (!$max_page || $max_page >= $nextpage) { $next = get_pagenum_link($nextpage); } } } } else { if (is_page() || is_single()) { $numpages = 1; $multipage = 0; $page = get_query_var('page'); if (!$page) { $page = 1; } if (is_single() || is_page() || is_feed()) { $more = 1; } $content = $post->post_content; if (false !== strpos($content, '<!--nextpage-->')) { if ($page > 1) { $more = 1; } $content = str_replace("\n<!--nextpage-->\n", '<!--nextpage-->', $content); $content = str_replace("\n<!--nextpage-->", '<!--nextpage-->', $content); $content = str_replace("<!--nextpage-->\n", '<!--nextpage-->', $content); // Ignore nextpage at the beginning of the content. if (0 === strpos($content, '<!--nextpage-->')) { $content = substr($content, 15); } $pages = explode('<!--nextpage-->', $content); $numpages = count($pages); if ($numpages > 1) { $multipage = 1; } } if (!empty($page)) { if ($page > 1) { $prev = _wp_link_page($page - 1); } if ($page + 1 <= $numpages) { $next = _wp_link_page($page + 1); } } if (!empty($prev)) { $prev = $this->substr($prev, 9, -2); } if (!empty($next)) { $next = $this->substr($next, 9, -2); } } } $prev = apply_filters('aioseop_prev_link', $prev); $next = apply_filters('aioseop_next_link', $next); if (!empty($prev)) { $meta_string .= "<link rel='prev' href='" . esc_url($prev) . "' />\n"; } if (!empty($next)) { $meta_string .= "<link rel='next' href='" . esc_url($next) . "' />\n"; } if ($meta_string != null) { echo "{$meta_string}\n"; } if ($aioseop_options['aiosp_can'] && ($url = $this->aiosp_mrt_get_url($wp_query))) { $url = apply_filters('aioseop_canonical_url', $url); if (!empty($url)) { echo '<link rel="canonical" href="' . esc_url($url) . '" />' . "\n"; } } do_action('aioseop_modules_wp_head'); echo "<!-- /all in one seo pack -->\n"; }
function wp_head() { if (is_feed()) { return; } if (aioseop_mrt_exclude_this_page()) { return; } global $wp_query; global $aioseop_options; $post = $this->get_queried_object(); $meta_string = null; if (is_single() || is_page()) { $aiosp_disable = htmlspecialchars(stripcslashes(get_post_meta($post->ID, '_aioseop_disable', true))); if ($aiosp_disable) { return; } if (empty($aioseop_options['aiosp_enablecpost'])) { $wp_post_types = get_post_types(array('_builtin' => true)); // don't display meta if SEO isn't enabled on custom post types -- pdb if (!is_singular($wp_post_types)) { return; } } else { if (!empty($aioseop_options['aiosp_cpostadvanced'])) { $wp_post_types = $aioseop_options['aiosp_cpostactive']; if (empty($aioseop_options['aiosp_cpostactive'])) { return; } if (!is_singular($wp_post_types)) { return; } } } } $force_rewrites = 1; if (isset($aioseop_options['aiosp_force_rewrites'])) { $force_rewrites = $aioseop_options['aiosp_force_rewrites']; } if (!empty($aioseop_options['aiosp_rewrite_titles']) && $force_rewrites) { // make the title rewrite as short as possible if (function_exists('ob_list_handlers')) { $active_handlers = ob_list_handlers(); } else { $active_handlers = array(); } if (sizeof($active_handlers) > 0 && strtolower($active_handlers[sizeof($active_handlers) - 1]) == strtolower('All_in_One_SEO_Pack::output_callback_for_title')) { ob_end_flush(); } else { $this->log("another plugin interfering?"); // if we get here there *could* be trouble with another plugin :( $this->ob_start_detected = true; if (function_exists('ob_list_handlers')) { foreach (ob_list_handlers() as $handler) { $this->log("detected output handler {$handler}"); } } } } echo "\n<!-- All in One SEO Pack {$this->version} by Michael Torbert of Semper Fi Web Design"; if ($this->ob_start_detected) { echo "ob_start_detected "; } echo "[{$this->title_start},{$this->title_end}] "; echo "-->\n"; $is_front_page = is_front_page(); $is_front_page_keywords = $is_front_page && $aioseop_options['aiosp_home_keywords'] && !$this->is_static_posts_page() || $this->is_static_front_page(); $page_for_posts = get_option('page_for_posts'); $blog_page = ''; if ($page_for_posts && (!is_object($post) || $page_for_posts != $post->ID) && is_home()) { $blog_page = get_post($page_for_posts); } if ($is_front_page_keywords) { $keywords = trim($this->internationalize($aioseop_options['aiosp_home_keywords'])); } elseif ($this->is_static_posts_page() && !$aioseop_options['aiosp_dynamic_postspage_keywords']) { // and if option = use page set keywords instead of keywords from recent posts $keywords = stripcslashes($this->internationalize(get_post_meta($post->ID, "_aioseop_keywords", true))); } elseif (!empty($blog_page) && !$aioseop_options['aiosp_dynamic_postspage_keywords']) { $keywords = stripcslashes($this->internationalize(get_post_meta($blog_page->ID, "_aioseop_keywords", true))); } else { $keywords = $this->get_all_keywords(); } if (is_category() && $this->show_page_description()) { $description = $this->internationalize(category_description()); } elseif (is_tag() && $this->show_page_description()) { $description = $this->internationalize(tag_description()); } elseif (is_tax() && $this->show_page_description()) { $description = $this->internationalize(term_description()); } elseif (is_author() && $this->show_page_description()) { $description = $this->internationalize(get_the_author_meta('description')); } else { if ($is_front_page) { $description = trim(stripcslashes($this->internationalize($aioseop_options['aiosp_home_description']))); } else { if (is_single() || is_page() || is_home() || $this->is_static_posts_page()) { if ($this->is_static_front_page()) { $description = trim(stripcslashes($this->internationalize($aioseop_options['aiosp_home_description']))); } elseif (!empty($blog_page)) { $description = $this->get_post_description($blog_page); } } } } if (empty($description) && is_object($post) && !is_archive() && empty($blog_page)) { $description = $this->get_post_description($post); } $description = apply_filters('aioseop_description', $description); if (isset($description) && strlen($description) > $this->minimum_description_length && !($is_front_page && is_paged())) { $description = trim(strip_tags($description)); $description = str_replace('"', '', $description); // replace newlines on mac / windows? $description = str_replace("\r\n", ' ', $description); // maybe linux uses this alone $description = str_replace("\n", ' ', $description); if (!isset($meta_string)) { $meta_string = ''; } // description format $description_format = $aioseop_options['aiosp_description_format']; if (!isset($description_format) || empty($description_format)) { $description_format = "%description%"; } $description = str_replace('%description%', apply_filters('aioseop_description_override', $description), $description_format); $description = str_replace('%blog_title%', get_bloginfo('name'), $description); $description = str_replace('%blog_description%', get_bloginfo('description'), $description); $description = str_replace('%wp_title%', $this->get_original_title(), $description); if ($aioseop_options['aiosp_can'] && is_attachment()) { $url = $this->aiosp_mrt_get_url($wp_query); if ($url) { $matches = array(); preg_match_all('/(\\d+)/', $url, $matches); if (is_array($matches)) { $uniqueDesc = join('', $matches[0]); } } $description .= ' ' . $uniqueDesc; } $meta_string .= sprintf("<meta name=\"description\" content=\"%s\" />\n", $description); } $keywords = apply_filters('aioseop_keywords', $keywords); if (isset($aioseop_options['aiosp_togglekeywords'])) { $togglekeywords = $aioseop_options['aiosp_togglekeywords']; } else { $togglekeywords = 0; } if (isset($keywords) && $togglekeywords == 0 && !empty($keywords) && !(is_home() && is_paged())) { if (isset($meta_string)) { $meta_string .= "\n"; } $keywords = str_replace('"', '', $keywords); $meta_string .= sprintf("<meta name=\"keywords\" content=\"%s\" />\n", $keywords); } $is_tag = is_tag(); if (is_category() && $aioseop_options['aiosp_category_noindex'] || !is_category() && is_archive() && !$is_tag && $aioseop_options['aiosp_archive_noindex'] || $aioseop_options['aiosp_tags_noindex'] && $is_tag) { $meta_string .= '<meta name="robots" content="noindex,follow" />' . "\n"; } else { if (is_single() || is_page()) { $aiosp_noindex = htmlspecialchars(stripcslashes(get_post_meta($post->ID, '_aioseop_noindex', true))); $aiosp_nofollow = htmlspecialchars(stripcslashes(get_post_meta($post->ID, '_aioseop_nofollow', true))); if ($aiosp_noindex || $aiosp_nofollow) { $noindex = "index"; $nofollow = "follow"; if ($aiosp_noindex) { $noindex = "no" . $noindex; } if ($aiosp_nofollow) { $nofollow = "no" . $nofollow; } $meta_string .= '<meta name="robots" content="' . $noindex . ',' . $nofollow . '" />' . "\n"; } } } if ($is_front_page) { foreach (array('google' => 'google-site-verification', 'bing' => 'msvalidate.01', 'pinterest' => 'p:domain_verify') as $k => $v) { if (!empty($aioseop_options["aiosp_{$k}_verify"])) { $meta_string .= '<meta name="' . $v . '" content="' . trim(strip_tags($aioseop_options["aiosp_{$k}_verify"])) . '" />' . "\n"; } } } foreach (array('page_meta', 'post_meta', 'home_meta', 'front_meta') as $meta) { if (!empty($aioseop_options["aiosp_{$meta}_tags"])) { ${$meta} = html_entity_decode(stripcslashes($aioseop_options["aiosp_{$meta}_tags"])); } else { ${$meta} = ''; } } if (is_page() && isset($page_meta) && !empty($page_meta) && (!$is_front_page || empty($front_meta))) { if (isset($meta_string)) { $meta_string .= "\n"; } $meta_string .= $page_meta; } if (is_single() && isset($post_meta) && !empty($post_meta)) { if (isset($meta_string)) { $meta_string .= "\n"; } $meta_string .= $post_meta; } if (!empty($post) && isset($post->post_author) && empty($aioseop_options['aiosp_google_disable_profile'])) { $googleplus = get_the_author_meta('googleplus', $post->post_author); } if (empty($googleplus) && !empty($aioseop_options['aiosp_google_publisher'])) { $googleplus = $aioseop_options['aiosp_google_publisher']; } if ($is_front_page && !empty($aioseop_options['aiosp_google_publisher'])) { $meta_string = '<link rel="publisher" href="' . $aioseop_options['aiosp_google_publisher'] . '" />' . "\n" . $meta_string; } if (is_singular() && $googleplus) { $meta_string = '<link rel="author" href="' . $googleplus . '" />' . "\n" . $meta_string; } else { if (!empty($aioseop_options['aiosp_google_publisher'])) { $meta_string = '<link rel="author" href="' . $aioseop_options['aiosp_google_publisher'] . '" />' . "\n" . $meta_string; } } if ($is_front_page && !empty($front_meta)) { if (isset($meta_string)) { $meta_string .= "\n"; } $meta_string .= $front_meta; } else { if (is_home() && !empty($home_meta)) { if (isset($meta_string)) { $meta_string .= "\n"; } $meta_string .= $home_meta; } } if ($meta_string != null) { echo "{$meta_string}\n"; } if ($aioseop_options['aiosp_can'] && ($url = $this->aiosp_mrt_get_url($wp_query))) { $url = apply_filters('aioseop_canonical_url', $url); echo "" . '<link rel="canonical" href="' . $url . '" />' . "\n"; } do_action('aioseop_modules_wp_head'); echo "<!-- /all in one seo pack -->\n"; }