Make WordPress Core


Ignore:
Timestamp:
11/19/2015 04:24:35 PM (10 years ago)
Author:
johnbillion
Message:

Move the show_ui logic into the get_edit_post_link() and get_edit_term_link() functions to facilitate post types and terms which specify show_ui as false but provide a custom editing UI via the get_edit_post_link and get_edit_term_link filters.

Fixes #33763
Fixes #33938

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/admin-bar.php

    r35157 r35704  
    594594            && ( $post_type_object = get_post_type_object( $current_object->post_type ) )
    595595            && current_user_can( 'edit_post', $current_object->ID )
    596             && $post_type_object->show_ui && $post_type_object->show_in_admin_bar
     596            && $post_type_object->show_in_admin_bar
    597597            && $edit_post_link = get_edit_post_link( $current_object->ID ) )
    598598        {
     
    605605            && ( $tax = get_taxonomy( $current_object->taxonomy ) )
    606606            && current_user_can( $tax->cap->edit_terms )
    607             && $tax->show_ui
    608607            && $edit_term_link = get_edit_term_link( $current_object->term_id, $current_object->taxonomy ) )
    609608        {
Note: See TracChangeset for help on using the changeset viewer.