Plugin Directory

Changeset 1470379


Ignore:
Timestamp:
08/08/2016 11:28:53 PM (10 years ago)
Author:
dsader
Message:

WP 4.6 tests OK, cleanup php notices

Location:
primary-blog-switcher-for-superadmins/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • primary-blog-switcher-for-superadmins/trunk/ds_wp3_primary_blog_switcher.php

    r1232725 r1470379  
    55Description: Adds a dropdown primary blog switcher to a user's profile at SuperAdmin->Users->Edit. Users with blog 1 as their primary, or have no blog, appear in an admin notice on the SuperAdmin->Admin page.
    66Author: D Sader
    7 Version: 3.0.1.5
     7Version: 4.6
    88Author URI: http://dsader.snowotherway.org
    99Network: true
     
    2020 
    2121*/
    22 class ds_primary_blog_switcher {
     22class DS_Primary_Blog_Switcher {
    2323
    24     function ds_primary_blog_switcher() {
     24    function __construct() {
     25        add_action( 'edit_user_profile', array($this, 'choose_primary_blog') );
     26        add_action( 'edit_user_profile_update',  array($this, 'profile_update_primary_blog') );
     27        add_action( 'mu_rightnow_end', array($this, 'admin_notices'));
    2528       
    2629        }
     
    173176}
    174177
    175 if (class_exists("ds_primary_blog_switcher")) {
    176     $ds_primary_blog_switcher = new ds_primary_blog_switcher();
    177 }
    178 
    179 if (isset($ds_primary_blog_switcher) && is_multisite()) {
    180     add_action( 'edit_user_profile', array(&$ds_primary_blog_switcher, 'choose_primary_blog') );
    181     add_action( 'edit_user_profile_update',  array(&$ds_primary_blog_switcher, 'profile_update_primary_blog') );
    182     add_action( 'mu_rightnow_end', array(&$ds_primary_blog_switcher, 'admin_notices'));
    183 
    184 }
     178new DS_Primary_Blog_Switcher();
    185179?>
  • primary-blog-switcher-for-superadmins/trunk/readme.txt

    r1470275 r1470379  
    6464
    6565== Changelog ==
    66 = 3.0.1.5 =
    67 * Tested up to: WP 3.2.1
    68 
    69 = 3.0.1.3 =
    70 * added if( function_exists(get_sitewide_tags_option)
    71 
    72 = 3.0.1.2 =
    73 * added is_multisite() check to add_action hooks
    74 
    75 = 3.0.1.1 =
    76 
    77 * Changes to text in dropdown and admin page notice to clarify case when user has no blog
    78 
    79 
    80 = 3.0.1 =
    81 
    82 * Initial Release for WP3.x multisite
     66= 4.6 =
     67* WP 4.6 tests OK, cleanup php notices
    8368
    8469== Upgrade Notice ==
    8570
    86 = 3.0.1 =
     71= 4.6 =
     72* WP 4.6 tests OK, cleanup php notices
    8773
    88 * WPMU2.9.2 version no longer supported.
    89 
Note: See TracChangeset for help on using the changeset viewer.