Make WordPress Core


Ignore:
Timestamp:
06/16/2008 09:08:49 PM (18 years ago)
Author:
mdawaffe
Message:

crazyhorse: merge with trunk [8072:8102]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/crazyhorse/wp-includes/post.php

    r8058 r8103  
    11<?php
    22/**
    3  * Post functions and post utility function
     3 * Post functions and post utility function.
     4 *
     5 * Warning: The inline documentation for the functions contained
     6 * in this file might be inaccurate, so the documentation is not
     7 * authoritative at the moment.
    48 *
    59 * @package WordPress
     
    751755
    752756/**
    753  * wp_count_posts() - Count number of posts with a given type
    754  *
    755  * {@internal Missing Long Description}}
     757 * Count number of posts of a post type and is permissible.
     758 *
     759 * This function provides an efficient method of finding the amount
     760 * of post's type a blog has. Another method is to count the amount
     761 * of items in get_posts(), but that method has a lot of overhead
     762 * with doing so. Therefore, when developing for 2.5+, use this
     763 * function instead.
     764 *
     765 * The $perm parameter checks for 'readable' value and if the user
     766 * can read private posts, it will display that for the user that
     767 * is signed in.
    756768 *
    757769 * @package WordPress
    758770 * @subpackage Post
    759771 * @since 2.5
    760  *
    761  * @param string $type Post type
    762  * @return array Number of posts for each status
     772 * @link http://codex.wordpress.org/Template_Tags/wp_count_posts
     773 *
     774 * @param string $type Optional. Post type to retrieve count
     775 * @param string $perm Optional. 'readable' or empty.
     776 * @return object Number of posts for each status
    763777 */
    764778function wp_count_posts( $type = 'post', $perm = '' ) {
     
    18141828function get_page_uri($page_id) {
    18151829        $page = get_page($page_id);
    1816         $uri = urldecode($page->post_name);
     1830        $uri = $page->post_name;
    18171831
    18181832        // A page cannot be it's own parent.
     
    18221836        while ($page->post_parent != 0) {
    18231837                $page = get_page($page->post_parent);
    1824                 $uri = urldecode($page->post_name) . "/" . $uri;
     1838                $uri = $page->post_name . "/" . $uri;
    18251839        }
    18261840
Note: See TracChangeset for help on using the changeset viewer.