Changeset 37254
- Timestamp:
- 04/20/2016 06:31:05 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r37252 r37254 1258 1258 * @since 2.3.0 1259 1259 * 1260 * @param int $id Optional. Post ID. 1261 * @param string $context Optional , defaults to display. How to write the '&', defaults to'&'.1260 * @param int $id Optional. Post ID. Default is the ID of the global `$post`. 1261 * @param string $context Optional. How to output the '&' character. Default '&'. 1262 1262 * @return string|null The edit post link for the given post. null if the post type is invalid or does 1263 1263 * not allow an editing UI. … … 1306 1306 * @since 4.4.0 The `$class` argument was added. 1307 1307 * 1308 * @param string $text Optional. Anchor text. 1309 * @param string $before Optional. Display before edit link. 1310 * @param string $after Optional. Display after edit link. 1311 * @param int $id Optional. Post ID. 1312 * @param string $class Optional. Add custom class to link. 1308 * @param string $text Optional. Anchor text. If null, default is 'Edit This'. Default null. 1309 * @param string $before Optional. Display before edit link. Default empty. 1310 * @param string $after Optional. Display after edit link. Default empty. 1311 * @param int $id Optional. Post ID. Default is the ID of the global `$post`. 1312 * @param string $class Optional. Add custom class to link. Default 'post-edit-link'. 1313 1313 */ 1314 1314 function edit_post_link( $text = null, $before = '', $after = '', $id = 0, $class = 'post-edit-link' ) { … … 1346 1346 * @since 2.9.0 1347 1347 * 1348 * @param int $id Optional. Post ID. 1348 * @param int $id Optional. Post ID. Default is the ID of the global `$post`. 1349 1349 * @param string $deprecated Not used. 1350 * @param bool $force_delete Whether to bypass trash and force deletion. Default isfalse.1350 * @param bool $force_delete Optional. Whether to bypass trash and force deletion. Default false. 1351 1351 * @return string|void The delete post link URL for the given post. 1352 1352 */ … … 1412 1412 * @since 1.0.0 1413 1413 * 1414 * @param string $text Optional. Anchor text. 1415 * @param string $before Optional. Display before edit link. 1416 * @param string $after Optional. Display after edit link. 1414 * @param string $text Optional. Anchor text. If null, default is 'Edit This'. Default null. 1415 * @param string $before Optional. Display before edit link. Default empty. 1416 * @param string $after Optional. Display after edit link. Default empty. 1417 1417 */ 1418 1418 function edit_comment_link( $text = null, $before = '', $after = '' ) { … … 1446 1446 * @since 2.7.0 1447 1447 * 1448 * @param int|stdClass $link Optional. Bookmark ID. 1448 * @param int|stdClass $link Optional. Bookmark ID. Default is the id of the current bookmark. 1449 1449 * @return string|void The edit bookmark link URL. 1450 1450 */ … … 1473 1473 * @since 2.7.0 1474 1474 * 1475 * @param string $link Optional. Anchor text. 1476 * @param string $before Optional. Display before edit link. 1477 * @param string $after Optional. Display after edit link. 1478 * @param int $bookmark Optional. Bookmark ID. 1475 * @param string $link Optional. Anchor text. Default empty. 1476 * @param string $before Optional. Display before edit link. Default empty. 1477 * @param string $after Optional. Display after edit link. Default empty. 1478 * @param int $bookmark Optional. Bookmark ID. Default is the current bookmark. 1479 1479 */ 1480 1480 function edit_bookmark_link( $link = '', $before = '', $after = '', $bookmark = null ) { … … 1543 1543 * @since 1.5.0 1544 1544 * 1545 * @param bool $in_same_term Optional. Whether post should be in a same taxonomy term. 1546 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. 1545 * @param bool $in_same_term Optional. Whether post should be in a same taxonomy term. Default false. 1546 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty. 1547 1547 * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. 1548 * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists. 1548 * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no 1549 * corresponding post exists. 1549 1550 */ 1550 1551 function get_previous_post( $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) { … … 1557 1558 * @since 1.5.0 1558 1559 * 1559 * @param bool $in_same_term Optional. Whether post should be in a same taxonomy term. 1560 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. 1560 * @param bool $in_same_term Optional. Whether post should be in a same taxonomy term. Default false. 1561 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty. 1561 1562 * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. 1562 * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists. 1563 * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no 1564 * corresponding post exists. 1563 1565 */ 1564 1566 function get_next_post( $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) { … … 1575 1577 * @global wpdb $wpdb WordPress database abstraction object. 1576 1578 * 1577 * @param bool $in_same_term Optional. Whether post should be in a same taxonomy term. 1578 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. 1579 * @param bool $previous Optional. Whether to retrieve previous post. 1579 * @param bool $in_same_term Optional. Whether post should be in a same taxonomy term. Default false. 1580 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty. 1581 * @param bool $previous Optional. Whether to retrieve previous post. Default true 1580 1582 * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. 1581 * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists. 1583 * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no 1584 * corresponding post exists. 1582 1585 */ 1583 1586 function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) { … … 1750 1753 * @since 2.8.0 1751 1754 * 1752 * @param string $title Optional. Link title format. 1753 * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. 1754 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. 1755 * @param string $title Optional. Link title format. Default '%title'. 1756 * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false. 1757 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty. 1755 1758 * @param bool $previous Optional. Whether to display link to previous or next post. Default true. 1756 1759 * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. … … 1800 1803 * @since 2.8.0 1801 1804 * 1802 * @param string $title Optional. Link title format. 1803 * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. 1804 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. 1805 * @param string $title Optional. Link title format. Default '%title'. 1806 * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false. 1807 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty. 1805 1808 * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. 1806 1809 */ … … 1813 1816 * Displays relational links for the posts adjacent to the current post for single post pages. 1814 1817 * 1815 * This is meant to be attached to actions like 'wp_head'. Do not call this directly in plugins or theme templates. 1818 * This is meant to be attached to actions like 'wp_head'. Do not call this directly in plugins 1819 * or theme templates. 1820 * 1816 1821 * @since 3.0.0 1817 1822 * 1823 * @see adjacent_posts_rel_link() 1818 1824 */ 1819 1825 function adjacent_posts_rel_link_wp_head() { … … 1829 1835 * @since 2.8.0 1830 1836 * 1831 * @param string $title Optional. Link title format. 1832 * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. 1833 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. 1837 * @see get_adjacent_post_rel_link() 1838 * 1839 * @param string $title Optional. Link title format. Default '%title'. 1840 * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false. 1841 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty. 1834 1842 * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. 1835 1843 */ … … 1843 1851 * @since 2.8.0 1844 1852 * 1845 * @param string $title Optional. Link title format. 1846 * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. 1853 * @see get_adjacent_post_rel_link() 1854 * 1855 * @param string $title Optional. Link title format. Default '%title'. 1856 * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false. 1847 1857 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default true. 1848 1858 * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. … … 1861 1871 * 1862 1872 * @param bool $in_same_term Optional. Whether returned post should be in a same taxonomy term. 1873 * Default false. 1863 1874 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. 1864 * @param bool $start Optional. Whether to retrieve first or last post. 1875 * Default empty. 1876 * @param bool $start Optional. Whether to retrieve first or last post. Default true 1865 1877 * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. 1866 1878 * @return null|array Array containing the boundary post object if successful, null otherwise. … … 1915 1927 * @since 3.7.0 1916 1928 * 1917 * @param string $format Optional. Link anchor format. 1918 * @param string $link Optional. Link permalink format. 1919 * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. 1920 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. 1929 * @param string $format Optional. Link anchor format. Default '« %link'. 1930 * @param string $link Optional. Link permalink format. Default '%title%'. 1931 * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false. 1932 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty. 1921 1933 * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. 1922 1934 * @return string The link URL of the previous post in relation to the current post. … … 1933 1945 * @see get_previous_post_link() 1934 1946 * 1935 * @param string $format Optional. Link anchor format. 1936 * @param string $link Optional. Link permalink format. 1937 * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. 1938 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. 1947 * @param string $format Optional. Link anchor format. Default '« %link'. 1948 * @param string $link Optional. Link permalink format. Default '%title'. 1949 * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false. 1950 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty. 1939 1951 * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. 1940 1952 */ … … 1948 1960 * @since 3.7.0 1949 1961 * 1950 * @param string $format Optional. Link anchor format. 1951 * @param string $link Optional. Link permalink format. 1952 * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. 1953 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. 1962 * @param string $format Optional. Link anchor format. Default '« %link'. 1963 * @param string $link Optional. Link permalink format. Default '%title'. 1964 * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false. 1965 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty. 1954 1966 * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. 1955 1967 * @return string The link URL of the next post in relation to the current post. … … 1965 1977 * @see get_next_post_link() 1966 1978 * 1967 * @param string $format Optional. Link anchor format. 1968 * @param string $link Optional. Link permalink format. 1969 * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. 1970 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. 1979 * @param string $format Optional. Link anchor format. Default '« %link'. 1980 * @param string $link Optional. Link permalink format. Default '%title' 1981 * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false. 1982 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty. 1971 1983 * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. 1972 1984 */ … … 1984 1996 * @param string $format Link anchor format. 1985 1997 * @param string $link Link permalink format. 1986 * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. 1987 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded terms IDs. 1998 * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false. 1999 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded terms IDs. Default empty. 1988 2000 * @param bool $previous Optional. Whether to display link to previous or next post. Default true. 1989 2001 * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. … … 2047 2059 * @param string $format Link anchor format. 2048 2060 * @param string $link Link permalink format. 2049 * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. 2050 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded category IDs. 2061 * @param bool $in_same_term Optional. Whether link should be in a same taxonomy term. Default false. 2062 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded category IDs. Default empty. 2051 2063 * @param bool $previous Optional. Whether to display link to previous or next post. Default true. 2052 2064 * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. … … 2063 2075 * @global WP_Rewrite $wp_rewrite 2064 2076 * 2065 * @param int $pagenum Optional. Page ID. 2077 * @param int $pagenum Optional. Page ID. Default 1. 2066 2078 * @param bool $escape Optional. Whether to escape the URL for display, with esc_url(). Defaults to true. 2067 2079 * Otherwise, prepares the URL with esc_url_raw(). … … 2141 2153 * @global int $paged 2142 2154 * 2143 * @param int $max_page Optional. Max pages. 2155 * @param int $max_page Optional. Max pages. Default 0. 2144 2156 * @return string|void The link URL for next posts page. 2145 2157 */ … … 2161 2173 * @since 0.71 2162 2174 * 2163 * @param int $max_page Optional. Max pages. 2164 * @param bool $echo Optional. Echo or return;2175 * @param int $max_page Optional. Max pages. Default 0. 2176 * @param bool $echo Optional. Whether to echo the link. Default true. 2165 2177 * @return string|void The link URL for next posts page if `$echo = false`. 2166 2178 */ … … 2183 2195 * 2184 2196 * @param string $label Content for link text. 2185 * @param int $max_page Optional. Max pages. 2197 * @param int $max_page Optional. Max pages. Default 0. 2186 2198 * @return string|void HTML-formatted next posts page link. 2187 2199 */ … … 2220 2232 * 2221 2233 * @param string $label Content for link text. 2222 * @param int $max_page Optional. Max pages. 2234 * @param int $max_page Optional. Max pages. Default 0. 2223 2235 */ 2224 2236 function next_posts_link( $label = null, $max_page = 0 ) { … … 2255 2267 * @since 0.71 2256 2268 * 2257 * @param bool $echo Optional. Echo or return;2269 * @param bool $echo Optional. Whether to echo the link. Default true. 2258 2270 * @return string|void The previous posts page link if `$echo = false`. 2259 2271 */ … … 2314 2326 * @global WP_Query $wp_query 2315 2327 * 2316 * @param string|array $args Optional args. 2328 * @param string|array $args { 2329 * Optional. Arguments to build the post pages link navigation. 2330 * 2331 * @type string $sep Separator character. Default '—'. 2332 * @type string $prelabel Link text to display for the previous page link. 2333 * Default '« Previous Page'. 2334 * @type string $nxtlabel Link text to display for the next page link. 2335 * Default 'Next Page »'. 2336 * } 2317 2337 * @return string The posts link navigation. 2318 2338 */ … … 2353 2373 * @since 0.71 2354 2374 * 2355 * @param string $sep Optional. Separator for posts navigation links. 2356 * @param string $prelabel Optional. Label for previous pages. 2357 * @param string $nxtlabel Optional Label for next pages. 2375 * @param string $sep Optional. Separator for posts navigation links. Default empty. 2376 * @param string $prelabel Optional. Label for previous pages. Default empty. 2377 * @param string $nxtlabel Optional Label for next pages. Default empty. 2358 2378 */ 2359 2379 function posts_nav_link( $sep = '', $prelabel = '', $nxtlabel = '' ) { … … 2421 2441 * @since 4.1.0 2422 2442 * 2423 * @param array $args Optional. See {@see get_the_post_navigation()} for available2424 * arguments.Default empty array.2443 * @param array $args Optional. See get_the_post_navigation() for available arguments. 2444 * Default empty array. 2425 2445 */ 2426 2446 function the_post_navigation( $args = array() ) { … … 2480 2500 * @since 4.1.0 2481 2501 * 2482 * @param array $args Optional. See {@see get_the_posts_navigation()} for available2483 * arguments.Default empty array.2502 * @param array $args Optional. See get_the_posts_navigation() for available arguments. 2503 * Default empty array. 2484 2504 */ 2485 2505 function the_posts_navigation( $args = array() ) { … … 2493 2513 * 2494 2514 * @param array $args { 2495 * Optional. Default pagination arguments, {@see paginate_links()}.2515 * Optional. Default pagination arguments, see paginate_links(). 2496 2516 * 2497 2517 * @type string $screen_reader_text Screen reader text for navigation element. … … 2533 2553 * @since 4.1.0 2534 2554 * 2535 * @param array $args Optional. See {@see get_the_posts_pagination()}for available arguments.2555 * @param array $args Optional. See get_the_posts_pagination() for available arguments. 2536 2556 * Default empty array. 2537 2557 */
Note: See TracChangeset
for help on using the changeset viewer.