Plugin Directory

Changeset 1191630


Ignore:
Timestamp:
07/03/2015 07:53:24 AM (11 years ago)
Author:
CoCeCa
Message:

Created new version and resolved issue of duplicate functions and warnings at time of activation.

Location:
coceca
Files:
18 added
5 edited

Legend:

Unmodified
Added
Removed
  • coceca/trunk/coceca.php

    r1188106 r1191630  
    44    Description: CTA plugin is an innovative solution designed to help you grow your WordPress blog. It creates an opportunity for you to promote your WordPress Websites & Blogs and engage your site visitors, in more ways than one.
    55    Author: CoCeCa
    6     Version: 1.4
     6    Version: 1.5
    77    Plugin URI: http://coceca.com/
    88    Author URI: http://coceca.com/help/
     
    1313
    1414    defined( 'ABSPATH' ) or die( 'Plugin file cannot be accessed directly.' );
    15     define( 'COCECA_PLUGIN_VERSION', '1.4' );
     15    define( 'COCECA_PLUGIN_VERSION', '1.5' );
    1616    define( 'PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
    1717    define( 'COCECA_PLUGIN_NAME', trim( dirname( PLUGIN_BASENAME ), '/' ) );
  • coceca/trunk/includes/coceca_plugin-class.php

    r1186165 r1191630  
    122122        }
    123123
    124         public function activate(){
     124        public static function activate(){
    125125            /***Insert Update Activate and Download***/
    126126            if ( ! function_exists( 'get_plugins' ) ) {
     
    136136        }
    137137
    138         public function deactivate(){
     138        public static function deactivate(){
    139139            /***Update Activate and Download***/
    140140            if ( ! function_exists( 'get_plugins' ) ) {
     
    225225            $admin_redirect_uri = $_POST['admin_redirect_uri'];
    226226            $response = '';
    227             $coupon_code = $paypal_payment = $coupon_data= '';
     227            $coupon_code = $paypal_payment = $coupon_data= $coupon_data_sr = '';
    228228            $coupon_code = $_POST['coupon_code'];
    229229            if(isset($coupon_code) && $coupon_code!=''){
     
    521521                $plugin['name']   = $_GET['plugin_name'];
    522522                $plugin['slug']   = $_GET['plugin'];
    523                 $plugin['source'] = $_GET['plugin_source'];
     523                $plugin['source'] = isset($_GET['plugin_source']) ? $_GET['plugin_source'] : '';
    524524
    525525                $plugin_data = get_plugins( '/' . $plugin['slug'] ); // Retrieve all plugins.
  • coceca/trunk/includes/functions.php

    r1183981 r1191630  
    186186function get_client_ip() {
    187187    $ipaddress = '';
    188     if ($_SERVER['HTTP_CLIENT_IP'])
     188    if (isset($_SERVER['HTTP_CLIENT_IP']))
    189189        $ipaddress = $_SERVER['HTTP_CLIENT_IP'];
    190     else if($_SERVER['HTTP_X_FORWARDED_FOR'])
     190    else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
    191191        $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
    192     else if($_SERVER['HTTP_X_FORWARDED'])
     192    else if(isset($_SERVER['HTTP_X_FORWARDED']))
    193193        $ipaddress = $_SERVER['HTTP_X_FORWARDED'];
    194     else if($_SERVER['HTTP_FORWARDED_FOR'])
     194    else if(isset($_SERVER['HTTP_FORWARDED_FOR']))
    195195        $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
    196     else if($_SERVER['HTTP_FORWARDED'])
     196    else if(isset($_SERVER['HTTP_FORWARDED']))
    197197        $ipaddress = $_SERVER['HTTP_FORWARDED'];
    198     else if($_SERVER['REMOTE_ADDR'])
     198    else if(isset($_SERVER['REMOTE_ADDR']))
    199199        $ipaddress = $_SERVER['REMOTE_ADDR'];
    200200    else
  • coceca/trunk/includes/templates/list_extensions.php

    r1181115 r1191630  
    3939
    4040                            $plugin_activate_url = plugin_activate($this->menu,$plugin_slug,$plugins['plugin_title'],$plugins['plugin_source'],$plugins['activate_path']);
     41                          //  echo $plugin_activate_url;
    4142                        }
    4243
    43                         if($plugins['id'] == 1){
    44                             $plugin_page_url = admin_url('admin.php?page=cta_manage');
     44                        if(!empty($plugins['plugin_page_url'])){
     45                            $plugin_page_url = admin_url($plugins['plugin_page_url']);
    4546                        }else{
    4647                            $plugin_page_url = admin_url('plugins.php');
  • coceca/trunk/readme.txt

    r1188106 r1191630  
    9090== Changelog ==
    9191
     92= 1.5 =
     93* Resolved issue of duplicate functions
     94* Resolved warnings at time of activation
    9295
    9396= 1.4 =
Note: See TracChangeset for help on using the changeset viewer.