Changeset 2270086
- Timestamp:
- 03/29/2020 09:28:49 AM (6 years ago)
- Location:
- abwpwoo
- Files:
-
- 2 edited
- 3 copied
-
tags/3.0 (copied) (copied from abwpwoo/trunk)
-
tags/3.0/readme.txt (copied) (copied from abwpwoo/trunk/readme.txt) (3 diffs)
-
tags/3.0/wwpcouseware-extra-settings.php (copied) (copied from abwpwoo/trunk/wwpcouseware-extra-settings.php) (11 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/wwpcouseware-extra-settings.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
abwpwoo/tags/3.0/readme.txt
r2252066 r2270086 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. 2.36 Stable tag: 2.05 Tested up to: 5.3.2 6 Stable tag: 3.0 7 7 License: GPLv3 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 33 33 1. Активируйте плагин в разделе 'Плагины' в админке сайта 34 34 35 == Перевод плагина == 36 37 Плагин локализован. Сейчас в плагине доступны 2 языка: Русский и Английский. Если ваш сайт не на русском и не на английском языках, вы можете самостоятельно сделать перевод плагина. В папке wpcourseware-extra-settings/languages вы найдете файл в расширением .pot. Откройте его в программе poedit и создайте перевод. Сохраните файл с названием wpcoursewarextra-ru_RU.po (вместо ru_RU укажите индекс языка вашего языка. Узнать индекс вашего языка можно здесь: https://translate.wordpress.org/ ) 38 35 39 == Вопросы == 36 40 … … 54 58 == Changelog == 55 59 60 61 = 3.0 = 62 * добавлена локализация плагина 63 * добавлен файл перевода на английский язык 64 * js вынесен в отдельный скрипт 65 56 66 = 2.0 = 57 67 * изменена запись после зачисления на курс -
abwpwoo/tags/3.0/wwpcouseware-extra-settings.php
r2252066 r2270086 2 2 /** 3 3 * Plugin Name: Addon for AB-Inspiration, WooCoocommerce and WP Courseware 4 * Version: 2.04 * Version: 3.0 5 5 * Plugin URI: https://ab-inspiration.com 6 6 * Description: The official extension AB-Inspiration for add integration for WP Courseware and WooCommmerce. 7 7 * Author: Anfisa Breus 8 8 * Author URI: https://anfisabreus.ru 9 * Text Domain: wpcoursewarextra 10 * Domain Path: /languages 9 11 * License: GPL v2 or later 10 12 */ … … 12 14 13 15 /***************Plugin Functions****************/ 16 17 18 function my_plugin_load_plugin_textdomain() { 19 load_plugin_textdomain( 'wpcoursewarextra', FALSE, basename( dirname( __FILE__ ) ) . '/languages/' ); 20 } 21 add_action( 'plugins_loaded', 'my_plugin_load_plugin_textdomain' ); 22 23 // Register the script 24 wp_register_script( 'wpcw_custom', plugin_dir_url( __FILE__ ) . 'js/wpcw-custom.js', array('jquery'), true ); 25 26 // Localize the script with new data 27 $translation_array = array( 28 'course_complete_text' => __( 'Завершено на ', 'wpcoursewarextra' ) 29 30 ); 31 wp_localize_script( 'wpcw_custom', 'course_complete', $translation_array ); 32 33 // Enqueued script with localized data. 34 wp_enqueue_script( 'wpcw_custom' ); 35 36 14 37 15 38 function ABIWPWOO_register_settings() { … … 20 43 21 44 function abwpwoo_register_options_page() { 22 add_submenu_page('wpcw', 'Доп настройки', 'Доп настройки', 'manage_options', 'abwpwoo', 'abwpwoo_options_page');45 add_submenu_page('wpcw', __( 'Доп. настройки', 'wpcoursewarextra' ), __( 'Доп. настройки', 'wpcoursewarextra' ), 'manage_options', 'abwpwoo', 'abwpwoo_options_page'); 23 46 } 24 47 add_action('admin_menu', 'abwpwoo_register_options_page',11); … … 30 53 { 31 54 ?> 55 56 57 32 58 <div> 33 59 <?php screen_icon(); ?> 34 <h2> Дополнительные настройки для плагина WP Courseware</h2>60 <h2><?php _e( 'Дополнительные настройки для плагина WP Courseware', 'wpcoursewarextra' ); ?></h2> 35 61 <form method="post" action="options.php"> 36 62 <?php settings_fields( 'abwpwoo_options_group' ); ?> … … 40 66 <table class="form-table"> 41 67 <tr valign="top"> 42 <th scope="row"> Исключить курсы из каталога:</th>68 <th scope="row"><?php _e( 'Исключить курсы из каталога:', 'wpcoursewarextra' ); ?></th> 43 69 <td colspan="2"> 44 70 … … 69 95 70 96 <tr valign="top"> 71 <th scope="row"> Курс + Товар:</th>97 <th scope="row"><?php _e( 'Курс + Товар:', 'wpcoursewarextra' ); ?></th> 72 98 <td colspan="2"> 73 99 … … 117 143 118 144 <tr valign="top"> 119 <th scope="row"> Курс + Странцицы:</th>145 <th scope="row"><?php _e( 'Курс + Страницы:', 'wpcoursewarextra' ); ?></th> 120 146 <td colspan="2"> 121 147 … … 145 171 <select name="ab_wpcourseware[id_courses_pages][<?php echo $item; ?>]" style="<?php if (in_array($itm->ID, $ab_wpcourseware["id_courses"])) { ?>display:none<?php } ?>"> 146 172 <?php if (!in_array($itm->ID, $ab_wpcourseware["id_courses"])) { ?> 147 <option value=""> Оставить страницу курса</option> <?php } ?>173 <option value=""><?php _e( 'Оставить страницу курса', 'wpcoursewarextra' ); ?></option> <?php } ?> 148 174 <?php foreach($itemsp as $itemp => $it) { ?> 149 175 <?php if (!in_array($itm->ID, $ab_wpcourseware["id_courses"])) { ?> … … 196 222 echo '<div style=""><div style="float:left;margin-bottom:30px; "><img style="border:1px solid #eaeaea; border-radius:50%" src="' . $usergravatar . '" /></div><div style="float:left; font-size:24px; font-weight:bold; margin-top: 20px; 197 223 margin-left: 20px;">'. $getusername .' '. $getuserlastname; 198 echo '<br><span style="font-size:16px; font-weight:normal;"> Это не вы?</span> <span style="font-size:16px; font-weight:normal; text-decoration:underline"> <a href="'. wp_logout_url(home_url()) .'" title="Выход">Выйти</a></span></div></div> ';224 echo '<br><span style="font-size:16px; font-weight:normal;">'. __( 'Это не вы?', 'wpcoursewarextra' ) .' </span> <span style="font-size:16px; font-weight:normal; text-decoration:underline"> <a href="'. wp_logout_url(home_url()) .'" title="'. __( 'Выйти', 'wpcoursewarextra' ) .'">'. __( 'Выйти', 'wpcoursewarextra' ) .'</a></span></div></div> '; 199 225 echo '<div style="clear:both"></div>'; 200 226 }} … … 208 234 add_filter( 'wpcw_course_enrollment_success_message', function( $message, $course_id, $user_id ) { 209 235 // Do something with the message. Replace it, append to it, etc... 210 $message .= ' Вы успешно зачислены на курс. Выбранные вами курсы смотрите в ЛИЧНОМ КАБИНЕТЕ в разделе КУРСЫ';236 $message .= __( 'Вы успешно зачислены на курс. Выбранные вами курсы смотрите в ЛИЧНОМ КАБИНЕТЕ в разделе КУРСЫ', 'wpcoursewarextra' ); 211 237 return $message; 212 238 }, 10, 3 ); … … 229 255 } 230 256 231 function abwpwoo_unit_order() { ?>232 <script>233 jQuery(document).ready(function($){234 235 setTimeout(function() {236 var unitTable = jQuery('.wpcw_fe_table');237 if (unitTable.length) {238 unitTable.each(function(el, index) {239 var units = $(this).find('.wpcw_fe_unit_title');240 units.each(function(index) {241 $(this).text(index + 1 + ".");242 });243 });244 }245 }, 500);246 247 })248 249 </script>250 <script> $( ".wpcw_progress_percent" ).prepend( "Завершено на " ); </script>251 <script> $( ".wpcw_course-template-template-single-course .wpcw_widget_progress" ).find(".wpcw_fe_module").addClass("wpcw_fe_module_toggle_hide"); </script>252 253 254 <?php }255 add_action( 'wp_footer', 'abwpwoo_unit_order' ); -
abwpwoo/trunk/readme.txt
r2252066 r2270086 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. 2.36 Stable tag: 2.05 Tested up to: 5.3.2 6 Stable tag: 3.0 7 7 License: GPLv3 8 8 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 33 33 1. Активируйте плагин в разделе 'Плагины' в админке сайта 34 34 35 == Перевод плагина == 36 37 Плагин локализован. Сейчас в плагине доступны 2 языка: Русский и Английский. Если ваш сайт не на русском и не на английском языках, вы можете самостоятельно сделать перевод плагина. В папке wpcourseware-extra-settings/languages вы найдете файл в расширением .pot. Откройте его в программе poedit и создайте перевод. Сохраните файл с названием wpcoursewarextra-ru_RU.po (вместо ru_RU укажите индекс языка вашего языка. Узнать индекс вашего языка можно здесь: https://translate.wordpress.org/ ) 38 35 39 == Вопросы == 36 40 … … 54 58 == Changelog == 55 59 60 61 = 3.0 = 62 * добавлена локализация плагина 63 * добавлен файл перевода на английский язык 64 * js вынесен в отдельный скрипт 65 56 66 = 2.0 = 57 67 * изменена запись после зачисления на курс -
abwpwoo/trunk/wwpcouseware-extra-settings.php
r2252066 r2270086 2 2 /** 3 3 * Plugin Name: Addon for AB-Inspiration, WooCoocommerce and WP Courseware 4 * Version: 2.04 * Version: 3.0 5 5 * Plugin URI: https://ab-inspiration.com 6 6 * Description: The official extension AB-Inspiration for add integration for WP Courseware and WooCommmerce. 7 7 * Author: Anfisa Breus 8 8 * Author URI: https://anfisabreus.ru 9 * Text Domain: wpcoursewarextra 10 * Domain Path: /languages 9 11 * License: GPL v2 or later 10 12 */ … … 12 14 13 15 /***************Plugin Functions****************/ 16 17 18 function my_plugin_load_plugin_textdomain() { 19 load_plugin_textdomain( 'wpcoursewarextra', FALSE, basename( dirname( __FILE__ ) ) . '/languages/' ); 20 } 21 add_action( 'plugins_loaded', 'my_plugin_load_plugin_textdomain' ); 22 23 // Register the script 24 wp_register_script( 'wpcw_custom', plugin_dir_url( __FILE__ ) . 'js/wpcw-custom.js', array('jquery'), true ); 25 26 // Localize the script with new data 27 $translation_array = array( 28 'course_complete_text' => __( 'Завершено на ', 'wpcoursewarextra' ) 29 30 ); 31 wp_localize_script( 'wpcw_custom', 'course_complete', $translation_array ); 32 33 // Enqueued script with localized data. 34 wp_enqueue_script( 'wpcw_custom' ); 35 36 14 37 15 38 function ABIWPWOO_register_settings() { … … 20 43 21 44 function abwpwoo_register_options_page() { 22 add_submenu_page('wpcw', 'Доп настройки', 'Доп настройки', 'manage_options', 'abwpwoo', 'abwpwoo_options_page');45 add_submenu_page('wpcw', __( 'Доп. настройки', 'wpcoursewarextra' ), __( 'Доп. настройки', 'wpcoursewarextra' ), 'manage_options', 'abwpwoo', 'abwpwoo_options_page'); 23 46 } 24 47 add_action('admin_menu', 'abwpwoo_register_options_page',11); … … 30 53 { 31 54 ?> 55 56 57 32 58 <div> 33 59 <?php screen_icon(); ?> 34 <h2> Дополнительные настройки для плагина WP Courseware</h2>60 <h2><?php _e( 'Дополнительные настройки для плагина WP Courseware', 'wpcoursewarextra' ); ?></h2> 35 61 <form method="post" action="options.php"> 36 62 <?php settings_fields( 'abwpwoo_options_group' ); ?> … … 40 66 <table class="form-table"> 41 67 <tr valign="top"> 42 <th scope="row"> Исключить курсы из каталога:</th>68 <th scope="row"><?php _e( 'Исключить курсы из каталога:', 'wpcoursewarextra' ); ?></th> 43 69 <td colspan="2"> 44 70 … … 69 95 70 96 <tr valign="top"> 71 <th scope="row"> Курс + Товар:</th>97 <th scope="row"><?php _e( 'Курс + Товар:', 'wpcoursewarextra' ); ?></th> 72 98 <td colspan="2"> 73 99 … … 117 143 118 144 <tr valign="top"> 119 <th scope="row"> Курс + Странцицы:</th>145 <th scope="row"><?php _e( 'Курс + Страницы:', 'wpcoursewarextra' ); ?></th> 120 146 <td colspan="2"> 121 147 … … 145 171 <select name="ab_wpcourseware[id_courses_pages][<?php echo $item; ?>]" style="<?php if (in_array($itm->ID, $ab_wpcourseware["id_courses"])) { ?>display:none<?php } ?>"> 146 172 <?php if (!in_array($itm->ID, $ab_wpcourseware["id_courses"])) { ?> 147 <option value=""> Оставить страницу курса</option> <?php } ?>173 <option value=""><?php _e( 'Оставить страницу курса', 'wpcoursewarextra' ); ?></option> <?php } ?> 148 174 <?php foreach($itemsp as $itemp => $it) { ?> 149 175 <?php if (!in_array($itm->ID, $ab_wpcourseware["id_courses"])) { ?> … … 196 222 echo '<div style=""><div style="float:left;margin-bottom:30px; "><img style="border:1px solid #eaeaea; border-radius:50%" src="' . $usergravatar . '" /></div><div style="float:left; font-size:24px; font-weight:bold; margin-top: 20px; 197 223 margin-left: 20px;">'. $getusername .' '. $getuserlastname; 198 echo '<br><span style="font-size:16px; font-weight:normal;"> Это не вы?</span> <span style="font-size:16px; font-weight:normal; text-decoration:underline"> <a href="'. wp_logout_url(home_url()) .'" title="Выход">Выйти</a></span></div></div> ';224 echo '<br><span style="font-size:16px; font-weight:normal;">'. __( 'Это не вы?', 'wpcoursewarextra' ) .' </span> <span style="font-size:16px; font-weight:normal; text-decoration:underline"> <a href="'. wp_logout_url(home_url()) .'" title="'. __( 'Выйти', 'wpcoursewarextra' ) .'">'. __( 'Выйти', 'wpcoursewarextra' ) .'</a></span></div></div> '; 199 225 echo '<div style="clear:both"></div>'; 200 226 }} … … 208 234 add_filter( 'wpcw_course_enrollment_success_message', function( $message, $course_id, $user_id ) { 209 235 // Do something with the message. Replace it, append to it, etc... 210 $message .= ' Вы успешно зачислены на курс. Выбранные вами курсы смотрите в ЛИЧНОМ КАБИНЕТЕ в разделе КУРСЫ';236 $message .= __( 'Вы успешно зачислены на курс. Выбранные вами курсы смотрите в ЛИЧНОМ КАБИНЕТЕ в разделе КУРСЫ', 'wpcoursewarextra' ); 211 237 return $message; 212 238 }, 10, 3 ); … … 229 255 } 230 256 231 function abwpwoo_unit_order() { ?>232 <script>233 jQuery(document).ready(function($){234 235 setTimeout(function() {236 var unitTable = jQuery('.wpcw_fe_table');237 if (unitTable.length) {238 unitTable.each(function(el, index) {239 var units = $(this).find('.wpcw_fe_unit_title');240 units.each(function(index) {241 $(this).text(index + 1 + ".");242 });243 });244 }245 }, 500);246 247 })248 249 </script>250 <script> $( ".wpcw_progress_percent" ).prepend( "Завершено на " ); </script>251 <script> $( ".wpcw_course-template-template-single-course .wpcw_widget_progress" ).find(".wpcw_fe_module").addClass("wpcw_fe_module_toggle_hide"); </script>252 253 254 <?php }255 add_action( 'wp_footer', 'abwpwoo_unit_order' );
Note: See TracChangeset
for help on using the changeset viewer.