Changeset 1110142
- Timestamp:
- 03/11/2015 08:11:35 AM (11 years ago)
- Location:
- classy
- Files:
-
- 22 edited
- 2 copied
-
tags/1.1 (copied) (copied from classy/trunk)
-
tags/1.1/README.txt (copied) (copied from classy/trunk/README.txt)
-
tags/1.1/admin/class-classy-admin.php (modified) (8 diffs)
-
tags/1.1/admin/partials/classy-admin-display.php (modified) (2 diffs)
-
tags/1.1/classy.php (modified) (3 diffs)
-
tags/1.1/includes/class-classy-activator.php (modified) (3 diffs)
-
tags/1.1/includes/class-classy-deactivator.php (modified) (3 diffs)
-
tags/1.1/includes/class-classy-i18n.php (modified) (5 diffs)
-
tags/1.1/includes/class-classy-loader.php (modified) (8 diffs)
-
tags/1.1/includes/class-classy.php (modified) (15 diffs)
-
tags/1.1/public/class-classy-public.php (modified) (14 diffs)
-
tags/1.1/public/partials/classy-public-display.php (modified) (1 diff)
-
tags/1.1/uninstall.php (modified) (1 diff)
-
trunk/admin/class-classy-admin.php (modified) (8 diffs)
-
trunk/admin/partials/classy-admin-display.php (modified) (2 diffs)
-
trunk/classy.php (modified) (3 diffs)
-
trunk/includes/class-classy-activator.php (modified) (3 diffs)
-
trunk/includes/class-classy-deactivator.php (modified) (3 diffs)
-
trunk/includes/class-classy-i18n.php (modified) (5 diffs)
-
trunk/includes/class-classy-loader.php (modified) (8 diffs)
-
trunk/includes/class-classy.php (modified) (15 diffs)
-
trunk/public/class-classy-public.php (modified) (14 diffs)
-
trunk/public/partials/classy-public-display.php (modified) (1 diff)
-
trunk/uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
classy/tags/1.1/admin/class-classy-admin.php
r1107257 r1110142 5 5 * 6 6 * @link http://mediacause.org 7 * @since 1. 0.07 * @since 1.1 8 8 * 9 9 * @package Classy … … 23 23 * The ID of this plugin. 24 24 * 25 * @since 1. 0.025 * @since 1.1 26 26 * @access private 27 27 * @var string $classy The ID of this plugin. … … 32 32 * The version of this plugin. 33 33 * 34 * @since 1. 0.034 * @since 1.1 35 35 * @access private 36 36 * @var string $version The current version of this plugin. … … 41 41 * Initialize the class and set its properties. 42 42 * 43 * @since 1. 0.043 * @since 1.1 44 44 * @param string $classy The name of this plugin. 45 45 * @param string $version The version of this plugin. 46 46 */ 47 47 48 public function __construct( $classy, $version ) { 48 49 49 $this->classy = $classy; 50 50 $this->version = $version; 51 52 51 } 53 52 … … 55 54 * Register the stylesheets for the Dashboard. 56 55 * 57 * @since 1. 0.056 * @since 1.1 58 57 */ 59 58 public function enqueue_styles() { … … 64 63 * Register the JavaScript for the dashboard. 65 64 * 66 * @since 1. 0.065 * @since 1.1 67 66 */ 68 67 public function enqueue_scripts() { … … 72 71 public function admin_menus(){ 73 72 if(isset($_POST['update'])){ 74 $token = $_POST['token']; 75 $cid = $_POST['cid']; 76 $url = 'https://www.classy.org/api1/account-info?token=' . $token . '&cid='. $cid; 77 $ch = curl_init(); 78 curl_setopt($ch, CURLOPT_URL, $url); 79 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 80 $output = curl_exec($ch); 81 $output = json_decode($output); 82 if($output->status_code == "SUCCESS"){ 83 update_option('classy_token', $token); 84 update_option('classy_cid', $cid); 85 update_option('classy_org_name', $output->name); 86 update_option('classy_url', $output->charity_url); 87 add_action( 'admin_notices', 'valid_api_notice' ); 88 } else { 89 update_option('classy_token', $token); 90 update_option('classy_cid', $cid); 91 update_option('classy_org_name', ''); 92 update_option('classy_url', $output->charity_url); 93 add_action( 'admin_notices', 'invalid_api_notice'); 94 } 95 } 73 $account = new Classy_Account($_POST['token'], $_POST['cid']); 74 $account->update() ? add_action( 'admin_notices', 'valid_api_notice' ) : add_action( 'admin_notices', 'invalid_api_notice'); 75 } 96 76 97 77 add_menu_page( 'Classy', 'Classy', 'manage_options', plugin_dir_path( __FILE__ ) . 'partials/classy-admin-display.php', '', 'dashicons-groups'); … … 109 89 } 110 90 } 111 112 91 } -
classy/tags/1.1/admin/partials/classy-admin-display.php
r1107257 r1110142 5 5 * 6 6 * @link http://mediacause.org 7 * @since 1. 0.07 * @since 1.1 8 8 * 9 9 * @package Classy 10 10 * @subpackage Classy/admin/partials 11 11 */ 12 global $error; 12 13 $classy = new Classy_API(); 14 $account = $classy->account_info(); 15 $activities = $classy->account_activity(); 13 16 ?> 14 17 … … 30 33 </form> 31 34 <hr> 32 <p>Organization: <?php echo get_option('classy_org_name') ? get_option('classy_org_name') : 'None'; ?></p> 35 <?php if($account->status_code == "SUCCESS"): ?> 36 <p>Organization: <?php echo $account->name; ?></p> 37 <p>Total Raised: $<?php echo $account->total_raised; ?></p> 38 <p>Total Events: <?php echo $account->total_active_events; ?></p> 39 <p>Total Supporters: <?php echo $account->total_supporters; ?></p> 40 <p>Total Teams: <?php echo $account->total_fund_teams; ?></p> 41 <?php endif; ?> 42 <?php ?> 33 43 </div> 34 44 </div> 35 45 </div> 46 <?php if($activities->status_code == "SUCCESS"): ?> 47 <h1><span class="dashicons dashicons-update"></span> Activity Stream</h1> 48 <div class="wrap"> 49 <div class="classy-form postbox"> 50 <div class="inside"> 51 <ul> 52 <?php foreach ($activities->activity as $activity) { 53 echo '<li><a href="'. $activity->url .'" target="_blank">' . $activity->activity_string . '</a></li>'; 54 } 55 ?> 56 </ul> 57 </div> 58 </div> 59 </div> 60 <?php endif; ?> -
classy/tags/1.1/classy.php
r1107257 r1110142 5 5 * 6 6 * @link http://mediacause.org 7 * @since 1. 0.07 * @since 1.1 8 8 * @package Classy 9 9 * … … 12 12 * Plugin URI: http://mediacause.org 13 13 * Description: A tool used to integrate Classy's API into easily accessible shortcodes 14 * Version: 1. 0.014 * Version: 1.1 15 15 * Author: Media Cause 16 16 * Author URI: http://mediacause.org … … 60 60 * not affect the page life cycle. 61 61 * 62 * @since 1. 0.062 * @since 1.1 63 63 */ 64 64 function run_classy() { -
classy/tags/1.1/includes/class-classy-activator.php
r1107257 r1110142 5 5 * 6 6 * @link http://mediacause.org 7 * @since 1. 0.07 * @since 1.1 8 8 * 9 9 * @package Classy … … 16 16 * This class defines all code necessary to run during the plugin's activation. 17 17 * 18 * @since 1. 0.018 * @since 1.1 19 19 * @package Classy 20 20 * @subpackage Classy/includes … … 28 28 * Long Description. 29 29 * 30 * @since 1. 0.030 * @since 1.1 31 31 */ 32 32 public static function activate() { -
classy/tags/1.1/includes/class-classy-deactivator.php
r1107257 r1110142 5 5 * 6 6 * @link http://mediacause.org 7 * @since 1. 0.07 * @since 1.1 8 8 * 9 9 * @package Classy … … 16 16 * This class defines all code necessary to run during the plugin's deactivation. 17 17 * 18 * @since 1. 0.018 * @since 1.1 19 19 * @package Classy 20 20 * @subpackage Classy/includes … … 28 28 * Long Description. 29 29 * 30 * @since 1. 0.030 * @since 1.1 31 31 */ 32 32 public static function deactivate() { -
classy/tags/1.1/includes/class-classy-i18n.php
r1107257 r1110142 8 8 * 9 9 * @link http://mediacause.org 10 * @since 1. 0.010 * @since 1.1 11 11 * 12 12 * @package Classy … … 20 20 * so that it is ready for translation. 21 21 * 22 * @since 1. 0.022 * @since 1.1 23 23 * @package Classy 24 24 * @subpackage Classy/includes … … 30 30 * The domain specified for this plugin. 31 31 * 32 * @since 1. 0.032 * @since 1.1 33 33 * @access private 34 34 * @var string $domain The domain identifier for this plugin. … … 39 39 * Load the plugin text domain for translation. 40 40 * 41 * @since 1. 0.041 * @since 1.1 42 42 */ 43 43 public function load_plugin_textdomain() { … … 54 54 * Set the domain equal to that of the specified domain. 55 55 * 56 * @since 1. 0.056 * @since 1.1 57 57 * @param string $domain The domain that represents the locale of this plugin. 58 58 */ -
classy/tags/1.1/includes/class-classy-loader.php
r1107257 r1110142 5 5 * 6 6 * @link http://mediacause.org 7 * @since 1. 0.07 * @since 1.1 8 8 * 9 9 * @package Classy … … 27 27 * The array of actions registered with WordPress. 28 28 * 29 * @since 1. 0.029 * @since 1.1 30 30 * @access protected 31 31 * @var array $actions The actions registered with WordPress to fire when the plugin loads. … … 36 36 * The array of filters registered with WordPress. 37 37 * 38 * @since 1. 0.038 * @since 1.1 39 39 * @access protected 40 40 * @var array $filters The filters registered with WordPress to fire when the plugin loads. … … 45 45 * Initialize the collections used to maintain the actions and filters. 46 46 * 47 * @since 1. 0.047 * @since 1.1 48 48 */ 49 49 public function __construct() { … … 57 57 * Add a new action to the collection to be registered with WordPress. 58 58 * 59 * @since 1. 0.059 * @since 1.1 60 60 * @param string $hook The name of the WordPress action that is being registered. 61 61 * @param object $component A reference to the instance of the object on which the action is defined. … … 71 71 * Add a new filter to the collection to be registered with WordPress. 72 72 * 73 * @since 1. 0.073 * @since 1.1 74 74 * @param string $hook The name of the WordPress filter that is being registered. 75 75 * @param object $component A reference to the instance of the object on which the filter is defined. … … 86 86 * collection. 87 87 * 88 * @since 1. 0.088 * @since 1.1 89 89 * @access private 90 90 * @param array $hooks The collection of hooks that is being registered (that is, actions or filters). … … 113 113 * Register the filters and actions with WordPress. 114 114 * 115 * @since 1. 0.0115 * @since 1.1 116 116 */ 117 117 public function run() { -
classy/tags/1.1/includes/class-classy.php
r1107257 r1110142 8 8 * 9 9 * @link http://mediacause.org 10 * @since 1. 0.010 * @since 1.1 11 11 * 12 12 * @package Classy … … 23 23 * version of the plugin. 24 24 * 25 * @since 1. 0.025 * @since 1.1 26 26 * @package Classy 27 27 * @subpackage Classy/includes … … 34 34 * the plugin. 35 35 * 36 * @since 1. 0.036 * @since 1.1 37 37 * @access protected 38 38 * @var Classy_Loader $loader Maintains and registers all hooks for the plugin. … … 43 43 * The unique identifier of this plugin. 44 44 * 45 * @since 1. 0.045 * @since 1.1 46 46 * @access protected 47 47 * @var string $classy The string used to uniquely identify this plugin. … … 52 52 * The current version of the plugin. 53 53 * 54 * @since 1. 0.054 * @since 1.1 55 55 * @access protected 56 56 * @var string $version The current version of the plugin. … … 65 65 * the public-facing side of the site. 66 66 * 67 * @since 1. 0.067 * @since 1.1 68 68 */ 69 69 public function __construct() { 70 70 71 71 $this->classy = 'classy'; 72 $this->version = '1. 0.0';72 $this->version = '1.1'; 73 73 74 74 $this->load_dependencies(); … … 92 92 * with WordPress. 93 93 * 94 * @since 1. 0.094 * @since 1.1 95 95 * @access private 96 96 */ … … 103 103 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-classy-loader.php'; 104 104 105 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-classy-api.php'; 106 107 105 108 /** 106 109 * The class responsible for defining internationalization functionality … … 130 133 * with WordPress. 131 134 * 132 * @since 1. 0.0135 * @since 1.1 133 136 * @access private 134 137 */ … … 146 149 * of the plugin. 147 150 * 148 * @since 1. 0.0151 * @since 1.1 149 152 * @access private 150 153 */ … … 162 165 * of the plugin. 163 166 * 164 * @since 1. 0.0167 * @since 1.1 165 168 * @access private 166 169 */ … … 177 180 * Run the loader to execute all of the hooks with WordPress. 178 181 * 179 * @since 1. 0.0182 * @since 1.1 180 183 */ 181 184 public function run() { … … 187 190 * WordPress and to define internationalization functionality. 188 191 * 189 * @since 1. 0.0192 * @since 1.1 190 193 * @return string The name of the plugin. 191 194 */ … … 197 200 * The reference to the class that orchestrates the hooks with the plugin. 198 201 * 199 * @since 1. 0.0202 * @since 1.1 200 203 * @return Classy_Loader Orchestrates the hooks of the plugin. 201 204 */ … … 207 210 * Retrieve the version number of the plugin. 208 211 * 209 * @since 1. 0.0212 * @since 1.1 210 213 * @return string The version number of the plugin. 211 214 */ -
classy/tags/1.1/public/class-classy-public.php
r1107270 r1110142 5 5 * 6 6 * @link http://mediacause.org 7 * @since 1. 0.07 * @since 1.1 8 8 * 9 9 * @package Classy … … 23 23 * The ID of this plugin. 24 24 * 25 * @since 1. 0.025 * @since 1.1 26 26 * @access private 27 27 * @var string $classy The ID of this plugin. … … 32 32 * The version of this plugin. 33 33 * 34 * @since 1. 0.034 * @since 1.1 35 35 * @access private 36 36 * @var string $version The current version of this plugin. … … 39 39 40 40 /** 41 * The version of this plugin. 42 * 43 * @since 1.1 44 * @access private 45 * @var object $api The current account API Object 46 */ 47 private $api; 48 49 /** 41 50 * Initialize the class and set its properties. 42 51 * 43 * @since 1. 0.052 * @since 1.1 44 53 * @param string $classy The name of the plugin. 45 54 * @param string $version The version of this plugin. 46 55 */ 56 47 57 public function __construct( $classy, $version ) { 48 49 58 $this->classy = $classy; 50 59 $this->version = $version; 51 60 $this->api = new Classy_API(); 52 61 } 53 62 … … 55 64 * Register the stylesheets for the public-facing side of the site. 56 65 * 57 * @since 1. 0.066 * @since 1.1 58 67 */ 59 68 public function enqueue_styles() { … … 64 73 * Register the stylesheets for the public-facing side of the site. 65 74 * 66 * @since 1. 0.075 * @since 1.1 67 76 */ 68 77 public function enqueue_scripts() { … … 76 85 } 77 86 78 // Gets Latest campaigns Created87 // Gets Latest campaigns created 79 88 function get_campaigns_func($atts){ 80 89 // Shortcode Attributes Setup … … 87 96 ), $atts ); 88 97 89 // Get Token and CID90 $a['token'] = get_option('classy_token');91 $a['cid'] = get_option('classy_cid');92 93 98 // Build URL Parameters 94 99 $attrs = http_build_query($a); 95 $url = 'https://www.classy.org/api1/campaigns?' . $attrs; 96 97 // Curl it 98 $ch = curl_init(); 99 curl_setopt($ch, CURLOPT_URL, $url); 100 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 101 $output = curl_exec($ch); 102 $output = json_decode($output); 103 curl_close($ch); 100 $output = $this->api->campaigns($attrs); 104 101 105 102 $count = 0; … … 114 111 $output .= ' 115 112 <div class="single-campaign"> 116 <p class="campaign-title"><a href="'. $campaign-> campaign_url .'">'. $campaign->name .'</a></p>113 <p class="campaign-title"><a href="'. $campaign->event_url .'">'. $campaign->name .'</a></p> 117 114 <p class="campaign-date">'. esc_attr(date_i18n('d M, Y',$date)) .'</p> 118 115 <p class="campaign-address">'. $location . ', ' . $campaign->city . ', ' . $campaign->state .'</p> … … 132 129 } 133 130 131 // Get latest fundraisers 134 132 function get_fundraisers_func($atts){ 135 133 // Shortcode Attributes Setup … … 153 151 ), $atts ); 154 152 155 // Get Token and CID156 $a['token'] = get_option('classy_token');157 $a['cid'] = get_option('classy_cid');158 159 153 // Build URL Parameters 160 154 $attrs = http_build_query($a); 161 $url = 'https://www.classy.org/api1/fundraisers?' . $attrs; 162 163 // Curl it 164 $ch = curl_init(); 165 curl_setopt($ch, CURLOPT_URL, $url); 166 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 167 $output = curl_exec($ch); 168 $output = json_decode($output); 169 curl_close($ch); 155 $output = $this->api->fundraisers($attrs); 170 156 171 157 if($output->status_code == "SUCCESS"){ … … 184 170 </div> 185 171 </div>'; 186 187 172 } 188 173 $output .= '</div></div>'; … … 192 177 } 193 178 179 // Get latest donations 194 180 function get_donations_func($atts){ 195 181 // Shortcode Attributes Setup … … 206 192 ), $atts ); 207 193 208 // Get Token and CID209 $a['token'] = get_option('classy_token');210 $a['cid'] = get_option('classy_cid');211 212 194 // Build URL Parameters 213 195 $attrs = http_build_query($a); 214 $url = 'https://www.classy.org/api1/donations?' . $attrs; 215 216 // Curl it 217 $ch = curl_init(); 218 curl_setopt($ch, CURLOPT_URL, $url); 219 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 220 $output = curl_exec($ch); 221 $output = json_decode($output); 222 curl_close($ch); 196 $output = $this->api->donations($attrs); 223 197 224 198 if($output->status_code == "SUCCESS"){ -
classy/tags/1.1/public/partials/classy-public-display.php
r1107257 r1110142 7 7 * 8 8 * @link http://mediacause.org 9 * @since 1. 0.09 * @since 1.1 10 10 * 11 11 * @package Classy -
classy/tags/1.1/uninstall.php
r1107257 r1110142 21 21 * 22 22 * @link http://mediacause.org 23 * @since 1. 0.023 * @since 1.1 24 24 * 25 25 * @package Classy -
classy/trunk/admin/class-classy-admin.php
r1107257 r1110142 5 5 * 6 6 * @link http://mediacause.org 7 * @since 1. 0.07 * @since 1.1 8 8 * 9 9 * @package Classy … … 23 23 * The ID of this plugin. 24 24 * 25 * @since 1. 0.025 * @since 1.1 26 26 * @access private 27 27 * @var string $classy The ID of this plugin. … … 32 32 * The version of this plugin. 33 33 * 34 * @since 1. 0.034 * @since 1.1 35 35 * @access private 36 36 * @var string $version The current version of this plugin. … … 41 41 * Initialize the class and set its properties. 42 42 * 43 * @since 1. 0.043 * @since 1.1 44 44 * @param string $classy The name of this plugin. 45 45 * @param string $version The version of this plugin. 46 46 */ 47 47 48 public function __construct( $classy, $version ) { 48 49 49 $this->classy = $classy; 50 50 $this->version = $version; 51 52 51 } 53 52 … … 55 54 * Register the stylesheets for the Dashboard. 56 55 * 57 * @since 1. 0.056 * @since 1.1 58 57 */ 59 58 public function enqueue_styles() { … … 64 63 * Register the JavaScript for the dashboard. 65 64 * 66 * @since 1. 0.065 * @since 1.1 67 66 */ 68 67 public function enqueue_scripts() { … … 72 71 public function admin_menus(){ 73 72 if(isset($_POST['update'])){ 74 $token = $_POST['token']; 75 $cid = $_POST['cid']; 76 $url = 'https://www.classy.org/api1/account-info?token=' . $token . '&cid='. $cid; 77 $ch = curl_init(); 78 curl_setopt($ch, CURLOPT_URL, $url); 79 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 80 $output = curl_exec($ch); 81 $output = json_decode($output); 82 if($output->status_code == "SUCCESS"){ 83 update_option('classy_token', $token); 84 update_option('classy_cid', $cid); 85 update_option('classy_org_name', $output->name); 86 update_option('classy_url', $output->charity_url); 87 add_action( 'admin_notices', 'valid_api_notice' ); 88 } else { 89 update_option('classy_token', $token); 90 update_option('classy_cid', $cid); 91 update_option('classy_org_name', ''); 92 update_option('classy_url', $output->charity_url); 93 add_action( 'admin_notices', 'invalid_api_notice'); 94 } 95 } 73 $account = new Classy_Account($_POST['token'], $_POST['cid']); 74 $account->update() ? add_action( 'admin_notices', 'valid_api_notice' ) : add_action( 'admin_notices', 'invalid_api_notice'); 75 } 96 76 97 77 add_menu_page( 'Classy', 'Classy', 'manage_options', plugin_dir_path( __FILE__ ) . 'partials/classy-admin-display.php', '', 'dashicons-groups'); … … 109 89 } 110 90 } 111 112 91 } -
classy/trunk/admin/partials/classy-admin-display.php
r1107257 r1110142 5 5 * 6 6 * @link http://mediacause.org 7 * @since 1. 0.07 * @since 1.1 8 8 * 9 9 * @package Classy 10 10 * @subpackage Classy/admin/partials 11 11 */ 12 global $error; 12 13 $classy = new Classy_API(); 14 $account = $classy->account_info(); 15 $activities = $classy->account_activity(); 13 16 ?> 14 17 … … 30 33 </form> 31 34 <hr> 32 <p>Organization: <?php echo get_option('classy_org_name') ? get_option('classy_org_name') : 'None'; ?></p> 35 <?php if($account->status_code == "SUCCESS"): ?> 36 <p>Organization: <?php echo $account->name; ?></p> 37 <p>Total Raised: $<?php echo $account->total_raised; ?></p> 38 <p>Total Events: <?php echo $account->total_active_events; ?></p> 39 <p>Total Supporters: <?php echo $account->total_supporters; ?></p> 40 <p>Total Teams: <?php echo $account->total_fund_teams; ?></p> 41 <?php endif; ?> 42 <?php ?> 33 43 </div> 34 44 </div> 35 45 </div> 46 <?php if($activities->status_code == "SUCCESS"): ?> 47 <h1><span class="dashicons dashicons-update"></span> Activity Stream</h1> 48 <div class="wrap"> 49 <div class="classy-form postbox"> 50 <div class="inside"> 51 <ul> 52 <?php foreach ($activities->activity as $activity) { 53 echo '<li><a href="'. $activity->url .'" target="_blank">' . $activity->activity_string . '</a></li>'; 54 } 55 ?> 56 </ul> 57 </div> 58 </div> 59 </div> 60 <?php endif; ?> -
classy/trunk/classy.php
r1107257 r1110142 5 5 * 6 6 * @link http://mediacause.org 7 * @since 1. 0.07 * @since 1.1 8 8 * @package Classy 9 9 * … … 12 12 * Plugin URI: http://mediacause.org 13 13 * Description: A tool used to integrate Classy's API into easily accessible shortcodes 14 * Version: 1. 0.014 * Version: 1.1 15 15 * Author: Media Cause 16 16 * Author URI: http://mediacause.org … … 60 60 * not affect the page life cycle. 61 61 * 62 * @since 1. 0.062 * @since 1.1 63 63 */ 64 64 function run_classy() { -
classy/trunk/includes/class-classy-activator.php
r1107257 r1110142 5 5 * 6 6 * @link http://mediacause.org 7 * @since 1. 0.07 * @since 1.1 8 8 * 9 9 * @package Classy … … 16 16 * This class defines all code necessary to run during the plugin's activation. 17 17 * 18 * @since 1. 0.018 * @since 1.1 19 19 * @package Classy 20 20 * @subpackage Classy/includes … … 28 28 * Long Description. 29 29 * 30 * @since 1. 0.030 * @since 1.1 31 31 */ 32 32 public static function activate() { -
classy/trunk/includes/class-classy-deactivator.php
r1107257 r1110142 5 5 * 6 6 * @link http://mediacause.org 7 * @since 1. 0.07 * @since 1.1 8 8 * 9 9 * @package Classy … … 16 16 * This class defines all code necessary to run during the plugin's deactivation. 17 17 * 18 * @since 1. 0.018 * @since 1.1 19 19 * @package Classy 20 20 * @subpackage Classy/includes … … 28 28 * Long Description. 29 29 * 30 * @since 1. 0.030 * @since 1.1 31 31 */ 32 32 public static function deactivate() { -
classy/trunk/includes/class-classy-i18n.php
r1107257 r1110142 8 8 * 9 9 * @link http://mediacause.org 10 * @since 1. 0.010 * @since 1.1 11 11 * 12 12 * @package Classy … … 20 20 * so that it is ready for translation. 21 21 * 22 * @since 1. 0.022 * @since 1.1 23 23 * @package Classy 24 24 * @subpackage Classy/includes … … 30 30 * The domain specified for this plugin. 31 31 * 32 * @since 1. 0.032 * @since 1.1 33 33 * @access private 34 34 * @var string $domain The domain identifier for this plugin. … … 39 39 * Load the plugin text domain for translation. 40 40 * 41 * @since 1. 0.041 * @since 1.1 42 42 */ 43 43 public function load_plugin_textdomain() { … … 54 54 * Set the domain equal to that of the specified domain. 55 55 * 56 * @since 1. 0.056 * @since 1.1 57 57 * @param string $domain The domain that represents the locale of this plugin. 58 58 */ -
classy/trunk/includes/class-classy-loader.php
r1107257 r1110142 5 5 * 6 6 * @link http://mediacause.org 7 * @since 1. 0.07 * @since 1.1 8 8 * 9 9 * @package Classy … … 27 27 * The array of actions registered with WordPress. 28 28 * 29 * @since 1. 0.029 * @since 1.1 30 30 * @access protected 31 31 * @var array $actions The actions registered with WordPress to fire when the plugin loads. … … 36 36 * The array of filters registered with WordPress. 37 37 * 38 * @since 1. 0.038 * @since 1.1 39 39 * @access protected 40 40 * @var array $filters The filters registered with WordPress to fire when the plugin loads. … … 45 45 * Initialize the collections used to maintain the actions and filters. 46 46 * 47 * @since 1. 0.047 * @since 1.1 48 48 */ 49 49 public function __construct() { … … 57 57 * Add a new action to the collection to be registered with WordPress. 58 58 * 59 * @since 1. 0.059 * @since 1.1 60 60 * @param string $hook The name of the WordPress action that is being registered. 61 61 * @param object $component A reference to the instance of the object on which the action is defined. … … 71 71 * Add a new filter to the collection to be registered with WordPress. 72 72 * 73 * @since 1. 0.073 * @since 1.1 74 74 * @param string $hook The name of the WordPress filter that is being registered. 75 75 * @param object $component A reference to the instance of the object on which the filter is defined. … … 86 86 * collection. 87 87 * 88 * @since 1. 0.088 * @since 1.1 89 89 * @access private 90 90 * @param array $hooks The collection of hooks that is being registered (that is, actions or filters). … … 113 113 * Register the filters and actions with WordPress. 114 114 * 115 * @since 1. 0.0115 * @since 1.1 116 116 */ 117 117 public function run() { -
classy/trunk/includes/class-classy.php
r1107257 r1110142 8 8 * 9 9 * @link http://mediacause.org 10 * @since 1. 0.010 * @since 1.1 11 11 * 12 12 * @package Classy … … 23 23 * version of the plugin. 24 24 * 25 * @since 1. 0.025 * @since 1.1 26 26 * @package Classy 27 27 * @subpackage Classy/includes … … 34 34 * the plugin. 35 35 * 36 * @since 1. 0.036 * @since 1.1 37 37 * @access protected 38 38 * @var Classy_Loader $loader Maintains and registers all hooks for the plugin. … … 43 43 * The unique identifier of this plugin. 44 44 * 45 * @since 1. 0.045 * @since 1.1 46 46 * @access protected 47 47 * @var string $classy The string used to uniquely identify this plugin. … … 52 52 * The current version of the plugin. 53 53 * 54 * @since 1. 0.054 * @since 1.1 55 55 * @access protected 56 56 * @var string $version The current version of the plugin. … … 65 65 * the public-facing side of the site. 66 66 * 67 * @since 1. 0.067 * @since 1.1 68 68 */ 69 69 public function __construct() { 70 70 71 71 $this->classy = 'classy'; 72 $this->version = '1. 0.0';72 $this->version = '1.1'; 73 73 74 74 $this->load_dependencies(); … … 92 92 * with WordPress. 93 93 * 94 * @since 1. 0.094 * @since 1.1 95 95 * @access private 96 96 */ … … 103 103 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-classy-loader.php'; 104 104 105 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-classy-api.php'; 106 107 105 108 /** 106 109 * The class responsible for defining internationalization functionality … … 130 133 * with WordPress. 131 134 * 132 * @since 1. 0.0135 * @since 1.1 133 136 * @access private 134 137 */ … … 146 149 * of the plugin. 147 150 * 148 * @since 1. 0.0151 * @since 1.1 149 152 * @access private 150 153 */ … … 162 165 * of the plugin. 163 166 * 164 * @since 1. 0.0167 * @since 1.1 165 168 * @access private 166 169 */ … … 177 180 * Run the loader to execute all of the hooks with WordPress. 178 181 * 179 * @since 1. 0.0182 * @since 1.1 180 183 */ 181 184 public function run() { … … 187 190 * WordPress and to define internationalization functionality. 188 191 * 189 * @since 1. 0.0192 * @since 1.1 190 193 * @return string The name of the plugin. 191 194 */ … … 197 200 * The reference to the class that orchestrates the hooks with the plugin. 198 201 * 199 * @since 1. 0.0202 * @since 1.1 200 203 * @return Classy_Loader Orchestrates the hooks of the plugin. 201 204 */ … … 207 210 * Retrieve the version number of the plugin. 208 211 * 209 * @since 1. 0.0212 * @since 1.1 210 213 * @return string The version number of the plugin. 211 214 */ -
classy/trunk/public/class-classy-public.php
r1107270 r1110142 5 5 * 6 6 * @link http://mediacause.org 7 * @since 1. 0.07 * @since 1.1 8 8 * 9 9 * @package Classy … … 23 23 * The ID of this plugin. 24 24 * 25 * @since 1. 0.025 * @since 1.1 26 26 * @access private 27 27 * @var string $classy The ID of this plugin. … … 32 32 * The version of this plugin. 33 33 * 34 * @since 1. 0.034 * @since 1.1 35 35 * @access private 36 36 * @var string $version The current version of this plugin. … … 39 39 40 40 /** 41 * The version of this plugin. 42 * 43 * @since 1.1 44 * @access private 45 * @var object $api The current account API Object 46 */ 47 private $api; 48 49 /** 41 50 * Initialize the class and set its properties. 42 51 * 43 * @since 1. 0.052 * @since 1.1 44 53 * @param string $classy The name of the plugin. 45 54 * @param string $version The version of this plugin. 46 55 */ 56 47 57 public function __construct( $classy, $version ) { 48 49 58 $this->classy = $classy; 50 59 $this->version = $version; 51 60 $this->api = new Classy_API(); 52 61 } 53 62 … … 55 64 * Register the stylesheets for the public-facing side of the site. 56 65 * 57 * @since 1. 0.066 * @since 1.1 58 67 */ 59 68 public function enqueue_styles() { … … 64 73 * Register the stylesheets for the public-facing side of the site. 65 74 * 66 * @since 1. 0.075 * @since 1.1 67 76 */ 68 77 public function enqueue_scripts() { … … 76 85 } 77 86 78 // Gets Latest campaigns Created87 // Gets Latest campaigns created 79 88 function get_campaigns_func($atts){ 80 89 // Shortcode Attributes Setup … … 87 96 ), $atts ); 88 97 89 // Get Token and CID90 $a['token'] = get_option('classy_token');91 $a['cid'] = get_option('classy_cid');92 93 98 // Build URL Parameters 94 99 $attrs = http_build_query($a); 95 $url = 'https://www.classy.org/api1/campaigns?' . $attrs; 96 97 // Curl it 98 $ch = curl_init(); 99 curl_setopt($ch, CURLOPT_URL, $url); 100 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 101 $output = curl_exec($ch); 102 $output = json_decode($output); 103 curl_close($ch); 100 $output = $this->api->campaigns($attrs); 104 101 105 102 $count = 0; … … 114 111 $output .= ' 115 112 <div class="single-campaign"> 116 <p class="campaign-title"><a href="'. $campaign-> campaign_url .'">'. $campaign->name .'</a></p>113 <p class="campaign-title"><a href="'. $campaign->event_url .'">'. $campaign->name .'</a></p> 117 114 <p class="campaign-date">'. esc_attr(date_i18n('d M, Y',$date)) .'</p> 118 115 <p class="campaign-address">'. $location . ', ' . $campaign->city . ', ' . $campaign->state .'</p> … … 132 129 } 133 130 131 // Get latest fundraisers 134 132 function get_fundraisers_func($atts){ 135 133 // Shortcode Attributes Setup … … 153 151 ), $atts ); 154 152 155 // Get Token and CID156 $a['token'] = get_option('classy_token');157 $a['cid'] = get_option('classy_cid');158 159 153 // Build URL Parameters 160 154 $attrs = http_build_query($a); 161 $url = 'https://www.classy.org/api1/fundraisers?' . $attrs; 162 163 // Curl it 164 $ch = curl_init(); 165 curl_setopt($ch, CURLOPT_URL, $url); 166 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 167 $output = curl_exec($ch); 168 $output = json_decode($output); 169 curl_close($ch); 155 $output = $this->api->fundraisers($attrs); 170 156 171 157 if($output->status_code == "SUCCESS"){ … … 184 170 </div> 185 171 </div>'; 186 187 172 } 188 173 $output .= '</div></div>'; … … 192 177 } 193 178 179 // Get latest donations 194 180 function get_donations_func($atts){ 195 181 // Shortcode Attributes Setup … … 206 192 ), $atts ); 207 193 208 // Get Token and CID209 $a['token'] = get_option('classy_token');210 $a['cid'] = get_option('classy_cid');211 212 194 // Build URL Parameters 213 195 $attrs = http_build_query($a); 214 $url = 'https://www.classy.org/api1/donations?' . $attrs; 215 216 // Curl it 217 $ch = curl_init(); 218 curl_setopt($ch, CURLOPT_URL, $url); 219 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 220 $output = curl_exec($ch); 221 $output = json_decode($output); 222 curl_close($ch); 196 $output = $this->api->donations($attrs); 223 197 224 198 if($output->status_code == "SUCCESS"){ -
classy/trunk/public/partials/classy-public-display.php
r1107257 r1110142 7 7 * 8 8 * @link http://mediacause.org 9 * @since 1. 0.09 * @since 1.1 10 10 * 11 11 * @package Classy -
classy/trunk/uninstall.php
r1107257 r1110142 21 21 * 22 22 * @link http://mediacause.org 23 * @since 1. 0.023 * @since 1.1 24 24 * 25 25 * @package Classy
Note: See TracChangeset
for help on using the changeset viewer.