Changeset 12177 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
- Timestamp:
- 11/01/2022 07:12:44 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r11408 r12177 96 96 } ); 97 97 98 /*99 // Temporarily disabled to see if this is still needed / causing issues.100 // Work around caching issues101 add_filter( 'pre_option_jetpack_sync_full__started', array( $this, 'bypass_options_cache' ), 10, 2 );102 add_filter( 'default_option_jetpack_sync_full__started', '__return_null' );103 add_filter( 'pre_option_jetpack_sync_full__params', array( $this, 'bypass_options_cache' ), 10, 2 );104 add_filter( 'default_option_jetpack_sync_full__params', '__return_null' );105 add_filter( 'pre_option_jetpack_sync_full__queue_finished', array( $this, 'bypass_options_cache' ), 10, 2 );106 add_filter( 'default_option_jetpack_sync_full__queue_finished', '__return_null' );107 add_filter( 'pre_option_jetpack_sync_full__send_started', array( $this, 'bypass_options_cache' ), 10, 2 );108 add_filter( 'default_option_jetpack_sync_full__send_started', '__return_null' );109 add_filter( 'pre_option_jetpack_sync_full__finished', array( $this, 'bypass_options_cache' ), 10, 2 );110 add_filter( 'default_option_jetpack_sync_full__finished', '__return_null' );111 */112 113 98 // Fix login URLs in admin bar 114 99 add_filter( 'login_url', array( $this, 'fix_login_url' ), 10, 3 ); … … 553 538 remove_action( 'template_redirect', 'wp_redirect_admin_locations', 1000 ); 554 539 555 // disable feeds540 // Disable feeds 556 541 remove_action( 'wp_head', 'feed_links', 2 ); 557 542 remove_action( 'wp_head', 'feed_links_extra', 3 ); … … 956 941 957 942 return $found_posts; 958 }959 960 /**961 * Filter to bypass caching for options critical to Jetpack sync to work around race conditions and other unidentified bugs.962 * If this works and becomes a permanent solution, it probably belongs elsewhere.963 */964 public function bypass_options_cache( $value, $option ) {965 global $wpdb;966 $value = $wpdb->get_var( $wpdb->prepare(967 "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1",968 $option969 ) );970 $value = maybe_unserialize( $value );971 972 return $value;973 943 } 974 944
Note: See TracChangeset
for help on using the changeset viewer.