'; esc_html_e( 'Error fetching static.html. Try running: ', 'jetpack' ); echo 'yarn distclean && yarn build'; echo '

'; return; } // 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' ); $version_notice = $rest_api_notice = @file_get_contents( JETPACK__PLUGIN_DIR . '_inc/build/static-version-notice.html' ); $ie_notice = @file_get_contents( JETPACK__PLUGIN_DIR . '_inc/build/static-ie-notice.html' ); $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 ); $version_notice = str_replace( '#HEADER_TEXT#', esc_html__( 'You are using an outdated version of WordPress', 'jetpack' ), $version_notice ); $version_notice = str_replace( '#TEXT#', esc_html__( "Update WordPress to unlock Jetpack's full potential!", 'jetpack' ), $version_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 ); $ie_notice = str_replace( '#HEADER_TEXT#', esc_html__( 'You are using an unsupported browser version.', 'jetpack' ), $ie_notice ); $ie_notice = str_replace( '#TEXT#', esc_html__( "Update your browser to unlock Jetpack's full potential!", 'jetpack' ), $ie_notice ); ob_start(); $this->admin_page_top(); if ( $this->is_wp_version_too_old() ) { echo $version_notice; } if ( ! $this->is_rest_api_enabled() ) { echo $rest_api_notice; } echo $noscript_notice; echo $ie_notice; ?>
unprotected_display_tablenav( 'top' ); ?>
display_rows_or_placeholder(); ?>
admin_page_bottom(); $page_content = ob_get_contents(); ob_end_clean(); echo str_replace( '
', $page_content, $static_html ); JetpackTracking::record_user_event( 'wpa_page_view', array( 'path' => 'old_settings' ) ); } /** * Load styles for static page. * * @since 4.3.0 */ function additional_styles() { $rtl = is_rtl() ? '.rtl' : ''; wp_enqueue_style( 'dops-css', plugins_url( "_inc/build/admin.dops-style$rtl.css", JETPACK__PLUGIN_FILE ), array(), JETPACK__VERSION ); wp_enqueue_style( 'components-css', plugins_url( "_inc/build/style.min$rtl.css", JETPACK__PLUGIN_FILE ), array(), JETPACK__VERSION ); } // Javascript logic specific to the list table function page_admin_scripts() { wp_enqueue_script( 'jetpack-admin-js', plugins_url( '_inc/jetpack-admin.js', JETPACK__PLUGIN_FILE ), array( 'jquery' ), JETPACK__VERSION ); } }