diff --git a/includes/options/class-amp-options-manager.php b/includes/options/class-amp-options-manager.php index 02f73c84d6c..ab2bc8792a0 100644 --- a/includes/options/class-amp-options-manager.php +++ b/includes/options/class-amp-options-manager.php @@ -27,7 +27,6 @@ class AMP_Options_Manager { 'supported_post_types' => array( 'post' ), 'analytics' => array(), 'auto_accept_sanitization' => true, - 'accept_tree_shaking' => true, 'all_templates_supported' => true, 'supported_templates' => array( 'is_singular' ), 'enable_response_caching' => true, @@ -135,7 +134,6 @@ public static function validate_options( $new_options ) { } $options['auto_accept_sanitization'] = ! empty( $new_options['auto_accept_sanitization'] ); - $options['accept_tree_shaking'] = ! empty( $new_options['accept_tree_shaking'] ); $options['enable_amp_stories'] = ! empty( $new_options['enable_amp_stories'] ); // Validate post type support. diff --git a/includes/options/class-amp-options-menu.php b/includes/options/class-amp-options-menu.php index 86214d667a7..0fe5726f5d8 100644 --- a/includes/options/class-amp-options-menu.php +++ b/includes/options/class-amp-options-menu.php @@ -270,15 +270,8 @@ public function render_validation_handling() { 'code' => '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']; ?> @@ -320,22 +313,6 @@ public function render_validation_handling() { - - - -
- -
-- -
-