Skip to content

Commit

Permalink
Remove unused variable and fix phpcs issue
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Jul 2, 2018
1 parent 1bc4251 commit 11ea3d1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
9 changes: 0 additions & 9 deletions amp.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,6 @@ function amp_correct_query_when_is_front_page( WP_Query $query ) {
* ),
* ) );
*
* Or if you want to prevent AMP from being used on the front page and on any Other template that is unrecognized:
*
* add_theme_support( 'amp', array(
* 'templates_supported' => array(
* 'is_front_page' => false,
* 'unrecognized' => false,
* ),
* ) );
*
* Or if you want to force AMP to be used on all templates:
*
* add_theme_support( 'amp', array(
Expand Down
6 changes: 1 addition & 5 deletions includes/class-amp-theme-support.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,14 +458,10 @@ public static function get_template_availability( $query = null ) {
}

$all_templates_supported_by_theme_support = false;
$theme_templates_supported = array();
if ( isset( $theme_support_args['templates_supported'] ) ) {
$all_templates_supported_by_theme_support = 'all' === $theme_support_args['templates_supported'];
if ( is_array( $theme_support_args['templates_supported'] ) ) {
$theme_templates_supported = $theme_support_args['templates_supported'];
}
}
$all_templates_supported = (
$all_templates_supported = (
$all_templates_supported_by_theme_support || AMP_Options_Manager::get_option( 'all_templates_supported' )
);

Expand Down

0 comments on commit 11ea3d1

Please sign in to comment.