Skip to content

Commit 878bebb

Browse files
committed
Fix reference to page_on_front
1 parent b1a45e2 commit 878bebb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Validation/ScannableURLProvider.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,12 @@ public function get_supportable_templates() {
7171
'is_singular',
7272
];
7373
if ( 'page' === get_option( 'show_on_front' ) ) {
74-
if ( get_option( 'page_for_posts' ) && amp_is_post_supported( get_option( 'page_for_posts' ) ) ) {
74+
$page_for_posts = get_option( 'page_for_posts' );
75+
if ( $page_for_posts && amp_is_post_supported( $page_for_posts ) ) {
7576
$allowed_templates[] = 'is_home';
7677
}
77-
if ( get_option( 'page_on_front' ) && amp_is_post_supported( get_option( 'page_for_posts' ) ) ) {
78+
$page_on_front = get_option( 'page_on_front' );
79+
if ( $page_on_front && amp_is_post_supported( $page_on_front ) ) {
7880
$allowed_templates[] = 'is_front_page';
7981
}
8082
}

0 commit comments

Comments
 (0)