gs, page sections, fields sections and fields. * * @since 3.0 */ public function configure() { register_setting( $this->slug, WP_ROCKET_SLUG, [ $this->settings, 'sanitize_callback' ] ); } /** * Renders the settings page. * * @since 3.0 */ public function render_page() { $rocket_valid_key = rocket_valid_key(); if ( $rocket_valid_key ) { $this->dashboard_section(); $this->rocket_insights_section(); $this->assets_section(); $this->media_section(); $this->preload_section(); $this->advanced_cache_section(); $this->database_section(); $this->cdn_section(); $this->heartbeat_section(); $this->addons_section(); $this->cloudflare_section(); // $this->sucuri_section(); CL. } else { $this->license_section(); } $this->render->set_settings( $this->settings->get_settings() ); $this->hidden_fields(); $this->render->set_hidden_settings( $this->settings->get_hidden_settings() ); $btn_submit_text = $rocket_valid_key ? __( 'Save Changes', 'rocket' ) : __( 'Validate License', 'rocket' ); echo $this->render->generate( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Dynamic content is properly escaped in the view. 'page', [ 'slug' => $this->slug, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Dynamic content is properly escaped in the view. 'btn_submit_text' => $btn_submit_text, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Dynamic content is properly escaped in the view. ] ); } /** * Enqueues WP Rocket scripts on the settings page * * @since 3.6.1 * * @param string $hook The current admin page. * * @return void */ public function enqueue_rocket_scripts( $hook ) { if ( 'settings_page_clsop' !== $hook ) { return; } wp_enqueue_script( 'wistia-e-v1', 'https://fast.wistia.com/assets/external/E-v1.js', [], null, true ); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion } /** * Adds the async attribute to the Wistia script * * @since 3.6.1 * * @param string $tag The