Changeset 35704
- Timestamp:
- 11/19/2015 04:24:35 PM (8 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/admin-bar.php
r35157 r35704 594 594 && ( $post_type_object = get_post_type_object( $current_object->post_type ) ) 595 595 && current_user_can( 'edit_post', $current_object->ID ) 596 && $post_type_object->show_ ui && $post_type_object->show_in_admin_bar596 && $post_type_object->show_in_admin_bar 597 597 && $edit_post_link = get_edit_post_link( $current_object->ID ) ) 598 598 { … … 605 605 && ( $tax = get_taxonomy( $current_object->taxonomy ) ) 606 606 && current_user_can( $tax->cap->edit_terms ) 607 && $tax->show_ui608 607 && $edit_term_link = get_edit_term_link( $current_object->term_id, $current_object->taxonomy ) ) 609 608 { -
trunk/src/wp-includes/link-template.php
r35274 r35704 938 938 } 939 939 940 $location = add_query_arg( $args, admin_url( 'edit-tags.php' ) ); 940 if ( $tax->show_ui ) { 941 $location = add_query_arg( $args, admin_url( 'edit-tags.php' ) ); 942 } else { 943 $location = ''; 944 } 941 945 942 946 /** … … 1255 1259 return; 1256 1260 1257 $allowed = array_merge( array( 1258 'revision', 1259 ), get_post_types( array( 1260 'show_ui' => true, 1261 ) ) ); 1262 1263 if ( ! in_array( $post->post_type, $allowed ) ) { 1264 return; 1261 if ( $post_type_object->_edit_link ) { 1262 $link = admin_url( sprintf( $post_type_object->_edit_link . $action, $post->ID ) ); 1263 } else { 1264 $link = ''; 1265 1265 } 1266 1266 … … 1275 1275 * are encoded. 1276 1276 */ 1277 return apply_filters( 'get_edit_post_link', admin_url( sprintf( $post_type_object->_edit_link . $action, $post->ID ) ), $post->ID, $context );1277 return apply_filters( 'get_edit_post_link', $link, $post->ID, $context ); 1278 1278 } 1279 1279 -
trunk/src/wp-includes/post-functions.php
r35623 r35704 1013 1013 $args = apply_filters( 'register_post_type_args', $args, $post_type ); 1014 1014 1015 $has_edit_link = ! empty( $args['_edit_link'] ); 1016 1015 1017 // Args prefixed with an underscore are reserved for internal use. 1016 1018 $defaults = array( … … 1082 1084 if ( null === $args->map_meta_cap ) 1083 1085 $args->map_meta_cap = false; 1086 1087 // If there's no specified edit link and no UI, remove the edit link. 1088 if ( ! $args->show_ui && ! $has_edit_link ) { 1089 $args->_edit_link = ''; 1090 } 1084 1091 1085 1092 $args->cap = get_post_type_capabilities( $args );
Note: See TracChangeset
for help on using the changeset viewer.