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 Error: Call to a member function withArgument() on null in /home/payon/public_html/wp-content/plugins/wp-rocket/inc/ThirdParty/ServiceProvider.php:62 Stack trace: #0 /home/payon/public_html/wp-content/plugins/wp-rocket/vendor/league/container/src/ServiceProvider/ServiceProviderAggregate.php(84): WP_Rocket\ThirdParty\ServiceProvider->register() #1 /home/payon/public_html/wp-content/plugins/wp-rocket/vendor/league/container/src/Container.php(88): League\Container\ServiceProvider\ServiceProviderAggregate->register('mobile_subscrib...') #2 /home/payon/public_html/wp-content/plugins/wp-rocket/inc/classes/class-plugin.php(186): League\Container\Container->get('mobile_subscrib...') #3 /home/payon/public_html/wp-content/plugins/wp-rocket/inc/main.php(40): WP_Rocket\Plugin->load() #4 /home/payon/public_html/wp-includes/class-wp-hook.php(308): rocket_init('') #5 /home/payon/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #6 /home/payon/public_html/wp-includes/plugin.php(517) in /home/payon/public_html/wp-content/plugins/wp-rocket/inc/ThirdParty/ServiceProvider.php on line 62