WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #12726, comment 10


Ignore:
Timestamp:
10/11/2013 01:07:59 AM (7 years ago)
Author:
ericlewis
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12726, comment 10

    initial v1  
    1 `get_page_by_path()` and `get_page_by_title()` have both allowed $post_type to be passed as an argument since r13774. I don't see a lot of benefit here, as there aren't any other unique identifying fields for posts other than ID and post_name (making `get_page_by_title()` problematic in my eyes, since it returns the first post with the given title, ignoring multiple posts).
     1`get_page_by_path()` and `get_page_by_title()` have both allowed $post_type to be passed as an argument since r13774 and r13899. I don't see a lot of benefit here, as there aren't any other unique identifying fields for posts other than ID and post_name (making `get_page_by_title()` problematic in my eyes, since it returns the first post with the given title, ignoring multiple posts).
    22
    33I'd say worksforme here, unless there are some good use cases I'm missing.