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' ); $native_description = __( 'Reuses active theme\'s templates to display AMP responses but does not use separate URLs for AMP. This means your site is AMP-first and your canonical URLs are AMP.', 'amp' ); $paired_description = __( 'Reuses active theme\'s templates to display AMP responses, but uses separate URLs for AMP. Each canonical URL may have a corresponding AMP URL, if the content is fully AMP valid.', 'amp' ); $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' ) ) ) ) ) ?>

>

>

>

>

.