WordPress.org

Plugin Directory

Changeset 578804


Ignore:
Timestamp:
07/29/12 18:38:25 (5 years ago)
Author:
hnla
Message:

update setting option screens to correct MS issue

Location:
bp-user-profile-map/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • bp-user-profile-map/trunk/readme.txt

    r538966 r578804  
    4141 
    4242 == Upgrade Notice == 
    43     1.4 Adds new capability for gmap info window marker to display a 'get directions' link, adds new region for display, tidies code, corrects loop issues on bp friends screen. 
     43    1.4.1 Revises options settings screen, moves options screen out of BP altogether to WP settings, 'options-general' for single WP or 'settings' for network admin MS. This corrects issue with options page not displaying correctly on WP MS 
    4444    
    4545 == Screenshots == 
     
    4949 
    5050== Changelog == 
     51** V 1.4.1 ** 29/07/12 
     52 
     53- Revised approach to options screen - corrects issue of not displaying correctly on WP MS installs, option screen now no longer displays under BP but under WP general settings. 
     54 
    5155** V 1.4 ** 29/04/12 
    5256 
  • bp-user-profile-map/trunk/upm-loader.php

    r538966 r578804  
    66Author URI: http://buddypress.org/developers/hnla 
    77Plugin URI: http://buddypress.org/groups/BP-User-Profile-Map 
    8 Version: 1.4 
     8Version: 1.4.1 
    99Network: true 
    1010License: CC-GNU-GPL http://creativecommons.org/licenses/GPL/2.0/ 
  • bp-user-profile-map/trunk/upm.php

    r539182 r578804  
    33global $bp, $wp; 
    44 
    5 define( 'BP_UPM_VERSION', '1.4' ); 
     5define( 'BP_UPM_VERSION', '1.4.1' ); 
    66define( 'BP_UPM_ACTIVE', 1 ); 
    77/** 
     
    7171    global $bp; 
    7272 
    73  if ( true == $bp->loggedin_user->is_super_admin ): 
     73 if ( true == is_super_admin() ): 
    7474   $user_is_admin = true; 
    75  elseif (true == $bp->loggedin_user->is_site_admin ): 
     75 elseif (true == is_site_admin() ): 
    7676   $user_is_admin = true; 
    7777 else: 
     
    8181    if ( !$user_is_admin ) 
    8282        return false; 
    83     // try and place the settings page under correct parent due to BP's menu changes V 1.6 
    84     if(floatval(BP_VERSION) >= 1.6) { 
    85     add_submenu_page( 'options-general.php', __( 'UPM setup', 'bp-upm' ), __( 'UPM Setup', 'bp-upm' ), 'manage_options', 'bp-upm-settings', 'bp_upm_admin' ); 
    86     }else{ 
    87     add_submenu_page( 'bp-general-settings', __( 'UPM setup', 'bp-upm' ), __( 'UPM Setup', 'bp-upm' ), 'manage_options', 'bp-upm-settings', 'bp_upm_admin' ); 
    88     } 
     83     
     84    // which page do we want? 
     85    if( is_network_admin() ) { 
     86        $settings_page = 'settings.php'; 
     87    }else { 
     88        $settings_page = 'options-general.php'; 
     89    }    
     90 
     91    add_submenu_page( $settings_page, __( 'UPM setup', 'bp-upm' ), __( 'UPM Setup', 'bp-upm' ), 'manage_options', 'bp-upm-settings', 'bp_upm_admin' ); 
     92     
    8993} 
    9094 
    9195//bp versions later than 1.2.9 can use bp_core_activation_hook() 
    92 if(function_exists('bp_core_admin_hook') ) { 
    93     add_action( bp_core_admin_hook(), 'bp_upm_menu' ); 
    94 }else{ 
     96// if it workked that is! ? removed as causing issues 
     97//if(function_exists('bp_core_admin_hook') ) { 
     98//  add_action( 'bp_core_admin_hook', 'bp_upm_menu' ); 
     99//}else{ 
    95100    if( is_multisite() && function_exists( 'is_network_admin' ) ): 
    96101        add_action( 'network_admin_menu', 'bp_upm_menu' ); 
     
    98103        add_action( 'admin_menu', 'bp_upm_menu' ); 
    99104    endif; 
    100 } 
     105//} 
    101106 
    102107// Fetch values for map page location &  directory/screen displays. 
Note: See TracChangeset for help on using the changeset viewer.