rmines if we can optimize * * @since 3.1 * * @return bool */ public function is_allowed() { global $pagenow; if ( rocket_bypass() ) { return false; } if ( rocket_get_constant( 'DONOTROCKETOPTIMIZE' ) ) { return false; } if ( is_user_logged_in() && ! $this->options->get( 'cache_logged_user' ) ) { return false; } if ( 'wp-login.php' === $pagenow ) { return false; } return true; } /** * Determines if the file is excluded from optimization * * @since 3.1 * * @param string $src source URL. * * @return bool */ public function is_excluded_file( $src ) { $file = get_rocket_parse_url( $src ); if ( isset( $file['path'] ) && ! preg_match( '#\.php$#', $file['path'] ) ) { return true; } if ( $this->is_external_file( $src ) ) { return true; } if ( preg_match( '#^' . $this->excluded_files . '$#', $file['path'] ) ) { return true; } if ( ! isset( $file['query'] ) ) { return false; } $file['query'] = remove_query_arg( 'ver', $file['query'] ); return (bool) $file['query']; } /** * Sets the current file extension and minify key * * @since 3.1 * * @param string $extension Current file extension. */ public function set_extension( $extension ) { $this->extension = $extension; $this->minify_key = $this->options->get( 'minify_' . $this->extension . '_key' ); } /** * Gets the CDN zones. * * @since 3.1 * * @return array */ public function get_zones() { return [ 'all', 'css_and_js', $this->extension ]; } /** * Gets the cache URL for the static file * * @since 3.1 * * @param string $filename Filename for the static file. * * @return string */ protected function get_cache_url( $filename ) { $cache_url = $this->busting_url . $filename; switch ( $this->extension ) { case 'css': // This filter is documented in inc/classes/optimization/css/class-abstract-css-optimization.php. $cache_url = apply_filters( 'rocket_css_url', $cache_url ); break; case 'js': // This filter is documented in inc/classes/optimization/css/class-abstract-js-optimization.php. $cache_url = apply_filters( 'rocket_js_url', $cache_url ); break; } return $cache_url; } /** * Gets content from an URL * * @since 3.1 * * @param string $url URL to get the content from. * * @return string|bool */ protected function get_url_content( $url ) { $content = wp_remote_retrieve_body( wp_remote_get( $url ) ); if ( ! $content ) { return false; } return $content; } }
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/nightechs.com/wp-content/plugins/wp-rocket/inc/Plugin.php on line 115 and defined in /htdocs/nightechs.com/wp-content/plugins/wp-rocket/inc/classes/event-management/class-event-manager.php:33 Stack trace: #0 /htdocs/nightechs.com/wp-content/plugins/wp-rocket/inc/Plugin.php(115): WP_Rocket\Event_Management\Event_Manager->add_subscriber('WP_Rocket\\Engin...') #1 /htdocs/nightechs.com/wp-content/plugins/wp-rocket/inc/main.php(50): WP_Rocket\Plugin->load() #2 /htdocs/nightechs.com/wp-includes/class-wp-hook.php(324): rocket_init('') #3 /htdocs/nightechs.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #4 /htdocs/nightechs.com/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #5 /htdocs/nightechs.com/wp-settings.php(550): do_action('plugins_loaded') #6 /htdocs/nightechs.com/wp-config.php(93): require_once('/htdocs/nightec...') #7 /htdocs/nightechs.com/wp-load.php(50): require_once('/htdocs/nightec...') #8 /htdocs/nightechs.com/wp-blog-header.php(13): require_once('/htdocs/nightec...') #9 /htdocs/nightechs.com/index.php(17): require('/htdocs/nightec...') #10 {main} thrown in /htdocs/nightechs.com/wp-content/plugins/wp-rocket/inc/classes/event-management/class-event-manager.php on line 33