Plugin Directory

Changeset 914060


Ignore:
Timestamp:
05/14/2014 06:17:15 PM (12 years ago)
Author:
cwhitmore
Message:

v1.1.0

  • Updated plugin to check for new Universal Analytics plugin.
  • Updated alerts so that they don't show on plugin details and update pages
Location:
launch-check
Files:
5 added
2 edited

Legend:

Unmodified
Added
Removed
  • launch-check/trunk/mdg-launch-check.php

    r856901 r914060  
    22/*
    33Plugin Name: Launch Check
    4 Version: 1.0.0
     4Version: 1.1.0
    55Plugin URI: http://matchboxdesigngroup.com/plugins/
    6 Description: Ensure that you have made your site visible to search engines, changed the default description and added Google Analytics before launch.
     6Description: Ensure that you have made your site visible to search engines, changed the default description and added Google's Universal Analytics before launch.
    77Author: Matchbox Design Group
    88Author URI: http://matchboxdesigngroup.com/
     
    6060function mdg_check_analytics_plugin() {
    6161    $default_desc   = get_option( 'blogdescription');
    62    
    63         if ( is_plugin_active( 'google-analytics-for-wordpress/googleanalytics.php' ) ) {
     62        if ( is_plugin_active( 'universal-analytics/universalanalytics.php' ) ) {
    6463            return;
    6564        }
    6665
    6766        echo "<div id='message' class='error'>";
    68         echo "<p><strong>" . __( "Easy killer: You're not tracking your site yet.", 'mdg-launch-check' ) . "</strong> " . sprintf( __( "How are you going to track those awesome visitors? Go %sgo install the Google Analytics plugin%s now.", 'mdg-launch-check' ), "<a href='" . admin_url( 'update.php?action=install-plugin&plugin=google-analytics-for-wordpress&_wpnonce=336c473101' ) . "'>", "</a>" ) . "</p></div>";
     67        echo "<p><strong>" . __( "Easy killer: You're not tracking your site yet.", 'mdg-launch-check' ) . "</strong> " . sprintf( __( "How are you going to track those awesome visitors? Go %sinstall the Universal Analytics plugin%s now.", 'mdg-launch-check' ), "<a href='" . admin_url( 'plugin-install.php?tab=plugin-information&plugin=universal-analytics&TB_iframe=true' ) . "'class='thickbox'>", "</a>" ) . "</p></div>";
    6968}
    70 
    7169
    7270
     
    7472
    7573function mdg_admin_check() {
    76         mdg_check_blog_description();
    77         mdg_is_blog_public();
    78         mdg_check_analytics_plugin();
    79        
     74    // To disable screens from displaying the alerts add the current screens base to the disabled screens
     75    $current_screen   = get_current_screen();
     76    $disabled_screens = array(
     77        'plugin-install',   // Hide the message on the Universal Analytics popup
     78        'update',                       // Hide the message when updating plugins
     79    );
     80    if ( in_array( $current_screen->base, $disabled_screens ) ) {
     81        return;
     82    } // if()
     83
     84    mdg_check_blog_description();
     85    mdg_is_blog_public();
     86    mdg_check_analytics_plugin();
     87   
    8088}
    8189add_action( 'admin_head', 'mdg_admin_check' );
  • launch-check/trunk/readme.txt

    r856939 r914060  
    33Tags: pre-launch checklist, pre-launch, checklist, Yoast Analytics, SEO, Google Analytics
    44Requires at least: 3.5
    5 Tested up to: 3.8.1
    6 Stable tag: 1.0.0
     5Tested up to: 3.9.1
     6Stable tag: 1.1.0
    77License: GPLv3 or later
    88License URI: http://www.gnu.org/licenses/
     
    2929
    3030== Changelog ==
     31= 1.2 =
     32* Updated plugin to use new [Universal Analytics](http://wordpress.org/plugins/universal-analytics/) plugin.  A simple way to add Google Analytics to your site
     33* Updated alerts so that they don't show on plugin details and update pages
    3134
    3235= 1.0 =
Note: See TracChangeset for help on using the changeset viewer.