WordPress.org

Plugin Directory

Changeset 595096


Ignore:
Timestamp:
09/05/12 19:38:21 (20 months ago)
Author:
andy
Message:

jetpack multiuser: do not show unlink_user button for master user

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jetpack/branches/multiuser/jetpack.php

    r595080 r595096  
    19591959        $user_token = Jetpack_Data::get_access_token($current_user->ID); 
    19601960        $is_user_connected = $user_token && !is_wp_error($user_token); 
     1961        $is_master_user = $current_user->ID == Jetpack::get_option( 'master_user' ); 
    19611962        $module = false; 
    19621963    ?> 
     
    19721973                        <a href="<?php echo wp_nonce_url( Jetpack::admin_url( array( 'action' => 'disconnect' ) ), 'jetpack-disconnect' ); ?>"><div class="deftext"><?php _e( 'Connected to WordPress.com', 'jetpack' ); ?></div><div class="hovertext"><?php _e( 'Disconnect from WordPress.com', 'jetpack' ) ?></div></a> 
    19731974                    </div> 
    1974                         <?php if ( $is_user_connected ) : ?> 
     1975                        <?php if ( $is_user_connected && !$is_master_user ) : ?> 
    19751976                        <div id="jp-unlink" class="jp-disconnect"> 
    19761977                            <a href="<?php echo wp_nonce_url( Jetpack::admin_url( array( 'action' => 'unlink' ) ), 'jetpack-unlink' ); ?>"><div class="deftext"><?php _e( 'User linked to WordPress.com', 'jetpack' ); ?></div><div class="hovertext"><?php _e( 'Unlink user from WordPress.com', 'jetpack' ) ?></div></a> 
Note: See TracChangeset for help on using the changeset viewer.