Changeset 9819
- Timestamp:
- 05/04/2020 02:27:48 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/theme-directory.php
r9638 r9819 234 234 } 235 235 add_filter( 'jetpack_active_modules', 'wporg_themes_disable_sitemap_for_rosetta' ); 236 237 /** 238 * Skip outdated themes in Jetpack Sitemaps. 239 * 240 * @param bool $skip If this post should be excluded from Sitemaps. 241 * @param object $plugin_db_row A row from the wp_posts table. 242 * @return bool 243 */ 244 function wporg_themes_jetpack_sitemap_skip_post( $skip, $theme_db_row ) { 245 // If it's outdated, don't include in Jetpack Sitemap. 246 if ( time() - strtotime( $theme_db_row->post_modified_gmt ) > 2 * YEAR_IN_SECONDS ) { 247 $skip = true; 248 } 249 250 return $skip; 251 } 252 add_filter( 'jetpack_sitemap_skip_post', 'wporg_themes_jetpack_sitemap_skip_post', 10, 2 ); 236 253 237 254 /**
Note: See TracChangeset
for help on using the changeset viewer.