diff --git a/includes/class-amp-theme-support.php b/includes/class-amp-theme-support.php index 65e88ce2eec..75d823a1071 100644 --- a/includes/class-amp-theme-support.php +++ b/includes/class-amp-theme-support.php @@ -374,19 +374,6 @@ public static function get_template_availability( $query = null ) { $matching_templates = array(); $supportable_templates = self::get_supportable_templates(); - - /* - * Singular template support is included here though it is not explicitly listed among the templates by default. - * It is the post type support that is used to indicate whether a given singular post template should be served - * via post_supports_amp() including the metabox toggle to enable/disable AMP, and the amp_skip_post filter. - */ - if ( ! isset( $supportable_templates['is_singular'] ) ) { - $supportable_templates['is_singular'] = array( - 'callback' => 'is_singular', - 'supported' => true, - ); - } - foreach ( $supportable_templates as $id => $supportable_template ) { if ( empty( $supportable_template['callback'] ) ) { $callback = $id; @@ -468,14 +455,13 @@ public static function get_template_availability( $query = null ) { /** * Get the templates which can be supported. * - * @todo The callback could have support for running in an admin context. * @return array Supportable templates. */ public static function get_supportable_templates() { $templates = array( 'is_singular' => array( - 'label' => __( 'Singular', 'amp' ), - // This needs to default to true. + 'label' => __( 'Singular', 'amp' ), + 'description' => __( 'Required for the above content types.', 'amp' ), ), ); if ( 'page' === get_option( 'show_on_front' ) ) { diff --git a/includes/options/class-amp-options-manager.php b/includes/options/class-amp-options-manager.php index ebfd274388a..0ec87537169 100644 --- a/includes/options/class-amp-options-manager.php +++ b/includes/options/class-amp-options-manager.php @@ -30,7 +30,9 @@ class AMP_Options_Manager { 'accept_tree_shaking' => false, 'disable_admin_bar' => false, 'all_templates_supported' => true, - 'supported_templates' => array(), + 'supported_templates' => array( + 'is_singular', + ), ); /**