From b7b0880526f65fde19c92aeb7a1f482b87a666f4 Mon Sep 17 00:00:00 2001 From: Michael Torbert Date: Fri, 10 Mar 2017 14:50:52 -0500 Subject: [PATCH] remove odp functionality #758 --- aioseop_class.php | 54 ++++------------------------------------------- 1 file changed, 4 insertions(+), 50 deletions(-) diff --git a/aioseop_class.php b/aioseop_class.php index 5174d7f71..5e9550b76 100644 --- a/aioseop_class.php +++ b/aioseop_class.php @@ -215,8 +215,6 @@ function __construct() { 'tax_noindex' => __( 'Check this to ask search engines not to index custom Taxonomy archive pages. Useful for avoiding duplicate content.', 'all-in-one-seo-pack' ), 'paginated_noindex' => __( 'Check this to ask search engines not to index paginated pages/posts. Useful for avoiding duplicate content.', 'all-in-one-seo-pack' ), 'paginated_nofollow' => __( 'Check this to ask search engines not to follow links from paginated pages/posts. Useful for avoiding duplicate content.', 'all-in-one-seo-pack' ), - 'noodp' => __( 'Check this box to ask search engines not to use descriptions from the Open Directory Project for your entire site.', 'all-in-one-seo-pack' ), - 'cpostnoodp' => __( 'Set the default noodp setting for each Post Type.', 'all-in-one-seo-pack' ), 'skip_excerpt' => __( "This option will auto generate your meta descriptions from your post content instead of your post excerpt. This is useful if you want to use your content for your autogenerated meta descriptions instead of the excerpt. WooCommerce users should read the documentation regarding this setting.", 'all-in-one-seo-pack' ), 'generate_descriptions' => __( 'Check this and your Meta Descriptions will be auto-generated from your excerpt or content.', 'all-in-one-seo-pack' ), 'run_shortcodes' => __( 'Check this and shortcodes will get executed for descriptions auto-generated from content.', 'all-in-one-seo-pack' ), @@ -291,7 +289,6 @@ function __construct() { 'ga_enhanced_ecommerce' => '#enhanced-ecommerce', 'cpostnoindex' => '#noindex', 'cpostnofollow' => '#nofollow', - 'cpostnoodp' => '#noodp', 'category_noindex' => '#noindex-settings', 'archive_date_noindex' => '#noindex-settings', 'archive_author_noindex' => '#noindex-settings', @@ -301,7 +298,6 @@ function __construct() { 'tax_noindex' => '#use-noindex-for-the-taxonomy-archives', 'paginated_noindex' => '#use-noindex-for-paginated-pages-posts', 'paginated_nofollow' => '#use-nofollow-for-paginated-pages-posts', - 'noodp' => '#exclude-site-from-the-open-directory-project', 'skip_excerpt' => '#avoid-using-the-excerpt-in-descriptions', 'generate_descriptions' => '#autogenerate-descriptions', 'run_shortcodes' => '#run-shortcodes-in-autogenerated-descriptions', @@ -324,7 +320,6 @@ function __construct() { 'custom_link' => __( 'Override the canonical URLs for this post.', 'all-in-one-seo-pack' ), 'noindex' => __( 'Check this box to ask search engines not to index this page.', 'all-in-one-seo-pack' ), 'nofollow' => __( 'Check this box to ask search engines not to follow links from this page.', 'all-in-one-seo-pack' ), - 'noodp' => __( 'Check this box to ask search engines not to use descriptions from the Open Directory Project for this page.', 'all-in-one-seo-pack' ), 'sitemap_exclude' => __( "Don't display this page in the sitemap.", 'all-in-one-seo-pack' ), 'disable' => __( 'Disable SEO on this page.', 'all-in-one-seo-pack' ), 'disable_analytics' => __( 'Disable Google Analytics on this page.', 'all-in-one-seo-pack' ), @@ -540,11 +535,6 @@ function __construct() { 'type' => 'multicheckbox', 'default' => array(), ), - 'cpostnoodp' => array( - 'name' => __( 'Default to NOODP:', 'all-in-one-seo-pack' ), - 'type' => 'multicheckbox', - 'default' => array(), - ), 'cposttitles' => array( 'name' => __( 'Custom titles:', 'all-in-one-seo-pack' ), 'type' => 'checkbox', @@ -814,10 +804,6 @@ function __construct() { 'name' => __( 'Use nofollow for paginated pages/posts:', 'all-in-one-seo-pack' ), 'default' => 0, ), - 'noodp' => array( - 'name' => __( 'Exclude site from the Open Directory Project:', 'all-in-one-seo-pack' ), - 'default' => 0, - ), 'generate_descriptions' => array( 'name' => __( 'Autogenerate Descriptions:', 'all-in-one-seo-pack' ), 'default' => 0, @@ -910,7 +896,6 @@ function __construct() { 'custom_link', 'noindex', 'nofollow', - 'noodp', 'sitemap_exclude', 'disable', 'disable_analytics', @@ -987,7 +972,6 @@ function __construct() { 'name' => __( 'Robots Meta NOFOLLOW', 'all-in-one-seo-pack' ), 'default' => '', ), - 'noodp' => array( 'name' => __( 'Robots Meta NOODP', 'all-in-one-seo-pack' ) ), 'sitemap_exclude' => array( 'name' => __( 'Exclude From Sitemap', 'all-in-one-seo-pack' ) ), 'disable' => array( 'name' => __( 'Disable on this page/post', 'all-in-one-seo-pack' ) ), 'disable_analytics' => array( @@ -1085,7 +1069,6 @@ function __construct() { 'options' => array( 'cpostnoindex', 'cpostnofollow', - 'cpostnoodp', 'category_noindex', 'archive_date_noindex', 'archive_author_noindex', @@ -1095,7 +1078,6 @@ function __construct() { 'tax_noindex', 'paginated_noindex', 'paginated_nofollow', - 'noodp', ), ), 'advanced' => array( @@ -1469,7 +1451,6 @@ function get_current_options( $opts = array(), $location = null, $defaults = nul 'disable_analytics', 'noindex', 'nofollow', - 'noodp', ); if ( ! ( ! empty( $this->options['aiosp_can'] ) ) && ( ! empty( $this->options['aiosp_customize_canonical_links'] ) ) ) { unset( $optlist['custom_link'] ); @@ -2964,7 +2945,6 @@ function get_all_term_data( $term_id ) { 'disable_analytics', 'noindex', 'nofollow', - 'noodp', ); foreach ( $optlist as $f ) { $meta = get_term_meta( $term_id, '_aioseop_' . $f, true ); @@ -3134,7 +3114,6 @@ function add_page_hooks() { $this->default_options['cpostactive']['initial_options'] = $all_post_types; $this->default_options['cpostnoindex']['initial_options'] = $post_types; $this->default_options['cpostnofollow']['initial_options'] = $post_types; - $this->default_options['cpostnoodp']['initial_options'] = $post_types; if ( AIOSEOPPRO ) { $this->default_options['taxactive']['initial_options'] = $tax_types; } @@ -3352,14 +3331,6 @@ function filter_settings( $settings, $location, $current ) { 'on' => __( 'nofollow', 'all-in-one-seo-pack' ), ); } - if ( ! empty( $this->options['aiosp_cpostnoodp'] ) && in_array( $post_type, $this->options['aiosp_cpostnoodp'] ) ) { - $settings["{$prefix}noodp"]['type'] = 'select'; - $settings["{$prefix}noodp"]['initial_options'] = array( - '' => __( 'Default - noodp', 'all-in-one-seo-pack' ), - 'off' => __( 'odp', 'all-in-one-seo-pack' ), - 'on' => __( 'noodp', 'all-in-one-seo-pack' ), - ); - } global $post; $info = $this->get_page_snippet_info(); @@ -3405,7 +3376,7 @@ function filter_options( $options, $location ) { if ( ! empty( $post ) ) { $prefix = $this->prefix; $post_type = get_post_type( $post ); - foreach ( array( 'noindex', 'nofollow', 'noodp' ) as $no ) { + foreach ( array( 'noindex', 'nofollow' ) as $no ) { if ( empty( $this->options[ 'aiosp_cpost' . $no ] ) || ( ! in_array( $post_type, $this->options[ 'aiosp_cpost' . $no ] ) ) ) { if ( isset( $options["{$prefix}{$no}"] ) && ( $options["{$prefix}{$no}"] != 'on' ) ) { unset( $options["{$prefix}{$no}"] ); @@ -4076,7 +4047,7 @@ function get_robots_meta() { $tax_noindex = array(); } - $aiosp_noindex = $aiosp_nofollow = $aiosp_noodp = ''; + $aiosp_noindex = $aiosp_nofollow = ''; $noindex = 'index'; $nofollow = 'follow'; if ( ( is_category() && ! empty( $aioseop_options['aiosp_category_noindex'] ) ) || ( ! is_category() && is_archive() && ! is_tag() && ! is_tax() @@ -4092,11 +4063,9 @@ function get_robots_meta() { if ( ! empty( $opts ) ) { $aiosp_noindex = htmlspecialchars( stripslashes( $opts['aiosp_noindex'] ) ); $aiosp_nofollow = htmlspecialchars( stripslashes( $opts['aiosp_nofollow'] ) ); - $aiosp_noodp = htmlspecialchars( stripslashes( $opts['aiosp_noodp'] ) ); } - if ( $aiosp_noindex || $aiosp_nofollow || $aiosp_noodp || ! empty( $aioseop_options['aiosp_cpostnoindex'] ) - || ! empty( $aioseop_options['aiosp_cpostnofollow'] ) || ! empty( $aioseop_options['aiosp_cpostnoodp'] ) - || ! empty( $aioseop_options['aiosp_paginated_noindex'] ) || ! empty( $aioseop_options['aiosp_paginated_nofollow'] ) + if ( $aiosp_noindex || $aiosp_nofollow || ! empty( $aioseop_options['aiosp_cpostnoindex'] ) + || ! empty( $aioseop_options['aiosp_cpostnofollow'] ) || ! empty( $aioseop_options['aiosp_paginated_noindex'] ) || ! empty( $aioseop_options['aiosp_paginated_nofollow'] ) ) { if ( ( $aiosp_noindex == 'on' ) || ( ( ! empty( $aioseop_options['aiosp_paginated_noindex'] ) ) && $page > 1 ) || ( ( $aiosp_noindex == '' ) && ( ! empty( $aioseop_options['aiosp_cpostnoindex'] ) ) && in_array( $post_type, $aioseop_options['aiosp_cpostnoindex'] ) ) @@ -4108,19 +4077,8 @@ function get_robots_meta() { ) { $nofollow = 'nofollow'; } - if ( ( $aiosp_noodp == 'on' ) || ( empty( $aiosp_noodp ) && ( ! empty( $aioseop_options['aiosp_cpostnoodp'] ) && in_array( $post_type, $aioseop_options['aiosp_cpostnoodp'] ) ) ) ) { - $aiosp_noodp = true; - } else { - $aiosp_noodp = false; - } } } - if ( ! empty( $aioseop_options['aiosp_noodp'] ) && $aioseop_options['aiosp_noodp'] ) { - $aiosp_noodp = true; - } - if ( $aiosp_noodp ) { - $nofollow .= ',noodp'; - } if ( is_singular() && $this->is_password_protected() && apply_filters( 'aiosp_noindex_password_posts', false ) ){ $noindex = 'noindex'; } @@ -4411,7 +4369,6 @@ function save_post_data( $id ) { 'disable_analytics', 'noindex', 'nofollow', - 'noodp', ); if ( ! ( ! empty( $this->options['aiosp_can'] ) ) && ( ! empty( $this->options['aiosp_customize_canonical_links'] ) ) ) { unset( $optlist['custom_link'] ); @@ -4430,7 +4387,6 @@ function save_post_data( $id ) { 'custom_link', 'noindex', 'nofollow', - 'noodp', ); if ( ! ( ! empty( $this->options['aiosp_can'] ) ) && ( ! empty( $this->options['aiosp_customize_canonical_links'] ) ) ) { unset( $optlist['custom_link'] ); @@ -4621,7 +4577,6 @@ function save_category_metaboxes( $id ) { 'disable_analytics', 'noindex', 'nofollow', - 'noodp', ); foreach ( $optlist as $f ) { $field = "aiosp_$f"; @@ -4637,7 +4592,6 @@ function save_category_metaboxes( $id ) { 'custom_link', 'noindex', 'nofollow', - 'noodp', ); if ( ! ( ! empty( $this->options['aiosp_can'] ) ) && ( ! empty( $this->options['aiosp_customize_canonical_links'] ) ) ) { unset( $optlist['custom_link'] );