on is_mobile_cpcss_active() { return ( $this->options->get( 'async_css', 0 ) && $this->options->get( 'cache_mobile', 0 ) && $this->options->get( 'do_caching_mobile_files', 0 ) ) && $this->options->get( 'async_css_mobile', 0 ); } /** * Checks if we should async CSS * * @since 3.6.2.1 * * @return boolean */ private function should_async_css() { if ( rocket_get_constant( 'DONOTROCKETOPTIMIZE' ) ) { return false; } if ( ! $this->options->get( 'async_css', 0 ) ) { return false; } return ! is_rocket_post_excluded_option( 'async_css' ); } /** * Stops the critical CSS generation. * * @since 3.10 * * @return void */ public function stop_critical_css_generation() { $this->critical_css->stop_generation(); delete_transient( 'rocket_critical_css_generation_process_running' ); delete_transient( 'rocket_critical_css_generation_process_complete' ); } /** * Display a notice to pass from CPCSS to RUCSS. * * @return void */ public function switch_to_rucss_notice() { $boxes = get_user_meta( get_current_user_id(), 'rocket_boxes', true ); if ( in_array( __FUNCTION__, (array) $boxes, true ) ) { return; } if ( ! $this->options->get( 'async_css', 0 ) ) { return; } if ( $this->user->is_license_expired() ) { return; } $screen = get_current_screen(); if ( isset( $screen->id ) && 'settings_page_wprocket' !== $screen->id ) { return; } /** * Filters the status of the RUCSS option. * * @param array $should_disable will return array with disable status and text. */ $rucss_status = apply_filters( 'rocket_disable_rucss_setting', [ 'disable' => false, 'text' => '', ] ); if ( is_array( $rucss_status ) && key_exists( 'disable', $rucss_status ) && $rucss_status['disable'] ) { return; } rocket_notice_html( [ 'status' => 'wpr-warning', 'dismissible' => '', 'dismiss_button' => __FUNCTION__, 'message' => sprintf( // translators: %1$ = opening bold tag, %2$ = closing bold tag. __( 'We highly recommend the %1$supdated Remove Unused CSS%2$s for a better CSS optimization. Load CSS Asynchronously is always available as a back-up.', 'rocket' ), '', '' ), 'action' => 'switch_to_rucss', 'dismiss_button_message' => __( 'Stay with the old option', 'rocket' ), ] ); } /** * Switch to RUCSS. * * @return void */ public function switch_to_rucss() { check_admin_referer( 'rucss_switch' ); if ( ! current_user_can( 'rocket_manage_options' ) ) { wp_safe_redirect( wp_get_referer() ); rocket_get_constant( 'WP_ROCKET_IS_TESTING', false ) ? wp_die() : exit; return; // phpcs:ignore Squiz.PHP.NonExecutableCode.Unreachable } $this->options->set( 'async_css', false ); $this->options->set( 'remove_unused_css', true ); $this->options_api->set( 'settings', $this->options->get_options() ); rocket_dismiss_box( 'switch_to_rucss_notice' ); wp_safe_redirect( wp_get_referer() ); rocket_get_constant( 'WP_ROCKET_IS_TESTING', false ) ? wp_die() : exit; } }
Fatal error: Uncaught TypeError: Argument 1 passed to WP_Rocket\Event_Management\Event_Manager::add_subscriber() must implement interface WP_Rocket\Event_Management\Subscriber_Interface, string given, called in /home/merciket/public_html/wp-content/plugins/wp-rocket/inc/Plugin.php on line 155 and defined in /home/merciket/public_html/wp-content/plugins/wp-rocket/inc/classes/event-management/class-event-manager.php:33 Stack trace: #0 /home/merciket/public_html/wp-content/plugins/wp-rocket/inc/Plugin.php(155): WP_Rocket\Event_Management\Event_Manager->add_subscriber('WP_Rocket\\Engin...') #1 /home/merciket/public_html/wp-content/plugins/wp-rocket/inc/main.php(42): WP_Rocket\Plugin->load() #2 /home/merciket/public_html/wp-includes/class-wp-hook.php(324): rocket_init('') #3 /home/merciket/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #4 /home/merciket/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #5 /home/merciket/public_html/wp-settings.php(506): do_action('plugins_l in /home/merciket/public_html/wp-content/plugins/wp-rocket/inc/classes/event-management/class-event-manager.php on line 33