is_offline_mode() ) { $position = defined( Admin_Menu::class . '::POSITION_FIRST_FALLBACK' ) ? Admin_Menu::POSITION_FIRST_FALLBACK : -5; return Admin_Menu::add_menu( __( 'Jetpack Settings', 'jetpack' ), __( 'Modules', 'jetpack' ), 'jetpack_manage_modules', 'jetpack_modules', array( $this, 'render' ), $position ); } return add_submenu_page( '', __( 'Jetpack Settings', 'jetpack' ), __( 'Settings', 'jetpack' ), 'jetpack_manage_modules', 'jetpack_modules', array( $this, 'render' ) ); } /** * Renders the module list table where you can use bulk action or row * actions to activate/deactivate and configure modules */ public function page_render() { $list_table = new Jetpack_Modules_List_Table(); // Currently selected product group filter (used to highlight the active View button). // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- This is view logic. $current_group = isset( $_GET['product_group'] ) ? sanitize_text_field( wp_unslash( $_GET['product_group'] ) ) : ''; $is_offline_mode = ( new Status() )->is_offline_mode(); // Currently selected offline-availability filter (only meaningful in Offline Mode). // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- This is view logic. $current_availability = isset( $_GET['offline_available'] ) ? sanitize_text_field( wp_unslash( $_GET['offline_available'] ) ) : ''; // We have static.html so let's continue trying to fetch the others. $noscript_notice = @file_get_contents( JETPACK__PLUGIN_DIR . '_inc/build/static-noscript-notice.html' ); //phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents, Not fetching a remote file. $rest_api_notice = @file_get_contents( JETPACK__PLUGIN_DIR . '_inc/build/static-version-notice.html' ); //phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents, Not fetching a remote file. $noscript_notice = str_replace( '#HEADER_TEXT#', esc_html__( 'You have JavaScript disabled', 'jetpack' ), $noscript_notice ); $noscript_notice = str_replace( '#TEXT#', esc_html__( "Turn on JavaScript to unlock Jetpack's full potential!", 'jetpack' ), $noscript_notice ); $rest_api_notice = str_replace( '#HEADER_TEXT#', esc_html( __( 'WordPress REST API is disabled', 'jetpack' ) ), $rest_api_notice ); $rest_api_notice = str_replace( '#TEXT#', esc_html( __( "Enable WordPress REST API to unlock Jetpack's full potential!", 'jetpack' ) ), $rest_api_notice ); if ( ! $this->is_rest_api_enabled() ) { echo $rest_api_notice; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } echo $noscript_notice; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>

unprotected_display_tablenav( 'top' ); ?>
display_rows_or_placeholder(); ?>
record_user_event( 'wpa_page_view', array( 'path' => 'old_settings' ) ); } /** * Load styles for static page. * * @since 4.3.0 */ public function additional_styles() { Jetpack_Admin_Page::load_wrapper_styles(); } /** * Javascript logic specific to the list table */ public function page_admin_scripts() { wp_enqueue_script( 'jetpack-admin-js', Assets::get_file_url_for_environment( '_inc/build/jetpack-admin.min.js', '_inc/jetpack-admin.js' ), array( 'jquery' ), JETPACK__VERSION, true ); } }