Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 16 years ago

#12743 closed enhancement (fixed)

Add $post_type as 3rd parameter to get_page_by_title() in /wp-includes/post.php

Reported by: mikeschinkel Owned by:
Priority: normal Milestone: 3.0
Component: Posts, Post Types Version: 3.0
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

This is a simple patch to add $post_type as a 3rd parameter to get_page_by_title() in /wp-includes/post.php. This is essentially identical to the logic for the 3rd parameter just added to get_page_by_path() in the same file.

Attachments (1)

post_type_param_for_get_page_by_title_in_post.php.diff​ (751 bytes ) - added by mikeschinkel 17 years ago.
Adds 3rd parameter to get_page_by_title() in /wp-includes/posts.php

Download all attachments as: .zip

Change History (4)

@mikeschinkel
17 years ago

Adds 3rd parameter to get_page_by_title() in /wp-includes/posts.php

#1 @nacin
17 years ago

  • Resolution → fixed
  • Status new → closed

(In [13899]) Add post type parameter to get_page_by_title(). props mikeschinkel, fixes #12743.

#2 @scribu
17 years ago

It would have been better if we left get_page_by_title() alone and created a more general function:

get_post_by($field, $value, $post_type);

This would be similar to get_term_by().

#3 @nacin
16 years ago

scribu -- Let's use #12726 for get_post_by()

Note: See TracTickets for help on using tickets.