Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.74 KB | None | 0 0
  1. ack-grep "noindex"
  2. wpml-config.xml
  3. 7: <custom-field action="copy">_yoast_wpseo_meta-robots-noindex</custom-field>
  4.  
  5. frontend/class-frontend.php
  6. 95: remove_action( 'wp_head', 'noindex', 1 );
  7. 105: add_action( 'template_redirect', array( $this, 'noindex_feed' ) );
  8. 693: $noindex = ! WPSEO_Post_Type::is_post_type_indexable( $post->post_type );
  9. 695: if ( $noindex || $private ) {
  10. 696: $robots['index'] = 'noindex';
  11. 703: $robots['index'] = 'noindex';
  12. 707: if ( is_object( $term ) && ( WPSEO_Options::get( 'noindex-tax-' . $term->taxonomy, false ) ) ) {
  13. 708: $robots['index'] = 'noindex';
  14. 711: // Three possible values, index, noindex and default, do nothing for default.
  15. 712: $term_meta = WPSEO_Taxonomy_Meta::get_term_meta( $term, $term->taxonomy, 'noindex' );
  16. 718: $robots['index'] = 'noindex';
  17. 722: if ( WPSEO_Options::get( 'noindex-author-wpseo', false ) ) {
  18. 723: $robots['index'] = 'noindex';
  19. 726: if ( WPSEO_Options::get( 'noindex-author-noposts-wpseo', false ) && count_user_posts( $curauth->ID, 'any' ) === 0 ) {
  20. 727: $robots['index'] = 'noindex';
  21. 729: if ( get_user_meta( $curauth->ID, 'wpseo_noindex_author', true ) === 'on' ) {
  22. 730: $robots['index'] = 'noindex';
  23. 733: elseif ( is_date() && WPSEO_Options::get( 'noindex-archive-wpseo', false ) ) {
  24. 734: $robots['index'] = 'noindex';
  25. 746: if ( WPSEO_Options::get( 'noindex-ptarchive-' . $post_type, false ) ) {
  26. 747: $robots['index'] = 'noindex';
  27. 756: $robots['index'] = 'noindex';
  28. 780: // If a page has a noindex, it should _not_ have a canonical, as these are opposing indexing directives.
  29. 781: if ( strpos( $robotsstr, 'noindex' ) !== false ) {
  30. 797: $noindex = $this->get_seo_meta_value( 'meta-robots-noindex', $post_id );
  31. 798: if ( $noindex === '1' ) {
  32. 799: $robots['index'] = 'noindex';
  33. 801: elseif ( $noindex === '2' ) {
  34. 1321: * Outputs noindex values for the current page.
  35. 1323: public function noindex_page() {
  36. 1325: echo '<meta name="robots" content="noindex" />', "\n";
  37. 1333: * @return boolean Boolean indicating whether the noindex header was sent.
  38. 1335: public function noindex_feed() {
  39. 1338: header( 'X-Robots-Tag: noindex, follow', true );
  40.  
  41. admin/class-meta-columns.php
  42. 377: 'key' => WPSEO_Meta::$meta_prefix . 'meta-robots-noindex',
  43. 381: 'key' => WPSEO_Meta::$meta_prefix . 'meta-robots-noindex',
  44. 512: 'key' => WPSEO_Meta::$meta_prefix . 'meta-robots-noindex',
  45. 527: 'key' => WPSEO_Meta::$meta_prefix . 'meta-robots-noindex',
  46. 548: return WPSEO_Meta::get_value( 'meta-robots-noindex', $post_id ) === '2';
  47. 555: return WPSEO_Options::get( 'noindex-' . $post->post_type, false ) === false;
  48. 569: return WPSEO_Meta::get_value( 'meta-robots-noindex', $post_id ) === '0';
  49. 607: $title = __( 'Post is set to noindex.', 'wordpress-seo' );
  50.  
  51. admin/views/class-view-utils.php
  52. 43: /* translators: 1: expands to an indexable object's name, like a post type or taxonomy; 2: expands to <code>noindex</code>; 3: link open tag; 4: link close tag. */
  53. 47: /* translators: 1: expands to an indexable object's name, like a post type or taxonomy; 2: expands to <code>noindex</code>; 3: link open tag; 4: link close tag. */
  54. 53: uniqid( 'noindex-' . $post_type->name ),
  55. 58: '<code>noindex</code>',
  56. 81: $noindex_option_name = 'noindex-' . $post_type->name;
  57. 84: $noindex_option_name,
  58.  
  59. admin/views/user-profile.php
  60. 33: <input class="yoast-settings__checkbox double" type="checkbox" id="wpseo_noindex_author"
  61. 34: name="wpseo_noindex_author"
  62. 35: value="on" <?php echo ( get_the_author_meta( 'wpseo_noindex_author', $user->ID ) === 'on' ) ? 'checked' : ''; ?> />
  63. 37: for="wpseo_noindex_author"><?php echo esc_html( $wpseo_no_index_author_label ); ?></label><br>
  64.  
  65. admin/views/tabs/metas/paper-content/media-content.php
  66. 34: $noindex_option_name = 'noindex-' . $wpseo_post_type->name;
  67. 36: if ( WPSEO_Options::get( 'is-media-purge-relevant' ) && WPSEO_Options::get( $noindex_option_name ) === false ) {
  68.  
  69. admin/views/tabs/metas/paper-content/date-archives-settings.php
  70. 23: 'noindex-archive-wpseo',
  71. 26: /* translators: 1: expands to <code>noindex</code>; 2: link open tag; 3: link close tag. */
  72. 28: '<code>noindex</code>',
  73. 35: 'noindex-archive-wpseo',
  74.  
  75. admin/views/tabs/metas/paper-content/special-pages.php
  76. 14: /* translators: %s expands to <code>noindex, follow</code>. */
  77. 16: '<code>noindex, follow</code>'
  78.  
  79. admin/views/tabs/metas/paper-content/post-type-content.php
  80. 37: 'noindex-ptarchive-' . $wpseo_post_type->name,
  81.  
  82. admin/views/tabs/metas/paper-content/taxonomy-content.php
  83. 29: 'noindex-tax-' . $wpseo_taxonomy->name,
  84.  
  85. admin/views/tabs/metas/paper-content/post_type/post-type.php
  86. 15:$noindex_option_name = 'noindex-' . $wpseo_post_type->name;
  87. 19: $noindex_option_name,
  88.  
  89. admin/views/tabs/metas/paper-content/author-archive-settings.php
  90. 25: 'noindex-author-wpseo',
  91. 28: /* translators: 1: expands to <code>noindex</code>; 2: link open tag; 3: link close tag. */
  92. 30: '<code>noindex</code>',
  93. 37: 'noindex-author-wpseo',
  94. 44:<div id='noindex-author-noposts-wpseo-container'>
  95. 48: 'noindex-author-noposts-wpseo',
  96. 51: /* translators: 1: expands to <code>noindex</code>; 2: link open tag; 3: link close tag. */
  97. 53: '<code>noindex</code>',
  98. 60: 'noindex-author-noposts-wpseo',
  99.  
  100. admin/views/tabs/metas/post-types.php
  101. 16: * Otherwise setting a post-type to `noindex` will remove it from the list,
  102.  
  103. admin/views/tabs/metas/archives/help.php
  104. 16: /* translators: %s expands to <code>noindex, follow</code> */
  105. 18: '<code>noindex,follow</code>'
  106.  
  107. admin/metabox/class-metabox.php
  108. 70: WPSEO_Meta::$meta_fields['advanced']['meta-robots-noindex']['title'] = __( 'Allow search engines to show this %s in search results?', 'wordpress-seo' );
  109. 72: WPSEO_Meta::$meta_fields['advanced']['meta-robots-noindex']['description'] = '<p class="error-message">' . __( 'Warning: even though you can set the meta robots setting here, the entire site is set to noindex in the sitewide privacy settings, so these settings won\'t have an effect.', 'wordpress-seo' ) . '</p>';
  110. 75: WPSEO_Meta::$meta_fields['advanced']['meta-robots-noindex']['options']['0'] = __( 'Default for %2$s, currently: %1$s', 'wordpress-seo' );
  111. 76: WPSEO_Meta::$meta_fields['advanced']['meta-robots-noindex']['options']['2'] = __( 'Yes', 'wordpress-seo' );
  112. 77: WPSEO_Meta::$meta_fields['advanced']['meta-robots-noindex']['options']['1'] = __( 'No', 'wordpress-seo' );
  113.  
  114. admin/class-admin-user-profile.php
  115. 74: update_user_meta( $user_id, 'wpseo_noindex_author', $this->filter_input_post( 'wpseo_noindex_author' ) );
  116.  
  117. admin/import/plugins/class-import-aioseo.php
  118. 54: 'old_key' => '_aioseop_noindex',
  119. 55: 'new_key' => 'meta-robots-noindex',
  120.  
  121. admin/import/plugins/class-import-wpseo.php
  122. 92: // In wpSEO: noindex.
  123. 97: // In wpSEO: noindex, follow.
  124. 102: // In wpSEO: noindex, nofollow.
  125. 186: $this->maybe_save_post_meta( 'meta-robots-noindex', $robot_value['index'], $post_id );
  126. 239: $new_robot_value = 'noindex';
  127. 245: $tax_meta[ $taxonomy ][ $term_id ]['wpseo_noindex'] = $new_robot_value;
  128.  
  129. admin/import/plugins/class-import-ultimate-seo.php
  130. 54: 'old_key' => '_su_meta_robots_noindex',
  131. 55: 'new_key' => 'meta-robots-noindex',
  132.  
  133. admin/import/plugins/class-import-headspace.php
  134. 44: 'old_key' => '_headspace_noindex',
  135. 45: 'new_key' => 'meta-robots-noindex',
  136.  
  137. admin/import/plugins/class-import-seopressor.php
  138. 141: $this->maybe_save_post_meta( 'meta-robots-noindex', $robot_value['index'], $post_id );
  139. 160: if ( in_array( 'noindex', $seopressor_robots, true ) ) {
  140.  
  141. admin/import/plugins/class-import-woothemes-seo.php
  142. 44: 'old_key' => 'seo_noindex',
  143. 45: 'new_key' => 'meta-robots-noindex',
  144. 60: 'seo_noindex',
  145.  
  146. admin/import/plugins/class-import-seo-framework.php
  147. 42: 'old_key' => '_genesis_noindex',
  148. 43: 'new_key' => 'meta-robots-noindex',
  149.  
  150. admin/import/plugins/class-import-wp-meta-seo.php
  151. 67: 'new_key' => 'meta-robots-noindex',
  152. 70: 'noindex' => 1,
  153.  
  154. admin/import/plugins/class-import-platinum-seo-pack.php
  155. 81: * - noindex,follow
  156. 82: * - noindex,nofollow
  157. 90: $this->import_by_meta_robots( 'noindex,follow', array( 'noindex' ) );
  158. 91: $this->import_by_meta_robots( 'noindex,nofollow', array( 'noindex', 'nofollow' ) );
  159.  
  160. admin/import/plugins/class-import-smartcrawl.php
  161. 50: 'old_key' => '_wds_meta-robots-noindex',
  162. 51: 'new_key' => 'meta-robots-noindex',
  163.  
  164. admin/import/plugins/class-import-squirrly.php
  165. 40: 'noindex' => 'meta-robots-noindex',
  166.  
  167. admin/services/class-indexable-term-provider.php
  168. 27: 'is_robots_noindex' => 'noindex',
  169. 130: if ( WPSEO_Validator::key_exists( $indexable_data, 'is_robots_noindex' ) ) {
  170. 131: $indexable_data['is_robots_noindex'] = $this->convert_noindex( $indexable_data['is_robots_noindex'] );
  171. 151: * Converts the noindex value to a database compatible one.
  172. 153: * @param bool $noindex The current noindex value.
  173. 157: protected function convert_noindex( $noindex ) {
  174. 158: if ( $noindex === 'false' ) {
  175. 162: if ( $noindex === 'true' ) {
  176. 163: return 'noindex';
  177.  
  178. admin/services/class-indexable-post-provider.php
  179. 27: 'is_robots_noindex' => 'meta-robots-noindex',
  180. 140: if ( WPSEO_Validator::key_exists( $indexable_data, 'is_robots_noindex' ) ) {
  181. 141: $indexable_data['is_robots_noindex'] = $this->convert_noindex( $indexable_data['is_robots_noindex'] );
  182. 215: * Converts the noindex value to a database compatible one.
  183. 217: * @param string $noindex The current noindex value.
  184. 221: protected function convert_noindex( $noindex ) {
  185. 222: if ( $noindex === 'false' ) {
  186. 226: if ( $noindex === 'true' ) {
  187.  
  188. admin/config-ui/fields/class-field-choice-post-type.php
  189. 64: $key = 'noindex-' . $this->get_post_type();
  190. 83: return WPSEO_Options::set( 'noindex-' . $post_type, ( $visible === 'false' ) );
  191.  
  192. admin/taxonomy/class-taxonomy-columns.php
  193. 133: __( 'Term is set to noindex.', 'wordpress-seo' )
  194. 184: $no_index = WPSEO_Taxonomy_Meta::get_term_meta( $term->term_id, $this->taxonomy, 'noindex' );
  195. 192: $no_index_key = 'noindex-tax-' . $term->taxonomy;
  196.  
  197. admin/taxonomy/class-taxonomy-settings-fields.php
  198. 36: 'noindex' => $this->get_field_config(
  199. 41: $this->get_noindex_options()
  200. 71: $this->no_index_options['noindex'] = __( 'No', 'wordpress-seo' );
  201. 75: * Getting the data for the noindex fields.
  202. 79: private function get_noindex_options() {
  203. 81: $noindex_options['options'] = $this->no_index_options;
  204. 82: $noindex_options['options']['default'] = sprintf( $noindex_options['options']['default'], $labels->name, $this->get_robot_index() );
  205. 84: return $noindex_options;
  206. 105: $index_option = 'noindex-tax-' . $this->term->taxonomy;
  207. 107: $robot_index = $this->no_index_options['noindex'];
  208.  
  209. inc/class-wpseo-statistics.php
  210. 37: 'meta_key' => WPSEO_Meta::$meta_prefix . 'meta-robots-noindex',
  211.  
  212. inc/options/class-wpseo-option-titles.php
  213. 47: 'noindex-author-wpseo' => false,
  214. 48: 'noindex-author-noposts-wpseo' => true,
  215. 49: 'noindex-archive-wpseo' => true,
  216. 84: * - 'noindex-' . $pt->name => false;
  217. 91: * - 'noindex-ptarchive-' . $pt->name => false;
  218. 95: * - 'noindex-tax-' . $tax->name => false;
  219. 115: 'noindex-',
  220. 266: $enriched_defaults[ 'noindex-' . $pt->name ] = false;
  221. 275: $enriched_defaults[ 'noindex-ptarchive-' . $pt->name ] = false;
  222. 291: $enriched_defaults[ 'noindex-tax-' . $tax->name ] = ( $tax->name === 'post_format' );
  223. 523: * 'noindex-author-wpseo', 'noindex-author-noposts-wpseo', 'noindex-archive-wpseo'
  224. 524: * 'noindex-' . $pt->name
  225. 525: * 'noindex-ptarchive-' . $pt->name
  226. 526: * 'noindex-tax-' . $tax->name
  227. 533: * 'noindex-'
  228. 629: 'noindexauthor' => 'noindex-author',
  229. 631: 'noindexdate' => 'noindex-archive',
  230. 632: 'noindexcat' => 'noindex-category',
  231. 633: 'noindextag' => 'noindex-post_tag',
  232. 634: 'noindexpostformat' => 'noindex-post_format',
  233. 669: 'noindex-author' => 'noindex-author-wpseo',
  234. 670: 'noindex-archive' => 'noindex-archive-wpseo',
  235. 689: 'noindex-' => 'noindex-tax-',
  236. 760: * 'noindex-'
  237.  
  238. inc/options/class-wpseo-taxonomy-meta.php
  239. 58: 'wpseo_noindex' => 'default',
  240. 88: 'noindex' => '',
  241. 261: case 'wpseo_noindex':
  242. 391: case 'noindex':
  243. 393: // Convert 'on' to 'noindex'.
  244. 394: $option_value[ $taxonomy ][ $term_id ][ $key ] = 'noindex';
  245.  
  246. inc/options/class-wpseo-options-backfill.php
  247. 117: 'disable_author_sitemap' => 'noindex-author-wpseo',
  248. 118: 'disable_author_noposts' => 'noindex-author-noposts-wpseo',
  249. 229: return get_user_meta( $object_id, 'wpseo_noindex_author' );
  250.  
  251. inc/class-upgrade.php
  252. 477: * Removes some no longer used options for noindexing subpages and for meta keywords and its associated templates.
  253. 550: // Moves the user meta for excluding from the XML sitemap to a noindex.
  254. 552: $wpdb->query( "UPDATE $wpdb->usermeta SET meta_key = 'wpseo_noindex_author' WHERE meta_key = 'wpseo_excludeauthorsitemap'" );
  255. 610: if ( WPSEO_Options::get( 'noindex-attachment' ) === true ) {
  256. 841: $noindex = WPSEO_Meta::get_value( 'meta-robots-noindex', $shop_page_id );
  257. 843: if ( $noindex === '0' ) {
  258. 844: $option_noindex = WPSEO_Options::get( 'noindex-ptarchive-product' );
  259. 847: 'meta-robots-noindex',
  260. 848: $option_noindex,
  261. 852: WPSEO_Options::set( 'noindex-ptarchive-product', false );
  262.  
  263. inc/class-post-type.php
  264. 62: return ( false === WPSEO_Options::get( 'noindex-' . $post_type_name, false ) );
  265.  
  266. inc/sitemaps/class-author-sitemap-provider.php
  267. 22: if ( WPSEO_Options::get( 'disable-author', false ) || WPSEO_Options::get( 'noindex-author-wpseo', false ) ) {
  268. 112: 'key' => 'wpseo_noindex_author',
  269. 117: 'key' => 'wpseo_noindex_author',
  270. 124: if ( WPSEO_Options::get( 'noindex-author-noposts-wpseo', true ) ) {
  271.  
  272. inc/sitemaps/class-sitemaps-cache.php
  273. 198: WPSEO_Options::get( 'noindex-' . $type ) === false ||
  274. 199: WPSEO_Options::get( 'noindex-tax-' . $type ) === false
  275.  
  276. inc/sitemaps/class-post-type-sitemap-provider.php
  277. 262: if ( WPSEO_Meta::get_value( 'meta-robots-noindex', $post->ID ) === '1' ) {
  278. 474: if ( WPSEO_Options::get( 'noindex-ptarchive-' . $post_type, false ) ) {
  279. 495: if ( $post_id > 0 && WPSEO_Meta::get_value( 'meta-robots-noindex', $post_id ) === '1' ) {
  280.  
  281. inc/sitemaps/class-taxonomy-sitemap-provider.php
  282. 198: $tax_noindex = WPSEO_Taxonomy_Meta::get_term_meta( $term, $term->taxonomy, 'noindex' );
  283. 200: if ( $tax_noindex === 'noindex' ) {
  284. 237: if ( WPSEO_Options::get( "noindex-tax-{$taxonomy_name}" ) === true ) {
  285.  
  286. inc/sitemaps/class-sitemaps.php
  287. 421: header( 'X-Robots-Tag: noindex, follow', true );
  288. 441: header( 'X-Robots-Tag: noindex, follow', true );
  289.  
  290. inc/sitemaps/class-sitemaps-admin.php
  291. 61: if ( WPSEO_Options::get( 'noindex-' . $post_type, false ) ) {
  292. 119: if ( WPSEO_Options::get( 'noindex-' . $post_type, false ) === false ) {
  293.  
  294. inc/class-wpseo-rank.php
  295. 36: const NO_INDEX = 'noindex';
  296. 108: self::NO_INDEX => 'noindex',
  297.  
  298. inc/indexables/class-term-indexable.php
  299. 29: 'is_robots_noindex',
  300. 66: 'is_robots_noindex' => self::get_robots_noindex_value( self::get_meta_value( 'noindex', $term ) ),
  301. 115: protected static function get_robots_noindex_value( $value ) {
  302. 116: if ( $value === 'noindex' ) {
  303.  
  304. inc/indexables/class-post-indexable.php
  305. 29: 'is_robots_noindex',
  306. 74: 'is_robots_noindex' => self::get_robots_noindex_value( WPSEO_Meta::get_value( 'meta-robots-noindex', $post_object_id ) ),
  307.  
  308. inc/indexables/validators/class-robots-validator.php
  309. 23: 'is_robots_noindex',
  310.  
  311. inc/indexables/class-indexable.php
  312. 60: protected static function get_robots_noindex_value( $value ) {
  313.  
  314. inc/class-wpseo-meta.php
  315. 148: 'meta-robots-noindex' => array(
  316. 357: $field_defs['meta-robots-noindex']['title'] = sprintf( $field_defs['meta-robots-noindex']['title'], $post_type_object->labels->singular_name );
  317. 358: $field_defs['meta-robots-noindex']['options']['0'] = sprintf( $field_defs['meta-robots-noindex']['options']['0'], ( ( WPSEO_Options::get( 'noindex-' . $post_type, false ) === true ) ? $field_defs['meta-robots-noindex']['options']['1'] : $field_defs['meta-robots-noindex']['options']['2'] ), $post_type_object->label );
  318. 777: self::$meta_prefix . 'meta-robots-noindex',
  319. 786: if ( $value === 'noindex' ) {
  320. 787: update_post_meta( $old->post_id, self::$meta_prefix . 'meta-robots-noindex', 1 );
  321.  
  322. migrations/20171228151840_WpYoastIndexable.php
  323. 47: $indexable_table->column( 'is_robots_noindex', 'boolean', array( 'null' => true, 'default' => false ) );
  324. 127: 'is_robots_noindex',
  325. 133: 'name' => 'robots_noindex',
  326.  
  327. src/formatters/indexable-term-formatter.php
  328. 61: $indexable->is_robots_noindex = $this->get_noindex_value( $this->get_meta_value( 'wpseo_noindex', $term_meta ) );
  329. 82: * Converts the meta noindex value to the indexable value.
  330. 88: protected function get_noindex_value( $meta_value ) {
  331. 89: if ( $meta_value === 'noindex' ) {
  332.  
  333. src/formatters/indexable-author-formatter.php
  334. 47: $indexable->is_robots_noindex = $this->get_noindex_value( $meta_data['wpseo_noindex_author'] );
  335. 65: 'wpseo_noindex_author',
  336. 77: * Retrieves the value for noindex.
  337. 79: * @param string $noindex Current noindex value.
  338. 81: * @return bool True if noindex is selected, false if not.
  339. 83: protected function get_noindex_value( $noindex ) {
  340. 84: return $noindex === 'on';
  341.  
  342. src/formatters/indexable-post-formatter.php
  343. 52: $indexable->is_robots_noindex = $this->get_robots_noindex(
  344. 53: $this->get_meta_value( 'meta-robots-noindex' )
  345. 57: $noindex_advanced = $this->get_meta_value( 'meta-robots-adv' );
  346. 58: $meta_robots = explode( ',', $noindex_advanced );
  347. 77: * Converts the meta robots noindex value to the indexable value.
  348. 81: * @return bool|null True for noindex, false for index, null for default of parent/type.
  349. 83: protected function get_robots_noindex( $value ) {
  350.  
  351. src/models/indexable.php
  352. 29: * @property boolean $is_robots_noindex
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement