Changeset 61766
- Timestamp:
- 02/27/2026 11:07:25 PM (5 days ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/link-template.php (modified) (22 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r61649 r61766 1132 1132 * @param int|WP_Term|null $term Optional. Term ID or object. If null, the queried object will be inspected. Default null. 1133 1133 * @param bool $display Optional. Whether or not to echo the return. Default true. 1134 * @return string| voidHTML content.1134 * @return string| HTML content. 1135 1135 */ 1136 1136 function edit_term_link( $link = '', $before = '', $after = '', $term = null, $display = true ) { … … 1142 1142 1143 1143 if ( ! $term ) { 1144 return ;1144 return; 1145 1145 } 1146 1146 1147 1147 $tax = get_taxonomy( $term->taxonomy ); 1148 1148 if ( ! current_user_can( 'edit_term', $term->term_id ) ) { 1149 return ;1149 return; 1150 1150 } 1151 1151 … … 1553 1553 * @param string $deprecated Not used. 1554 1554 * @param bool $force_delete Optional. Whether to bypass Trash and force deletion. Default false. 1555 * @return string| voidThe delete post link URL for the given post.1555 * @return string| The delete post link URL for the given post. 1556 1556 */ 1557 1557 function get_delete_post_link( $post = 0, $deprecated = '', $force_delete = false ) { … … 1563 1563 1564 1564 if ( ! $post ) { 1565 return ;1565 return; 1566 1566 } 1567 1567 … … 1569 1569 1570 1570 if ( ! $post_type_object ) { 1571 return ;1571 return; 1572 1572 } 1573 1573 1574 1574 if ( ! current_user_can( 'delete_post', $post->ID ) ) { 1575 return ;1575 return; 1576 1576 } 1577 1577 … … 1601 1601 * @param string $context Optional. Context in which the URL should be used. Either 'display', 1602 1602 * to include HTML entities, or 'url'. Default 'display'. 1603 * @return string| void The edit comment link URL for the given comment, or void if the comment iddoes not exist or1603 * @return string| does not exist or 1604 1604 * the current user is not allowed to edit it. 1605 1605 */ … … 1608 1608 1609 1609 if ( ! is_object( $comment ) || ! current_user_can( 'edit_comment', $comment->comment_ID ) ) { 1610 return ;1610 return; 1611 1611 } 1612 1612 … … 1675 1675 * 1676 1676 * @param int|stdClass $link Optional. Bookmark ID. Default is the ID of the current bookmark. 1677 * @return string| voidThe edit bookmark link URL.1677 * @return string| The edit bookmark link URL. 1678 1678 */ 1679 1679 function get_edit_bookmark_link( $link = 0 ) { … … 1681 1681 1682 1682 if ( ! current_user_can( 'manage_links' ) ) { 1683 return ;1683 return; 1684 1684 } 1685 1685 … … 2058 2058 * Default true. 2059 2059 * @param string $taxonomy Optional. Taxonomy, if `$in_same_term` is true. Default 'category'. 2060 * @return string| voidThe adjacent post relational link URL.2060 * @return string| The adjacent post relational link URL. 2061 2061 */ 2062 2062 function get_adjacent_post_rel_link( $title = '%title', $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) { … … 2069 2069 2070 2070 if ( empty( $post ) ) { 2071 return ;2071 return; 2072 2072 } 2073 2073 … … 2516 2516 * 2517 2517 * @param int $max_page Optional. Max pages. Default 0. 2518 * @return string| voidThe link URL for next posts page.2518 * @return string| The link URL for next posts page. 2519 2519 */ 2520 2520 function get_next_posts_page_link( $max_page = 0 ) { … … 2541 2541 * @param int $max_page Optional. Max pages. Default 0. 2542 2542 * @param bool $display Optional. Whether to echo the link. Default true. 2543 * @return string| voidThe link URL for next posts page if `$display = false`.2543 * @return string| The link URL for next posts page if `$display = false`. 2544 2544 */ 2545 2545 function next_posts( $max_page = 0, $display = true ) { … … 2564 2564 * @param string $label Content for link text. 2565 2565 * @param int $max_page Optional. Max pages. Default 0. 2566 * @return string| voidHTML-formatted next posts page link.2566 * @return string| HTML-formatted next posts page link. 2567 2567 */ 2568 2568 function get_next_posts_link( $label = null, $max_page = 0 ) { … … 2625 2625 * @global int $paged 2626 2626 * 2627 * @return string| voidThe link for the previous posts page.2627 * @return string| The link for the previous posts page. 2628 2628 */ 2629 2629 function get_previous_posts_page_link() { … … 2647 2647 * 2648 2648 * @param bool $display Optional. Whether to echo the link. Default true. 2649 * @return string| voidThe previous posts page link if `$display = false`.2649 * @return string| The previous posts page link if `$display = false`. 2650 2650 */ 2651 2651 function previous_posts( $display = true ) { … … 2667 2667 * 2668 2668 * @param string $label Optional. Previous page link text. 2669 * @return string| voidHTML-formatted previous page link.2669 * @return string| HTML-formatted previous page link. 2670 2670 */ 2671 2671 function get_previous_posts_link( $label = null ) { … … 3125 3125 * @param int $max_page Optional. Max page. Default 0. 3126 3126 * @param int|null $page Optional. Page number. Default null. 3127 * @return string| voidHTML-formatted link for the next page of comments.3127 * @return string| HTML-formatted link for the next page of comments. 3128 3128 */ 3129 3129 function get_next_comments_link( $label = '', $max_page = 0, $page = null ) { … … 3131 3131 3132 3132 if ( ! is_singular() ) { 3133 return ;3133 return; 3134 3134 } 3135 3135 … … 3153 3153 3154 3154 if ( $next_page > $max_page ) { 3155 return ;3155 return; 3156 3156 } 3157 3157 … … 3197 3197 * @param string $label Optional. Label for comments link text. Default empty. 3198 3198 * @param int|null $page Optional. Page number. Default null. 3199 * @return string| voidHTML-formatted link for the previous page of comments.3199 * @return string| HTML-formatted link for the previous page of comments. 3200 3200 */ 3201 3201 function get_previous_comments_link( $label = '', $page = null ) { 3202 3202 if ( ! is_singular() ) { 3203 return ;3203 return; 3204 3204 } 3205 3205 … … 3209 3209 3210 3210 if ( (int) $page <= 1 ) { 3211 return ;3211 return; 3212 3212 } 3213 3213
Note: See TracChangeset
for help on using the changeset viewer.