Changeset 8103 for branches/crazyhorse/wp-includes/post.php
- Timestamp:
- 06/16/2008 09:08:49 PM (18 years ago)
- File:
-
- 1 edited
-
branches/crazyhorse/wp-includes/post.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/crazyhorse/wp-includes/post.php
r8058 r8103 1 1 <?php 2 2 /** 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. 4 8 * 5 9 * @package WordPress … … 751 755 752 756 /** 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. 756 768 * 757 769 * @package WordPress 758 770 * @subpackage Post 759 771 * @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 763 777 */ 764 778 function wp_count_posts( $type = 'post', $perm = '' ) { … … 1814 1828 function get_page_uri($page_id) { 1815 1829 $page = get_page($page_id); 1816 $uri = urldecode($page->post_name);1830 $uri = $page->post_name; 1817 1831 1818 1832 // A page cannot be it's own parent. … … 1822 1836 while ($page->post_parent != 0) { 1823 1837 $page = get_page($page->post_parent); 1824 $uri = urldecode($page->post_name). "/" . $uri;1838 $uri = $page->post_name . "/" . $uri; 1825 1839 } 1826 1840
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)