Skip to content

Commit

Permalink
Fixing coding standard error
Browse files Browse the repository at this point in the history
Fixing coding standard error as per the PHPCS
  • Loading branch information
AakifKadiwala committed Jan 3, 2025
1 parent ca1dd5d commit 43d3772
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/wp-includes/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -8500,12 +8500,11 @@ function get_page_by_template( $template, $field = 'ID' ) {
if ( $query->have_posts() ) {

Check failure on line 8500 in src/wp-includes/post.php

View workflow job for this annotation

GitHub Actions / PHP coding standards / Run coding standards checks

Whitespace found at end of line
$template_page_ids = $query->posts;
wp_reset_postdata();

if ( 'ID' === $field ) {
if ( 'ID' === $field ) {
return $template_page_ids;
} elseif ( 'title' === $field ) {
} elseif ( 'title' === $field ) {
return array_combine( $template_page_ids, array_map( 'get_the_title', $template_page_ids ) );
} elseif ( 'permalink' === $field ) {
} elseif ( 'permalink' === $field ) {
return array_combine( $template_page_ids, array_map( 'get_permalink', $template_page_ids ) );
}
}
Expand Down

0 comments on commit 43d3772

Please sign in to comment.