hooks * 3 = .htaccess */ $old_value = $old_value > 0; $value = $value > 0; if ( $old_value !== $value ) { $this->trigger_webp_change(); } } /** * Store the ShortPixel option value before it is deleted. * * @since 3.4 * @access public * @author Grégory Viguier * * @param string $option Name of the option to delete. */ public function store_option_value_before_delete( $option ) { if ( $this->plugin_option_name_to_serve_webp === $option ) { $this->tmp_is_serving_webp = $this->is_serving_webp(); } } /** * Maybe activate webp cache after ShortPixel option has been deleted. * * @since 3.4 * @access public * @author Grégory Viguier */ public function sync_on_option_delete() { if ( false !== $this->tmp_is_serving_webp ) { $this->trigger_webp_change(); } } /** ----------------------------------------------------------------------------------------- */ /** PUBLIC TOOLS ============================================================================ */ /** ----------------------------------------------------------------------------------------- */ /** * Get the plugin name. * * @since 3.4 * @access public * @author Grégory Viguier * * @return string */ public function get_name() { return 'ShortPixel'; } /** * Get the plugin identifier. * * @since 3.4 * @access public * @author Grégory Viguier * * @return string */ public function get_id() { return 'shortpixel'; } /** * Tell if the plugin converts images to webp. * * @since 3.4 * @access public * @author Grégory Viguier * * @return bool */ public function is_converting_to_webp() { return (bool) get_option( 'wp-short-create-webp' ); } /** * Tell if the plugin serves webp images on frontend. * * @since 3.4 * @access public * @author Grégory Viguier * * @return bool */ public function is_serving_webp() { return (bool) get_option( $this->plugin_option_name_to_serve_webp ); } /** * Tell if the plugin uses a CDN-compatible technique to serve webp images on frontend. * * @since 3.4 * @access public * @author Grégory Viguier * * @return bool */ public function is_serving_webp_compatible_with_cdn() { $display = (int) get_option( $this->plugin_option_name_to_serve_webp ); if ( ! $display ) { // The option is not enabled, no webp. return false; } if ( 3 === $display ) { // The option is set to "rewrite rules". return false; } return true; } /** * Get the plugin basename. * * @since 3.4 * @access public * @author Grégory Viguier * * @return bool */ public function get_basename() { if ( empty( $this->plugin_basename ) ) { $this->plugin_basename = defined( 'SHORTPIXEL_PLUGIN_FILE' ) ? plugin_basename( SHORTPIXEL_PLUGIN_FILE ) : 'shortpixel-image-optimiser/wp-shortpixel.php'; } return $this->plugin_basename; } }
Fatal error: Uncaught TypeError: WP_Rocket\Event_Management\Event_Manager::add_subscriber(): Argument #1 ($subscriber) must be of type WP_Rocket\Event_Management\Subscriber_Interface, string given, called in /htdocs/le-blog.fr/wp-content/plugins/wp-rocket/inc/Plugin.php on line 168 and defined in /htdocs/le-blog.fr/wp-content/plugins/wp-rocket/inc/classes/event-management/class-event-manager.php:33 Stack trace: #0 /htdocs/le-blog.fr/wp-content/plugins/wp-rocket/inc/Plugin.php(168): WP_Rocket\Event_Management\Event_Manager->add_subscriber('WP_Rocket\\Subsc...') #1 /htdocs/le-blog.fr/wp-content/plugins/wp-rocket/inc/main.php(47): WP_Rocket\Plugin->load() #2 /htdocs/le-blog.fr/wp-includes/class-wp-hook.php(341): rocket_init('') #3 /htdocs/le-blog.fr/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array) #4 /htdocs/le-blog.fr/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #5 /htdocs/le-blog.fr/wp-settings.php(593): do_action('plugins_loaded') #6 /htdocs/le-blog.fr/wp-config.php(102): require_once('/htdocs/le-blog...') #7 /htdocs/le-blog.fr/wp-load.php(50): require_once('/htdocs/le-blog...') #8 /htdocs/le-blog.fr/wp-blog-header.php(13): require_once('/htdocs/le-blog...') #9 /htdocs/le-blog.fr/index.php(17): require('/htdocs/le-blog...') #10 {main} thrown in /htdocs/le-blog.fr/wp-content/plugins/wp-rocket/inc/classes/event-management/class-event-manager.php on line 33