WordPress.org

Plugin Directory

Changeset 622209


Ignore:
Timestamp:
11/07/12 17:51:21 (18 months ago)
Author:
beaulebens
Message:

Sharedaddy: Only add the Sharing menu if Publicize is enabled, or if the current user is capable of changing options (which is required to manage sharing options).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jetpack/trunk/modules/sharedaddy/sharing.php

    r619533 r622209  
    4949     
    5050    public function subscription_menu( $user ) { 
    51         add_submenu_page( 'options-general.php', __( 'Sharing Settings', 'jetpack' ), __( 'Sharing', 'jetpack' ), 'publish_posts', 'sharing', array( &$this, 'management_page' ) ); 
     51        $active = Jetpack::get_active_modules(); 
     52        if ( in_array( 'publicize', $active ) || current_user_can( 'manage_options' ) ) 
     53            add_submenu_page( 'options-general.php', __( 'Sharing Settings', 'jetpack' ), __( 'Sharing', 'jetpack' ), 'publish_posts', 'sharing', array( &$this, 'management_page' ) ); 
    5254    } 
    5355     
Note: See TracChangeset for help on using the changeset viewer.