sprintf( '%2$s', esc_url( add_query_arg( 'page', AMP_Options_Manager::OPTION_NAME, admin_url( 'admin.php' ) ) ), __( 'Settings', 'amp' ) ), ), $links ); } /** * Add menu. */ public function add_menu_items() { add_menu_page( __( 'AMP Options', 'amp' ), __( 'AMP', 'amp' ), 'edit_posts', AMP_Options_Manager::OPTION_NAME, array( $this, 'render_screen' ), self::ICON_BASE64_SVG ); add_submenu_page( AMP_Options_Manager::OPTION_NAME, __( 'AMP Settings', 'amp' ), __( 'General', 'amp' ), 'edit_posts', AMP_Options_Manager::OPTION_NAME ); add_settings_section( 'general', false, '__return_false', AMP_Options_Manager::OPTION_NAME ); add_settings_field( 'theme_support', __( 'Template Mode', 'amp' ), array( $this, 'render_theme_support' ), AMP_Options_Manager::OPTION_NAME, 'general', array( 'class' => 'theme_support', ) ); add_settings_field( 'validation', __( 'Validation Handling', 'amp' ), array( $this, 'render_validation_handling' ), AMP_Options_Manager::OPTION_NAME, 'general', array( 'class' => 'amp-validation-field', ) ); add_settings_field( 'supported_templates', __( 'Supported Templates', 'amp' ), array( $this, 'render_supported_templates' ), AMP_Options_Manager::OPTION_NAME, 'general', array( 'class' => 'amp-template-support-field', ) ); if ( wp_using_ext_object_cache() ) { add_settings_field( 'caching', __( 'Caching', 'amp' ), array( $this, 'render_caching' ), AMP_Options_Manager::OPTION_NAME, 'general', array( 'class' => 'amp-caching-field', ) ); } $submenus = array( new AMP_Analytics_Options_Submenu( AMP_Options_Manager::OPTION_NAME ), ); // Create submenu items and calls on the Submenu Page object to render the actual contents of the page. foreach ( $submenus as $submenu ) { $submenu->init(); } } /** * Render theme support. * * @since 1.0 */ public function render_theme_support() { $theme_support = AMP_Options_Manager::get_option( 'theme_support' ); /* translators: %s: URL to the documentation. */ $native_description = sprintf( __( 'Integrates AMP as the framework for your site by using the active’s theme templates and styles to render AMP responses. This means your site is AMP-first and your canonical URLs are AMP! Depending on your theme/plugins, a varying level of development work may be required.', 'amp' ), esc_url( 'https://amp-wp.org/documentation/developing-wordpress-amp-sites/' ) ); /* translators: %s: URL to the documentation. */ $transitional_description = sprintf( __( 'Uses the active theme’s templates to generate non-AMP and AMP versions of your content, allowing for each canonical URL to have a corresponding (paired) AMP URL. This mode is useful to progressively transition towards a fully AMP-first site. Depending on your theme/plugins, a varying level of development work may be required.', 'amp' ), esc_url( 'https://amp-wp.org/documentation/developing-wordpress-amp-sites/' ) ); $reader_description = __( 'Formerly called the classic mode, this mode generates paired AMP content using simplified templates which may not match the look-and-feel of your site. Only posts/pages can be served as AMP in Reader mode. No redirection is performed for mobile visitors; AMP pages are served by AMP consumption platforms.', 'amp' ); /* translators: %s: URL to the ecosystem page. */ $ecosystem_description = sprintf( __( 'For a list of themes and plugins that are known to be AMP compatible, please see the ecosystem page.' ), esc_url( 'https://amp-wp.org/ecosystem/' ) ); $builtin_support = in_array( get_template(), AMP_Core_Theme_Sanitizer::get_supported_themes(), true ); ?>

>

>
>
>
publish > 0 ) : ?>

%s', esc_url( add_query_arg( 'post_type', AMP_Validated_URL_Post_Type::POST_TYPE_SLUG, admin_url( 'edit.php' ) ) ), esc_html( get_post_type_object( AMP_Validated_URL_Post_Type::POST_TYPE_SLUG )->labels->name ) ), sprintf( '%s', esc_url( add_query_arg( array( 'taxonomy' => AMP_Validation_Error_Taxonomy::TAXONOMY_SLUG, 'post_type' => AMP_Validated_URL_Post_Type::POST_TYPE_SLUG, ), admin_url( 'edit-tags.php' ) ) ), esc_html( get_taxonomy( AMP_Validation_Error_Taxonomy::TAXONOMY_SLUG )->labels->name ) ) ) ); ?>

> 'non_existent', ) ); remove_filter( 'amp_validation_error_sanitized', array( 'AMP_Validation_Manager', 'filter_tree_shaking_validation_error_as_accepted' ) ); $tree_shaking_sanitization = AMP_Validation_Error_Taxonomy::get_validation_error_sanitization( array( 'code' => AMP_Style_Sanitizer::TREE_SHAKING_ERROR_CODE, ) ); $forced_sanitization = 'with_filter' === $auto_sanitization['forced']; $forced_tree_shaking = $forced_sanitization || 'with_filter' === $tree_shaking_sanitization['forced']; ?>

bulk-accepting them).', 'amp' ), esc_url( add_query_arg( array( 'taxonomy' => AMP_Validation_Error_Taxonomy::TAXONOMY_SLUG, 'post_type' => AMP_Validated_URL_Post_Type::POST_TYPE_SLUG, ), admin_url( 'edit-tags.php' ) ) ) ) ) ?>

>

>

>

>

.