Make WordPress Core


Ignore:
Timestamp:
08/13/2012 04:18:42 PM (12 years ago)
Author:
nacin
Message:

Hide the link manager from the UI on upgrade, if the site has no links. New DB option, link_manager_enabled.

Enforce this by denying the 'manage_links' capability, which hides the All Links, Add New Link, and Link Categories screens. Hide WP_Widget_Links and the UI for the default_link_category as well.

Convert all references to 'posts and links' when handling reassignment on user deletion to just 'posts'.

see #21307.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/taxonomy.php

    r20972 r21501  
    8989            'add_or_remove_items' => null,
    9090            'choose_from_most_used' => null,
     91        ),
     92        'capabilities' => array(
     93            'manage_terms' => 'manage_links',
     94            'edit_terms'   => 'manage_links',
     95            'delete_terms' => 'manage_links',
     96            'assign_terms' => 'manage_links',
    9197        ),
    9298        'query_var' => false,
Note: See TracChangeset for help on using the changeset viewer.