WordPress.org

Plugin Directory

Changeset 548307


Ignore:
Timestamp:
05/23/12 22:58:13 (2 years ago)
Author:
mpvanwinkle77
Message:

added network admin functionality

Location:
wpengine-ready/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wpengine-ready/trunk/init.php

    r548288 r548307  
    22/* 
    33Plugin Name: WPEngine Ready 
    4 Version: 1.0 
     4Version: 1.0.1 
    55Description: This plugin scans your wordpress installation to ensure it is ready to migrate to WP-Engine 
    66Author: WPEngine 
     
    3030            register_activation_hook(__FILE__,array($this,'activate')); 
    3131            $this->root_dir = dirname(__FILE__); 
    32             $this->root_url = plugins_url('',__FILE__); 
     32            $this->root_url = plugins_url('',__FILE__);      
    3333            add_action('admin_init',array($this,'admin_init')); 
    34             add_action('admin_notices',array($this,'render_messages')); 
    35             add_action('admin_menu',array($this,'admin_menu')); 
     34             
     35            if(defined('WP_ALLOW_MULTISITE')) { 
     36                add_action('network_admin_menu',array($this,'admin_menu')); 
     37                add_action('network_admin_notices',array($this,'render_messages')); 
     38            } else { 
     39                add_action('admin_menu',array($this,'admin_menu')); 
     40                add_action('admin_notices',array($this,'render_messages')); 
     41            } 
     42             
    3643            add_action('wpengine_compat',array($this,'page_hook')); 
    3744            add_action('wp_ajax_wpe_check',array($this,'load_content')); 
     
    4249         
    4350        function admin_menu() { 
    44             add_submenu_page( 'options-general.php', __("WPEngine Compatibility Check",$this->name), __("WPEngine",$this->name), 'manage_options', 'wpengine_compat', array($this,'settings_page')); 
     51            add_submenu_page( defined('WP_ALLOW_MULTISITE')?'settings.php':'options-general.php', __("WPEngine Compatibility Check",$this->name), __("WPEngine",$this->name), 'manage_options', 'wpengine_compat', array($this,'settings_page')); 
    4552        } 
    4653         
     
    6976            $options = get_option('wpengine_check'); 
    7077            if(!$options['process_last_run'] and $_REQUEST['page'] !== 'wpengine_compat') { 
    71                 $this->set_message(array('message'=>$this->language('admin|never-run'),'class'=>'updated')); 
     78                $admin_link = defined('WP_ALLOW_MULTISITE')?network_admin_url('settings.php?page=wpengine_compat'):admin_url('options-general.php?page=wpengine_check'); 
     79                $this->set_message(array('message'=>$this->language('admin|never-run',array('%%LINK%%'=>$admin_link)),'class'=>'updated')); 
    7280            } 
    7381            if($_REQUEST['page'] == 'wpengine_compat') { 
     
    191199                ); 
    192200            } else { 
     201                $update_link = defined('WP_ALLOW_MULTISITE')?network_admin_url('update-core.php'):admin_url('update-core.php'); 
    193202                $data['version'] = array( 
    194203                    'class'=>'errors', 
    195                     'message'=>$this->language('admin|version-fail',array('%%VERSION%%'=>$wp_version)), 
     204                    'message'=>$this->language('admin|version-fail',array('%%VERSION%%'=>$wp_version,'%%LINK%%'=>$update_link)), 
    196205                    'image'=>$this->root_url.'/assets/images/alert.png' 
    197206                ); 
  • wpengine-ready/trunk/language.php

    r548131 r548307  
    11<?php 
    2 $lang['admin']['never-run'] = 'Thanks for installing <strong>WP-Engine Compatibility Check</strong>.To check your engine go to <a href="'.admin_url('options-general.php?page=wpengine_compat').'">Settings >> WPEngine</a>'; 
     2$lang['admin']['never-run'] = 'Thanks for installing <strong>WP-Engine Compatibility Check</strong>.To check your engine go to <a href="%%LINK%%">Settings >> WPEngine</a>'; 
    33$lang['admin']['version-success'] = "Excellent! Your WordPress Version is compatible with WPEngine's servers."; 
    4 $lang['admin']['version-fail'] = 'Uh oh, you are not running the latest version of WordPress (Your version: v%%VERSION%% ). Please upgrade your installation and try again.<br/><br/><a href="'.admin_url('update-core.php').'" class="button-primary">Update Now</a>'; 
     4$lang['admin']['version-fail'] = 'Uh oh, you are not running the latest version of WordPress (Your version: v%%VERSION%% ). Please upgrade your installation and try again.<br/><br/><a href="%%LINK%%" class="button-primary">Update Now</a>'; 
    55$lang['admin']['ajax-wait'] = "Please wait while we analyze your system ..."; 
    66$lang['admin']['blacklist-fail'] = "Oops. Looks like you have some of our blacklisted plugins installed. Please deactivate before migrating to WPEngine. <small><a href='http://wpengine.com/faq/plugins/what-plugins-have-been-blacklisted-on-wp-engine/' target='_blank'>Why?</a></small>"; 
  • wpengine-ready/trunk/readme.txt

    r548288 r548307  
    55Requires at least: 3.3 
    66Tested up to: 3.3 
    7 Stable tag: 1.0 
     7Stable tag: 1.0.1 
    88License: GPLv2 or later 
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    3131* Initial version 
    3232 
     33= 1.0.1 =    
     34* Moved settings page to network admin when network is active 
     35 
    3336== Upgrade Notice == 
     37 
     38* Moved settings page to network admin when network is active 
  • wpengine-ready/trunk/views/sidebar.php

    r548131 r548307  
    11<div id="sidebar"> 
    2     <a href="#" class="btn">Start your engine!</a> 
     2    <a href="http://www.wpengine.com" class="btn">Start your engine!</a> 
    33    <span class="note">Super Charged WordPress in 60 Seconds</span> 
    44</div> 
Note: See TracChangeset for help on using the changeset viewer.