Changeset 2588477
- Timestamp:
- 08/25/2021 12:31:12 PM (5 years ago)
- Location:
- abwpwoo
- Files:
-
- 2 edited
- 5 copied
-
tags/4.6 (copied) (copied from abwpwoo/trunk)
-
tags/4.6/js (copied) (copied from abwpwoo/trunk/js)
-
tags/4.6/languages (copied) (copied from abwpwoo/trunk/languages)
-
tags/4.6/readme.txt (copied) (copied from abwpwoo/trunk/readme.txt) (2 diffs)
-
tags/4.6/wwpcouseware-extra-settings.php (copied) (copied from abwpwoo/trunk/wwpcouseware-extra-settings.php) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/wwpcouseware-extra-settings.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
abwpwoo/tags/4.6/readme.txt
r2439211 r2588477 3 3 Tags: ab-inspiration,woocommerce,wp courseware,lms,learning management system,online courses 4 4 Requires at least: 4.8 5 Tested up to: 5. 66 Stable tag: 4. 55 Tested up to: 5.8 6 Stable tag: 4.6 7 7 License: GPLv3 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 58 58 == Changelog == 59 59 60 = 4.7 = 61 * Добавлен шорткод для вставки ссылки на регистрацию на бесплатных курс (для кнопки Elementor) 62 63 = 4.6 = 64 * Заменено слово "вертикально" на "горизонтально" в настройках 65 60 66 = 4.5 = 61 67 * Удалена строка "Это не вы? Выйти" в шорткоде для страницы Личный кабинет -
abwpwoo/tags/4.6/wwpcouseware-extra-settings.php
r2439211 r2588477 2 2 /** 3 3 * Plugin Name: Addon for AB-Inspiration, WooCoocommerce and WP Courseware 4 * Version: 4. 54 * Version: 4.6 5 5 * Plugin URI: https://ab-inspiration.com 6 6 * Description: The official extension AB-Inspiration for add integration for WP Courseware and WooCommmerce. … … 133 133 <?php foreach($itemsp as $itemp => $it) { ?> 134 134 <?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> 136 136 <?php } ?> 137 137 <?php } ?></select> … … 212 212 213 213 214 <label for="checkbox_example">Отметьте галочкой, если хотите, чтобы курсы располагались вертикально </label>214 <label for="checkbox_example">Отметьте галочкой, если хотите, чтобы курсы располагались горизонтально </label> 215 215 216 216 … … 292 292 } 293 293 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 3 3 Tags: ab-inspiration,woocommerce,wp courseware,lms,learning management system,online courses 4 4 Requires at least: 4.8 5 Tested up to: 5. 66 Stable tag: 4. 55 Tested up to: 5.8 6 Stable tag: 4.6 7 7 License: GPLv3 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 58 58 == Changelog == 59 59 60 = 4.7 = 61 * Добавлен шорткод для вставки ссылки на регистрацию на бесплатных курс (для кнопки Elementor) 62 63 = 4.6 = 64 * Заменено слово "вертикально" на "горизонтально" в настройках 65 60 66 = 4.5 = 61 67 * Удалена строка "Это не вы? Выйти" в шорткоде для страницы Личный кабинет -
abwpwoo/trunk/wwpcouseware-extra-settings.php
r2439211 r2588477 2 2 /** 3 3 * Plugin Name: Addon for AB-Inspiration, WooCoocommerce and WP Courseware 4 * Version: 4. 54 * Version: 4.6 5 5 * Plugin URI: https://ab-inspiration.com 6 6 * Description: The official extension AB-Inspiration for add integration for WP Courseware and WooCommmerce. … … 133 133 <?php foreach($itemsp as $itemp => $it) { ?> 134 134 <?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> 136 136 <?php } ?> 137 137 <?php } ?></select> … … 212 212 213 213 214 <label for="checkbox_example">Отметьте галочкой, если хотите, чтобы курсы располагались вертикально </label>214 <label for="checkbox_example">Отметьте галочкой, если хотите, чтобы курсы располагались горизонтально </label> 215 215 216 216 … … 292 292 } 293 293 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.