Make WordPress Core


Ignore:
Timestamp:
08/13/2012 04:18:42 PM (13 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/default-widgets.php

    r20285 r21501  
    11591159    register_widget('WP_Widget_Archives');
    11601160
    1161     register_widget('WP_Widget_Links');
     1161    if ( get_option( 'link_manager_enabled' ) )
     1162        register_widget('WP_Widget_Links');
    11621163
    11631164    register_widget('WP_Widget_Meta');
Note: See TracChangeset for help on using the changeset viewer.