return array_merge( $config, $filtered_config ); } /** * Gets the URIs to exclude. * * @since 3.7 * * @param bool $use_trailing_slash When true, uses trailing slash. * * @return string */ private function get_uris_to_exclude( $use_trailing_slash ) { $site_url = site_url(); $uris = get_rocket_cache_reject_uri( false, false ); $uris = str_replace( [ '/(.*)|', '/(.*)/|' ], '/|', $uris ); $default = [ '/refer/', '/go/', '/recommend/', '/recommends/', ]; $excluded = $default; /** * Filters the patterns excluded from links preload * * @since 3.10.8 * * @param string[] $excluded Array of excluded patterns. * @param string[] $default Array of default excluded patterns. */ $excluded = wpm_apply_filters_typed( 'array', 'rocket_preload_links_exclusions', $excluded, $default ); $excluded = array_filter( $excluded ); $login_url = wp_login_url(); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound $login_uri = str_replace( home_url(), '', $login_url ); $excluded = array_filter( $excluded, function ( $uri ) use ( $login_uri ) { return ! str_contains( $login_uri, $uri ); } ); $excluded_patterns = ''; if ( ! empty( $excluded ) ) { $excluded_patterns = '|' . implode( '|', $excluded ); } return $uris . $excluded_patterns; } /** * Checks if the given URL has a trailing slash. * * @since 3.7 * * @param string $url URL to check. * * @return bool */ private function has_trailing_slash( $url ) { return substr( $url, -1 ) === '/'; } /** * Indicates if the site uses a trailing slash in the permalink structure. * * @since 3.7 * * @return bool when true, uses `/`; else, no. */ private function use_trailing_slash() { return $this->has_trailing_slash( get_permalink() ); } }
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/top-x-porn.com/wp-content/plugins/wp-rocket/inc/Plugin.php on line 168 and defined in /htdocs/top-x-porn.com/wp-content/plugins/wp-rocket/inc/classes/event-management/class-event-manager.php:33 Stack trace: #0 /htdocs/top-x-porn.com/wp-content/plugins/wp-rocket/inc/Plugin.php(168): WP_Rocket\Event_Management\Event_Manager->add_subscriber('WP_Rocket\\Engin...') #1 /htdocs/top-x-porn.com/wp-content/plugins/wp-rocket/inc/main.php(47): WP_Rocket\Plugin->load() #2 /htdocs/top-x-porn.com/wp-includes/class-wp-hook.php(324): rocket_init('') #3 /htdocs/top-x-porn.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #4 /htdocs/top-x-porn.com/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #5 /htdocs/top-x-porn.com/wp-settings.php(555): do_action('plugins_loaded') #6 /htdocs/top-x-porn.com/wp-config.php(106): require_once('/htdocs/top-x-p...') #7 /htdocs/top-x-porn.com/wp-load.php(50): require_once('/htdocs/top-x-p...') #8 /htdocs/top-x-porn.com/wp-blog-header.php(13): require_once('/htdocs/top-x-p...') #9 /htdocs/top-x-porn.com/index.php(17): require('/htdocs/top-x-p...') #10 {main} thrown in /htdocs/top-x-porn.com/wp-content/plugins/wp-rocket/inc/classes/event-management/class-event-manager.php on line 33