Changeset 47122 for trunk/src/wp-includes/link-template.php
- Timestamp:
- 01/29/2020 12:43:23 AM (7 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/link-template.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r47060 r47122 196 196 } 197 197 } 198 // show default category in permalinks, without199 // having to assign it explicitly198 // Show default category in permalinks, 199 // without having to assign it explicitly. 200 200 if ( empty( $category ) ) { 201 201 $default_category = get_term( get_option( 'default_category' ), 'category' ); … … 233 233 $permalink = user_trailingslashit( $permalink, 'single' ); 234 234 235 } else { // if they're not using the fancy permalink option235 } else { // If they're not using the fancy permalink option. 236 236 $permalink = home_url( '?p=' . $post->ID ); 237 237 } … … 424 424 if ( $wp_rewrite->using_permalinks() && $parent ) { 425 425 if ( 'page' == $parent->post_type ) { 426 $parentlink = _get_page_link( $post->post_parent ); // Ignores page_on_front 426 $parentlink = _get_page_link( $post->post_parent ); // Ignores page_on_front. 427 427 } else { 428 428 $parentlink = get_permalink( $post->post_parent ); … … 430 430 431 431 if ( is_numeric( $post->post_name ) || false !== strpos( get_option( 'permalink_structure' ), '%category%' ) ) { 432 $name = 'attachment/' . $post->post_name; // <permalink>/<int>/ is paged so we use the explicit attachment marker 432 $name = 'attachment/' . $post->post_name; // <permalink>/<int>/ is paged so we use the explicit attachment marker. 433 433 } else { 434 434 $name = $post->post_name; … … 1088 1088 * Retrieves the permalink for a search. 1089 1089 * 1090 * @since 3.0.01090 * @since 3.0.0 1091 1091 * 1092 1092 * @global WP_Rewrite $wp_rewrite WordPress rewrite component. … … 1650 1650 } 1651 1651 1652 // Navigation links 1652 // 1653 // Navigation links. 1654 // 1653 1655 1654 1656 /** … … 2514 2516 $paged = get_query_var( 'paged' ); 2515 2517 2516 // only have sep if there's both prev and next results2518 // Only have sep if there's both prev and next results. 2517 2519 if ( $paged < 2 || $paged >= $max_num_pages ) { 2518 2520 $args['sep'] = ''; … … 3882 3884 $shortlink = ''; 3883 3885 3884 // Return p=link for all public post types.3886 // Return `?p=` link for all public post types. 3885 3887 if ( ! empty( $post_id ) ) { 3886 3888 $post_type = get_post_type_object( $post->post_type ); … … 4092 4094 'rating' => get_option( 'avatar_rating' ), 4093 4095 'scheme' => null, 4094 'processed_args' => null, // if used, should be a reference4096 'processed_args' => null, // If used, should be a reference. 4095 4097 'extra_attr' => '', 4096 4098 ) … … 4178 4180 } elseif ( is_string( $id_or_email ) ) { 4179 4181 if ( strpos( $id_or_email, '@md5.gravatar.com' ) ) { 4180 // md5 hash4182 // MD5 hash. 4181 4183 list( $email_hash ) = explode( '@', $id_or_email ); 4182 4184 } else { 4183 // email address4185 // Email address. 4184 4186 $email = $id_or_email; 4185 4187 } 4186 4188 } elseif ( $id_or_email instanceof WP_User ) { 4187 // User Object4189 // User object. 4188 4190 $user = $id_or_email; 4189 4191 } elseif ( $id_or_email instanceof WP_Post ) { 4190 // Post Object4192 // Post object. 4191 4193 $user = get_user_by( 'id', (int) $id_or_email->post_author ); 4192 4194 } elseif ( $id_or_email instanceof WP_Comment ) {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)