WordPress.org

Plugin Directory

Changeset 725790


Ignore:
Timestamp:
06/12/13 17:00:20 (10 months ago)
Author:
donncha
Message:

Added warning that user must login to Polldaddy before using plugin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • polldaddy/trunk/polldaddy-org.php

    r697468 r725790  
    10311031    add_action('widgets_init', create_function('', 'return register_widget("PD_Top_Rated");')); 
    10321032} 
     1033 
     1034function polldaddy_login_warning() { 
     1035    global $cache_enabled; 
     1036    $page = isset( $_GET[ 'page' ] ) ? $_GET[ 'page' ] : ''; 
     1037    if ( $page != 'polls' && false == get_option( 'polldaddy_api_key' ) && function_exists( "admin_url" ) ) 
     1038        echo '<div class="updated"><p><strong>' . sprintf( __( 'Warning! The Polldaddy plugin must be linked to your Polldaddy.com account. Please visit the <a href="%s">plugin settings page</a> to login.', 'polldaddy' ), admin_url( 'options-general.php?page=polls&action=options' ) ) . '</strong></p></div>'; 
     1039} 
     1040add_action( 'admin_notices', 'polldaddy_login_warning' ); 
    10331041?> 
Note: See TracChangeset for help on using the changeset viewer.