Changeset 4406 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
- Timestamp:
- 11/23/2016 10:44:15 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r4383 r4406 323 323 324 324 // When Jetpack syncs, we want to add filters to inject additional metadata for Jetpack, so it syncs for ElasticSearch indexing. 325 add_action( 'shutdown', array( $this, 'append_meta_for_jetpack' ), 8 ); 325 if ( defined( 'DOING_CRON' ) ) 326 $this->append_meta_for_jetpack(); 327 else 328 add_action( 'shutdown', array( $this, 'append_meta_for_jetpack' ), 8 ); 329 326 330 } 327 331 … … 684 688 * so we can get in first.Fetching the extra meta to inject is expensive, so we only want to do this if a sync 685 689 * is likely. 690 * As of Jetpack 4.4, sync can also run in a cron job, so filter the meta there too. 686 691 */ 687 if ( class_exists( 'Jetpack' ) && ! empty( \Jetpack::$instance->sync->sync) ) {692 if ( class_exists( 'Jetpack' ) && ( defined( 'DOING_CRON' ) || ! empty( \Jetpack::$instance->sync->sync ) ) ) { 688 693 // Attempt to work around the problem with options cache poisoning from subdomains 689 694 refresh_blog_details();
Note: See TracChangeset
for help on using the changeset viewer.