Plugin Directory

Changeset 756422


Ignore:
Timestamp:
08/15/2013 12:13:11 AM (12 years ago)
Author:
bradmkjr
Message:

added activation function to core class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • iphods-itunes-top-products-rss-widget/trunk/iphods.php

    r756236 r756422  
    1919define('APPLE_LANG_MEDIA_TYPES_JSON_URL','https://rss.itunes.apple.com/data/lang/en-US/media-types.json');
    2020define('APPLE_COUNTRIES_JSON_URL','https://rss.itunes.apple.com/data/countries.json');
     21define('ACTIVATION_URL','http://iphods.com/activation.php');
    2122
    2223require(dirname(__FILE__)."/iphods_top_widget.php");
     
    3031    public function __construct() 
    3132    { 
     33        register_activation_hook( __FILE__, array( $this, 'register_iphods_plugin' ) );
     34        register_deactivation_hook( __FILE__, array( $this, 'deregister_iphods_plugin' ) );
     35       
    3236        add_action( 'widgets_init', array($this,'register_iphods_widget') );
    3337        add_action( 'wp_enqueue_scripts', array($this,'register_iphods_css') );
    3438    } 
     39   
     40    public function register_iphods_plugin(){
     41       
     42        $post = wp_remote_post( ACTIVATION_URL,  array( 'body' => array( 'op'=> 'activate', 'bu' => get_bloginfo('url') ) ) );
     43       
     44    }
     45   
     46    public function deregister_iphods_plugin(){
     47       
     48        $post = wp_remote_post( ACTIVATION_URL, array( 'body' => array( 'op'=> 'activate', 'bu' => get_bloginfo('url') ) ) );
     49     
     50    }
    3551   
    3652    // register iPhods_Widget widget
Note: See TracChangeset for help on using the changeset viewer.