Changeset 2135624
- Timestamp:
- 08/07/2019 01:17:37 PM (7 years ago)
- Location:
- classroom
- Files:
-
- 12 edited
- 1 copied
-
tags/2.2.7 (copied) (copied from classroom/trunk)
-
tags/2.2.7/admin/class-wp-classroom-admin.php (modified) (4 diffs)
-
tags/2.2.7/includes/class-woocommerce-purchase.php (modified) (1 diff)
-
tags/2.2.7/includes/class-wp-classroom-purchase-handler.php (modified) (1 diff)
-
tags/2.2.7/includes/class-wp-classroom-users.php (modified) (2 diffs)
-
tags/2.2.7/readme.txt (modified) (2 diffs)
-
tags/2.2.7/wp-classroom.php (modified) (2 diffs)
-
trunk/admin/class-wp-classroom-admin.php (modified) (4 diffs)
-
trunk/includes/class-woocommerce-purchase.php (modified) (1 diff)
-
trunk/includes/class-wp-classroom-purchase-handler.php (modified) (1 diff)
-
trunk/includes/class-wp-classroom-users.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/wp-classroom.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
classroom/tags/2.2.7/admin/class-wp-classroom-admin.php
r1895222 r2135624 4 4 * 5 5 * @link http://example.com 6 * @since 1.0.06 * @since 2.2.7 7 7 * 8 8 * @package WP_Classroom … … 224 224 'no_terms' => __( 'No Courses', 'wp-classroom' ), 225 225 'items_list' => __( 'Course list', 'wp-classroom' ), 226 'items_list_navigation' => __( 'Course list navigation', 'wp-classroom' ),226 'items_list_navigation' => __( 'Course list navigation', 'wp-classroom' ), 227 227 ); 228 228 $rewrite = array( … … 279 279 'type' => 'text_small', 280 280 ) ); 281 281 282 } 282 283 … … 307 308 'options' => $this->teacherOptions(), 308 309 ) ); 309 } 310 311 $cmb_term->add_field( array( 312 'name' => __( 'Course Redirect', $this->plugin_name ), 313 'id' => $prefix . 'course_redirect', 314 'type' => 'text', 315 'object_types' => array( 'term' ), 316 'taxonomies' => array( 'wp_course' ), 317 )); 318 } 310 319 311 320 /** -
classroom/tags/2.2.7/includes/class-woocommerce-purchase.php
r1908829 r2135624 451 451 452 452 //$classes = explode(',',$classes); 453 if( !empty($classes) &&in_array( $post->ID,$classes ) || $term_bought )453 if( in_array( $post->ID,$classes ) || $term_bought ) 454 454 { 455 455 return $content; -
classroom/tags/2.2.7/includes/class-wp-classroom-purchase-handler.php
r1861997 r2135624 42 42 43 43 // do_action( 'woocommerce_subscription_status_updated', $this, $new_status, $old_status ); 44 add_action( 'woocommerce_subscription_status_updated', array( __CLASS__, 'woocommerce_subscription_status_updated' ), 10, 3 );44 // add_action( 'woocommerce_subscription_status_updated', array( __CLASS__, 'woocommerce_subscription_status_updated' ), 10, 3 ); 45 45 // do_action( 'woocommerce_subscription_trashed', $post_id ); 46 add_action( 'woocommerce_subscription_trashed', array( __CLASS__, 'woocommerce_subscription_trashed' ), 10, 1 );46 // add_action( 'woocommerce_subscription_trashed', array( __CLASS__, 'woocommerce_subscription_trashed' ), 10, 1 ); 47 47 // do_action( 'woocommerce_subscriptions_switched_item', $subscription, $new_order_item, WC_Subscriptions_Order::get_item_by_id( $new_order_item['switched_subscription_item_id'] ) ); 48 add_action( 'woocommerce_subscriptions_switched_item', array( __CLASS__, 'woocommerce_subscriptions_switched_item' ), 10, 3 );48 // add_action( 'woocommerce_subscriptions_switched_item', array( __CLASS__, 'woocommerce_subscriptions_switched_item' ), 10, 3 ); 49 49 50 50 add_action( 'woocommerce_scheduled_subscription_end_of_prepaid_term', array( __CLASS__, 'woocommerce_scheduled_subscription_end_of_prepaid_term' ), 10, 1 ); -
classroom/tags/2.2.7/includes/class-wp-classroom-users.php
r1861997 r2135624 5 5 * 6 6 * @link https://wordpress.org/plugins/classroom 7 * @since 1.1.07 * @since 2.2.7 8 8 * 9 9 * @package WP_Classroom … … 151 151 $url = wp_login_url(); 152 152 153 // remove get_taxonomies(); 154 $terms = get_the_terms($post->ID, 'wp_course'); 155 $terms_array = []; 156 157 // push all redirect links to $terms_array[]. Only add to array if there is a link in that field 158 foreach ($terms as $term) { 159 $term = get_term_meta($term->term_id, '_wp_course_course_redirect', true); 160 if ($term) { 161 array_push($terms_array, $term); 162 } 163 } 164 153 165 if ($postRedirect = get_post_meta($post->ID, 'wp_classroom_redirect', true)) { 154 166 $url = get_permalink($postRedirect); 167 } // we can obviously only redirect once, and since the above array descends from parent to child, we want to give the lowest level descendent priority over its ancestors. 168 elseif ($taxonomyRedirect = array_pop($terms_array)) { 169 $url = $taxonomyRedirect; 155 170 } elseif ($globalRedirect = $this->getOption('unauthorized-redirect')) { 156 171 $url = get_permalink($globalRedirect); 157 172 } 158 173 159 174 wp_redirect($url); 160 175 } -
classroom/tags/2.2.7/readme.txt
r1908829 r2135624 4 4 Tags: classroom, education, school, woocommerce 5 5 Requires at least: 3.7 6 Tested up to: 4.97 Stable tag: 2. 1.76 Tested up to: 5.2 7 Stable tag: 2.2.7 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl.html … … 57 57 == Changelog == 58 58 59 = 2.2.6 = 60 * Added ability to define redirects on course level. 61 59 62 = 2.1.6 = 60 63 * Updated CMB2 -
classroom/tags/2.2.7/wp-classroom.php
r1908829 r2135624 4 4 * Author: Fresh Brewed Web 5 5 * Author URI: https://freshbrewedweb.com 6 * Version: 2. 1.76 * Version: 2.2.7 7 7 * Description: Create a digital video based classroom in WordPress. This plugin gives you the ability to publish classes. It's flexible enough to combine with other well known WordPress plugins to enhance the functionality. 8 8 * Tags: classroom, education, school, woocommerce, video … … 15 15 } 16 16 17 define( 'WP_CLASSROOM_VERSION', '2. 1.7' );17 define( 'WP_CLASSROOM_VERSION', '2.2.7' ); 18 18 define( 'WP_CLASSROOM_NAMESPACE', 'wp-classroom' ); 19 19 define( 'WP_CLASSROOM_CLASS_POST_TYPE', 'wp_classroom' ); -
classroom/trunk/admin/class-wp-classroom-admin.php
r1895222 r2135624 4 4 * 5 5 * @link http://example.com 6 * @since 1.0.06 * @since 2.2.7 7 7 * 8 8 * @package WP_Classroom … … 224 224 'no_terms' => __( 'No Courses', 'wp-classroom' ), 225 225 'items_list' => __( 'Course list', 'wp-classroom' ), 226 'items_list_navigation' => __( 'Course list navigation', 'wp-classroom' ),226 'items_list_navigation' => __( 'Course list navigation', 'wp-classroom' ), 227 227 ); 228 228 $rewrite = array( … … 279 279 'type' => 'text_small', 280 280 ) ); 281 281 282 } 282 283 … … 307 308 'options' => $this->teacherOptions(), 308 309 ) ); 309 } 310 311 $cmb_term->add_field( array( 312 'name' => __( 'Course Redirect', $this->plugin_name ), 313 'id' => $prefix . 'course_redirect', 314 'type' => 'text', 315 'object_types' => array( 'term' ), 316 'taxonomies' => array( 'wp_course' ), 317 )); 318 } 310 319 311 320 /** -
classroom/trunk/includes/class-woocommerce-purchase.php
r1908829 r2135624 451 451 452 452 //$classes = explode(',',$classes); 453 if( !empty($classes) &&in_array( $post->ID,$classes ) || $term_bought )453 if( in_array( $post->ID,$classes ) || $term_bought ) 454 454 { 455 455 return $content; -
classroom/trunk/includes/class-wp-classroom-purchase-handler.php
r1861997 r2135624 42 42 43 43 // do_action( 'woocommerce_subscription_status_updated', $this, $new_status, $old_status ); 44 add_action( 'woocommerce_subscription_status_updated', array( __CLASS__, 'woocommerce_subscription_status_updated' ), 10, 3 );44 // add_action( 'woocommerce_subscription_status_updated', array( __CLASS__, 'woocommerce_subscription_status_updated' ), 10, 3 ); 45 45 // do_action( 'woocommerce_subscription_trashed', $post_id ); 46 add_action( 'woocommerce_subscription_trashed', array( __CLASS__, 'woocommerce_subscription_trashed' ), 10, 1 );46 // add_action( 'woocommerce_subscription_trashed', array( __CLASS__, 'woocommerce_subscription_trashed' ), 10, 1 ); 47 47 // do_action( 'woocommerce_subscriptions_switched_item', $subscription, $new_order_item, WC_Subscriptions_Order::get_item_by_id( $new_order_item['switched_subscription_item_id'] ) ); 48 add_action( 'woocommerce_subscriptions_switched_item', array( __CLASS__, 'woocommerce_subscriptions_switched_item' ), 10, 3 );48 // add_action( 'woocommerce_subscriptions_switched_item', array( __CLASS__, 'woocommerce_subscriptions_switched_item' ), 10, 3 ); 49 49 50 50 add_action( 'woocommerce_scheduled_subscription_end_of_prepaid_term', array( __CLASS__, 'woocommerce_scheduled_subscription_end_of_prepaid_term' ), 10, 1 ); -
classroom/trunk/includes/class-wp-classroom-users.php
r1861997 r2135624 5 5 * 6 6 * @link https://wordpress.org/plugins/classroom 7 * @since 1.1.07 * @since 2.2.7 8 8 * 9 9 * @package WP_Classroom … … 151 151 $url = wp_login_url(); 152 152 153 // remove get_taxonomies(); 154 $terms = get_the_terms($post->ID, 'wp_course'); 155 $terms_array = []; 156 157 // push all redirect links to $terms_array[]. Only add to array if there is a link in that field 158 foreach ($terms as $term) { 159 $term = get_term_meta($term->term_id, '_wp_course_course_redirect', true); 160 if ($term) { 161 array_push($terms_array, $term); 162 } 163 } 164 153 165 if ($postRedirect = get_post_meta($post->ID, 'wp_classroom_redirect', true)) { 154 166 $url = get_permalink($postRedirect); 167 } // we can obviously only redirect once, and since the above array descends from parent to child, we want to give the lowest level descendent priority over its ancestors. 168 elseif ($taxonomyRedirect = array_pop($terms_array)) { 169 $url = $taxonomyRedirect; 155 170 } elseif ($globalRedirect = $this->getOption('unauthorized-redirect')) { 156 171 $url = get_permalink($globalRedirect); 157 172 } 158 173 159 174 wp_redirect($url); 160 175 } -
classroom/trunk/readme.txt
r1908829 r2135624 4 4 Tags: classroom, education, school, woocommerce 5 5 Requires at least: 3.7 6 Tested up to: 4.97 Stable tag: 2. 1.76 Tested up to: 5.2 7 Stable tag: 2.2.7 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl.html … … 57 57 == Changelog == 58 58 59 = 2.2.6 = 60 * Added ability to define redirects on course level. 61 59 62 = 2.1.6 = 60 63 * Updated CMB2 -
classroom/trunk/wp-classroom.php
r1908829 r2135624 4 4 * Author: Fresh Brewed Web 5 5 * Author URI: https://freshbrewedweb.com 6 * Version: 2. 1.76 * Version: 2.2.7 7 7 * Description: Create a digital video based classroom in WordPress. This plugin gives you the ability to publish classes. It's flexible enough to combine with other well known WordPress plugins to enhance the functionality. 8 8 * Tags: classroom, education, school, woocommerce, video … … 15 15 } 16 16 17 define( 'WP_CLASSROOM_VERSION', '2. 1.7' );17 define( 'WP_CLASSROOM_VERSION', '2.2.7' ); 18 18 define( 'WP_CLASSROOM_NAMESPACE', 'wp-classroom' ); 19 19 define( 'WP_CLASSROOM_CLASS_POST_TYPE', 'wp_classroom' );
Note: See TracChangeset
for help on using the changeset viewer.