Plugin Directory

Changeset 2135624


Ignore:
Timestamp:
08/07/2019 01:17:37 PM (7 years ago)
Author:
freshbrewedweb
Message:

Tagged 2.2.7

Location:
classroom
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • classroom/tags/2.2.7/admin/class-wp-classroom-admin.php

    r1895222 r2135624  
    44 *
    55 * @link       http://example.com
    6  * @since      1.0.0
     6 * @since      2.2.7
    77 *
    88 * @package    WP_Classroom
     
    224224            'no_terms'                   => __( 'No Courses', 'wp-classroom' ),
    225225            'items_list'                 => __( 'Course list', 'wp-classroom' ),
    226             'items_list_navigation'      => __( 'Course list navigation', 'wp-classroom' ),
     226            'items_list_navigation'      => __( 'Course list navigation', 'wp-classroom' ),
    227227        );
    228228        $rewrite = array(
     
    279279            'type' => 'text_small',
    280280        ) );
     281       
    281282    }
    282283
     
    307308            'options' => $this->teacherOptions(),
    308309        ) );
    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    }   
    310319
    311320    /**
  • classroom/tags/2.2.7/includes/class-woocommerce-purchase.php

    r1908829 r2135624  
    451451
    452452        //$classes = explode(',',$classes);
    453         if( !empty($classes) && in_array( $post->ID,$classes ) || $term_bought )
     453        if( in_array( $post->ID,$classes ) || $term_bought )
    454454        {
    455455            return $content;
  • classroom/tags/2.2.7/includes/class-wp-classroom-purchase-handler.php

    r1861997 r2135624  
    4242
    4343        // 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 );
    4545        // 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 );
    4747        // 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 );
    4949
    5050        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  
    55 *
    66 * @link       https://wordpress.org/plugins/classroom
    7  * @since      1.1.0
     7 * @since      2.2.7
    88 *
    99 * @package    WP_Classroom
     
    151151        $url = wp_login_url();
    152152
     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
    153165        if ($postRedirect = get_post_meta($post->ID, 'wp_classroom_redirect', true)) {
    154166            $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;
    155170        } elseif ($globalRedirect = $this->getOption('unauthorized-redirect')) {
    156171            $url = get_permalink($globalRedirect);
    157172        }
    158 
     173       
    159174        wp_redirect($url);
    160175    }
  • classroom/tags/2.2.7/readme.txt

    r1908829 r2135624  
    44Tags: classroom, education, school, woocommerce
    55Requires at least: 3.7
    6 Tested up to: 4.9
    7 Stable tag: 2.1.7
     6Tested up to: 5.2
     7Stable tag: 2.2.7
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl.html
     
    5757== Changelog ==
    5858
     59= 2.2.6 =
     60* Added ability to define redirects on course level.
     61
    5962= 2.1.6 =
    6063* Updated CMB2
  • classroom/tags/2.2.7/wp-classroom.php

    r1908829 r2135624  
    44* Author: Fresh Brewed Web
    55* Author URI: https://freshbrewedweb.com
    6 * Version: 2.1.7
     6* Version: 2.2.7
    77* 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.
    88* Tags: classroom, education, school, woocommerce, video
     
    1515}
    1616
    17 define( 'WP_CLASSROOM_VERSION', '2.1.7' );
     17define( 'WP_CLASSROOM_VERSION', '2.2.7' );
    1818define( 'WP_CLASSROOM_NAMESPACE', 'wp-classroom' );
    1919define( 'WP_CLASSROOM_CLASS_POST_TYPE', 'wp_classroom' );
  • classroom/trunk/admin/class-wp-classroom-admin.php

    r1895222 r2135624  
    44 *
    55 * @link       http://example.com
    6  * @since      1.0.0
     6 * @since      2.2.7
    77 *
    88 * @package    WP_Classroom
     
    224224            'no_terms'                   => __( 'No Courses', 'wp-classroom' ),
    225225            'items_list'                 => __( 'Course list', 'wp-classroom' ),
    226             'items_list_navigation'      => __( 'Course list navigation', 'wp-classroom' ),
     226            'items_list_navigation'      => __( 'Course list navigation', 'wp-classroom' ),
    227227        );
    228228        $rewrite = array(
     
    279279            'type' => 'text_small',
    280280        ) );
     281       
    281282    }
    282283
     
    307308            'options' => $this->teacherOptions(),
    308309        ) );
    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    }   
    310319
    311320    /**
  • classroom/trunk/includes/class-woocommerce-purchase.php

    r1908829 r2135624  
    451451
    452452        //$classes = explode(',',$classes);
    453         if( !empty($classes) && in_array( $post->ID,$classes ) || $term_bought )
     453        if( in_array( $post->ID,$classes ) || $term_bought )
    454454        {
    455455            return $content;
  • classroom/trunk/includes/class-wp-classroom-purchase-handler.php

    r1861997 r2135624  
    4242
    4343        // 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 );
    4545        // 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 );
    4747        // 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 );
    4949
    5050        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  
    55 *
    66 * @link       https://wordpress.org/plugins/classroom
    7  * @since      1.1.0
     7 * @since      2.2.7
    88 *
    99 * @package    WP_Classroom
     
    151151        $url = wp_login_url();
    152152
     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
    153165        if ($postRedirect = get_post_meta($post->ID, 'wp_classroom_redirect', true)) {
    154166            $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;
    155170        } elseif ($globalRedirect = $this->getOption('unauthorized-redirect')) {
    156171            $url = get_permalink($globalRedirect);
    157172        }
    158 
     173       
    159174        wp_redirect($url);
    160175    }
  • classroom/trunk/readme.txt

    r1908829 r2135624  
    44Tags: classroom, education, school, woocommerce
    55Requires at least: 3.7
    6 Tested up to: 4.9
    7 Stable tag: 2.1.7
     6Tested up to: 5.2
     7Stable tag: 2.2.7
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl.html
     
    5757== Changelog ==
    5858
     59= 2.2.6 =
     60* Added ability to define redirects on course level.
     61
    5962= 2.1.6 =
    6063* Updated CMB2
  • classroom/trunk/wp-classroom.php

    r1908829 r2135624  
    44* Author: Fresh Brewed Web
    55* Author URI: https://freshbrewedweb.com
    6 * Version: 2.1.7
     6* Version: 2.2.7
    77* 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.
    88* Tags: classroom, education, school, woocommerce, video
     
    1515}
    1616
    17 define( 'WP_CLASSROOM_VERSION', '2.1.7' );
     17define( 'WP_CLASSROOM_VERSION', '2.2.7' );
    1818define( 'WP_CLASSROOM_NAMESPACE', 'wp-classroom' );
    1919define( 'WP_CLASSROOM_CLASS_POST_TYPE', 'wp_classroom' );
Note: See TracChangeset for help on using the changeset viewer.