Changeset 9506 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
- Timestamp:
- 02/14/2020 05:08:35 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r9501 r9506 41 41 add_filter( 'pre_update_option_jetpack_options', array( $this, 'filter_jetpack_options' ) ); 42 42 add_filter( 'jetpack_sitemap_post_types', array( $this, 'jetpack_sitemap_post_types' ) ); 43 add_filter( 'jetpack_sitemap_skip_post', array( $this, 'jetpack_sitemap_skip_post' ), 10, 2 ); 43 44 add_action( 'template_redirect', array( $this, 'prevent_canonical_for_plugins' ), 9 ); 44 45 add_action( 'template_redirect', array( $this, 'custom_redirects' ), 1 ); … … 1374 1375 1375 1376 return $post_types; 1377 } 1378 1379 /** 1380 * Skip outdated plugins in Jetpack Sitemaps. 1381 * 1382 * @param bool $skip If this post should be excluded from Sitemaps. 1383 * @param object $plugin_db_row A row from the wp_posts table. 1384 * @return bool 1385 */ 1386 public function jetpack_sitemap_skip_post( $skip, $plugin_db_row ) { 1387 if ( Template::is_plugin_outdated( $plugin_db_row->ID ) ) { 1388 $skip = true; 1389 } 1390 1391 return $skip; 1376 1392 } 1377 1393
Note: See TracChangeset
for help on using the changeset viewer.