Skip to content

Commit

Permalink
updated code as suggested
Browse files Browse the repository at this point in the history
  • Loading branch information
AakifKadiwala committed Jan 2, 2025
1 parent 7874987 commit 3473943
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/wp-includes/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -8474,7 +8474,7 @@ function wp_create_initial_post_meta() {
/**
* Retrieves page IDs, permalinks, or titles based on a template file name.
*
* Queries pages using a specified template file and returns an array of
* Queries pages using a specified template file and returns an array of
* IDs, permalinks, or titles based on the provided field parameter.
*
* @param string $template The template file name to search for.
Expand All @@ -8499,7 +8499,6 @@ function get_page_by_template( $template, $field = 'ID' ) {

if ( $query->have_posts() ) {
$template_page_ids = $query->posts;

if ( 'ID' === $field ) {
wp_reset_postdata();
return $template_page_ids;
Expand Down

0 comments on commit 3473943

Please sign in to comment.