Changeset 1576771
- Timestamp:
- 01/17/2017 07:37:23 PM (9 years ago)
- Location:
- pushpress-integration
- Files:
-
- 12 edited
- 1 copied
-
tags/1.5.11 (copied) (copied from pushpress-integration/trunk)
-
tags/1.5.11/inc/wp_pushpress_model.php (modified) (14 diffs)
-
tags/1.5.11/inc/wp_pushpress_shortcode.php (modified) (1 diff)
-
tags/1.5.11/pushpress.php (modified) (2 diffs)
-
tags/1.5.11/readme.txt (modified) (2 diffs)
-
tags/1.5.11/templates/frontend/shortcode_leads.php (modified) (1 diff)
-
tags/1.5.11/templates/frontend/shortcode_workouts.php (modified) (1 diff)
-
trunk/inc/wp_pushpress_model.php (modified) (14 diffs)
-
trunk/inc/wp_pushpress_shortcode.php (modified) (1 diff)
-
trunk/pushpress.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/templates/frontend/shortcode_leads.php (modified) (1 diff)
-
trunk/templates/frontend/shortcode_workouts.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
pushpress-integration/tags/1.5.11/inc/wp_pushpress_model.php
r1571482 r1576771 32 32 $productsList = array(); 33 33 34 foreach ($productsObj ['data']as $product) {34 foreach ($productsObj->data as $product) { 35 35 //get categories 36 36 $catId = $product->category->uuid; … … 68 68 $client = $this->getClient(); 69 69 $timeNow = LocalTime::toGM($client); 70 foreach ($livePreorders ['data']as $product) {70 foreach ($livePreorders->data as $product) { 71 71 72 72 if ($product->end_timestamp >= $timeNow) { … … 138 138 139 139 140 foreach ($productsObj ['data']as $product) {140 foreach ($productsObj->data as $product) { 141 141 if ($product->is_public) { 142 142 //get categories … … 180 180 181 181 182 foreach ($plans ['data']as $plan) {182 foreach ($plans->data as $plan) { 183 183 $plansList[$plan->type][$plan->uuid]['name'] = $plan->name; 184 184 $plansList[$plan->type][$plan->uuid]['price'] = $plan->amount; … … 223 223 } 224 224 225 foreach ($plans ['data']as $plan) {225 foreach ($plans->data as $plan) { 226 226 $plansList[$plan->slug] = $plan->name; 227 227 } … … 243 243 set_transient($key, $items, 600); 244 244 } 245 foreach ($items ['data']as $item) {245 foreach ($items->data as $item) { 246 246 $categories[$item->uuid] = mb_convert_encoding($item->name, 'UTF-8', 'HTML-ENTITIES'); 247 247 } … … 275 275 $eventsList = array(); 276 276 277 foreach ($calendar ['data']as $item) {277 foreach ($calendar->data as $item) { 278 278 if (($item->doy) >= $doy) { 279 279 $eventsList[$item->uuid]['title'] = $item->title; … … 322 322 'end_time' => $end 323 323 )); 324 foreach ($calendar ['data']as $item) {324 foreach ($calendar->data as $item) { 325 325 if (($item->doy) >= $doy) { 326 326 $eventsList[$item->uuid] = $item->title; … … 363 363 } 364 364 365 foreach ($calendar ['data']as $item) {365 foreach ($calendar->data as $item) { 366 366 367 367 if (($item->doy) >= $doy) { … … 419 419 420 420 $results = array(); 421 foreach ($tracks ['data']as $key => $track) {421 foreach ($tracks->data as $key => $track) { 422 422 //check public to wordpress plugin 423 423 if($track->publish_wordpress){ … … 451 451 452 452 $workoutList = array(); 453 foreach ($workouts ['data']as $item) {453 foreach ($workouts->data as $item) { 454 454 $public_day = $public_setting['publish_day']; 455 455 $public_time = $public_setting['publish_time']; … … 501 501 } 502 502 503 foreach ($referral_sources ['data']as $item) {503 foreach ($referral_sources->data as $item) { 504 504 $referral[] = array('id' => $item['id'], 'name' => $item['name'], 'show_staff_list' => $item['show_staff_list']); 505 505 } … … 696 696 'end_time' => $end 697 697 )); 698 foreach ($calendar ['data']as $item) {698 foreach ($calendar->data as $item) { 699 699 if (($item->doy) >= $doy) { 700 700 if ($item->uuid == $id) { … … 718 718 //get all products object 719 719 $plans = Pushpress_Plan::all($params); 720 foreach ($plans ['data']as $plan) {720 foreach ($plans->data as $plan) { 721 721 if ($plan->slug == $id) { 722 722 return TRUE; -
pushpress-integration/tags/1.5.11/inc/wp_pushpress_shortcode.php
r1571482 r1576771 180 180 if( !$client = get_transient( 'pp_client2' ) ){ 181 181 echo "<br><br>Getting Client from API"; 182 $client = Pushpress_Client::retrieve('self'); 182 try { 183 $client = Pushpress_Client::retrieve('self'); 184 } 185 catch(Exception $e) { 186 187 } 183 188 set_transient( 'pp_client2', $client, 3600 ); // 1 hour cache 184 189 } -
pushpress-integration/tags/1.5.11/pushpress.php
r1571482 r1576771 2 2 /** 3 3 * @package WP-PushPress 4 * @version 1.5.1 04 * @version 1.5.11 5 5 */ 6 6 /* … … 9 9 Description: Easily integrate your workouts, calendar, products, membership plans, events and more with your Wordpress blog! This plugin is a free add-on for existing PushPress clients. See https://pushpress.com for more info. 10 10 Author: PushPress, Inc 11 Version: 1.5.1 011 Version: 1.5.11 12 12 Author URI: https://pushpress.com 13 13 */ 14 14 define('PUSHPRESS_LOCAL', FALSE); 15 15 define('PUSHPRESS_DEV', FALSE); 16 define( 'PP_PLUGIN_VERSION', '1.5.1 0');16 define( 'PP_PLUGIN_VERSION', '1.5.11'); 17 17 define( 'PUSHPRESS_ERROR_REPORT', 0 ); 18 18 define( 'PUSHPRESS_BUTTON_CLASS', 'pushpress-button-class-' . rand(0, 10000)); -
pushpress-integration/tags/1.5.11/readme.txt
r1571488 r1576771 4 4 Requires at least: 3.0.1 5 5 Tested up to: 4.6.1 6 Stable tag: 1.5.1 06 Stable tag: 1.5.11 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 123 123 = 1.5.10 = 124 124 Fixed issue causing some systems to hang up / freeze due to output of characters before the <!DOCTYPE> 125 126 = 1.5.11 = 127 Found an issue affecting *some* PHP versions / hosting providers in how they were treating the data being returned from our API. This was causing white screens of death on our pages. Fixed the issue for those affected. -
pushpress-integration/tags/1.5.11/templates/frontend/shortcode_leads.php
r1571482 r1576771 135 135 foreach ($staff as $s) { 136 136 $selected = ''; 137 if ( $s->uuid == $form['referred_by_user_id']) {137 if (isset($form['referred_by_user_id']) && ($s->uuid == $form['referred_by_user_id'])) { 138 138 $selected = 'selected'; 139 139 } -
pushpress-integration/tags/1.5.11/templates/frontend/shortcode_workouts.php
r1299350 r1576771 21 21 <h2><?php echo $workout['track_name']; ?></h2> 22 22 <div class="wp-pushpress-list"> 23 <?php if (count($workout ['data']) > 0): ?>24 <?php foreach ($workout ['data']as $key => $item): ?>23 <?php if (count($workout->data) > 0): ?> 24 <?php foreach ($workout->data as $key => $item): ?> 25 25 <div class="item-other"> 26 26 <h3><?php echo $item['type']; ?> -
pushpress-integration/trunk/inc/wp_pushpress_model.php
r1571482 r1576771 32 32 $productsList = array(); 33 33 34 foreach ($productsObj ['data']as $product) {34 foreach ($productsObj->data as $product) { 35 35 //get categories 36 36 $catId = $product->category->uuid; … … 68 68 $client = $this->getClient(); 69 69 $timeNow = LocalTime::toGM($client); 70 foreach ($livePreorders ['data']as $product) {70 foreach ($livePreorders->data as $product) { 71 71 72 72 if ($product->end_timestamp >= $timeNow) { … … 138 138 139 139 140 foreach ($productsObj ['data']as $product) {140 foreach ($productsObj->data as $product) { 141 141 if ($product->is_public) { 142 142 //get categories … … 180 180 181 181 182 foreach ($plans ['data']as $plan) {182 foreach ($plans->data as $plan) { 183 183 $plansList[$plan->type][$plan->uuid]['name'] = $plan->name; 184 184 $plansList[$plan->type][$plan->uuid]['price'] = $plan->amount; … … 223 223 } 224 224 225 foreach ($plans ['data']as $plan) {225 foreach ($plans->data as $plan) { 226 226 $plansList[$plan->slug] = $plan->name; 227 227 } … … 243 243 set_transient($key, $items, 600); 244 244 } 245 foreach ($items ['data']as $item) {245 foreach ($items->data as $item) { 246 246 $categories[$item->uuid] = mb_convert_encoding($item->name, 'UTF-8', 'HTML-ENTITIES'); 247 247 } … … 275 275 $eventsList = array(); 276 276 277 foreach ($calendar ['data']as $item) {277 foreach ($calendar->data as $item) { 278 278 if (($item->doy) >= $doy) { 279 279 $eventsList[$item->uuid]['title'] = $item->title; … … 322 322 'end_time' => $end 323 323 )); 324 foreach ($calendar ['data']as $item) {324 foreach ($calendar->data as $item) { 325 325 if (($item->doy) >= $doy) { 326 326 $eventsList[$item->uuid] = $item->title; … … 363 363 } 364 364 365 foreach ($calendar ['data']as $item) {365 foreach ($calendar->data as $item) { 366 366 367 367 if (($item->doy) >= $doy) { … … 419 419 420 420 $results = array(); 421 foreach ($tracks ['data']as $key => $track) {421 foreach ($tracks->data as $key => $track) { 422 422 //check public to wordpress plugin 423 423 if($track->publish_wordpress){ … … 451 451 452 452 $workoutList = array(); 453 foreach ($workouts ['data']as $item) {453 foreach ($workouts->data as $item) { 454 454 $public_day = $public_setting['publish_day']; 455 455 $public_time = $public_setting['publish_time']; … … 501 501 } 502 502 503 foreach ($referral_sources ['data']as $item) {503 foreach ($referral_sources->data as $item) { 504 504 $referral[] = array('id' => $item['id'], 'name' => $item['name'], 'show_staff_list' => $item['show_staff_list']); 505 505 } … … 696 696 'end_time' => $end 697 697 )); 698 foreach ($calendar ['data']as $item) {698 foreach ($calendar->data as $item) { 699 699 if (($item->doy) >= $doy) { 700 700 if ($item->uuid == $id) { … … 718 718 //get all products object 719 719 $plans = Pushpress_Plan::all($params); 720 foreach ($plans ['data']as $plan) {720 foreach ($plans->data as $plan) { 721 721 if ($plan->slug == $id) { 722 722 return TRUE; -
pushpress-integration/trunk/inc/wp_pushpress_shortcode.php
r1571482 r1576771 180 180 if( !$client = get_transient( 'pp_client2' ) ){ 181 181 echo "<br><br>Getting Client from API"; 182 $client = Pushpress_Client::retrieve('self'); 182 try { 183 $client = Pushpress_Client::retrieve('self'); 184 } 185 catch(Exception $e) { 186 187 } 183 188 set_transient( 'pp_client2', $client, 3600 ); // 1 hour cache 184 189 } -
pushpress-integration/trunk/pushpress.php
r1571482 r1576771 2 2 /** 3 3 * @package WP-PushPress 4 * @version 1.5.1 04 * @version 1.5.11 5 5 */ 6 6 /* … … 9 9 Description: Easily integrate your workouts, calendar, products, membership plans, events and more with your Wordpress blog! This plugin is a free add-on for existing PushPress clients. See https://pushpress.com for more info. 10 10 Author: PushPress, Inc 11 Version: 1.5.1 011 Version: 1.5.11 12 12 Author URI: https://pushpress.com 13 13 */ 14 14 define('PUSHPRESS_LOCAL', FALSE); 15 15 define('PUSHPRESS_DEV', FALSE); 16 define( 'PP_PLUGIN_VERSION', '1.5.1 0');16 define( 'PP_PLUGIN_VERSION', '1.5.11'); 17 17 define( 'PUSHPRESS_ERROR_REPORT', 0 ); 18 18 define( 'PUSHPRESS_BUTTON_CLASS', 'pushpress-button-class-' . rand(0, 10000)); -
pushpress-integration/trunk/readme.txt
r1571488 r1576771 4 4 Requires at least: 3.0.1 5 5 Tested up to: 4.6.1 6 Stable tag: 1.5.1 06 Stable tag: 1.5.11 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 123 123 = 1.5.10 = 124 124 Fixed issue causing some systems to hang up / freeze due to output of characters before the <!DOCTYPE> 125 126 = 1.5.11 = 127 Found an issue affecting *some* PHP versions / hosting providers in how they were treating the data being returned from our API. This was causing white screens of death on our pages. Fixed the issue for those affected. -
pushpress-integration/trunk/templates/frontend/shortcode_leads.php
r1571482 r1576771 135 135 foreach ($staff as $s) { 136 136 $selected = ''; 137 if ( $s->uuid == $form['referred_by_user_id']) {137 if (isset($form['referred_by_user_id']) && ($s->uuid == $form['referred_by_user_id'])) { 138 138 $selected = 'selected'; 139 139 } -
pushpress-integration/trunk/templates/frontend/shortcode_workouts.php
r1299350 r1576771 21 21 <h2><?php echo $workout['track_name']; ?></h2> 22 22 <div class="wp-pushpress-list"> 23 <?php if (count($workout ['data']) > 0): ?>24 <?php foreach ($workout ['data']as $key => $item): ?>23 <?php if (count($workout->data) > 0): ?> 24 <?php foreach ($workout->data as $key => $item): ?> 25 25 <div class="item-other"> 26 26 <h3><?php echo $item['type']; ?>
Note: See TracChangeset
for help on using the changeset viewer.