WordPress.org

Plugin Directory

Changeset 622272


Ignore:
Timestamp:
11/07/12 20:37:00 (18 months ago)
Author:
mdawaffe
Message:

Sharing: More robust version of [622209]

Props beaulebens

File:
1 edited

Legend:

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

    r622240 r622272  
    4949     
    5050    public function subscription_menu( $user ) { 
    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' ) ); 
     51        if ( !defined( 'IS_WPCOM' ) || !IS_WPCOM ) { 
     52            $active = Jetpack::get_active_modules(); 
     53            if ( !in_array( 'publicize', $active ) && !current_user_can( 'manage_options' ) ) 
     54                return; 
     55        } 
     56 
     57        add_submenu_page( 'options-general.php', __( 'Sharing Settings', 'jetpack' ), __( 'Sharing', 'jetpack' ), 'publish_posts', 'sharing', array( &$this, 'management_page' ) ); 
    5458    } 
    5559     
Note: See TracChangeset for help on using the changeset viewer.