Changeset 34445
- Timestamp:
- 09/22/2015 08:08:49 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r34444 r34445 3472 3472 * @since 3.0.0. 3473 3473 * 3474 * @global WP_Query $wp_query3475 *3476 3474 * @param int $id A post or blog id. Default is 0, which means the current post or blog. 3477 3475 * @param string $context Whether the id is a 'blog' id, 'post' id, or 'media' id. … … 3498 3496 $shortlink = apply_filters( 'pre_get_shortlink', false, $id, $context, $allow_slugs ); 3499 3497 3500 if ( false !== $shortlink ) 3498 if ( false !== $shortlink ) { 3501 3499 return $shortlink; 3502 3503 global $wp_query; 3500 } 3501 3504 3502 $post_id = 0; 3505 3503 if ( 'query' == $context && is_singular() ) { 3506 $post_id = $wp_query->get_queried_object_id();3504 $post_id = get_queried_object_id(); 3507 3505 $post = get_post( $post_id ); 3508 3506 } elseif ( 'post' == $context ) {
Note: See TracChangeset
for help on using the changeset viewer.