WordPress.org

Plugin Directory

Changeset 819814


Ignore:
Timestamp:
12/12/13 14:04:23 (4 months ago)
Author:
donncha
Message:

If the API key isn't set then don't allow the polls feedback page to be displayed, and don't show the obsolete signup form, there's one on the settings page already.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • polldaddy/trunk/polldaddy.php

    r799769 r819814  
    8686        $function   = array( &$this, 'management_page' ); 
    8787                     
    88         if ( !WP_POLLDADDY__PARTNERGUID ) { 
    89             foreach( array( 'polls' => __( 'Polls', 'polldaddy' ), 'ratings' => __( 'Ratings', 'polldaddy' ) ) as $menu_slug => $menu_title ) { 
    90                 $hook = add_object_page( $menu_title, $menu_title, $capability, $menu_slug, array( &$this, 'api_key_page' ), $icon ); 
    91                 add_action( "load-$hook", array( &$this, 'api_key_page_load' ) ); 
    92             } 
    93             return false; 
    94         } 
    9588         
    9689        $hook = add_object_page( __( 'Feedback', 'polldaddy' ), __( 'Feedback', 'polldaddy' ), $capability, 'feedback', $function, $icon ); 
     
    11731166            } 
    11741167            switch ( $action ) { 
    1175             case 'signup' : 
    1176             case 'account' : 
    1177                 $this->signup(); 
    1178                 break; 
    11791168            case 'preview' : 
    11801169                if ( isset( $_GET['iframe'] ) ): 
     
    13151304 
    13161305        $this->parse_errors( $polldaddy ); 
     1306        if ( in_array( 'API Key Not Found, 890', $polldaddy->errors ) ) 
     1307            return false; 
    13171308        $this->print_errors(); 
    13181309        $polls = & $polls_object->poll; 
Note: See TracChangeset for help on using the changeset viewer.