Changeset 53733
- Timestamp:
- 07/20/2022 03:39:18 PM (11 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r53715 r53733 153 153 * @param int|WP_Post $post Optional. Post ID or post object. Default is the global `$post`. 154 154 * @param bool $leavename Optional. Whether to keep post name or page name. Default false. 155 * @return string|false The permalink URL or false ifpost does not exist.155 * @return string|false The permalink URL. False if the post does not exist. 156 156 */ 157 157 function get_the_permalink( $post = 0, $leavename = false ) { … … 166 166 * @param int|WP_Post $post Optional. Post ID or post object. Default is the global `$post`. 167 167 * @param bool $leavename Optional. Whether to keep post name or page name. Default false. 168 * @return string|false The permalink URL or false ifpost does not exist.168 * @return string|false The permalink URL. False if the post does not exist. 169 169 */ 170 170 function get_permalink( $post = 0, $leavename = false ) { … … 315 315 * @param bool $leavename Optional. Whether to keep post name. Default false. 316 316 * @param bool $sample Optional. Is it a sample permalink. Default false. 317 * @return string| WP_Error The post permalink.317 * @return string|false The post permalink URL. False if the post does not exist. 318 318 */ 319 319 function get_post_permalink( $post = 0, $leavename = false, $sample = false ) { … … 322 322 $post = get_post( $post ); 323 323 324 if ( is_wp_error( $post )) {325 return $post;324 if ( ! $post ) { 325 return false; 326 326 } 327 327 … … 3924 3924 * 3925 3925 * @param int|WP_Post $post Optional. Post ID or object. Default is global `$post`. 3926 * @return string|false The canonical URL , or false if the post does not exist or has not3927 * been published yet.3926 * @return string|false The canonical URL. False if the post does not exist 3927 * or has not been published yet. 3928 3928 */ 3929 3929 function wp_get_canonical_url( $post = null ) {
Note: See TracChangeset
for help on using the changeset viewer.