Plugin Directory

Changeset 2588477


Ignore:
Timestamp:
08/25/2021 12:31:12 PM (5 years ago)
Author:
Anfisa
Message:

tagging version 4.6

Location:
abwpwoo
Files:
2 edited
5 copied

Legend:

Unmodified
Added
Removed
  • abwpwoo/tags/4.6/readme.txt

    r2439211 r2588477  
    33Tags: ab-inspiration,woocommerce,wp courseware,lms,learning management system,online courses
    44Requires at least: 4.8
    5 Tested up to: 5.6
    6 Stable tag: 4.5
     5Tested up to: 5.8
     6Stable tag: 4.6
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5858== Changelog ==
    5959
     60= 4.7 =
     61* Добавлен шорткод для вставки ссылки на регистрацию на бесплатных курс (для кнопки Elementor)
     62
     63= 4.6 =
     64* Заменено слово "вертикально" на "горизонтально" в настройках
     65
    6066= 4.5 =
    6167* Удалена строка "Это не вы? Выйти" в шорткоде для страницы Личный кабинет
  • abwpwoo/tags/4.6/wwpcouseware-extra-settings.php

    r2439211 r2588477  
    22/**
    33 * Plugin Name: Addon for AB-Inspiration, WooCoocommerce and WP Courseware
    4  * Version:     4.5
     4 * Version:     4.6
    55 * Plugin URI:  https://ab-inspiration.com
    66 * Description: The official extension AB-Inspiration for add integration for WP Courseware and WooCommmerce.
     
    133133    <?php foreach($itemsp as $itemp => $it) { ?>
    134134    <?php if (!in_array($itm->ID, $ab_wpcourseware["id_courses"])) { ?>
    135     <option value="<?php echo $it->ID; ?>" <?php if ($ab_wpcourseware['id_courses_product'][$item] == $it->ID) { echo 'selected="selected"';} ?>><?php echo $it->post_title; ?></option>
     135  <option value=""><?php _e( 'Курс бесплатный', 'wpcoursewarextra' ); ?></option>   <option value="<?php echo $it->ID; ?>" <?php if ($ab_wpcourseware['id_courses_product'][$item] == $it->ID) { echo 'selected="selected"';} ?>><?php echo $it->post_title; ?></option>
    136136    <?php } ?>
    137137<?php } ?></select>
     
    212212   
    213213   
    214    <label for="checkbox_example">Отметьте галочкой, если хотите, чтобы курсы располагались вертикально </label>
     214   <label for="checkbox_example">Отметьте галочкой, если хотите, чтобы курсы располагались горизонтально </label>
    215215
    216216   
     
    292292}
    293293
     294
     295
     296
     297
     298 
     299        /**
     300     * Course Enroll Shortcode.
     301     *
     302     * e.g. [wpcourse_enroll courses="2,3" enroll_text="Enroll Here"]
     303     *
     304     * @since 4.3.0
     305     *
     306     * @param array $atts The shortcode attributes.
     307     * @param string $content The shortcode content.
     308     *
     309     * @return string The course enroll button string.
     310     */
     311    function course_enroll_shortcode_link( $atts, $content = '' ) {
     312        $shortcode_atts = shortcode_atts( array(
     313            'courses'           => false,
     314            'enroll_text'       => esc_html__( 'Enroll Now', 'wp-courseware' ),
     315            'purchase_text'     => esc_html__( 'Purchase', 'wp-courseware' ),
     316            'installments_text' => esc_html__( 'Installments', 'wp-courseware' ),
     317            'display_messages'  => true,
     318            'display_raw'       => false,
     319            'redirect'          => false,
     320        ), $atts, 'wpcourse_enroll' );
     321
     322        // Check for courses.
     323        if ( ! $shortcode_atts['courses'] && ! is_null( $shortcode_atts['courses'] ) ) {
     324            return;
     325        }
     326$courses_to_enroll   = array();
     327
     328
     329
     330                $courses        = array();
     331       
     332                foreach ( $courses as $key => $course ) {
     333               
     334               
     335                    $courses_to_enroll[ 'course_id[0]' ] = esc_html( $shortcode_atts['courses'] );
     336                }   
     337                   
     338                   
     339                   
     340                   
     341           
     342            $courses_to_enroll[ 'course_id[0]' ] = esc_html( $shortcode_atts['courses'] );
     343    $enroll_text         = esc_html( $shortcode_atts['enroll_text'] );
     344                   
     345            $query_args            = array( $courses_to_enroll, array( 'unit_redirect' => $redirect ) );
     346                $course_enrollment_url = wp_nonce_url( add_query_arg( $query_args, wp_registration_url() ), 'wpcw_enroll', '_wp_enroll' );
     347                $shortcode_html        .= sprintf( __( '%s', 'wp-courseware' ), esc_url_raw( $course_enrollment_url ), esc_html( $enroll_text ) );     
     348       
     349       
     350       
     351
     352        return apply_filters( 'wpcw_course_enroll_shortcode_html', $shortcode_html );
     353    }
     354   
     355    add_shortcode( 'wpcourse_enroll_link',  'course_enroll_shortcode_link'  );
  • abwpwoo/trunk/readme.txt

    r2439211 r2588477  
    33Tags: ab-inspiration,woocommerce,wp courseware,lms,learning management system,online courses
    44Requires at least: 4.8
    5 Tested up to: 5.6
    6 Stable tag: 4.5
     5Tested up to: 5.8
     6Stable tag: 4.6
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5858== Changelog ==
    5959
     60= 4.7 =
     61* Добавлен шорткод для вставки ссылки на регистрацию на бесплатных курс (для кнопки Elementor)
     62
     63= 4.6 =
     64* Заменено слово "вертикально" на "горизонтально" в настройках
     65
    6066= 4.5 =
    6167* Удалена строка "Это не вы? Выйти" в шорткоде для страницы Личный кабинет
  • abwpwoo/trunk/wwpcouseware-extra-settings.php

    r2439211 r2588477  
    22/**
    33 * Plugin Name: Addon for AB-Inspiration, WooCoocommerce and WP Courseware
    4  * Version:     4.5
     4 * Version:     4.6
    55 * Plugin URI:  https://ab-inspiration.com
    66 * Description: The official extension AB-Inspiration for add integration for WP Courseware and WooCommmerce.
     
    133133    <?php foreach($itemsp as $itemp => $it) { ?>
    134134    <?php if (!in_array($itm->ID, $ab_wpcourseware["id_courses"])) { ?>
    135     <option value="<?php echo $it->ID; ?>" <?php if ($ab_wpcourseware['id_courses_product'][$item] == $it->ID) { echo 'selected="selected"';} ?>><?php echo $it->post_title; ?></option>
     135  <option value=""><?php _e( 'Курс бесплатный', 'wpcoursewarextra' ); ?></option>   <option value="<?php echo $it->ID; ?>" <?php if ($ab_wpcourseware['id_courses_product'][$item] == $it->ID) { echo 'selected="selected"';} ?>><?php echo $it->post_title; ?></option>
    136136    <?php } ?>
    137137<?php } ?></select>
     
    212212   
    213213   
    214    <label for="checkbox_example">Отметьте галочкой, если хотите, чтобы курсы располагались вертикально </label>
     214   <label for="checkbox_example">Отметьте галочкой, если хотите, чтобы курсы располагались горизонтально </label>
    215215
    216216   
     
    292292}
    293293
     294
     295
     296
     297
     298 
     299        /**
     300     * Course Enroll Shortcode.
     301     *
     302     * e.g. [wpcourse_enroll courses="2,3" enroll_text="Enroll Here"]
     303     *
     304     * @since 4.3.0
     305     *
     306     * @param array $atts The shortcode attributes.
     307     * @param string $content The shortcode content.
     308     *
     309     * @return string The course enroll button string.
     310     */
     311    function course_enroll_shortcode_link( $atts, $content = '' ) {
     312        $shortcode_atts = shortcode_atts( array(
     313            'courses'           => false,
     314            'enroll_text'       => esc_html__( 'Enroll Now', 'wp-courseware' ),
     315            'purchase_text'     => esc_html__( 'Purchase', 'wp-courseware' ),
     316            'installments_text' => esc_html__( 'Installments', 'wp-courseware' ),
     317            'display_messages'  => true,
     318            'display_raw'       => false,
     319            'redirect'          => false,
     320        ), $atts, 'wpcourse_enroll' );
     321
     322        // Check for courses.
     323        if ( ! $shortcode_atts['courses'] && ! is_null( $shortcode_atts['courses'] ) ) {
     324            return;
     325        }
     326$courses_to_enroll   = array();
     327
     328
     329
     330                $courses        = array();
     331       
     332                foreach ( $courses as $key => $course ) {
     333               
     334               
     335                    $courses_to_enroll[ 'course_id[0]' ] = esc_html( $shortcode_atts['courses'] );
     336                }   
     337                   
     338                   
     339                   
     340                   
     341           
     342            $courses_to_enroll[ 'course_id[0]' ] = esc_html( $shortcode_atts['courses'] );
     343    $enroll_text         = esc_html( $shortcode_atts['enroll_text'] );
     344                   
     345            $query_args            = array( $courses_to_enroll, array( 'unit_redirect' => $redirect ) );
     346                $course_enrollment_url = wp_nonce_url( add_query_arg( $query_args, wp_registration_url() ), 'wpcw_enroll', '_wp_enroll' );
     347                $shortcode_html        .= sprintf( __( '%s', 'wp-courseware' ), esc_url_raw( $course_enrollment_url ), esc_html( $enroll_text ) );     
     348       
     349       
     350       
     351
     352        return apply_filters( 'wpcw_course_enroll_shortcode_html', $shortcode_html );
     353    }
     354   
     355    add_shortcode( 'wpcourse_enroll_link',  'course_enroll_shortcode_link'  );
Note: See TracChangeset for help on using the changeset viewer.