Changeset 32617 for trunk/src/wp-includes/post-template.php
- Timestamp:
- 05/27/2015 04:25:17 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post-template.php
r32081 r32617 23 23 * @since 2.1.0 24 24 * 25 * @return int| boolThe ID of the current item in the WordPress Loop. False if $post is not set.25 * @return int|false The ID of the current item in the WordPress Loop. False if $post is not set. 26 26 */ 27 27 function get_the_ID() { … … 36 36 * 37 37 * @param string $before Optional. Content to prepend to the title. 38 * @param string $after Optional. Content to append to the title.39 * @param bool $echoOptional, default to true.Whether to display or return.40 * @return null|string Null on no title.String if $echo parameter is false.41 */ 42 function the_title( $before = '', $after = '', $echo = true) {38 * @param string $after Optional. Content to append to the title. 39 * @param bool $echo Optional, default to true.Whether to display or return. 40 * @return string|void String if $echo parameter is false. 41 */ 42 function the_title( $before = '', $after = '', $echo = true ) { 43 43 $title = get_the_title(); 44 44 … … 74 74 * @type WP_Post $post Current post object to retrieve the title for. 75 75 * } 76 * @return string| null Null on failure or display.String when echo is false.76 * @return string|void String when echo is false. 77 77 */ 78 78 function the_title_attribute( $args = '' ) { … … 238 238 * @since 0.71 239 239 * 240 * @global int $page 241 * @global int $more 242 * @global bool $preview 243 * @global array $pages 244 * @global int $multipage 245 * 240 246 * @param string $more_link_text Optional. Content for when there is more text. 241 247 * @param bool $strip_teaser Optional. Strip teaser content before the more text. Default is false. … … 521 527 * 522 528 * @since 2.8.0 529 * 530 * @global WP_Query $wp_query 531 * @global wpdb $wpdb 523 532 * 524 533 * @param string|array $class One or more classes to add to the class list. … … 727 736 * @since 2.7.0 728 737 * 729 * @param int|WP_Post $post An optional post. Global $post used if not provided.738 * @param int|WP_Post|null $post An optional post. Global $post used if not provided. 730 739 * @return bool false if a password is not required or the correct password cookie is present, true otherwise. 731 740 */ … … 760 769 * 761 770 * @since 1.2.0 771 * 772 * @global int $page 773 * @global int $numpages 774 * @global int $multipage 775 * @global int $more 762 776 * 763 777 * @param string|array $args { … … 783 797 */ 784 798 function wp_link_pages( $args = '' ) { 799 global $page, $numpages, $multipage, $more; 800 785 801 $defaults = array( 786 802 'before' => '<p>' . __( 'Pages:' ), … … 806 822 */ 807 823 $r = apply_filters( 'wp_link_pages_args', $params ); 808 809 global $page, $numpages, $multipage, $more;810 824 811 825 $output = ''; … … 878 892 * @access private 879 893 * 894 * @global WP_Rewrite $wp_rewrite 895 * 880 896 * @param int $i Page number. 881 897 * @return string Link. … … 922 938 * 923 939 * @param string $key Meta data key name. 924 * @return bool|string|array Array of values or single value, if only one element exists. False will be returned if key does not exist.940 * @return false|string|array Array of values or single value, if only one element exists. False will be returned if key does not exist. 925 941 */ 926 942 function post_custom( $key = '' ) { … … 1048 1064 * 1049 1065 * @see get_pages() 1066 * 1067 * @global WP_Query $wp_query 1050 1068 * 1051 1069 * @param array|string $args { … … 1075 1093 * @type Walker $walker Walker instance to use for listing pages. Default empty (Walker_Page). 1076 1094 * } 1077 * @return string HTML list of pages.1095 * @return string|void HTML list of pages. 1078 1096 */ 1079 1097 function wp_list_pages( $args = '' ) { … … 1173 1191 * you'd like shown for the home link. 1|true defaults to 'Home'. 1174 1192 * } 1175 * @return string htmlmenu1193 * @return string|void HTML menu 1176 1194 */ 1177 1195 function wp_page_menu( $args = array() ) { … … 1250 1268 * @uses Walker_Page to create HTML list content. 1251 1269 * @since 2.1.0 1252 * @see Walker_Page::walk() for parameters and return description. 1253 */ 1254 function walk_page_tree($pages, $depth, $current_page, $r) { 1270 * 1271 * @param array $pages 1272 * @param int $depth 1273 * @param int $current_page 1274 * @param array $r 1275 * @return string 1276 */ 1277 function walk_page_tree( $pages, $depth, $current_page, $r ) { 1255 1278 if ( empty($r['walker']) ) 1256 1279 $walker = new Walker_Page; … … 1273 1296 * @since 2.1.0 1274 1297 * @see Walker_PageDropdown::walk() for parameters and return description. 1298 * 1299 * @return string 1275 1300 */ 1276 1301 function walk_page_dropdown_tree() { … … 1311 1336 * 1312 1337 * @param string $output Passed by reference. Used to append additional content. 1313 * @param int $depthDepth of page. Used for padding.1314 * @param array $args1338 * @param int $depth Depth of page. Used for padding. 1339 * @param array $args 1315 1340 */ 1316 1341 public function start_lvl( &$output, $depth = 0, $args = array() ) { … … 1324 1349 * 1325 1350 * @param string $output Passed by reference. Used to append additional content. 1326 * @param int $depthDepth of page. Used for padding.1327 * @param array $args1351 * @param int $depth Depth of page. Used for padding. 1352 * @param array $args 1328 1353 */ 1329 1354 public function end_lvl( &$output, $depth = 0, $args = array() ) { … … 1336 1361 * @since 2.1.0 1337 1362 * 1338 * @param string $output Passed by reference. Used to append additional content.1339 * @param object $page Page data object.1340 * @param int $depthDepth of page. Used for padding.1341 * @param int $current_page Page ID.1342 * @param array $args1363 * @param string $output Passed by reference. Used to append additional content. 1364 * @param object $page Page data object. 1365 * @param int $depth Depth of page. Used for padding. 1366 * @param int $current_page Page ID. 1367 * @param array $args 1343 1368 */ 1344 1369 public function start_el( &$output, $page, $depth = 0, $args = array(), $current_page = 0 ) { … … 1420 1445 * @param string $output Passed by reference. Used to append additional content. 1421 1446 * @param object $page Page data object. Not used. 1422 * @param int $depth Depth of page. Not Used.1423 * @param array $args1447 * @param int $depth Depth of page. Not Used. 1448 * @param array $args 1424 1449 */ 1425 1450 public function end_el( &$output, $page, $depth = 0, $args = array() ) { … … 1459 1484 * @param int $depth Depth of page in reference to parent pages. Used for padding. 1460 1485 * @param array $args Uses 'selected' argument for selected page to set selected HTML attribute for option 1461 * element. Uses 'value_field' argument to fill "value" attribute. See {@see wp_dropdown_pages()}.1462 * @param int $id1486 * element. Uses 'value_field' argument to fill "value" attribute. See {@see wp_dropdown_pages()}. 1487 * @param int $id 1463 1488 */ 1464 1489 public function start_el( &$output, $page, $depth = 0, $args = array(), $id = 0 ) { … … 1681 1706 } 1682 1707 1683 if ( 'default' == $template && ! $page_template ) 1684 return true; 1685 1686 return false; 1708 return ( 'default' === $template && ! $page_template ); 1687 1709 } 1688 1710 … … 1693 1715 * 1694 1716 * @param int $post_id Optional. The page ID to check. Defaults to the current post, when used in the loop. 1695 * @return string| boolPage template filename. Returns an empty string when the default page template1717 * @return string|false Page template filename. Returns an empty string when the default page template 1696 1718 * is in use. Returns false if the post is not a page. 1697 1719 */ … … 1712 1734 * 1713 1735 * @param int|object $revision Revision ID or revision object. 1714 * @param bool $linkOptional, default is true. Link to revisions's page?1715 * @return string i18n formatted datetimestamp or localized 'Current Revision'.1736 * @param bool $link Optional, default is true. Link to revisions's page? 1737 * @return string|false i18n formatted datetimestamp or localized 'Current Revision'. 1716 1738 */ 1717 1739 function wp_post_revision_title( $revision, $link = true ) { … … 1747 1769 * 1748 1770 * @param int|object $revision Revision ID or revision object. 1749 * @param bool $linkOptional, default is true. Link to revisions's page?1750 * @return string gravatar, user, i18n formatted datetimestamp or localized 'Current Revision'.1771 * @param bool $link Optional, default is true. Link to revisions's page? 1772 * @return string|false gravatar, user, i18n formatted datetimestamp or localized 'Current Revision'. 1751 1773 */ 1752 1774 function wp_post_revision_title_expanded( $revision, $link = true ) { … … 1797 1819 * @param int|WP_Post $post_id Optional. Post ID or WP_Post object. Default is global $post. 1798 1820 * @param string $type 'all' (default), 'revision' or 'autosave' 1799 * @return null1800 1821 */ 1801 1822 function wp_list_post_revisions( $post_id = 0, $type = 'all' ) {
Note: See TracChangeset
for help on using the changeset viewer.