Make WordPress Core


Ignore:
Timestamp:
10/02/2013 07:41:19 PM (11 years ago)
Author:
wonderboymusic
Message:

Make url_to_postid() work for custom post type URLs. Use get_post_types() and get_taxonomies() instead of directly accessing globals. Adds unit test.

Props faishal, for the globals fix.
Fixes #19744.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/query.php

    r25632 r25659  
    17361736        }
    17371737
    1738         foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) {
     1738        foreach ( get_taxonomies( array() , 'objects' ) as $taxonomy => $t ) {
    17391739            if ( 'post_tag' == $taxonomy )
    17401740                continue;   // Handled further down in the $q['tag'] block
Note: See TracChangeset for help on using the changeset viewer.