Changeset 45590 for trunk/src/wp-includes/link-template.php
- Timestamp:
- 07/02/2019 11:41:16 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r45424 r45590 1198 1198 function get_post_type_archive_link( $post_type ) { 1199 1199 global $wp_rewrite; 1200 if ( ! $post_type_obj = get_post_type_object( $post_type ) ) { 1200 1201 $post_type_obj = get_post_type_object( $post_type ); 1202 if ( ! $post_type_obj ) { 1201 1203 return false; 1202 1204 } … … 1257 1259 } 1258 1260 1259 if ( ! $link = get_post_type_archive_link( $post_type ) ) { 1261 $link = get_post_type_archive_link( $post_type ); 1262 if ( ! $link ) { 1260 1263 return false; 1261 1264 } … … 1339 1342 */ 1340 1343 function get_edit_post_link( $id = 0, $context = 'display' ) { 1341 if ( ! $post = get_post( $id ) ) { 1344 $post = get_post( $id ); 1345 if ( ! $post ) { 1342 1346 return; 1343 1347 } … … 1392 1396 */ 1393 1397 function edit_post_link( $text = null, $before = '', $after = '', $id = 0, $class = 'post-edit-link' ) { 1394 if ( ! $post = get_post( $id ) ) { 1398 $post = get_post( $id ); 1399 if ( ! $post ) { 1395 1400 return; 1396 1401 } 1397 1402 1398 if ( ! $url = get_edit_post_link( $post->ID ) ) { 1403 $url = get_edit_post_link( $post->ID ); 1404 if ( ! $url ) { 1399 1405 return; 1400 1406 } … … 1435 1441 } 1436 1442 1437 if ( ! $post = get_post( $id ) ) { 1443 $post = get_post( $id ); 1444 if ( ! $post ) { 1438 1445 return; 1439 1446 } … … 1678 1685 global $wpdb; 1679 1686 1680 if ( ( ! $post = get_post() ) || ! taxonomy_exists( $taxonomy ) ) { 1687 $post = get_post(); 1688 if ( ! $post || ! taxonomy_exists( $taxonomy ) ) { 1681 1689 return null; 1682 1690 } … … 1860 1868 */ 1861 1869 function get_adjacent_post_rel_link( $title = '%title', $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) { 1862 if ( $previous && is_attachment() && $post = get_post() ) { 1870 $post = get_post(); 1871 if ( $previous && is_attachment() && $post ) { 1863 1872 $post = get_post( $post->post_parent ); 1864 1873 } else { … … 4084 4093 4085 4094 $email_hash = ''; 4086 $user = $email = false; 4095 $user = false; 4096 $email = false; 4087 4097 4088 4098 if ( is_object( $id_or_email ) && isset( $id_or_email->comment_ID ) ) {
Note: See TracChangeset
for help on using the changeset viewer.