Make WordPress Core


Ignore:
Timestamp:
11/26/2009 11:29:54 AM (15 years ago)
Author:
azaozz
Message:

Fix notices and phpdoc, props hakre, fixes #10758

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r12279 r12284  
    19421942 * Given the desired slug and some post details computes a unique slug for the post.
    19431943 *
     1944 * @global wpdb $wpdb
     1945 * @global WP_Rewrite $wp_rewrite
    19441946 * @param string $slug the desired slug (post_name)
    19451947 * @param integer $post_ID
     
    19541956
    19551957    global $wpdb, $wp_rewrite;
     1958
     1959    $feeds = $wp_rewrite->feeds;
     1960    if ( !is_array($feeds) )
     1961        $feeds = array();
     1962
    19561963    $hierarchical_post_types = apply_filters('hierarchical_post_types', array('page'));
    19571964    if ( 'attachment' == $post_type ) {
     
    19601967        $post_name_check = $wpdb->get_var($wpdb->prepare($check_sql, $slug, $post_ID));
    19611968
    1962         if ( $post_name_check || in_array($slug, $wp_rewrite->feeds) ) {
     1969        if ( $post_name_check || in_array($slug, $feeds) ) {
    19631970            $suffix = 2;
    19641971            do {
     
    19751982        $post_name_check = $wpdb->get_var($wpdb->prepare($check_sql, $slug, $post_ID, $post_parent));
    19761983
    1977         if ( $post_name_check || in_array($slug, $wp_rewrite->feeds) ) {
     1984        if ( $post_name_check || in_array($slug, $feeds) ) {
    19781985            $suffix = 2;
    19791986            do {
Note: See TracChangeset for help on using the changeset viewer.