LearnPress – WordPress LMS Plugin - Version 3.2.1

Version Description

~ Fixed can't enroll course. ~ Fixed upload issue and drag user avatar on mobile. ~ Fixed course duration does not work properly. ~ Fixed question with multi language. ~ Fixed mail to user 2 times when completed course.

Download this release

Release Info

Developer phonglq.foobla
Plugin Icon 128x128 LearnPress – WordPress LMS Plugin
Version 3.2.1
Comparing to
See all releases

Code changes from version 3.2.0 to 3.2.1

Files changed (190) hide show
  1. inc/class-lp-assets.php +2 -1
  2. inc/class-lp-schedules.php +1 -2
  3. inc/course/abstract-course.php +62 -0
  4. inc/course/class-lp-course-item.php +15 -14
  5. inc/curds/class-lp-user-curd.php +0 -1
  6. inc/curds/class-lp-user-item-curd.php +107 -57
  7. inc/custom-post-types/order.php +1 -2
  8. inc/libraries/meta-box/css/autocomplete.css +1 -1
  9. inc/libraries/meta-box/css/button-group.css +13 -13
  10. inc/libraries/meta-box/css/color.css +1 -1
  11. inc/libraries/meta-box/css/divider.css +1 -1
  12. inc/libraries/meta-box/css/heading.css +1 -1
  13. inc/libraries/meta-box/css/input-list.css +3 -3
  14. inc/libraries/meta-box/css/map.css +44 -0
  15. inc/libraries/meta-box/css/oembed.css +1 -1
  16. inc/libraries/meta-box/css/osm.css +49 -0
  17. inc/libraries/meta-box/css/select.css +1 -1
  18. inc/libraries/meta-box/css/select2/select2.css +4 -3
  19. inc/libraries/meta-box/css/slider.css +1 -1
  20. inc/libraries/meta-box/css/style-rtl.css +5 -5
  21. inc/libraries/meta-box/css/text-list.css +19 -0
  22. inc/libraries/meta-box/css/upload.css +0 -4
  23. inc/libraries/meta-box/inc/about/about.php +129 -24
  24. inc/libraries/meta-box/inc/about/css/about.css +219 -0
  25. inc/libraries/meta-box/inc/about/images/meta-box.svg +5 -0
  26. inc/libraries/meta-box/inc/about/js/about.js +26 -0
  27. inc/libraries/meta-box/inc/about/sections/extensions.php +351 -0
  28. inc/libraries/meta-box/inc/about/sections/getting-started.php +15 -20
  29. inc/libraries/meta-box/inc/about/sections/newsletter.php +16 -0
  30. inc/libraries/meta-box/inc/about/sections/support.php +35 -0
  31. inc/libraries/meta-box/inc/about/sections/tabs.php +5 -3
  32. inc/libraries/meta-box/inc/about/sections/upgrade.php +26 -0
  33. inc/libraries/meta-box/inc/about/sections/welcome.php +11 -4
  34. inc/libraries/meta-box/inc/clone.php +4 -4
  35. inc/libraries/meta-box/inc/core.php +3 -3
  36. inc/libraries/meta-box/inc/field.php +95 -48
  37. inc/libraries/meta-box/inc/fields/autocomplete.php +15 -8
  38. inc/libraries/meta-box/inc/fields/background.php +167 -0
  39. inc/libraries/meta-box/inc/fields/button-group.php +82 -0
  40. inc/libraries/meta-box/inc/fields/button.php +12 -6
  41. inc/libraries/meta-box/inc/fields/checkbox-list.php +1 -1
  42. inc/libraries/meta-box/inc/fields/checkbox.php +1 -1
  43. inc/libraries/meta-box/inc/fields/choice.php +17 -73
  44. inc/libraries/meta-box/inc/fields/color.php +21 -12
  45. inc/libraries/meta-box/inc/fields/datetime.php +39 -24
  46. inc/libraries/meta-box/inc/fields/file-input.php +11 -7
  47. inc/libraries/meta-box/inc/fields/file-upload.php +12 -6
  48. inc/libraries/meta-box/inc/fields/file.php +44 -28
  49. inc/libraries/meta-box/inc/fields/image-advanced.php +12 -6
  50. inc/libraries/meta-box/inc/fields/image-select.php +1 -1
  51. inc/libraries/meta-box/inc/fields/image.php +16 -8
  52. inc/libraries/meta-box/inc/fields/input-list.php +26 -24
  53. inc/libraries/meta-box/inc/fields/input.php +28 -19
  54. inc/libraries/meta-box/inc/fields/key-value.php +8 -5
  55. inc/libraries/meta-box/inc/fields/map.php +68 -41
  56. inc/libraries/meta-box/inc/fields/media.php +44 -31
  57. inc/libraries/meta-box/inc/fields/number.php +16 -10
  58. inc/libraries/meta-box/inc/fields/object-choice.php +46 -28
  59. inc/libraries/meta-box/inc/fields/oembed.php +46 -10
  60. inc/libraries/meta-box/inc/fields/osm.php +175 -0
  61. inc/libraries/meta-box/inc/fields/post.php +65 -50
  62. inc/libraries/meta-box/inc/fields/radio.php +1 -1
  63. inc/libraries/meta-box/inc/fields/range.php +7 -4
  64. inc/libraries/meta-box/inc/fields/select-advanced.php +21 -12
  65. inc/libraries/meta-box/inc/fields/select-tree.php +7 -9
  66. inc/libraries/meta-box/inc/fields/select.php +25 -20
  67. inc/libraries/meta-box/inc/fields/sidebar.php +68 -0
  68. inc/libraries/meta-box/inc/fields/single-image.php +76 -0
  69. inc/libraries/meta-box/inc/fields/slider.php +24 -14
  70. inc/libraries/meta-box/inc/fields/switch.php +97 -0
  71. inc/libraries/meta-box/inc/fields/taxonomy-advanced.php +26 -27
  72. inc/libraries/meta-box/inc/fields/taxonomy.php +90 -42
  73. inc/libraries/meta-box/inc/fields/text-list.php +39 -13
  74. inc/libraries/meta-box/inc/fields/text.php +17 -11
  75. inc/libraries/meta-box/inc/fields/textarea.php +24 -18
  76. inc/libraries/meta-box/inc/fields/time.php +1 -1
  77. inc/libraries/meta-box/inc/fields/user.php +42 -42
  78. inc/libraries/meta-box/inc/fields/video.php +23 -15
  79. inc/libraries/meta-box/inc/fields/wysiwyg.php +15 -9
  80. inc/libraries/meta-box/inc/functions.php +119 -16
  81. inc/libraries/meta-box/inc/loader.php +1 -1
  82. inc/libraries/meta-box/inc/meta-box.php +48 -23
  83. inc/libraries/meta-box/inc/sanitizer.php +16 -4
  84. inc/libraries/meta-box/inc/validation.php +7 -3
  85. inc/libraries/meta-box/inc/walkers/base.php +13 -16
  86. inc/libraries/meta-box/inc/walkers/input-list.php +3 -5
  87. inc/libraries/meta-box/inc/walkers/select-tree.php +18 -26
  88. inc/libraries/meta-box/inc/walkers/select.php +3 -5
  89. inc/libraries/meta-box/js/autosave.js +1 -1
  90. inc/libraries/meta-box/js/input-list.js +5 -5
  91. inc/libraries/meta-box/js/map.js +65 -32
  92. inc/libraries/meta-box/js/media.js +2 -2
  93. inc/libraries/meta-box/js/oembed.js +2 -1
  94. inc/libraries/meta-box/js/osm-frontend.js +50 -0
  95. inc/libraries/meta-box/js/osm.js +266 -0
  96. inc/libraries/meta-box/js/select-advanced.js +34 -0
  97. inc/libraries/meta-box/js/select.js +20 -41
  98. inc/libraries/meta-box/js/select2/i18n/af.js +3 -0
  99. inc/libraries/meta-box/js/select2/i18n/ar.js +2 -2
  100. inc/libraries/meta-box/js/select2/i18n/az.js +1 -1
  101. inc/libraries/meta-box/js/select2/i18n/bg.js +1 -1
  102. inc/libraries/meta-box/js/select2/i18n/bs.js +3 -0
  103. inc/libraries/meta-box/js/select2/i18n/ca.js +1 -1
  104. inc/libraries/meta-box/js/select2/i18n/cs.js +2 -2
  105. inc/libraries/meta-box/js/select2/i18n/da.js +2 -2
  106. inc/libraries/meta-box/js/select2/i18n/de.js +2 -2
  107. inc/libraries/meta-box/js/select2/i18n/dsb.js +3 -0
  108. inc/libraries/meta-box/js/select2/i18n/el.js +3 -0
  109. inc/libraries/meta-box/js/select2/i18n/en.js +1 -1
  110. inc/libraries/meta-box/js/select2/i18n/es.js +2 -2
  111. inc/libraries/meta-box/js/select2/i18n/et.js +1 -1
  112. inc/libraries/meta-box/js/select2/i18n/eu.js +1 -1
  113. inc/libraries/meta-box/js/select2/i18n/fa.js +1 -1
  114. inc/libraries/meta-box/js/select2/i18n/fi.js +2 -2
  115. inc/libraries/meta-box/js/select2/i18n/fr.js +2 -2
  116. inc/libraries/meta-box/js/select2/i18n/gl.js +2 -2
  117. inc/libraries/meta-box/js/select2/i18n/he.js +1 -1
  118. inc/libraries/meta-box/js/select2/i18n/hi.js +1 -1
  119. inc/libraries/meta-box/js/select2/i18n/hr.js +1 -1
  120. inc/libraries/meta-box/js/select2/i18n/hsb.js +3 -0
  121. inc/libraries/meta-box/js/select2/i18n/hu.js +2 -2
  122. inc/libraries/meta-box/js/select2/i18n/hy.js +3 -0
  123. inc/libraries/meta-box/js/select2/i18n/id.js +1 -1
  124. inc/libraries/meta-box/js/select2/i18n/is.js +1 -1
  125. inc/libraries/meta-box/js/select2/i18n/it.js +1 -1
  126. inc/libraries/meta-box/js/select2/i18n/ja.js +1 -1
  127. inc/libraries/meta-box/js/select2/i18n/km.js +3 -0
  128. inc/libraries/meta-box/js/select2/i18n/ko.js +1 -1
  129. inc/libraries/meta-box/js/select2/i18n/lt.js +2 -2
  130. inc/libraries/meta-box/js/select2/i18n/lv.js +1 -1
  131. inc/libraries/meta-box/js/select2/i18n/mk.js +1 -1
  132. inc/libraries/meta-box/js/select2/i18n/ms.js +1 -1
  133. inc/libraries/meta-box/js/select2/i18n/nb.js +2 -2
  134. inc/libraries/meta-box/js/select2/i18n/nl.js +1 -1
  135. inc/libraries/meta-box/js/select2/i18n/pl.js +1 -1
  136. inc/libraries/meta-box/js/select2/i18n/ps.js +3 -0
  137. inc/libraries/meta-box/js/select2/i18n/pt-BR.js +1 -1
  138. inc/libraries/meta-box/js/select2/i18n/pt.js +2 -2
  139. inc/libraries/meta-box/js/select2/i18n/ro.js +2 -2
  140. inc/libraries/meta-box/js/select2/i18n/ru.js +1 -1
  141. inc/libraries/meta-box/js/select2/i18n/sk.js +2 -2
  142. inc/libraries/meta-box/js/select2/i18n/sl.js +3 -0
  143. inc/libraries/meta-box/js/select2/i18n/sr-Cyrl.js +1 -1
  144. inc/libraries/meta-box/js/select2/i18n/sr.js +1 -1
  145. inc/libraries/meta-box/js/select2/i18n/sv.js +1 -1
  146. inc/libraries/meta-box/js/select2/i18n/th.js +2 -2
  147. inc/libraries/meta-box/js/select2/i18n/tr.js +2 -2
  148. inc/libraries/meta-box/js/select2/i18n/uk.js +1 -1
  149. inc/libraries/meta-box/js/select2/i18n/vi.js +2 -2
  150. inc/libraries/meta-box/js/select2/i18n/zh-CN.js +1 -1
  151. inc/libraries/meta-box/js/select2/i18n/zh-TW.js +1 -1
  152. inc/libraries/meta-box/js/select2/select2.min.js +1 -2
  153. inc/libraries/meta-box/js/validate.js +7 -2
  154. inc/libraries/meta-box/js/wysiwyg.js +1 -1
  155. inc/libraries/meta-box/languages/default.pot +353 -0
  156. inc/libraries/meta-box/languages/meta-box-ar.mo +0 -0
  157. inc/libraries/meta-box/languages/meta-box-ar.po +122 -0
  158. inc/libraries/meta-box/languages/meta-box-fa_IR.mo +0 -0
  159. inc/libraries/meta-box/languages/meta-box-fa_IR.po +184 -0
  160. inc/libraries/meta-box/languages/meta-box-fr_FR.mo +0 -0
  161. inc/libraries/meta-box/languages/meta-box-fr_FR.po +217 -0
  162. inc/libraries/meta-box/languages/meta-box-it_IT.mo +0 -0
  163. inc/libraries/meta-box/languages/meta-box-it_IT.po +318 -0
  164. inc/libraries/meta-box/languages/meta-box-nb_NO.mo +0 -0
  165. inc/libraries/meta-box/languages/meta-box-nb_NO.po +149 -0
  166. inc/libraries/meta-box/languages/meta-box-nl_NL.mo +0 -0
  167. inc/libraries/meta-box/languages/meta-box-nl_NL.po +130 -0
  168. inc/libraries/meta-box/languages/meta-box-pl_PL.mo +0 -0
  169. inc/libraries/meta-box/languages/meta-box-pl_PL.po +215 -0
  170. inc/libraries/meta-box/languages/meta-box-pt_BR.mo +0 -0
  171. inc/libraries/meta-box/languages/meta-box-pt_BR.po +124 -0
  172. inc/libraries/meta-box/languages/meta-box-ru_RU.mo +0 -0
  173. inc/libraries/meta-box/languages/meta-box-ru_RU.po +637 -0
  174. inc/libraries/meta-box/languages/meta-box-tr_TR.mo +0 -0
  175. inc/libraries/meta-box/languages/meta-box-tr_TR.po +180 -0
  176. inc/libraries/meta-box/languages/meta-box-zh_CN.mo +0 -0
  177. inc/libraries/meta-box/languages/meta-box-zh_CN.po +189 -0
  178. inc/libraries/meta-box/languages/readme.md +15 -0
  179. inc/libraries/meta-box/meta-box.php +2 -3
  180. inc/libraries/meta-box/readme.txt +97 -65
  181. inc/lp-constants.php +1 -1
  182. inc/lp-template-functions.php +1 -0
  183. inc/order/class-lp-order.php +0 -1
  184. inc/quiz/class-lp-quiz.php +6 -1
  185. inc/user-item/class-lp-user-item-course-bk.php +898 -0
  186. inc/user/class-lp-user-factory.php +1 -1
  187. inc/user/lp-user-functions.php +1 -0
  188. learnpress.php +3 -4
  189. readme.txt +62 -56
  190. templates/single-course/loop-section.php +10 -5
inc/class-lp-assets.php CHANGED
@@ -128,7 +128,8 @@ class LP_Assets extends LP_Abstract_Assets {
128
  'plupload',
129
  'backbone',
130
  'jquery-ui-slider',
131
- 'jquery-ui-draggable'
 
132
  ),
133
  'enqueue' => learn_press_is_profile()
134
  ),
128
  'plupload',
129
  'backbone',
130
  'jquery-ui-slider',
131
+ 'jquery-ui-draggable',
132
+ 'jquery-touch-punch',
133
  ),
134
  'enqueue' => learn_press_is_profile()
135
  ),
inc/class-lp-schedules.php CHANGED
@@ -88,8 +88,7 @@ class LP_Schedules {
88
  return;
89
  }
90
  $this->_update_user_course_items_expired( $course, $user );
91
- $user_course = $user->get_course_data( $course->get_id() );
92
- $item_meta_id = $user_course->finish();
93
  if ( $item_meta_id ) {
94
  learn_press_update_user_item_meta( $item_meta_id, 'finishing_type', 'automation' );
95
  do_action( 'learn_press_user_finish_course_automation', $course->get_id(), $item_meta_id, $user->get_id() );
88
  return;
89
  }
90
  $this->_update_user_course_items_expired( $course, $user );
91
+ $item_meta_id = $user->finish_course( $course->get_id(), true );
 
92
  if ( $item_meta_id ) {
93
  learn_press_update_user_item_meta( $item_meta_id, 'finishing_type', 'automation' );
94
  do_action( 'learn_press_user_finish_course_automation', $course->get_id(), $item_meta_id, $user->get_id() );
inc/course/abstract-course.php CHANGED
@@ -1764,5 +1764,67 @@ if ( ! function_exists( 'LP_Abstract_Course' ) ) {
1764
  public function is_enable_item_link() {
1765
  return get_post_meta( $this->get_id(), '_lp_submission', true ) === 'yes';
1766
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1767
  }
1768
  }
1764
  public function is_enable_item_link() {
1765
  return get_post_meta( $this->get_id(), '_lp_submission', true ) === 'yes';
1766
  }
1767
+
1768
+ /**
1769
+ * Prepare course items.
1770
+ *
1771
+ * @since 3.2.0
1772
+ *
1773
+ * @return array
1774
+ */
1775
+ public function prepare() {
1776
+ global $wpdb;
1777
+ $id = $this->get_id();
1778
+ $all_items = LP_Object_Cache::get( $id, 'course-raw-items' );
1779
+
1780
+ $type_items = LP_Object_Cache::get( 'course-' . $id, 'learn-press/course-item-group-types' );
1781
+ $section_items = LP_Object_Cache::get( $id, 'learn-press/section-items' );
1782
+ $course_sections = LP_Object_Cache::get( $id, 'learn-press/course-sections-ids' );
1783
+
1784
+ if ( false === $type_items || false === $section_items || false === $course_sections ) {
1785
+ $types = learn_press_get_course_item_types();
1786
+ $type_items = array_fill_keys( $types, array() );
1787
+ $section_items = array();
1788
+ $course_sections = array();
1789
+
1790
+ if ( $all_items === false ) {
1791
+ $query = $wpdb->prepare( "
1792
+ SELECT section_items.item_id AS id, course_sections.section_id AS section, item.post_type AS type
1793
+ FROM {$wpdb->posts} course
1794
+ INNER JOIN {$wpdb->learnpress_sections} course_sections ON course.ID = course_sections.section_course_id
1795
+ INNER JOIN {$wpdb->learnpress_section_items} section_items ON course_sections.section_id = section_items.section_id
1796
+ INNER JOIN {$wpdb->posts} item ON item.ID = section_items.item_id
1797
+ WHERE course.ID = %d
1798
+ ORDER BY course_sections.section_id, course_sections.section_order,section_items.section_item_id, section_items.item_order ASC
1799
+ ", $id );
1800
+
1801
+ $all_items = $wpdb->get_results( $query );
1802
+
1803
+ LP_Object_Cache::set( $id, $all_items, 'course-raw-items' );
1804
+ }
1805
+
1806
+ if ( $all_items ) {
1807
+ foreach ( $all_items as $item ) {
1808
+ if ( ! array_key_exists( $item->type, $type_items ) ) {
1809
+ continue;
1810
+ }
1811
+ $type_items[ $item->type ][] = $item->id;
1812
+ $section_items[ 'section-' . $item->section ][] = $item->id;
1813
+ $course_sections[ $item->section ] = $item->section;
1814
+ }
1815
+ }
1816
+
1817
+ LP_Object_Cache::set( 'course-' . $id, $type_items, 'learn-press/course-item-group-types' );
1818
+ foreach ( $section_items as $k => $v ) {
1819
+ LP_Object_Cache::set( $k, $v, 'learn-press/section-items' );
1820
+ }
1821
+ LP_Object_Cache::set( $id, $course_sections, 'learn-press/course-sections-ids' );
1822
+
1823
+ $all_ids = call_user_func_array( 'array_merge', $type_items );
1824
+ LP_Helper_CURD::cache_posts( $all_ids );
1825
+ }
1826
+
1827
+ return compact( 'type_items', 'section_items', 'course_sections' );
1828
+ }
1829
  }
1830
  }
inc/course/class-lp-course-item.php CHANGED
@@ -95,25 +95,26 @@ if ( ! class_exists( 'LP_Course_Item' ) ) {
95
  * @return bool
96
  */
97
  public function is_preview( $context = 'display' ) {
98
- if ( $this->get_post_type() === LP_LESSON_CPT && '' === $this->_preview ) {
99
- $is_preview = get_post_meta( $this->get_id(), '_lp_preview', true ) == 'yes';
 
100
 
101
- if ( $course = $this->get_course() ) {
102
- $user_id = get_current_user_id();
 
 
 
103
 
104
- if ( false === ( $cached = LP_Object_Cache::get( 'item-' . $user_id . '-' . $course->get_id() . '-' . $this->get_id(), 'learn-press/preview-items' ) ) ) {
105
- $user = learn_press_get_current_user();
 
106
 
107
- if ( $user->has_enrolled_course( $course->get_id() ) ) {
108
- $is_preview = false;
109
- }
110
- LP_Object_Cache::set( 'item-' . $user_id . '-' . $course->get_id() . '-' . $this->get_id(), $is_preview ? 'yes' : 'no', 'learn-press/preview-items' );
111
- } else {
112
- $is_preview = $cached === 'yes' ? true : false;
113
- }
114
  }
115
- $this->_preview = $is_preview;
 
116
  }
 
117
 
118
  return $context === 'display' ? apply_filters( 'learn-press/course-item-preview', $this->_preview, $this->get_id() ) : $this->_preview;
119
  }
95
  * @return bool
96
  */
97
  public function is_preview( $context = 'display' ) {
98
+ if ( empty( $GLOBALS['course-item/is-preview'] ) ) {
99
+ $GLOBALS['course-item/is-preview'] = 0;
100
+ }
101
 
102
+ $t = microtime( true );
103
+ $user_id = get_current_user_id();
104
+ if ( $this->get_post_type() === LP_LESSON_CPT && '' === $this->_preview ) {
105
+ $course_id = $this->get_course_id();
106
+ $item_id = $this->get_id();
107
 
108
+ if ( false === ( $is_preview = LP_Object_Cache::get( 'item-' . $user_id . '-' . $course_id . '-' . $item_id, 'learn-press/preview-items' ) ) ) {
109
+ $api = new LP_User_Item_CURD();
110
+ $items = $api->parse_items_preview( $course_id, $user_id );
111
 
112
+ $is_preview = isset( $items[ $item_id ] ) ? $items[ $item_id ] : 'no';
 
 
 
 
 
 
113
  }
114
+
115
+ $this->_preview = $is_preview === 'yes';
116
  }
117
+ $GLOBALS['course-item/is-preview'] += microtime( true ) - $t;
118
 
119
  return $context === 'display' ? apply_filters( 'learn-press/course-item-preview', $this->_preview, $this->get_id() ) : $this->_preview;
120
  }
inc/curds/class-lp-user-curd.php CHANGED
@@ -895,7 +895,6 @@ class LP_User_CURD extends LP_Object_Data_CURD implements LP_Interface_CURD {
895
  * @return bool|mixed
896
  */
897
  public function get_user_item( $user_id, $item_id, $course_id = 0, $last = true ) {
898
-
899
  $num_args = func_num_args();
900
 
901
  if ( $num_args == 2 ) {
895
  * @return bool|mixed
896
  */
897
  public function get_user_item( $user_id, $item_id, $course_id = 0, $last = true ) {
 
898
  $num_args = func_num_args();
899
 
900
  if ( $num_args == 2 ) {
inc/curds/class-lp-user-item-curd.php CHANGED
@@ -483,6 +483,54 @@ class LP_User_Item_CURD implements LP_Interface_CURD {
483
  }
484
 
485
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
486
  * @since 3.2.0
487
  *
488
  * @param int $course_id
@@ -509,75 +557,77 @@ class LP_User_Item_CURD implements LP_Interface_CURD {
509
  $is_free = $course->is_free();
510
  $required_enroll = $course->is_required_enroll();
511
 
512
- foreach ( $get_item_ids as $item_id ) {
513
- $item = $course->get_item( $item_id );
 
514
 
515
- $defaults = array_merge(
516
- array(
517
- 'course-item',
518
- 'course-item-' . $item->get_item_type(),
519
- 'course-item-' . $item_id
520
- ), (array) $more
521
- );
522
 
523
- if ( ( 'standard' !== ( $post_format = $item->get_format() ) ) && $post_format ) {
524
- $defaults[] = 'course-item-type-' . $post_format;
525
- }
526
 
527
- if ( $current_item && $current_item->get_id() == $item->get_id() ) {
528
- $defaults[] = 'current';
529
- }
530
 
531
- if ( $item->is_preview() ) {
532
- $defaults[] = 'item-preview';
533
- $defaults[] = 'has-status';
534
- } elseif ( $item->is_blocked() ) {
535
- $defaults[] = 'item-locked';
536
- } else {
537
- if ( $course ) {
538
- if ( $is_free && ! $required_enroll ) {
539
- $defaults[] = 'item-free';
540
- } else {
541
- if ( $user ) {
542
- if ( $enrolled ) {
543
- $item_status = $user->get_item_status( $item_id, $course_id );
544
- $item_grade = $user->get_item_grade( $item_id, $course_id );
545
-
546
- if ( $item_status ) {
547
- $defaults[] = 'has-status';
548
- $defaults[] = 'status-' . $item_status;
549
- }
550
- switch ( $item_status ) {
551
- case 'started':
552
- break;
553
- case 'completed':
554
- $defaults[] = $item_grade;
555
- break;
556
- default:
557
- if ( $item_class = apply_filters( 'learn-press/course-item-status-class', $item_status, $item_grade, $item->get_item_type(), $item_id, $course_id ) ) {
558
- $defaults[] = $item_class;
559
- }
 
560
  }
561
  }
562
- }
563
 
564
- if ( ! $enrolled ) {
565
- $defaults[] = 'item-locked';
 
566
  }
 
 
567
  }
568
- } else {
569
- $defaults[] = 'item-locked';
570
  }
571
- }
572
- $classes = apply_filters( 'learn-press/course-item-class', $defaults, $item->get_item_type(), $item_id, $course_id );
573
 
574
- // Filter unwanted values
575
- $classes = is_array( $classes ) ? $classes : explode( ' ', $classes );
576
- $classes = array_filter( $classes );
577
- $classes = array_unique( $classes );
578
 
579
- LP_Object_Cache::set( 'item-' . $user_id . '-' . $item_id, $classes, 'learn-press/post-classes' );
580
- $items[ $item_id ] = $classes;
 
581
  }
582
 
583
  return $items;
483
  }
484
 
485
  /**
486
+ * Parse attribute 'preview' for all items in a course
487
+ *
488
+ * @since 3.2.0
489
+ *
490
+ * @param int $course_id
491
+ * @param int $user_id
492
+ *
493
+ * @return array
494
+ */
495
+ public function parse_items_preview( $course_id, $user_id = 0 ) {
496
+
497
+ $items = array();
498
+
499
+ if ( ! $course = learn_press_get_course( $course_id ) ) {
500
+ return $items;
501
+ }
502
+
503
+ if ( ! $user_id ) {
504
+ $user_id = get_current_user_id();
505
+ }
506
+
507
+ $user = learn_press_get_user( $user_id, false );
508
+ $current_item = LP_Global::course_item();
509
+ $get_item_ids = $course->get_item_ids();
510
+ $enrolled = $user ? $user->has_enrolled_course( $course_id ) : false;
511
+
512
+ if ( $get_item_ids ) {
513
+ foreach ( $get_item_ids as $item_id ) {
514
+ $is_preview = get_post_meta( $item_id, '_lp_preview', true );#// == 'yes';
515
+ if( $enrolled ){
516
+ $is_preview = 'no';
517
+ }
518
+ if ( false === ( $cached = LP_Object_Cache::get( 'item-' . $user_id . '-' . $course_id . '-' . $item_id, 'learn-press/preview-items' ) ) ) {
519
+ LP_Object_Cache::set( 'item-' . $user_id . '-' . $course->get_id() . '-' . $item_id, $is_preview, 'learn-press/preview-items' );
520
+ } else {
521
+ ///$is_preview = $cached === 'yes' ? true : false;
522
+ }
523
+
524
+ $items[ $item_id ] = $is_preview;
525
+ }
526
+ }
527
+
528
+ return $items;
529
+ }
530
+
531
+ /**
532
+ * Parse classes for all items in a course.
533
+ *
534
  * @since 3.2.0
535
  *
536
  * @param int $course_id
557
  $is_free = $course->is_free();
558
  $required_enroll = $course->is_required_enroll();
559
 
560
+ if ( $get_item_ids ) {
561
+ foreach ( $get_item_ids as $item_id ) {
562
+ $item = $course->get_item( $item_id );
563
 
564
+ $defaults = array_merge(
565
+ array(
566
+ 'course-item',
567
+ 'course-item-' . $item->get_item_type(),
568
+ 'course-item-' . $item_id
569
+ ), (array) $more
570
+ );
571
 
572
+ if ( ( 'standard' !== ( $post_format = $item->get_format() ) ) && $post_format ) {
573
+ $defaults[] = 'course-item-type-' . $post_format;
574
+ }
575
 
576
+ if ( $current_item && $current_item->get_id() == $item->get_id() ) {
577
+ $defaults[] = 'current';
578
+ }
579
 
580
+ if ( $item->is_preview() ) {
581
+ $defaults[] = 'item-preview';
582
+ $defaults[] = 'has-status';
583
+ } elseif ( $item->is_blocked() ) {
584
+ $defaults[] = 'item-locked';
585
+ } else {
586
+ if ( $course ) {
587
+ if ( $is_free && ! $required_enroll ) {
588
+ $defaults[] = 'item-free';
589
+ } else {
590
+ if ( $user ) {
591
+ if ( $enrolled ) {
592
+ $item_status = $user->get_item_status( $item_id, $course_id );
593
+ $item_grade = $user->get_item_grade( $item_id, $course_id );
594
+
595
+ if ( $item_status ) {
596
+ $defaults[] = 'has-status';
597
+ $defaults[] = 'status-' . $item_status;
598
+ }
599
+ switch ( $item_status ) {
600
+ case 'started':
601
+ break;
602
+ case 'completed':
603
+ $defaults[] = $item_grade;
604
+ break;
605
+ default:
606
+ if ( $item_class = apply_filters( 'learn-press/course-item-status-class', $item_status, $item_grade, $item->get_item_type(), $item_id, $course_id ) ) {
607
+ $defaults[] = $item_class;
608
+ }
609
+ }
610
  }
611
  }
 
612
 
613
+ if ( ! $enrolled ) {
614
+ $defaults[] = 'item-locked';
615
+ }
616
  }
617
+ } else {
618
+ $defaults[] = 'item-locked';
619
  }
 
 
620
  }
621
+ $classes = apply_filters( 'learn-press/course-item-class', $defaults, $item->get_item_type(), $item_id, $course_id );
 
622
 
623
+ // Filter unwanted values
624
+ $classes = is_array( $classes ) ? $classes : explode( ' ', $classes );
625
+ $classes = array_filter( $classes );
626
+ $classes = array_unique( $classes );
627
 
628
+ LP_Object_Cache::set( 'item-' . $user_id . '-' . $item_id, $classes, 'learn-press/post-classes' );
629
+ $items[ $item_id ] = $classes;
630
+ }
631
  }
632
 
633
  return $items;
inc/custom-post-types/order.php CHANGED
@@ -435,10 +435,9 @@ if ( ! class_exists( 'LP_Order_Post_Type' ) ) {
435
  * user. If the order is for multi users then it will trigger in
436
  * each child order
437
  */
438
- if ( ! is_array( $user_id ) && ( ( $new_status !== $old_status ) || $trigger_action ) ) {
439
  $status = str_replace( 'lp-', '', $new_status );
440
  do_action( 'learn-press/order/status-' . $status, $order->get_id(), $status );
441
- do_action( 'learn-press/order/status-' . $status . '-to-' . $status, $order->get_id() );
442
  do_action( 'learn-press/order/status-changed', $order->get_id(), $status, $status );
443
  }
444
 
435
  * user. If the order is for multi users then it will trigger in
436
  * each child order
437
  */
438
+ if ( ! is_array( $user_id ) && ( ( $new_status == $old_status ) && $trigger_action ) ) {
439
  $status = str_replace( 'lp-', '', $new_status );
440
  do_action( 'learn-press/order/status-' . $status, $order->get_id(), $status );
 
441
  do_action( 'learn-press/order/status-changed', $order->get_id(), $status, $status );
442
  }
443
 
inc/libraries/meta-box/css/autocomplete.css CHANGED
@@ -11,4 +11,4 @@
11
  width: 10%;
12
  float: right;
13
  cursor: pointer;
14
- }
11
  width: 10%;
12
  float: right;
13
  cursor: pointer;
14
+ }
inc/libraries/meta-box/css/button-group.css CHANGED
@@ -21,48 +21,48 @@
21
  }
22
  /* Layout not inline
23
  -------------------------------------------------*/
24
- .rwmb-button-input-list:not(.inline) li label {
25
  border-top-width: 0;
26
  }
27
- .rwmb-button-input-list:not(.inline) li:first-child label {
28
  border-top-width: 1px;
29
  }
30
- .rwmb-button-input-list:not(.inline) li label.selected {
31
  border-bottom: 1px solid #fff;
32
  }
33
- .rwmb-button-input-list:not(.inline) li:last-child label.selected {
34
  border-bottom-color: #0073aa;
35
  }
36
- .rwmb-button-input-list:not(.inline) > li:first-child:not(:last-child) label {
37
  border-top-left-radius: 3px;
38
  border-top-right-radius: 3px;
39
  }
40
- .rwmb-button-input-list:not(.inline) > li:last-child:not(:first-child) label {
41
  border-bottom-right-radius: 3px;
42
  border-bottom-left-radius: 3px;
43
  }
44
  /* Layout inline
45
  ---------------------------------------------*/
46
- .rwmb-button-input-list.inline li {
47
  display: inline-block;
48
  }
49
- .rwmb-button-input-list.inline li label {
50
  border-left-width: 0;
51
  }
52
- .rwmb-button-input-list.inline li:first-child label {
53
  border-left-width: 1px;
54
  }
55
- .rwmb-button-input-list.inline li label.selected {
56
  border-right-color: rgb(255, 255, 255);
57
  }
58
- .rwmb-button-input-list.inline li:last-child label.selected {
59
  border-right-color: #0073aa;
60
  }
61
- .rwmb-button-input-list.inline > li:first-child:not(:last-child) label {
62
  border-top-left-radius: 3px;
63
  border-bottom-left-radius: 3px;
64
  }
65
- .rwmb-button-input-list.inline > li:last-child:not(:first-child) label {
66
  border-top-right-radius: 3px;
67
  border-bottom-right-radius: 3px;
68
  }
21
  }
22
  /* Layout not inline
23
  -------------------------------------------------*/
24
+ .rwmb-button-input-list:not(.rwmb-inline) li label {
25
  border-top-width: 0;
26
  }
27
+ .rwmb-button-input-list:not(.rwmb-inline) li:first-child label {
28
  border-top-width: 1px;
29
  }
30
+ .rwmb-button-input-list:not(.rwmb-inline) li label.selected {
31
  border-bottom: 1px solid #fff;
32
  }
33
+ .rwmb-button-input-list:not(.rwmb-inline) li:last-child label.selected {
34
  border-bottom-color: #0073aa;
35
  }
36
+ .rwmb-button-input-list:not(.rwmb-inline) > li:first-child:not(:last-child) label {
37
  border-top-left-radius: 3px;
38
  border-top-right-radius: 3px;
39
  }
40
+ .rwmb-button-input-list:not(.rwmb-inline) > li:last-child:not(:first-child) label {
41
  border-bottom-right-radius: 3px;
42
  border-bottom-left-radius: 3px;
43
  }
44
  /* Layout inline
45
  ---------------------------------------------*/
46
+ .rwmb-button-input-list.rwmb-inline li {
47
  display: inline-block;
48
  }
49
+ .rwmb-button-input-list.rwmb-inline li label {
50
  border-left-width: 0;
51
  }
52
+ .rwmb-button-input-list.rwmb-inline li:first-child label {
53
  border-left-width: 1px;
54
  }
55
+ .rwmb-button-input-list.rwmb-inline li label.selected {
56
  border-right-color: rgb(255, 255, 255);
57
  }
58
+ .rwmb-button-input-list.rwmb-inline li:last-child label.selected {
59
  border-right-color: #0073aa;
60
  }
61
+ .rwmb-button-input-list.rwmb-inline > li:first-child:not(:last-child) label {
62
  border-top-left-radius: 3px;
63
  border-bottom-left-radius: 3px;
64
  }
65
+ .rwmb-button-input-list.rwmb-inline > li:last-child:not(:first-child) label {
66
  border-top-right-radius: 3px;
67
  border-bottom-right-radius: 3px;
68
  }
inc/libraries/meta-box/css/color.css CHANGED
@@ -3,6 +3,6 @@
3
  }
4
  .rwmb-color-wrapper .wp-picker-holder {
5
  position: absolute;
6
- z-index: 9;
7
  min-width: 255px;
8
  }
3
  }
4
  .rwmb-color-wrapper .wp-picker-holder {
5
  position: absolute;
6
+ z-index: 99;
7
  min-width: 255px;
8
  }
inc/libraries/meta-box/css/divider.css CHANGED
@@ -4,4 +4,4 @@
4
  .rwmb-divider-wrapper hr {
5
  border: none;
6
  border-top: 1px solid #e6e6e6;
7
- }
4
  .rwmb-divider-wrapper hr {
5
  border: none;
6
  border-top: 1px solid #e6e6e6;
7
+ }
inc/libraries/meta-box/css/heading.css CHANGED
@@ -9,4 +9,4 @@
9
  text-transform: uppercase;
10
  padding: .75rem 0 .375rem;
11
  margin: 0 0 6px;
12
- }
9
  text-transform: uppercase;
10
  padding: .75rem 0 .375rem;
11
  margin: 0 0 6px;
12
+ }
inc/libraries/meta-box/css/input-list.css CHANGED
@@ -9,12 +9,12 @@
9
  list-style: none;
10
  margin-bottom: 0;
11
  }
12
- .rwmb-input-list.inline {
13
  line-height: inherit;
14
  }
15
- .rwmb-input-list.inline li {
16
  display: inline-block;
17
  }
18
- .rwmb-input-list.inline li:not(:last-child) {
19
  margin-right: 20px;
20
  }
9
  list-style: none;
10
  margin-bottom: 0;
11
  }
12
+ .rwmb-input-list.rwmb-inline {
13
  line-height: inherit;
14
  }
15
+ .rwmb-input-list.rwmb-inline li {
16
  display: inline-block;
17
  }
18
+ .rwmb-input-list.rwmb-inline li:not(:last-child) {
19
  margin-right: 20px;
20
  }
inc/libraries/meta-box/css/map.css CHANGED
@@ -3,3 +3,47 @@
3
  height: 400px;
4
  margin-bottom: 10px;
5
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  height: 400px;
4
  margin-bottom: 10px;
5
  }
6
+
7
+ /* Autocomplete style, copy from WordPress's common.css and forms.css */
8
+
9
+ input.ui-autocomplete-input.open {
10
+ border-bottom-color: transparent;
11
+ }
12
+
13
+ .ui-autocomplete {
14
+ padding: 0;
15
+ margin: 0;
16
+ list-style: none;
17
+ position: absolute;
18
+ z-index: 10000;
19
+ border: 1px solid #5b9dd9;
20
+ box-shadow: 0 1px 2px rgba( 30, 140, 190, 0.8 );
21
+ background-color: #fff;
22
+ }
23
+
24
+ .ui-autocomplete li {
25
+ margin-bottom: 0;
26
+ padding: 4px 10px;
27
+ white-space: nowrap;
28
+ text-align: left;
29
+ cursor: pointer;
30
+ }
31
+
32
+ /* Colors for the wplink toolbar autocomplete. */
33
+ .ui-autocomplete .ui-state-focus {
34
+ background-color: #ddd;
35
+ }
36
+
37
+ .ui-helper-hidden-accessible {
38
+ border: 0;
39
+ clip: rect(1px, 1px, 1px, 1px);
40
+ -webkit-clip-path: inset(50%);
41
+ clip-path: inset(50%);
42
+ height: 1px;
43
+ margin: -1px;
44
+ overflow: hidden;
45
+ padding: 0;
46
+ position: absolute;
47
+ width: 1px;
48
+ word-wrap: normal !important; /* many screen reader and browser combinations announce broken words as they would appear visually */
49
+ }
inc/libraries/meta-box/css/oembed.css CHANGED
@@ -8,4 +8,4 @@
8
  }
9
  .rwmb-embed-media iframe {
10
  max-width: 100%;
11
- }
8
  }
9
  .rwmb-embed-media iframe {
10
  max-width: 100%;
11
+ }
inc/libraries/meta-box/css/osm.css ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .rwmb-osm-canvas {
2
+ width: 100%;
3
+ height: 400px;
4
+ margin-bottom: 10px;
5
+ }
6
+
7
+ /* Autocomplete style, copy from WordPress's common.css and forms.css */
8
+
9
+ input.ui-autocomplete-input.open {
10
+ border-bottom-color: transparent;
11
+ }
12
+
13
+ .ui-autocomplete {
14
+ padding: 0;
15
+ margin: 0;
16
+ list-style: none;
17
+ position: absolute;
18
+ z-index: 10000;
19
+ border: 1px solid #5b9dd9;
20
+ box-shadow: 0 1px 2px rgba( 30, 140, 190, 0.8 );
21
+ background-color: #fff;
22
+ }
23
+
24
+ .ui-autocomplete li {
25
+ margin-bottom: 0;
26
+ padding: 4px 10px;
27
+ white-space: nowrap;
28
+ text-align: left;
29
+ cursor: pointer;
30
+ }
31
+
32
+ /* Colors for the wplink toolbar autocomplete. */
33
+ .ui-autocomplete .ui-state-focus {
34
+ background-color: #ddd;
35
+ }
36
+
37
+ .ui-helper-hidden-accessible {
38
+ border: 0;
39
+ clip: rect(1px, 1px, 1px, 1px);
40
+ -webkit-clip-path: inset(50%);
41
+ clip-path: inset(50%);
42
+ height: 1px;
43
+ margin: -1px;
44
+ overflow: hidden;
45
+ padding: 0;
46
+ position: absolute;
47
+ width: 1px;
48
+ word-wrap: normal !important; /* many screen reader and browser combinations announce broken words as they would appear visually */
49
+ }
inc/libraries/meta-box/css/select.css CHANGED
@@ -3,7 +3,7 @@
3
  padding: 0;
4
  }
5
  .rwmb-select option {
6
- padding: 4px 8px;
7
  }
8
  .rwmb-select-all-none {
9
  display: block;
3
  padding: 0;
4
  }
5
  .rwmb-select option {
6
+ padding: 4px 8px;
7
  }
8
  .rwmb-select-all-none {
9
  display: block;
inc/libraries/meta-box/css/select2/select2.css CHANGED
@@ -3,8 +3,7 @@
3
  display: inline-block;
4
  margin: 0;
5
  position: relative;
6
- vertical-align: middle;
7
- }
8
  .select2-container .select2-selection--single {
9
  box-sizing: border-box;
10
  cursor: pointer;
@@ -32,7 +31,7 @@
32
  user-select: none;
33
  -webkit-user-select: none; }
34
  .select2-container .select2-selection--multiple .select2-selection__rendered {
35
- /*display: inline-block;*/
36
  overflow: hidden;
37
  padding-left: 8px;
38
  text-overflow: ellipsis;
@@ -185,6 +184,8 @@
185
  margin: 0;
186
  padding: 0 5px;
187
  width: 100%; }
 
 
188
  .select2-container--default .select2-selection--multiple .select2-selection__placeholder {
189
  color: #999;
190
  margin-top: 5px;
3
  display: inline-block;
4
  margin: 0;
5
  position: relative;
6
+ vertical-align: middle; }
 
7
  .select2-container .select2-selection--single {
8
  box-sizing: border-box;
9
  cursor: pointer;
31
  user-select: none;
32
  -webkit-user-select: none; }
33
  .select2-container .select2-selection--multiple .select2-selection__rendered {
34
+ display: inline-block;
35
  overflow: hidden;
36
  padding-left: 8px;
37
  text-overflow: ellipsis;
184
  margin: 0;
185
  padding: 0 5px;
186
  width: 100%; }
187
+ .select2-container--default .select2-selection--multiple .select2-selection__rendered li {
188
+ list-style: none; }
189
  .select2-container--default .select2-selection--multiple .select2-selection__placeholder {
190
  color: #999;
191
  margin-top: 5px;
inc/libraries/meta-box/css/slider.css CHANGED
@@ -10,4 +10,4 @@
10
  /* Fix slider handle being visible through jQuery panel */
11
  .ui-slider .ui-slider-handle {
12
  z-index: 1;
13
- }
10
  /* Fix slider handle being visible through jQuery panel */
11
  .ui-slider .ui-slider-handle {
12
  z-index: 1;
13
+ }
inc/libraries/meta-box/css/style-rtl.css CHANGED
@@ -1,11 +1,11 @@
1
  .rwmb-label, .rwmb-input{
2
- float: right;
3
  }
4
  label.error{
5
- padding-left: auto;
6
- padding-right: 3px;
7
  }
8
  .rwmb-button.remove-clone {
9
- right: auto;
10
- left: 0;
11
  }
1
  .rwmb-label, .rwmb-input{
2
+ float: right;
3
  }
4
  label.error{
5
+ padding-left: auto;
6
+ padding-right: 3px;
7
  }
8
  .rwmb-button.remove-clone {
9
+ right: auto;
10
+ left: 0;
11
  }
inc/libraries/meta-box/css/text-list.css ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .rwmb-text_list-non-cloneable > .rwmb-input,
2
+ .rwmb-text_list-clone {
3
+ display: flex;
4
+ flex-wrap: wrap;
5
+ }
6
+ .rwmb-text_list-non-cloneable > .rwmb-input > label,
7
+ .rwmb-text_list-clone > label {
8
+ margin: 0 10px 10px 0;
9
+ }
10
+ .rwmb-text_list-non-cloneable > .rwmb-input > label:last-child,
11
+ .rwmb-text_list-clone > label:last-child {
12
+ margin-right: 0;
13
+ }
14
+
15
+ .rwmb-text-list-label {
16
+ font-weight: 600;
17
+ display: block;
18
+ margin-bottom: 5px;
19
+ }
inc/libraries/meta-box/css/upload.css CHANGED
@@ -5,10 +5,6 @@
5
  height: 200px;
6
  border: 4px dashed #ddd;
7
  }
8
- /* Fix blank space in the footer */
9
- .rwmb-upload-area .moxie-shim {
10
- display: none;
11
- }
12
  .rwmb-upload-inside {
13
  text-align: center;
14
  position: absolute;
5
  height: 200px;
6
  border: 4px dashed #ddd;
7
  }
 
 
 
 
8
  .rwmb-upload-inside {
9
  text-align: center;
10
  position: absolute;
inc/libraries/meta-box/inc/about/about.php CHANGED
@@ -28,12 +28,12 @@ class RWMB_About {
28
  // Add links to about page in the plugin action links.
29
  add_filter( 'plugin_action_links_meta-box/meta-box.php', array( $this, 'plugin_links' ) );
30
 
31
- // Add a hidden about page.
32
- add_action( 'admin_menu', array( $this, 'register_page' ) );
33
- add_action( 'admin_head', array( $this, 'hide_page' ) );
34
 
35
- // Enqueue scripts and styles for about page.
36
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) );
37
 
38
  // Redirect to about page after activation.
39
  add_action( 'activated_plugin', array( $this, 'redirect' ), 10, 2 );
@@ -47,28 +47,56 @@ class RWMB_About {
47
  * @return array
48
  */
49
  public function plugin_links( $links ) {
50
- $links[] = '<a href="' . esc_url( admin_url( 'index.php?page=meta-box-about' ) ) . '">' . esc_html__( 'About', 'learnpress' ) . '</a>';
51
  return $links;
52
  }
53
 
54
  /**
55
  * Register admin page.
56
  */
57
- public function register_page() {
58
- add_dashboard_page(
59
- __( 'Welcome to Meta Box', 'learnpress' ),
60
- __( 'Welcome to Meta Box', 'learnpress' ),
 
 
 
61
  'activate_plugins',
62
- 'meta-box-about',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  array( $this, 'render' )
64
  );
 
 
 
 
 
 
 
 
 
65
  }
66
 
67
  /**
68
  * Hide about page from the admin menu.
69
  */
70
  public function hide_page() {
71
- remove_submenu_page( 'index.php', 'meta-box-about' );
72
  }
73
 
74
  /**
@@ -76,10 +104,31 @@ class RWMB_About {
76
  */
77
  public function render() {
78
  ?>
79
- <div class="wrap about-wrap">
80
- <?php include dirname( __FILE__ ) . '/sections/welcome.php'; ?>
81
- <?php include dirname( __FILE__ ) . '/sections/tabs.php'; ?>
82
- <?php include dirname( __FILE__ ) . '/sections/getting-started.php'; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  </div>
84
  <?php
85
  }
@@ -88,12 +137,24 @@ class RWMB_About {
88
  * Enqueue CSS and JS.
89
  */
90
  public function enqueue() {
91
- $screen = get_current_screen();
92
- if ( 'dashboard_page_meta-box-about' !== $screen->id ) {
93
- return;
94
- }
95
- wp_enqueue_style( 'meta-box-about', RWMB_URL . 'inc/about/css/style.css' );
96
- wp_enqueue_script( 'meta-box-about', RWMB_URL . 'inc/about/js/script.js', array( 'jquery' ), '', true );
 
 
 
 
 
 
 
 
 
 
 
 
97
  }
98
 
99
  /**
@@ -104,12 +165,40 @@ class RWMB_About {
104
  * or just the current site. Multisite only. Default is false.
105
  */
106
  public function redirect( $plugin, $network_wide ) {
107
- if ( ! $network_wide && 'meta-box/meta-box.php' === $plugin && ! $this->is_bundled() ) {
108
- wp_safe_redirect( admin_url( 'index.php?page=meta-box-about' ) );
109
  die;
110
  }
111
  }
112
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  /**
114
  * Check if Meta Box is bundled by TGM Activation Class.
115
  */
@@ -122,4 +211,20 @@ class RWMB_About {
122
  }
123
  return false;
124
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  }
28
  // Add links to about page in the plugin action links.
29
  add_filter( 'plugin_action_links_meta-box/meta-box.php', array( $this, 'plugin_links' ) );
30
 
31
+ // Add a shared top-level admin menu and Dashboard page. Use priority 5 to show Dashboard at the top.
32
+ add_action( 'admin_menu', array( $this, 'add_menu' ), 5 );
33
+ add_action( 'admin_menu', array( $this, 'add_submenu' ), 5 );
34
 
35
+ // If no admin menu, then hide the About page.
36
+ add_action( 'admin_head', array( $this, 'hide_page' ) );
37
 
38
  // Redirect to about page after activation.
39
  add_action( 'activated_plugin', array( $this, 'redirect' ), 10, 2 );
47
  * @return array
48
  */
49
  public function plugin_links( $links ) {
50
+ $links[] = '<a href="' . esc_url( $this->get_menu_link() ) . '">' . esc_html__( 'About', 'meta-box' ) . '</a>';
51
  return $links;
52
  }
53
 
54
  /**
55
  * Register admin page.
56
  */
57
+ public function add_menu() {
58
+ if ( ! $this->has_menu() ) {
59
+ return;
60
+ }
61
+ add_menu_page(
62
+ __( 'Meta Box', 'meta-box' ),
63
+ __( 'Meta Box', 'meta-box' ),
64
  'activate_plugins',
65
+ 'meta-box',
66
+ '__return_null',
67
+ 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2aWV3Qm94PSIxNjQuMzI4IDE0OS40NDEgNTMuNDcgNDIuNjYiIHdpZHRoPSI1My40NyIgaGVpZ2h0PSI0Mi42NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNIDIwNC42NjggMTc5LjM5MSBMIDIwNS40ODggMTYwLjU1MSBMIDIwNS4zMTggMTYwLjUyMSBMIDE5My44ODggMTkyLjEwMSBMIDE4OC4xNDggMTkyLjEwMSBMIDE3Ni43NzggMTYwLjY0MSBMIDE3Ni42MDggMTYwLjY2MSBMIDE3Ny40MjggMTc5LjM5MSBMIDE3Ny40MjggMTg2LjA5MSBMIDE4MS45OTggMTg2Ljk3MSBMIDE4MS45OTggMTkyLjEwMSBMIDE2NC4zMjggMTkyLjEwMSBMIDE2NC4zMjggMTg2Ljk3MSBMIDE2OC44NjggMTg2LjA5MSBMIDE2OC44NjggMTU1LjQ4MSBMIDE2NC4zMjggMTU0LjYwMSBMIDE2NC4zMjggMTQ5LjQ0MSBMIDE2OC44NjggMTQ5LjQ0MSBMIDE4MC4wMjggMTQ5LjQ0MSBMIDE5MC44OTggMTgwLjg4MSBMIDE5MS4wNzggMTgwLjg4MSBMIDIwMi4wMzggMTQ5LjQ0MSBMIDIxNy43OTggMTQ5LjQ0MSBMIDIxNy43OTggMTU0LjYwMSBMIDIxMy4yMjggMTU1LjQ4MSBMIDIxMy4yMjggMTg2LjA5MSBMIDIxNy43OTggMTg2Ljk3MSBMIDIxNy43OTggMTkyLjEwMSBMIDIwMC4xMjggMTkyLjEwMSBMIDIwMC4xMjggMTg2Ljk3MSBMIDIwNC42NjggMTg2LjA5MSBMIDIwNC42NjggMTc5LjM5MSBaIiBzdHlsZT0iZmlsbDogcmdiKDE1OCwgMTYzLCAxNjgpOyB3aGl0ZS1zcGFjZTogcHJlOyIvPgo8L3N2Zz4='
68
+ );
69
+ }
70
+
71
+ /**
72
+ * Add submenu for the About page.
73
+ */
74
+ public function add_submenu() {
75
+ $parent_menu = $this->has_menu() ? 'meta-box' : $this->get_parent_menu();
76
+ $about = add_submenu_page(
77
+ $parent_menu,
78
+ __( 'Welcome to Meta Box', 'meta-box' ),
79
+ __( 'Dashboard', 'meta-box' ),
80
+ 'activate_plugins',
81
+ 'meta-box',
82
  array( $this, 'render' )
83
  );
84
+ add_action( "load-$about", array( $this, 'load_about' ) );
85
+ }
86
+
87
+ /**
88
+ * Functions and hooks for about page.
89
+ */
90
+ public function load_about() {
91
+ $this->enqueue();
92
+ add_filter( 'admin_footer_text', array( $this, 'change_footer_text' ) );
93
  }
94
 
95
  /**
96
  * Hide about page from the admin menu.
97
  */
98
  public function hide_page() {
99
+ remove_submenu_page( $this->get_parent_menu(), 'meta-box' );
100
  }
101
 
102
  /**
104
  */
105
  public function render() {
106
  ?>
107
+ <div class="wrap">
108
+ <div id="poststuff">
109
+ <div id="post-body" class="metabox-holder columns-2">
110
+ <div id="post-body-content">
111
+ <div class="about-wrap">
112
+ <?php
113
+ include dirname( __FILE__ ) . '/sections/welcome.php';
114
+ include dirname( __FILE__ ) . '/sections/tabs.php';
115
+ include dirname( __FILE__ ) . '/sections/getting-started.php';
116
+ include dirname( __FILE__ ) . '/sections/extensions.php';
117
+ include dirname( __FILE__ ) . '/sections/support.php';
118
+ do_action( 'rwmb_about_tabs_content' );
119
+ ?>
120
+ </div>
121
+ </div>
122
+ <div id="postbox-container-1" class="postbox-container">
123
+ <?php
124
+ include dirname( __FILE__ ) . '/sections/newsletter.php';
125
+ if ( ! $this->is_premium_user() ) {
126
+ include dirname( __FILE__ ) . '/sections/upgrade.php';
127
+ }
128
+ ?>
129
+ </div>
130
+ </div>
131
+ </div>
132
  </div>
133
  <?php
134
  }
137
  * Enqueue CSS and JS.
138
  */
139
  public function enqueue() {
140
+ wp_enqueue_style( 'meta-box-about', RWMB_URL . 'inc/about/css/about.css', array(), RWMB_VER );
141
+ wp_enqueue_script( 'meta-box-about', RWMB_URL . 'inc/about/js/about.js', array( 'jquery' ), RWMB_VER, true );
142
+ }
143
+
144
+ /**
145
+ * Change WordPress footer text on about page.
146
+ */
147
+ public function change_footer_text() {
148
+ $allowed_html = array(
149
+ 'a' => array(
150
+ 'href' => array(),
151
+ 'target' => array(),
152
+ ),
153
+ 'strong' => array(),
154
+ );
155
+
156
+ // Translators: %1$s - link to review form.
157
+ echo wp_kses( sprintf( __( 'Please rate <strong>Meta Box</strong> <a href="%1$s" target="_blank">&#9733;&#9733;&#9733;&#9733;&#9733;</a> on <a href="%1$s" target="_blank">WordPress.org</a> to help us spread the word. Thank you from the Meta Box team!', 'meta-box' ), 'https://wordpress.org/support/view/plugin-reviews/meta-box?filter=5#new-post' ), $allowed_html );
158
  }
159
 
160
  /**
165
  * or just the current site. Multisite only. Default is false.
166
  */
167
  public function redirect( $plugin, $network_wide ) {
168
+ if ( 'cli' !== php_sapi_name() && ! $network_wide && 'meta-box/meta-box.php' === $plugin && ! $this->is_bundled() ) {
169
+ wp_safe_redirect( $this->get_menu_link() );
170
  die;
171
  }
172
  }
173
 
174
+ /**
175
+ * Get link to the plugin admin menu.
176
+ *
177
+ * @return string
178
+ */
179
+ protected function get_menu_link() {
180
+ $menu = $this->has_menu() ? 'admin.php?page=meta-box' : $this->get_parent_menu() . '?page=meta-box';
181
+ return admin_url( $menu );
182
+ }
183
+
184
+ /**
185
+ * Get default parent menu, which is Plugins.
186
+ *
187
+ * @return string
188
+ */
189
+ protected function get_parent_menu() {
190
+ return 'plugins.php';
191
+ }
192
+
193
+ /**
194
+ * Check if the plugin has a top-level admin menu.
195
+ *
196
+ * @return bool
197
+ */
198
+ protected function has_menu() {
199
+ return apply_filters( 'rwmb_admin_menu', false );
200
+ }
201
+
202
  /**
203
  * Check if Meta Box is bundled by TGM Activation Class.
204
  */
211
  }
212
  return false;
213
  }
214
+
215
+ /**
216
+ * Check if current user is a premium user.
217
+ *
218
+ * @return bool
219
+ */
220
+ protected function is_premium_user() {
221
+ $option = is_multisite() ? get_site_option( 'meta_box_updater' ) : get_option( 'meta_box_updater' );
222
+ if ( empty( $option['api_key'] ) ) {
223
+ return false;
224
+ }
225
+ if ( isset( $option['status'] ) && 'success' !== $option['status'] ) {
226
+ return false;
227
+ }
228
+ return true;
229
+ }
230
  }
inc/libraries/meta-box/inc/about/css/about.css ADDED
@@ -0,0 +1,219 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .about-wrap.about-wrap .wp-badge {
2
+ background-image: url(../images/meta-box.svg);
3
+ background-color: #fff;
4
+ color: #222;
5
+ text-transform: uppercase;
6
+ font-weight: bold;
7
+ text-decoration: none;
8
+ }
9
+
10
+ .wp-badge:hover {
11
+ text-decoration: none;
12
+ }
13
+
14
+ .about-buttons .dashicons {
15
+ position: relative;
16
+ top: 5px;
17
+ width: 16px;
18
+ height: 16px;
19
+ font-size: 16px;
20
+ }
21
+
22
+ #poststuff .nav-tab-wrapper {
23
+ padding: 0;
24
+ margin-top: 60px;
25
+ }
26
+
27
+ .feature-section.two-col {
28
+ align-items: flex-start;
29
+ }
30
+
31
+ .feature-section.two-col h3:not(:first-child) {
32
+ margin-top: 3em;
33
+ }
34
+
35
+ .feature-section img {
36
+ display: block;
37
+ box-shadow: 0 0 20px rgba(0, 0, 0, .1);
38
+ }
39
+
40
+ .nav-tab-active:focus {
41
+ box-shadow: none;
42
+ }
43
+
44
+ .gt-tab-pane {
45
+ display: none;
46
+ }
47
+
48
+ .gt-is-active {
49
+ display: block;
50
+ }
51
+
52
+ .screenshot {
53
+ display: block;
54
+ margin: 3em auto;
55
+ }
56
+ .col ul {
57
+ font-size: 14px;
58
+ margin: 2em 0;
59
+ }
60
+
61
+ .col li a {
62
+ text-decoration: none;
63
+ }
64
+
65
+ .col .dashicons {
66
+ color: #82878c;
67
+ padding-right: 5px;
68
+ font-size: 16px;
69
+ vertical-align: middle;
70
+ }
71
+
72
+ /* Extensions tab */
73
+ .theme-browser {
74
+ margin-top: 40px;
75
+ }
76
+ .theme-browser .theme:hover {
77
+ cursor: initial;
78
+ }
79
+ .extension-inner {
80
+ display: flex;
81
+ background: #fff;
82
+ padding: 25px 20px;
83
+ }
84
+ .extension-inner svg {
85
+ width: 36px;
86
+ height: 36px;
87
+ margin: 8px 15px 0 0;
88
+ fill: #b4b9be;
89
+ }
90
+ .extension-info {
91
+ flex: 1;
92
+ }
93
+ .extension-info.extension-info h3 {
94
+ margin: 0 0 5px;
95
+ font-size: 1.2em;
96
+ }
97
+ .extension-info p {
98
+ margin: 0;
99
+ }
100
+ .extension-action {
101
+ border-top: 1px solid #ddd;
102
+ text-align: center;
103
+ padding: 20px;
104
+ background: #f7f7f7;
105
+ }
106
+
107
+ /* Extensions tab: 2 columns */
108
+ .extension {
109
+ margin-bottom: 4%;
110
+ }
111
+ @media (min-width: 768px) {
112
+ .extension {
113
+ float: left;
114
+ width: 47.5%;
115
+ margin: 0 4% 4% 0;
116
+ }
117
+ .extension:nth-child(2n) {
118
+ margin-right: 0;
119
+ }
120
+ .extension:nth-child(2n+1) {
121
+ clear: left;
122
+ }
123
+ }
124
+ /* For large screen: 2 columns */
125
+ @media (min-width: 1640px) {
126
+ .extension {
127
+ width: 30.6%;
128
+ }
129
+ .extension:nth-child(2n) {
130
+ margin-right: 4%;
131
+ }
132
+ .extension:nth-child(2n+1) {
133
+ clear: none;
134
+ }
135
+ .extension:nth-child(3n) {
136
+ margin-right: 0;
137
+ }
138
+ .extension:nth-child(3n+1) {
139
+ clear: left;
140
+ }
141
+ }
142
+
143
+ /* Right column */
144
+ #post-body.columns-2 #postbox-container-1 {
145
+ position: fixed;
146
+ right: 320px;
147
+ top: 40px;
148
+ }
149
+
150
+ @media (max-width: 1279px) {
151
+ #postbox-container-1 {
152
+ display: none;
153
+ }
154
+ #poststuff #post-body.columns-2 {
155
+ margin-right: 0;
156
+ }
157
+ }
158
+
159
+ /* Newsletter */
160
+ .newsletter {
161
+ margin: 40px 0;
162
+ border: 3px dashed #82878c;
163
+ padding: 15px;
164
+ background: #fff;
165
+ }
166
+ .newsletter .dashicons {
167
+ color: #00b9eb;
168
+ width: 30px;
169
+ height: 30px;
170
+ font-size: 30px;
171
+ position: relative;
172
+ top: -5px;
173
+ left: -2px;
174
+ }
175
+ .newsletter h3 {
176
+ margin: 0 0 5px;
177
+ }
178
+ .newsletter p {
179
+ margin-top: 0;
180
+ }
181
+ .newsletter.newsletter input,
182
+ .newsletter.newsletter button {
183
+ margin-top: 5px;
184
+ }
185
+ .newsletter.newsletter input {
186
+ width: 145px;
187
+ padding: 5px;
188
+ }
189
+
190
+ /* Upgrade */
191
+ .upgrade {
192
+ border: 3px dashed #82878c;
193
+ background: #fff;
194
+ padding: 15px;
195
+ }
196
+ .upgrade .dashicons {
197
+ color: #ef4836;
198
+ width: 26px;
199
+ height: 26px;
200
+ font-size: 30px;
201
+ position: relative;
202
+ top: -4px;
203
+ left: -5px;
204
+ }
205
+ .upgrade h3 {
206
+ margin: 0;
207
+ }
208
+ .upgrade li {
209
+ padding-left: 20px;
210
+ position: relative;
211
+ }
212
+ .upgrade svg {
213
+ width: 1em;
214
+ height: 1em;
215
+ fill: #0073aa;
216
+ position: absolute;
217
+ top: 4px;
218
+ left: 0;
219
+ }
inc/libraries/meta-box/inc/about/images/meta-box.svg ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <svg viewBox="227 227 46 46" width="46" height="46" xmlns="http://www.w3.org/2000/svg">
3
+ <rect style="" x="227" y="227" width="46" height="46" rx="4" ry="4"/>
4
+ <path d="M 256.873 255.508 L 257.283 246.088 L 257.193 246.078 L 251.483 261.868 L 248.613 261.868 L 242.933 246.138 L 242.843 246.148 L 243.253 255.508 L 243.253 258.868 L 245.533 259.308 L 245.533 261.868 L 236.703 261.868 L 236.703 259.308 L 238.973 258.868 L 238.973 243.558 L 236.703 243.118 L 236.703 240.538 L 238.973 240.538 L 244.553 240.538 L 249.993 256.258 L 250.073 256.258 L 255.553 240.538 L 263.433 240.538 L 263.433 243.118 L 261.153 243.558 L 261.153 258.868 L 263.433 259.308 L 263.433 261.868 L 254.603 261.868 L 254.603 259.308 L 256.873 258.868 L 256.873 255.508 Z" style="fill:#fff"/>
5
+ </svg>
inc/libraries/meta-box/inc/about/js/about.js ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ( function ( $ ) {
2
+ 'use strict';
3
+
4
+ function tabs() {
5
+ var $container = $( '.nav-tab-wrapper' ),
6
+ $tabs = $container.find( '.nav-tab' ),
7
+ $panes = $( '.gt-tab-pane' );
8
+
9
+ $container.on(
10
+ 'click',
11
+ '.nav-tab',
12
+ function ( e ) {
13
+ e.preventDefault();
14
+
15
+ $tabs.removeClass( 'nav-tab-active' );
16
+ $( this ).addClass( 'nav-tab-active' );
17
+
18
+ $panes.removeClass( 'gt-is-active' );
19
+ $panes.filter( $( this ).attr( 'href' ) ).addClass( 'gt-is-active' );
20
+ }
21
+ );
22
+ }
23
+
24
+ // Auto activate tabs when DOM ready.
25
+ $( tabs );
26
+ } ( jQuery ) );
inc/libraries/meta-box/inc/about/sections/extensions.php ADDED
@@ -0,0 +1,351 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Extensions section.
4
+ *
5
+ * @package Meta Box
6
+ */
7
+
8
+ ?>
9
+ <div id="extensions" class="gt-tab-pane">
10
+ <p class="about-description">
11
+ <?php esc_html_e( 'Extend custom fields in WordPress well beyond what others would ever consider ordinary! Save over 70% with our extensions bundles.', 'meta-box' ); ?> <a target="_blank" href="https://metabox.io/pricing/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'View Bundles', 'meta-box' ); ?> &rarr;</a>
12
+ </p>
13
+ <div class="extensions wp-clearfix">
14
+ <div class="extension">
15
+ <div class="extension-inner">
16
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M736 1440q0 12-10 24l-319 319q-10 9-23 9-12 0-23-9l-320-320q-15-16-7-35 8-20 30-20h192v-1376q0-14 9-23t23-9h192q14 0 23 9t9 23v1376h192q14 0 23 9t9 23zm1056 128v192q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-192q0-14 9-23t23-9h832q14 0 23 9t9 23zm-192-512v192q0 14-9 23t-23 9h-640q-14 0-23-9t-9-23v-192q0-14 9-23t23-9h640q14 0 23 9t9 23zm-192-512v192q0 14-9 23t-23 9h-448q-14 0-23-9t-9-23v-192q0-14 9-23t23-9h448q14 0 23 9t9 23zm-192-512v192q0 14-9 23t-23 9h-256q-14 0-23-9t-9-23v-192q0-14 9-23t23-9h256q14 0 23 9t9 23z"/></svg>
17
+ <div class="extension-info">
18
+ <h3>Meta Box Builder</h3>
19
+ <p><?php esc_html_e( 'Drag and drop your custom fields into place without a single line of code.', 'meta-box' ); ?></p>
20
+ </div>
21
+ </div>
22
+ <div class="extension-action">
23
+ <a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-builder/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
24
+ </div>
25
+ </div>
26
+ <div class="extension">
27
+ <div class="extension-inner">
28
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1596 476q14 14 28 36h-472v-472q22 14 36 28zm-476 164h544v1056q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1600q0-40 28-68t68-28h800v544q0 40 28 68t68 28zm160 736v-64q0-14-9-23t-23-9h-704q-14 0-23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23-9t9-23zm0-256v-64q0-14-9-23t-23-9h-704q-14 0-23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23-9t9-23zm0-256v-64q0-14-9-23t-23-9h-704q-14 0-23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23-9t9-23z" /></svg>
29
+ <div class="extension-info">
30
+ <h3>MB Custom Post Type</h3>
31
+ <p><?php esc_html_e( 'Create and manage custom post types easily in WordPress with an easy-to-use interface.', 'meta-box' ); ?></p>
32
+ </div>
33
+ </div>
34
+ <div class="extension-action">
35
+ <a class="button" target="_blank" href="https://metabox.io/plugins/custom-post-type/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
36
+ </div>
37
+ </div>
38
+ <div class="extension">
39
+ <div class="extension-inner">
40
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M512 1248v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm1280 512v192q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h960q40 0 68 28t28 68zm-1280-1024v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm1280 512v192q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h960q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h960q40 0 68 28t28 68z" /></svg>
41
+ <div class="extension-info">
42
+ <h3>Meta Box Group</h3>
43
+ <p><?php esc_html_e( 'Create repeatable groups of custom fields for better appearance and structure.', 'meta-box' ); ?></p>
44
+ </div>
45
+ </div>
46
+ <div class="extension-action">
47
+ <a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-group/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
48
+ </div>
49
+ </div>
50
+ <div class="extension">
51
+ <div class="extension-inner">
52
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1152 896q0-106-75-181t-181-75-181 75-75 181 75 181 181 75 181-75 75-181zm512-109v222q0 12-8 23t-20 13l-185 28q-19 54-39 91 35 50 107 138 10 12 10 25t-9 23q-27 37-99 108t-94 71q-12 0-26-9l-138-108q-44 23-91 38-16 136-29 186-7 28-36 28h-222q-14 0-24.5-8.5t-11.5-21.5l-28-184q-49-16-90-37l-141 107q-10 9-25 9-14 0-25-11-126-114-165-168-7-10-7-23 0-12 8-23 15-21 51-66.5t54-70.5q-27-50-41-99l-183-27q-13-2-21-12.5t-8-23.5v-222q0-12 8-23t19-13l186-28q14-46 39-92-40-57-107-138-10-12-10-24 0-10 9-23 26-36 98.5-107.5t94.5-71.5q13 0 26 10l138 107q44-23 91-38 16-136 29-186 7-28 36-28h222q14 0 24.5 8.5t11.5 21.5l28 184q49 16 90 37l142-107q9-9 24-9 13 0 25 10 129 119 165 170 7 8 7 22 0 12-8 23-15 21-51 66.5t-54 70.5q26 50 41 98l183 28q13 2 21 12.5t8 23.5z" /></svg>
53
+ <div class="extension-info">
54
+ <h3>MB Settings Page</h3>
55
+ <p><?php esc_html_e( 'Create a powerful settings page for your theme, plugin or website.', 'meta-box' ); ?></p>
56
+ </div>
57
+ </div>
58
+ <div class="extension-action">
59
+ <a class="button" target="_blank" href="https://metabox.io/plugins/mb-settings-page/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
60
+ </div>
61
+ </div>
62
+ <div class="extension">
63
+ <div class="extension-inner">
64
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1792 1184v192q0 13-9.5 22.5t-22.5 9.5h-1376v192q0 13-9.5 22.5t-22.5 9.5q-12 0-24-10l-319-320q-9-9-9-22 0-14 9-23l320-320q9-9 23-9 13 0 22.5 9.5t9.5 22.5v192h1376q13 0 22.5 9.5t9.5 22.5zm0-544q0 14-9 23l-320 320q-9 9-23 9-13 0-22.5-9.5t-9.5-22.5v-192h-1376q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1376v-192q0-14 9-23t23-9q12 0 24 10l319 319q9 9 9 23z" /></svg>
65
+ <div class="extension-info">
66
+ <h3>Meta Box Conditional Logic</h3>
67
+ <p><?php esc_html_e( 'Control the visibility of meta boxes and fields or even HTML elements with ease.', 'meta-box' ); ?></p>
68
+ </div>
69
+ </div>
70
+ <div class="extension-action">
71
+ <a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-conditional-logic/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
72
+ </div>
73
+ </div>
74
+ <div class="extension">
75
+ <div class="extension-inner">
76
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1703 478q40 57 18 129l-275 906q-19 64-76.5 107.5t-122.5 43.5h-923q-77 0-148.5-53.5t-99.5-131.5q-24-67-2-127 0-4 3-27t4-37q1-8-3-21.5t-3-19.5q2-11 8-21t16.5-23.5 16.5-23.5q23-38 45-91.5t30-91.5q3-10 .5-30t-.5-28q3-11 17-28t17-23q21-36 42-92t25-90q1-9-2.5-32t.5-28q4-13 22-30.5t22-22.5q19-26 42.5-84.5t27.5-96.5q1-8-3-25.5t-2-26.5q2-8 9-18t18-23 17-21q8-12 16.5-30.5t15-35 16-36 19.5-32 26.5-23.5 36-11.5 47.5 5.5l-1 3q38-9 51-9h761q74 0 114 56t18 130l-274 906q-36 119-71.5 153.5t-128.5 34.5h-869q-27 0-38 15-11 16-1 43 24 70 144 70h923q29 0 56-15.5t35-41.5l300-987q7-22 5-57 38 15 59 43zm-1064 2q-4 13 2 22.5t20 9.5h608q13 0 25.5-9.5t16.5-22.5l21-64q4-13-2-22.5t-20-9.5h-608q-13 0-25.5 9.5t-16.5 22.5zm-83 256q-4 13 2 22.5t20 9.5h608q13 0 25.5-9.5t16.5-22.5l21-64q4-13-2-22.5t-20-9.5h-608q-13 0-25.5 9.5t-16.5 22.5z" /></svg>
77
+ <div class="extension-info">
78
+ <h3>MB Term Meta</h3>
79
+ <p><?php esc_html_e( 'Easily add custom fields to categories, tags or any custom taxonomy.', 'meta-box' ); ?></p>
80
+ </div>
81
+ </div>
82
+ <div class="extension-action">
83
+ <a class="button" target="_blank" href="https://metabox.io/plugins/mb-term-meta/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
84
+ </div>
85
+ </div>
86
+ <div class="extension">
87
+ <div class="extension-inner">
88
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1536 1399q0 109-62.5 187t-150.5 78h-854q-88 0-150.5-78t-62.5-187q0-85 8.5-160.5t31.5-152 58.5-131 94-89 134.5-34.5q131 128 313 128t313-128q76 0 134.5 34.5t94 89 58.5 131 31.5 152 8.5 160.5zm-256-887q0 159-112.5 271.5t-271.5 112.5-271.5-112.5-112.5-271.5 112.5-271.5 271.5-112.5 271.5 112.5 112.5 271.5z" /></svg>
89
+ <div class="extension-info">
90
+ <h3>MB User Meta</h3>
91
+ <p><?php esc_html_e( 'Add custom fields to user profile (user meta) quickly with simple syntax.', 'meta-box' ); ?></p>
92
+ </div>
93
+ </div>
94
+ <div class="extension-action">
95
+ <a class="button" target="_blank" href="https://metabox.io/plugins/mb-user-meta/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
96
+ </div>
97
+ </div>
98
+ <div class="extension">
99
+ <div class="extension-inner">
100
+ <svg viewBox="0 0 2048 1792" xmlns="http://www.w3.org/2000/svg"><path d="M657 896q-162 5-265 128h-134q-82 0-138-40.5t-56-118.5q0-353 124-353 6 0 43.5 21t97.5 42.5 119 21.5q67 0 133-23-5 37-5 66 0 139 81 256zm1071 637q0 120-73 189.5t-194 69.5h-874q-121 0-194-69.5t-73-189.5q0-53 3.5-103.5t14-109 26.5-108.5 43-97.5 62-81 85.5-53.5 111.5-20q10 0 43 21.5t73 48 107 48 135 21.5 135-21.5 107-48 73-48 43-21.5q61 0 111.5 20t85.5 53.5 62 81 43 97.5 26.5 108.5 14 109 3.5 103.5zm-1024-1277q0 106-75 181t-181 75-181-75-75-181 75-181 181-75 181 75 75 181zm704 384q0 159-112.5 271.5t-271.5 112.5-271.5-112.5-112.5-271.5 112.5-271.5 271.5-112.5 271.5 112.5 112.5 271.5zm576 225q0 78-56 118.5t-138 40.5h-134q-103-123-265-128 81-117 81-256 0-29-5-66 66 23 133 23 59 0 119-21.5t97.5-42.5 43.5-21q124 0 124 353zm-128-609q0 106-75 181t-181 75-181-75-75-181 75-181 181-75 181 75 75 181z" /></svg>
101
+ <div class="extension-info">
102
+ <h3>MB User Profile</h3>
103
+ <p><?php esc_html_e( 'Create register, login and edit user profile forms in the frontend. Embed everywhere with shortcodes.', 'meta-box' ); ?></p>
104
+ </div>
105
+ </div>
106
+ <div class="extension-action">
107
+ <a class="button" target="_blank" href="https://metabox.io/plugins/mb-user-profile/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
108
+ </div>
109
+ </div>
110
+ <div class="extension">
111
+ <div class="extension-inner">
112
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M381 1620q0 80-54.5 126t-135.5 46q-106 0-172-66l57-88q49 45 106 45 29 0 50.5-14.5t21.5-42.5q0-64-105-56l-26-56q8-10 32.5-43.5t42.5-54 37-38.5v-1q-16 0-48.5 1t-48.5 1v53h-106v-152h333v88l-95 115q51 12 81 49t30 88zm2-627v159h-362q-6-36-6-54 0-51 23.5-93t56.5-68 66-47.5 56.5-43.5 23.5-45q0-25-14.5-38.5t-39.5-13.5q-46 0-81 58l-85-59q24-51 71.5-79.5t105.5-28.5q73 0 123 41.5t50 112.5q0 50-34 91.5t-75 64.5-75.5 50.5-35.5 52.5h127v-60h105zm1409 319v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-14 9-23t23-9h1216q13 0 22.5 9.5t9.5 22.5zm-1408-899v99h-335v-99h107q0-41 .5-121.5t.5-121.5v-12h-2q-8 17-50 54l-71-76 136-127h106v404h108zm1408 387v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-14 9-23t23-9h1216q13 0 22.5 9.5t9.5 22.5zm0-512v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5z" /></svg>
113
+ <div class="extension-info">
114
+ <h3>MB Frontend Submission</h3>
115
+ <p><?php esc_html_e( 'Create frontend forms for users to submit custom content. Embed everywhere with shortcode.', 'meta-box' ); ?></p>
116
+ </div>
117
+ </div>
118
+ <div class="extension-action">
119
+ <a class="button" target="_blank" href="https://metabox.io/plugins/mb-frontend-submission/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
120
+ </div>
121
+ </div>
122
+ <div class="extension">
123
+ <div class="extension-inner">
124
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1600 1312v-704q0-40-28-68t-68-28h-704q-40 0-68-28t-28-68v-64q0-40-28-68t-68-28h-320q-40 0-68 28t-28 68v960q0 40 28 68t68 28h1216q40 0 68-28t28-68zm128-704v704q0 92-66 158t-158 66h-1216q-92 0-158-66t-66-158v-960q0-92 66-158t158-66h320q92 0 158 66t66 158v32h672q92 0 158 66t66 158z" /></svg>
125
+ <div class="extension-info">
126
+ <h3>Meta Box Tabs</h3>
127
+ <p><?php esc_html_e( 'Add as many custom fields as you want and organize them into tabs.', 'meta-box' ); ?></p>
128
+ </div>
129
+ </div>
130
+ <div class="extension-action">
131
+ <a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-tabs/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
132
+ </div>
133
+ </div>
134
+ <div class="extension">
135
+ <div class="extension-inner">
136
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M576 1376v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm128-320v1088q0 66-47 113t-113 47h-1344q-66 0-113-47t-47-113v-1088q0-66 47-113t113-47h1344q66 0 113 47t47 113z" /></svg>
137
+ <div class="extension-info">
138
+ <h3>MB Custom Table</h3>
139
+ <p><?php esc_html_e( 'Save custom fields data to custom table instead of the default meta tables. Reduce database size and increase performance.', 'meta-box' ); ?></p>
140
+ </div>
141
+ </div>
142
+ <div class="extension-action">
143
+ <a class="button" target="_blank" href="https://metabox.io/plugins/mb-custom-table/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
144
+ </div>
145
+ </div>
146
+ <div class="extension">
147
+ <div class="extension-inner">
148
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M672 1472q0-40-28-68t-68-28-68 28-28 68 28 68 68 28 68-28 28-68zm0-1152q0-40-28-68t-68-28-68 28-28 68 28 68 68 28 68-28 28-68zm640 128q0-40-28-68t-68-28-68 28-28 68 28 68 68 28 68-28 28-68zm96 0q0 52-26 96.5t-70 69.5q-2 287-226 414-67 38-203 81-128 40-169.5 71t-41.5 100v26q44 25 70 69.5t26 96.5q0 80-56 136t-136 56-136-56-56-136q0-52 26-96.5t70-69.5v-820q-44-25-70-69.5t-26-96.5q0-80 56-136t136-56 136 56 56 136q0 52-26 96.5t-70 69.5v497q54-26 154-57 55-17 87.5-29.5t70.5-31 59-39.5 40.5-51 28-69.5 8.5-91.5q-44-25-70-69.5t-26-96.5q0-80 56-136t136-56 136 56 56 136z" /></svg>
149
+ <div class="extension-info">
150
+ <h3>MB Rest API</h3>
151
+ <p><?php esc_html_e( 'Pull all meta value from posts, terms into the WP REST API responses.', 'meta-box' ); ?></p>
152
+ </div>
153
+ </div>
154
+ <div class="extension-action">
155
+ <a class="button" target="_blank" href="https://metabox.io/plugins/mb-rest-api/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
156
+ </div>
157
+ </div>
158
+ <div class="extension">
159
+ <div class="extension-inner">
160
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1792 1184v192q0 13-9.5 22.5t-22.5 9.5h-1376v192q0 13-9.5 22.5t-22.5 9.5q-12 0-24-10l-319-320q-9-9-9-22 0-14 9-23l320-320q9-9 23-9 13 0 22.5 9.5t9.5 22.5v192h1376q13 0 22.5 9.5t9.5 22.5zm0-544q0 14-9 23l-320 320q-9 9-23 9-13 0-22.5-9.5t-9.5-22.5v-192h-1376q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1376v-192q0-14 9-23t23-9q12 0 24 10l319 319q9 9 9 23z" /></svg>
161
+ <div class="extension-info">
162
+ <h3>MB Relationships</h3>
163
+ <p><?php esc_html_e( 'A lightweight WordPress plugin for creating many-to-many relationships between posts, terms and users.', 'meta-box' ); ?></p>
164
+ </div>
165
+ </div>
166
+ <div class="extension-action">
167
+ <a class="button" target="_blank" href="https://metabox.io/plugins/mb-relationships/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
168
+ </div>
169
+ </div>
170
+ <div class="extension">
171
+ <div class="extension-inner">
172
+ <svg viewBox="0 0 2048 1792" xmlns="http://www.w3.org/2000/svg"><path d="M212 768l623 665-300-665h-323zm812 772l349-772h-698zm-486-900l204-384h-262l-288 384h346zm675 793l623-665h-323zm-530-793h682l-204-384h-274zm827 0h346l-288-384h-262zm141-486l384 512q14 18 13 41.5t-17 40.5l-960 1024q-18 20-47 20t-47-20l-960-1024q-16-17-17-40.5t13-41.5l384-512q18-26 51-26h1152q33 0 51 26z" /></svg>
173
+ <div class="extension-info">
174
+ <h3>Meta Box – FacetWP Integrator</h3>
175
+ <p><?php esc_html_e( 'Integrates Meta Box and FacetWP, makes custom fields searchable and filterable in the frontend.', 'meta-box' ); ?></p>
176
+ </div>
177
+ </div>
178
+ <div class="extension-action">
179
+ <a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-facetwp-integrator/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
180
+ </div>
181
+ </div>
182
+ <div class="extension">
183
+ <div class="extension-inner">
184
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1755 453q37 38 37 90.5t-37 90.5l-401 400 150 150-160 160q-163 163-389.5 186.5t-411.5-100.5l-362 362h-181v-181l362-362q-124-185-100.5-411.5t186.5-389.5l160-160 150 150 400-401q38-37 91-37t90 37 37 90.5-37 90.5l-400 401 234 234 401-400q38-37 91-37t90 37z" /></svg>
185
+ <div class="extension-info">
186
+ <h3>Meta Box – Beaver Themer Integrator</h3>
187
+ <p><?php esc_html_e( 'Select and show custom fields created by the Meta Box plugin in the Beaver Themer field connection.', 'meta-box' ); ?></p>
188
+ </div>
189
+ </div>
190
+ <div class="extension-action">
191
+ <a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-beaver-themer-integrator/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
192
+ </div>
193
+ </div>
194
+ <div class="extension">
195
+ <div class="extension-inner">
196
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1792 896q0 174-120 321.5t-326 233-450 85.5q-70 0-145-8-198 175-460 242-49 14-114 22-17 2-30.5-9t-17.5-29v-1q-3-4-.5-12t2-10 4.5-9.5l6-9 7-8.5 8-9q7-8 31-34.5t34.5-38 31-39.5 32.5-51 27-59 26-76q-157-89-247.5-220t-90.5-281q0-130 71-248.5t191-204.5 286-136.5 348-50.5q244 0 450 85.5t326 233 120 321.5z" /></svg>
197
+ <div class="extension-info">
198
+ <h3>MB Comment Meta</h3>
199
+ <p><?php esc_html_e( 'Add custom fields to comments in WordPress. Support all field types and options.', 'meta-box' ); ?></p>
200
+ </div>
201
+ </div>
202
+ <div class="extension-action">
203
+ <a class="button" target="_blank" href="https://metabox.io/plugins/mb-comment-meta/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
204
+ </div>
205
+ </div>
206
+ <div class="extension">
207
+ <div class="extension-inner">
208
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1664 256v448q0 26-19 45t-45 19h-448q-42 0-59-40-17-39 14-69l138-138q-148-137-349-137-104 0-198.5 40.5t-163.5 109.5-109.5 163.5-40.5 198.5 40.5 198.5 109.5 163.5 163.5 109.5 198.5 40.5q119 0 225-52t179-147q7-10 23-12 15 0 25 9l137 138q9 8 9.5 20.5t-7.5 22.5q-109 132-264 204.5t-327 72.5q-156 0-298-61t-245-164-164-245-61-298 61-298 164-245 245-164 298-61q147 0 284.5 55.5t244.5 156.5l130-129q29-31 70-14 39 17 39 59z" /></svg>
209
+ <div class="extension-info">
210
+ <h3>MB Revision</h3>
211
+ <p><?php esc_html_e( 'Track changes of custom fields with WordPress revision. Save, compare, restore the changes easily.', 'meta-box' ); ?></p>
212
+ </div>
213
+ </div>
214
+ <div class="extension-action">
215
+ <a class="button" target="_blank" href="https://metabox.io/plugins/mb-revision/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
216
+ </div>
217
+ </div>
218
+ <div class="extension">
219
+ <div class="extension-inner">
220
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1593 349l-640 1280q-17 35-57 35-5 0-15-2-22-5-35.5-22.5t-13.5-39.5v-576h-576q-22 0-39.5-13.5t-22.5-35.5 4-42 29-30l1280-640q13-7 29-7 27 0 45 19 15 14 18.5 34.5t-6.5 39.5z" /></svg>
221
+ <div class="extension-info">
222
+ <h3>Meta Box Geolocation</h3>
223
+ <p><?php esc_html_e( 'Automatically and instantly populate location data with the power of Google Maps Geolocation API.', 'meta-box' ); ?></p>
224
+ </div>
225
+ </div>
226
+ <div class="extension-action">
227
+ <a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-geolocation/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
228
+ </div>
229
+ </div>
230
+ <div class="extension">
231
+ <div class="extension-inner">
232
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M576 1376v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm128-320v1088q0 66-47 113t-113 47h-1344q-66 0-113-47t-47-113v-1088q0-66 47-113t113-47h1344q66 0 113 47t47 113z" /></svg>
233
+ <div class="extension-info">
234
+ <h3>MB Admin Columns</h3>
235
+ <p><?php esc_html_e( 'Display custom fields in table columns in admin screens for All Posts (types).', 'meta-box' ); ?></p>
236
+ </div>
237
+ </div>
238
+ <div class="extension-action">
239
+ <a class="button" target="_blank" href="https://metabox.io/plugins/mb-admin-columns/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
240
+ </div>
241
+ </div>
242
+ <div class="extension">
243
+ <div class="extension-inner">
244
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M888 1184l116-116-152-152-116 116v56h96v96h56zm440-720q-16-16-33 1l-350 350q-17 17-1 33t33-1l350-350q17-17 1-33zm80 594v190q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q63 0 117 25 15 7 18 23 3 17-9 29l-49 49q-14 14-32 8-23-6-45-6h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113v-126q0-13 9-22l64-64q15-15 35-7t20 29zm-96-738l288 288-672 672h-288v-288zm444 132l-92 92-288-288 92-92q28-28 68-28t68 28l152 152q28 28 28 68t-28 68z" /></svg>
245
+ <div class="extension-info">
246
+ <h3>Meta Box for Yoast SEO</h3>
247
+ <p><?php esc_html_e( 'Add content of custom fields to Yoast SEO Content Analysis to have better/correct SEO score.', 'meta-box' ); ?></p>
248
+ </div>
249
+ </div>
250
+ <div class="extension-action">
251
+ <a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-yoast-seo/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
252
+ </div>
253
+ </div>
254
+ <div class="extension">
255
+ <div class="extension-inner">
256
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z" /></svg>
257
+ <div class="extension-info">
258
+ <h3>Meta Box Text Limiter</h3>
259
+ <p><?php esc_html_e( 'Limit the number of characters or words entered for text and textarea fields.', 'meta-box' ); ?></p>
260
+ </div>
261
+ </div>
262
+ <div class="extension-action">
263
+ <a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-text-limiter/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
264
+ </div>
265
+ </div>
266
+ <div class="extension">
267
+ <div class="extension-inner">
268
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1639 1056q0 5-1 7-64 268-268 434.5t-478 166.5q-146 0-282.5-55t-243.5-157l-129 129q-19 19-45 19t-45-19-19-45v-448q0-26 19-45t45-19h448q26 0 45 19t19 45-19 45l-137 137q71 66 161 102t187 36q134 0 250-65t186-179q11-17 53-117 8-23 30-23h192q13 0 22.5 9.5t9.5 22.5zm25-800v448q0 26-19 45t-45 19h-448q-26 0-45-19t-19-45 19-45l138-138q-148-137-349-137-134 0-250 65t-186 179q-11 17-53 117-8 23-30 23h-199q-13 0-22.5-9.5t-9.5-22.5v-7q65-268 270-434.5t480-166.5q146 0 284 55.5t245 156.5l130-129q19-19 45-19t45 19 19 45z" /></svg>
269
+ <div class="extension-info">
270
+ <h3>Meta Box Updater</h3>
271
+ <p><?php esc_html_e( 'Automatically updates all Meta Box extensions within the WordPress Admin area.', 'meta-box' ); ?></p>
272
+ </div>
273
+ </div>
274
+ <div class="extension-action">
275
+ <a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-updater/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
276
+ </div>
277
+ </div>
278
+ <div class="extension">
279
+ <div class="extension-inner">
280
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1596 476q14 14 28 36h-472v-472q22 14 36 28zm-476 164h544v1056q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1600q0-40 28-68t68-28h800v544q0 40 28 68t68 28zm160 736v-64q0-14-9-23t-23-9h-704q-14 0-23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23-9t9-23zm0-256v-64q0-14-9-23t-23-9h-704q-14 0-23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23-9t9-23zm0-256v-64q0-14-9-23t-23-9h-704q-14 0-23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23-9t9-23z" /></svg>
281
+ <div class="extension-info">
282
+ <h3>Meta Box Template</h3>
283
+ <p><?php esc_html_e( 'Define custom meta boxes and custom fields easier with templates.', 'meta-box' ); ?></p>
284
+ </div>
285
+ </div>
286
+ <div class="extension-action">
287
+ <a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-template/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
288
+ </div>
289
+ </div>
290
+ <div class="extension">
291
+ <div class="extension-inner">
292
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1152 1376v-160q0-14-9-23t-23-9h-96v-512q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v160q0 14 9 23t23 9h96v320h-96q-14 0-23 9t-9 23v160q0 14 9 23t23 9h448q14 0 23-9t9-23zm-128-896v-160q0-14-9-23t-23-9h-192q-14 0-23 9t-9 23v160q0 14 9 23t23 9h192q14 0 23-9t9-23zm640 416q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z" /></svg>
293
+ <div class="extension-info">
294
+ <h3>Meta Box Tooltip</h3>
295
+ <p><?php esc_html_e( 'Display help information for fields using beautiful tooltips.', 'meta-box' ); ?></p>
296
+ </div>
297
+ </div>
298
+ <div class="extension-action">
299
+ <a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-tooltip/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
300
+ </div>
301
+ </div>
302
+ <div class="extension">
303
+ <div class="extension-inner">
304
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1664 960q-152-236-381-353 61 104 61 225 0 185-131.5 316.5t-316.5 131.5-316.5-131.5-131.5-316.5q0-121 61-225-229 117-381 353 133 205 333.5 326.5t434.5 121.5 434.5-121.5 333.5-326.5zm-720-384q0-20-14-34t-34-14q-125 0-214.5 89.5t-89.5 214.5q0 20 14 34t34 14 34-14 14-34q0-86 61-147t147-61q20 0 34-14t14-34zm848 384q0 34-20 69-140 230-376.5 368.5t-499.5 138.5-499.5-139-376.5-368q-20-35-20-69t20-69q140-229 376.5-368t499.5-139 499.5 139 376.5 368q20 35 20 69z" /></svg>
305
+ <div class="extension-info">
306
+ <h3>Meta Box Show Hide</h3>
307
+ <p><?php esc_html_e( 'Toggle meta boxes by page template, post format or taxonomy using JS.', 'meta-box' ); ?></p>
308
+ </div>
309
+ </div>
310
+ <div class="extension-action">
311
+ <a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-show-hide/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
312
+ </div>
313
+ </div>
314
+ <div class="extension">
315
+ <div class="extension-inner">
316
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M224 1536h608v-1152h-640v1120q0 13 9.5 22.5t22.5 9.5zm1376-32v-1120h-640v1152h608q13 0 22.5-9.5t9.5-22.5zm128-1216v1216q0 66-47 113t-113 47h-1344q-66 0-113-47t-47-113v-1216q0-66 47-113t113-47h1344q66 0 113 47t47 113z" /></svg>
317
+ <div class="extension-info">
318
+ <h3>Meta Box Columns</h3>
319
+ <p><?php esc_html_e( 'Display fields more beautiful by putting them into 12-columns grid.', 'meta-box' ); ?></p>
320
+ </div>
321
+ </div>
322
+ <div class="extension-action">
323
+ <a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-columns/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
324
+ </div>
325
+ </div>
326
+ <div class="extension">
327
+ <div class="extension-inner">
328
+ <svg viewBox="0 0 2048 1792" xmlns="http://www.w3.org/2000/svg"><path d="M681 1399l-50 50q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l466-466q10-10 23-10t23 10l50 50q10 10 10 23t-10 23l-393 393 393 393q10 10 10 23t-10 23zm591-1067l-373 1291q-4 13-15.5 19.5t-23.5 2.5l-62-17q-13-4-19.5-15.5t-2.5-24.5l373-1291q4-13 15.5-19.5t23.5-2.5l62 17q13 4 19.5 15.5t2.5 24.5zm657 651l-466 466q-10 10-23 10t-23-10l-50-50q-10-10-10-23t10-23l393-393-393-393q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l466 466q10 10 10 23t-10 23z" /></svg>
329
+ <div class="extension-info">
330
+ <h3>Meta Box Include Exclude</h3>
331
+ <p><?php esc_html_e( 'Show or hide meta boxes whenever and for whomever you choose.', 'meta-box' ); ?></p>
332
+ </div>
333
+ </div>
334
+ <div class="extension-action">
335
+ <a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-include-exclude/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
336
+ </div>
337
+ </div>
338
+ <div class="extension">
339
+ <div class="extension-inner">
340
+ <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M384 1184v64q0 13-9.5 22.5t-22.5 9.5h-64q-13 0-22.5-9.5t-9.5-22.5v-64q0-13 9.5-22.5t22.5-9.5h64q13 0 22.5 9.5t9.5 22.5zm0-256v64q0 13-9.5 22.5t-22.5 9.5h-64q-13 0-22.5-9.5t-9.5-22.5v-64q0-13 9.5-22.5t22.5-9.5h64q13 0 22.5 9.5t9.5 22.5zm0-256v64q0 13-9.5 22.5t-22.5 9.5h-64q-13 0-22.5-9.5t-9.5-22.5v-64q0-13 9.5-22.5t22.5-9.5h64q13 0 22.5 9.5t9.5 22.5zm1152 512v64q0 13-9.5 22.5t-22.5 9.5h-960q-13 0-22.5-9.5t-9.5-22.5v-64q0-13 9.5-22.5t22.5-9.5h960q13 0 22.5 9.5t9.5 22.5zm0-256v64q0 13-9.5 22.5t-22.5 9.5h-960q-13 0-22.5-9.5t-9.5-22.5v-64q0-13 9.5-22.5t22.5-9.5h960q13 0 22.5 9.5t9.5 22.5zm0-256v64q0 13-9.5 22.5t-22.5 9.5h-960q-13 0-22.5-9.5t-9.5-22.5v-64q0-13 9.5-22.5t22.5-9.5h960q13 0 22.5 9.5t9.5 22.5zm128 704v-832q0-13-9.5-22.5t-22.5-9.5h-1472q-13 0-22.5 9.5t-9.5 22.5v832q0 13 9.5 22.5t22.5 9.5h1472q13 0 22.5-9.5t9.5-22.5zm128-1088v1088q0 66-47 113t-113 47h-1472q-66 0-113-47t-47-113v-1088q0-66 47-113t113-47h1472q66 0 113 47t47 113z" /></svg>
341
+ <div class="extension-info">
342
+ <h3>MB Custom Taxonomy</h3>
343
+ <p><?php esc_html_e( 'Create and manage custom taxonomies with an easy-to-use interface in WordPress.', 'meta-box' ); ?></p>
344
+ </div>
345
+ </div>
346
+ <div class="extension-action">
347
+ <a class="button" target="_blank" href="https://metabox.io/plugins/custom-taxonomy/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
348
+ </div>
349
+ </div>
350
+ </div>
351
+ </div>
inc/libraries/meta-box/inc/about/sections/getting-started.php CHANGED
@@ -2,40 +2,35 @@
2
  /**
3
  * Getting started section.
4
  *
5
- * @package Meta Box
6
- * @subpackage MB Custom Post Type
7
  */
8
 
9
  ?>
10
  <div id="getting-started" class="gt-tab-pane gt-is-active">
11
  <div class="feature-section two-col">
12
  <div class="col">
13
- <h3><?php esc_html_e( 'Getting Started With Online Generator', 'learnpress' ); ?></h3>
14
- <p><?php esc_html_e( 'The fastest way to getting started with Meta Box is use our online generator to generate meta boxes with custom fields. It provides a friendly UI for you to create meta boxes and custom fields just by drag and drop fields.', 'learnpress' ); ?><p>
15
 
16
- <a class="screenshot" href="https://metabox.io/online-generator/?utm_source=plugin_about_page&utm_medium=link_generator&utm_campaign=meta_box_about_page" target="_blank"><img src="<?php echo esc_url( RWMB_URL . 'inc/about/images/online-generator.png' ); ?>" alt="<?php esc_attr_e( 'online generator', 'learnpress' ); ?>"></a>
17
 
18
- <p><a href="<?php echo esc_url( 'https://metabox.io/online-generator/?utm_source=plugin_about_page&utm_medium=button_generator&utm_campaign=meta_box_about_page' ); ?>" class="button button-primary"><?php esc_html_e( 'Go to Online Generator', 'learnpress' ); ?></a></p>
19
  </div>
20
 
21
  <div class="col">
22
- <h3><?php esc_html_e( 'Understand The Basics', 'learnpress' ); ?></h3>
23
- <p><?php esc_html_e( 'Meta Box doesn\'t have any admin page for configuration or settings. Instead of that, it provides a very powerful API to speed up the process of creating meta boxes and custom fields. It might take you a little time at first, but then you\'ll love the way it work because it helps you do and customize almost everything.', 'learnpress' ); ?><p>
24
- <p><a href="<?php echo esc_url( 'https://docs.metabox.io/quick-start/?utm_source=plugin_about_page&utm_medium=button_docs&utm_campaign=meta_box_about_page' ); ?>" class="button button-primary"><?php esc_html_e( 'Learn More', 'learnpress' ); ?></a></p>
25
 
26
- <h3><?php esc_html_e( 'Extensions', 'learnpress' ); ?></h3>
27
- <p><?php esc_html_e( 'Wanna see more features that transform your WordPress website into a powerful CMS? Check out some extensions below:', 'learnpress' ); ?><p>
28
  <ul>
29
- <li><a target="_blank" href="https://metabox.io/plugins/meta-box-group/?utm_source=plugin_about_page&utm_medium=link_group&utm_campaign=meta_box_about_page"><span class="dashicons dashicons-welcome-widgets-menus"></span> <?php esc_html_e( 'Meta Box Group', 'learnpress' ); ?></a></li>
30
- <li><a target="_blank" href="https://metabox.io/plugins/meta-box-conditional-logic/?utm_source=plugin_about_page&utm_medium=link_conditional&utm_campaign=meta_box_about_page"><span class="dashicons dashicons-yes"></span> <?php esc_html_e( 'Meta Box Conditional Logic', 'learnpress' ); ?></a></li>
31
- <li><a target="_blank" href="https://metabox.io/plugins/mb-settings-page/?utm_source=plugin_about_page&utm_medium=link_settings&utm_campaign=meta_box_about_page"><span class="dashicons dashicons-admin-generic"></span> <?php esc_html_e( 'MB Settings Page', 'learnpress' ); ?></a></li>
32
- <li><a target="_blank" href="https://metabox.io/plugins/mb-term-meta/?utm_source=plugin_about_page&utm_medium=link_term&utm_campaign=meta_box_about_page"><span class="dashicons dashicons-image-filter"></span> <?php esc_html_e( 'MB Term Meta', 'learnpress' ); ?></a></li>
33
  </ul>
34
- <p><a target="_blank" class="button button-primary" href="https://metabox.io/plugins/?utm_source=plugin_about_page&utm_medium=button_extensions&utm_campaign=meta_box_about_page"><?php esc_html_e( 'More Extensions', 'learnpress' ); ?></a>
35
  </div>
36
  </div>
37
- <hr>
38
- <div class="return-to-dashboard">
39
- <a href="https://metabox.io/plugins/?utm_source=plugin_about_page&utm_medium=link_home&utm_campaign=meta_box_about_page"><?php esc_html_e( 'Go to MetaBox.IO &rarr;', 'learnpress' ); ?></a>
40
- </div>
41
  </div>
2
  /**
3
  * Getting started section.
4
  *
5
+ * @package Meta Box
 
6
  */
7
 
8
  ?>
9
  <div id="getting-started" class="gt-tab-pane gt-is-active">
10
  <div class="feature-section two-col">
11
  <div class="col">
12
+ <h3><?php esc_html_e( 'Getting Started With Online Generator', 'meta-box' ); ?></h3>
13
+ <p><?php esc_html_e( 'The fastest way to getting started with Meta Box is use our online generator to generate meta boxes with custom fields. It provides a friendly UI for you to create meta boxes and custom fields just by drag and drop fields.', 'meta-box' ); ?><p>
14
 
15
+ <a target="_blank" class="screenshot" href="https://metabox.io/online-generator/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><img src="<?php echo esc_url( RWMB_URL . 'inc/about/images/online-generator.png' ); ?>" alt="<?php esc_attr_e( 'online generator', 'meta-box' ); ?>"></a>
16
 
17
+ <p><a class="button" target="_blank" href="<?php echo esc_url( 'https://metabox.io/online-generator/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin' ); ?>"><?php esc_html_e( 'Go to Online Generator', 'meta-box' ); ?></a></p>
18
  </div>
19
 
20
  <div class="col">
21
+ <h3><?php esc_html_e( 'Understand The Basics', 'meta-box' ); ?></h3>
22
+ <p><?php esc_html_e( 'Meta Box doesn\'t have any admin page for configuration or settings. Instead of that, it provides a very powerful API to speed up the process of creating meta boxes and custom fields. It might take you a little time at first, but then you\'ll love the way it work because it helps you do and customize almost everything.', 'meta-box' ); ?><p>
23
+ <p><a class="button" target="_blank" href="<?php echo esc_url( 'https://docs.metabox.io/quick-start/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin' ); ?>"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a></p>
24
 
25
+ <h3><?php esc_html_e( 'Extensions', 'meta-box' ); ?></h3>
26
+ <p><?php esc_html_e( 'Wanna see more features that transform your WordPress website into a powerful CMS? Check out some extensions below:', 'meta-box' ); ?><p>
27
  <ul>
28
+ <li><a target="_blank" href="https://metabox.io/plugins/meta-box-group/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><span class="dashicons dashicons-welcome-widgets-menus"></span> <?php esc_html_e( 'Meta Box Group', 'meta-box' ); ?></a></li>
29
+ <li><a target="_blank" href="https://metabox.io/plugins/meta-box-conditional-logic/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><span class="dashicons dashicons-yes"></span> <?php esc_html_e( 'Meta Box Conditional Logic', 'meta-box' ); ?></a></li>
30
+ <li><a target="_blank" href="https://metabox.io/plugins/mb-settings-page/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><span class="dashicons dashicons-admin-generic"></span> <?php esc_html_e( 'MB Settings Page', 'meta-box' ); ?></a></li>
31
+ <li><a target="_blank" href="https://metabox.io/plugins/mb-term-meta/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><span class="dashicons dashicons-image-filter"></span> <?php esc_html_e( 'MB Term Meta', 'meta-box' ); ?></a></li>
32
  </ul>
33
+ <p><a class="button" target="_blank" href="https://metabox.io/plugins/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'More Extensions', 'meta-box' ); ?></a>
34
  </div>
35
  </div>
 
 
 
 
36
  </div>
inc/libraries/meta-box/inc/about/sections/newsletter.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Newsletter form
4
+ *
5
+ * @package Meta Box
6
+ */
7
+
8
+ ?>
9
+
10
+ <form method="post" action="https://app.zetamail.vn/form.php?form=77" target="_blank" class="newsletter">
11
+ <h3><span class="dashicons dashicons-email-alt"></span> <?php esc_html_e( 'Meta Box Newsletter', 'meta-box' ); ?></h3>
12
+ <input name="format" value="h" type="hidden">
13
+ <p><?php esc_html_e( 'Want to learn how to use Meta Box to its full potential? Sign up to get valuable tips and resources. We will never spam you.', 'meta-box' ); ?></p>
14
+ <input name="email" value="" placeholder="joe@gmail.com" required type="email">
15
+ <button class="button button-primary"><?php esc_html_e( 'Subscribe', 'meta-box' ); ?></button>
16
+ </form>
inc/libraries/meta-box/inc/about/sections/support.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Support section.
4
+ *
5
+ * @package Meta Box
6
+ */
7
+
8
+ ?>
9
+ <div id="support" class="gt-tab-pane">
10
+ <p class="about-description">
11
+ <?php
12
+ $allowed_html = array(
13
+ 'a' => array(
14
+ 'href' => array(),
15
+ ),
16
+ );
17
+ // Translators: %s - link to documentation.
18
+ echo wp_kses( sprintf( __( 'Still need help with Meta Box? We offer excellent support for you. But don\'t forget to check our <a href="%s">documentation</a> first.', 'meta-box' ), 'https://docs.metabox.io?utm_source=WordPress&utm_medium=link&utm_campaign=plugin' ), $allowed_html );
19
+ ?>
20
+ </p>
21
+ <div class="feature-section two-col">
22
+ <div class="col">
23
+ <h3><?php esc_html_e( 'Free Support', 'meta-box' ); ?></h3>
24
+ <p><?php esc_html_e( 'If you have any question about how to use the plugin, please open a new topic on WordPress.org support forum or open a new issue on Github (preferable). We will try to answer as soon as we can.', 'meta-box' ); ?><p>
25
+ <p><a class="button" target="_blank" href="https://github.com/wpmetabox/meta-box/issues"><?php esc_html_e( 'Go to Github', 'meta-box' ); ?> &rarr;</a></p>
26
+ <p><a class="button" target="_blank" href="https://wordpress.org/support/plugin/meta-box"><?php esc_html_e( 'Go to WordPress.org', 'meta-box' ); ?> &rarr;</a></p>
27
+ </div>
28
+
29
+ <div class="col">
30
+ <h3><?php esc_html_e( 'Premium Support', 'meta-box' ); ?></h3>
31
+ <p><?php esc_html_e( 'For users that have bought premium extensions, the support is provided in the Meta Box Support forum. Any question will be answered with technical details within 24 hours.', 'meta-box' ); ?><p>
32
+ <p><a class="button" target="_blank" href="https://metabox.io/support/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Go to support forum', 'meta-box' ); ?> &rarr;</a></p>
33
+ </div>
34
+ </div>
35
+ </div>
inc/libraries/meta-box/inc/about/sections/tabs.php CHANGED
@@ -2,11 +2,13 @@
2
  /**
3
  * Tabs navigation.
4
  *
5
- * @package Meta Box
6
- * @subpackage MB Custom Post Type
7
  */
8
 
9
  ?>
10
  <h2 class="nav-tab-wrapper">
11
- <a href="#getting-started" class="nav-tab nav-tab-active"><?php esc_html_e( 'Getting Started', 'learnpress' ); ?></a>
 
 
 
12
  </h2>
2
  /**
3
  * Tabs navigation.
4
  *
5
+ * @package Meta Box
 
6
  */
7
 
8
  ?>
9
  <h2 class="nav-tab-wrapper">
10
+ <a href="#getting-started" class="nav-tab nav-tab-active"><?php esc_html_e( 'Getting Started', 'meta-box' ); ?></a>
11
+ <?php do_action( 'rwmb_about_tabs' ); ?>
12
+ <a href="#extensions" class="nav-tab"><?php esc_html_e( 'Extensions', 'meta-box' ); ?></a>
13
+ <a href="#support" class="nav-tab"><?php esc_html_e( 'Support', 'meta-box' ); ?></a>
14
  </h2>
inc/libraries/meta-box/inc/about/sections/upgrade.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Upgrade notice
4
+ *
5
+ * @package Meta Box
6
+ */
7
+
8
+ ?>
9
+ <div class="upgrade">
10
+ <h3><span class="dashicons dashicons-awards"></span> <?php esc_html_e( 'Upgrade to Meta Box PRO', 'meta-box' ); ?></h3>
11
+ <p><?php esc_html_e( 'Please upgrade to the PRO plan to unlock more awesome features.', 'meta-box' ); ?></p>
12
+ <ul>
13
+ <li><svg class="icon"><use xlink:href="#checkmark-outline"></use></svg><?php esc_html_e( 'Create custom fields with drag-n-drop interface - no coding knowledge required!', 'meta-box' ); ?></li>
14
+ <li><svg class="icon"><use xlink:href="#checkmark-outline"></use></svg><?php esc_html_e( 'Add custom fields to taxonomies or user profile.', 'meta-box' ); ?></li>
15
+ <li><svg class="icon"><use xlink:href="#checkmark-outline"></use></svg><?php esc_html_e( 'Create custom settings pages.', 'meta-box' ); ?></li>
16
+ <li><svg class="icon"><use xlink:href="#checkmark-outline"></use></svg><?php esc_html_e( 'Create frontend submission forms.', 'meta-box' ); ?></li>
17
+ <li><svg class="icon"><use xlink:href="#checkmark-outline"></use></svg><?php esc_html_e( 'Save custom fields in custom tables.', 'meta-box' ); ?></li>
18
+ <li><svg class="icon"><use xlink:href="#checkmark-outline"></use></svg><?php esc_html_e( 'And much more!', 'meta-box' ); ?></li>
19
+ </ul>
20
+ <a class="button button-primary" target="_blank" href="https://metabox.io/pricing/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Get Meta Box PRO now', 'meta-box' ); ?></a>
21
+ </div>
22
+ <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
23
+ <symbol id="checkmark-outline" viewBox="0 0 20 20">
24
+ <path d="M2.93 17.07A10 10 0 1 1 17.07 2.93 10 10 0 0 1 2.93 17.07zm12.73-1.41A8 8 0 1 0 4.34 4.34a8 8 0 0 0 11.32 11.32zM6.7 9.29L9 11.6l4.3-4.3 1.4 1.42L9 14.4l-3.7-3.7 1.4-1.42z"/>
25
+ </symbol>
26
+ </svg>
inc/libraries/meta-box/inc/about/sections/welcome.php CHANGED
@@ -9,9 +9,16 @@
9
  ?>
10
  <h1>
11
  <?php
12
- // Translators: %1$s - Plugin name, %2$s - Plugin version.
13
- echo esc_html( sprintf( __( 'Welcome to %1$s %2$s', 'learnpress' ), $this->plugin['Name'], $this->plugin['Version'] ) );
14
  ?>
15
  </h1>
16
- <div class="about-text"><?php esc_html_e( 'This plugin is a lightweight and powerful toolkit that helps you to create custom meta boxes and custom fields in WordPress fast and easy. Follow the instruction below to get started.', 'learnpress' ); ?></div>
17
- <a target="_blank" href="<?php echo esc_url( 'https://metabox.io/?utm_source=plugin_about_page&utm_medium=badge_link&utm_campaign=meta_box_about' ); ?>" class="wp-badge"><?php echo esc_html( $this->plugin['Name'] ); ?></a>
 
 
 
 
 
 
 
9
  ?>
10
  <h1>
11
  <?php
12
+ // Translators: %s - Plugin name.
13
+ echo esc_html( sprintf( __( 'Welcome to %s', 'meta-box' ), $this->plugin['Name'] ) );
14
  ?>
15
  </h1>
16
+ <div class="about-text"><?php esc_html_e( 'Meta Box is a free Gutenberg and GDPR-compatible WordPress custom fields plugin and framework that makes quick work of customizing a website with—you guessed it—meta boxes and custom fields in WordPress. Follow the instruction below to get started!', 'meta-box' ); ?></div>
17
+ <a target="_blank" class="wp-badge" href="<?php echo esc_url( 'https://metabox.io/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin' ); ?>"><?php echo esc_html( $this->plugin['Name'] ); ?></a>
18
+ <p class="about-buttons">
19
+ <a target="_blank" class="button" href="<?php echo esc_url( 'https://docs.metabox.io?utm_source=WordPress&utm_medium=link&utm_campaign=plugin' ); ?>"><?php esc_html_e( 'Documentation', 'meta-box' ); ?></a>
20
+ <a target="_blank" class="button" href="<?php echo esc_url( 'https://metabox.io/plugins/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin' ); ?>"><?php esc_html_e( 'Extensions', 'meta-box' ); ?></a>
21
+ <a target="_blank" class="button" href="<?php echo esc_url( 'https://metabox.io/support/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin' ); ?>"><?php esc_html_e( 'Support', 'meta-box' ); ?></a>
22
+ <a target="_blank" class="button" href="https://www.facebook.com/sharer/sharer.php?u=https%3A//metabox.io"><span class="dashicons dashicons-facebook-alt"></span> Share</a>
23
+ <a target="_blank" class="button" href="https://twitter.com/home?status=Reduce%20your%20dev%20time!%20Meta%20Box%20is%20the%20most%20powerful%20custom%20fields%20plugin%20for%20WordPress%20on%20the%20web%20https%3A//metabox.io%20via%20%40wpmetabox"><span class="dashicons dashicons-twitter"></span> Tweet</a>
24
+ </p>
inc/libraries/meta-box/inc/clone.php CHANGED
@@ -49,14 +49,14 @@ class RWMB_Clone {
49
  $class = "rwmb-clone rwmb-{$field['type']}-clone";
50
  $sort_icon = '';
51
  if ( $field['sort_clone'] ) {
52
- $class .= ' rwmb-sort-clone';
53
  $sort_icon = "<a href='javascript:;' class='rwmb-clone-icon'></a>";
54
  }
55
  $input_html = "<div class='$class'>" . $sort_icon;
56
 
57
  // Call separated methods for displaying each type of field.
58
  $input_html .= RWMB_Field::call( $sub_field, 'html', $sub_meta );
59
- $input_html = RWMB_Field::filter( 'html', $input_html, $sub_field, $sub_meta );
60
 
61
  // Remove clone button.
62
  $input_html .= self::remove_clone_button( $sub_field );
@@ -88,8 +88,8 @@ class RWMB_Clone {
88
  }
89
 
90
  foreach ( $new as $key => $value ) {
91
- $old_value = isset( $old[ $key ] ) ? $old[ $key ] : null;
92
- $value = RWMB_Field::call( $field, 'value', $value, $old_value, $post_id );
93
  $new[ $key ] = RWMB_Field::filter( 'sanitize', $value, $field );
94
  }
95
 
49
  $class = "rwmb-clone rwmb-{$field['type']}-clone";
50
  $sort_icon = '';
51
  if ( $field['sort_clone'] ) {
52
+ $class .= ' rwmb-sort-clone';
53
  $sort_icon = "<a href='javascript:;' class='rwmb-clone-icon'></a>";
54
  }
55
  $input_html = "<div class='$class'>" . $sort_icon;
56
 
57
  // Call separated methods for displaying each type of field.
58
  $input_html .= RWMB_Field::call( $sub_field, 'html', $sub_meta );
59
+ $input_html = RWMB_Field::filter( 'html', $input_html, $sub_field, $sub_meta );
60
 
61
  // Remove clone button.
62
  $input_html .= self::remove_clone_button( $sub_field );
88
  }
89
 
90
  foreach ( $new as $key => $value ) {
91
+ $old_value = isset( $old[ $key ] ) ? $old[ $key ] : null;
92
+ $value = RWMB_Field::call( $field, 'value', $value, $old_value, $post_id );
93
  $new[ $key ] = RWMB_Field::filter( 'sanitize', $value, $field );
94
  }
95
 
inc/libraries/meta-box/inc/core.php CHANGED
@@ -17,7 +17,7 @@ class RWMB_Core {
17
  public function init() {
18
  load_plugin_textdomain( 'meta-box', false, plugin_basename( RWMB_DIR ) . '/languages/' );
19
 
20
- add_filter( 'plugin_action_links_meta-box/meta-box.php', array( $this, 'plugin_links' ) );
21
 
22
  // Uses priority 20 to support custom port types registered using the default priority.
23
  add_action( 'init', array( $this, 'register_meta_boxes' ), 20 );
@@ -35,8 +35,8 @@ class RWMB_Core {
35
  * @return array
36
  */
37
  public function plugin_links( $links ) {
38
- $links[] = '<a href="https://docs.metabox.io">' . esc_html__( 'Documentation', 'learnpress' ) . '</a>';
39
- $links[] = '<a href="https://metabox.io/plugins/">' . esc_html__( 'Extensions', 'learnpress' ) . '</a>';
40
  return $links;
41
  }
42
 
17
  public function init() {
18
  load_plugin_textdomain( 'meta-box', false, plugin_basename( RWMB_DIR ) . '/languages/' );
19
 
20
+ add_filter( 'plugin_action_links_meta-box/meta-box.php', array( $this, 'plugin_links' ), 20 );
21
 
22
  // Uses priority 20 to support custom port types registered using the default priority.
23
  add_action( 'init', array( $this, 'register_meta_boxes' ), 20 );
35
  * @return array
36
  */
37
  public function plugin_links( $links ) {
38
+ $links[] = '<a href="https://docs.metabox.io">' . esc_html__( 'Documentation', 'meta-box' ) . '</a>';
39
+ $links[] = '<a href="https://metabox.io/plugins/" style="color: #39b54a; font-weight: bold">' . esc_html__( 'Extensions', 'meta-box' ) . '</a>';
40
  return $links;
41
  }
42
 
inc/libraries/meta-box/inc/field.php CHANGED
@@ -184,10 +184,10 @@ abstract class RWMB_Field {
184
  return '';
185
  }
186
 
187
- if ( isset( $args['object_type'] ) ) {
188
- $storage = rwmb_get_storage( $args['object_type'] );
189
- } elseif ( isset( $field['storage'] ) ) {
190
  $storage = $field['storage'];
 
 
191
  } else {
192
  $storage = rwmb_get_storage( 'post' );
193
  }
@@ -196,6 +196,10 @@ abstract class RWMB_Field {
196
  $args['single'] = $field['clone'] || ! $field['multiple'];
197
  }
198
 
 
 
 
 
199
  return $storage->get( $object_id, $field['id'], $args );
200
  }
201
 
@@ -286,10 +290,10 @@ abstract class RWMB_Field {
286
  * @param array $field The field parameters.
287
  */
288
  public static function save( $new, $old, $post_id, $field ) {
289
- if ( empty( $field['id'] ) ) {
290
  return;
291
  }
292
- $name = $field['id'];
293
  $storage = $field['storage'];
294
 
295
  // Remove post meta if it's empty.
@@ -298,6 +302,38 @@ abstract class RWMB_Field {
298
  return;
299
  }
300
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
301
  // If field is cloneable, value is saved as a single entry in the database.
302
  if ( $field['clone'] ) {
303
  // Remove empty values.
@@ -315,8 +351,8 @@ abstract class RWMB_Field {
315
 
316
  // If field is multiple, value is saved as multiple entries in the database (WordPress behaviour).
317
  if ( $field['multiple'] ) {
318
- $old = (array) $old;
319
- $new = (array) $new;
320
  $new_values = array_diff( $new, $old );
321
  foreach ( $new_values as $new_value ) {
322
  $storage->add( $post_id, $name, $new_value, false );
@@ -340,37 +376,45 @@ abstract class RWMB_Field {
340
  * @return array
341
  */
342
  public static function normalize( $field ) {
343
- $field = wp_parse_args( $field, array(
344
- 'id' => '',
345
- 'name' => '',
346
- 'label_description' => '',
347
- 'multiple' => false,
348
- 'std' => '',
349
- 'desc' => '',
350
- 'format' => '',
351
- 'before' => '',
352
- 'after' => '',
353
- 'field_name' => isset( $field['id'] ) ? $field['id'] : '',
354
- 'placeholder' => '',
355
-
356
- 'clone' => false,
357
- 'max_clone' => 0,
358
- 'sort_clone' => false,
359
- 'add_button' => __( '+ Add more', 'learnpress' ),
360
- 'clone_default' => false,
361
-
362
- 'class' => '',
363
- 'disabled' => false,
364
- 'required' => false,
365
- 'autofocus' => false,
366
- 'attributes' => array(),
367
- ) );
 
 
 
 
 
368
 
369
  if ( $field['clone_default'] ) {
370
- $field['attributes'] = wp_parse_args( $field['attributes'], array(
371
- 'data-default' => $field['std'],
372
- 'data-clone-default' => 'true',
373
- ) );
 
 
 
374
  }
375
 
376
  return $field;
@@ -385,16 +429,19 @@ abstract class RWMB_Field {
385
  * @return array
386
  */
387
  public static function get_attributes( $field, $value = null ) {
388
- $attributes = wp_parse_args( $field['attributes'], array(
389
- 'disabled' => $field['disabled'],
390
- 'autofocus' => $field['autofocus'],
391
- 'required' => $field['required'],
392
- 'id' => $field['id'],
393
- 'class' => '',
394
- 'name' => $field['field_name'],
395
- ) );
 
 
 
396
 
397
- $attributes['class'] = implode( ' ', array_merge( array( "rwmb-{$field['type']}" ), (array) $attributes['class'] ) );
398
 
399
  return $attributes;
400
  }
@@ -450,7 +497,7 @@ abstract class RWMB_Field {
450
  }
451
 
452
  // Get raw meta value in the database, no escape.
453
- $value = self::call( $field, 'raw_meta', $post_id, $args );
454
 
455
  // Make sure meta value is an array for cloneable and multiple fields.
456
  if ( $field['clone'] || $field['multiple'] ) {
@@ -582,7 +629,7 @@ abstract class RWMB_Field {
582
  * @return string Field mapped type.
583
  */
584
  public static function map_types( $field ) {
585
- $type = isset( $field['type'] ) ? $field['type'] : 'input';
586
  $type_map = apply_filters(
587
  'rwmb_type_map',
588
  array(
@@ -602,7 +649,7 @@ abstract class RWMB_Field {
602
  * @return string Field class name.
603
  */
604
  public static function get_class_name( $field ) {
605
- $type = self::map_types( $field );
606
  $type = str_replace( array( '-', '_' ), ' ', $type );
607
  $class = 'RWMB_' . ucwords( $type ) . '_Field';
608
  $class = str_replace( ' ', '_', $class );
184
  return '';
185
  }
186
 
187
+ if ( isset( $field['storage'] ) ) {
 
 
188
  $storage = $field['storage'];
189
+ } elseif ( isset( $args['object_type'] ) ) {
190
+ $storage = rwmb_get_storage( $args['object_type'] );
191
  } else {
192
  $storage = rwmb_get_storage( 'post' );
193
  }
196
  $args['single'] = $field['clone'] || ! $field['multiple'];
197
  }
198
 
199
+ if ( $field['clone'] && $field['clone_as_multiple'] ) {
200
+ $args['single'] = false;
201
+ }
202
+
203
  return $storage->get( $object_id, $field['id'], $args );
204
  }
205
 
290
  * @param array $field The field parameters.
291
  */
292
  public static function save( $new, $old, $post_id, $field ) {
293
+ if ( empty( $field['id'] ) || ! $field['save_field'] ) {
294
  return;
295
  }
296
+ $name = $field['id'];
297
  $storage = $field['storage'];
298
 
299
  // Remove post meta if it's empty.
302
  return;
303
  }
304
 
305
+ // Save cloned fields as multiple values instead serialized array.
306
+ if ( $field['clone'] && $field['clone_as_multiple'] ) {
307
+ $old = array_filter( (array) $old );
308
+ $new = array_filter( (array) $new );
309
+
310
+ if ( empty( $new ) ) {
311
+ $storage->delete( $post_id, $name );
312
+ }
313
+
314
+ if ( $field['sort_clone'] && array_values( $new ) != array_values( $old ) ) {
315
+ $storage->delete( $post_id, $name );
316
+
317
+ foreach ( $new as $new_value ) {
318
+ $storage->add( $post_id, $name, $new_value, false );
319
+ }
320
+
321
+ return;
322
+ }
323
+
324
+ $new_values = array_diff( $new, $old );
325
+ foreach ( $new_values as $new_value ) {
326
+ $storage->add( $post_id, $name, $new_value, false );
327
+ }
328
+
329
+ $old_values = array_diff( $old, $new );
330
+ foreach ( $old_values as $old_value ) {
331
+ $storage->delete( $post_id, $name, $old_value );
332
+ }
333
+
334
+ return;
335
+ }
336
+
337
  // If field is cloneable, value is saved as a single entry in the database.
338
  if ( $field['clone'] ) {
339
  // Remove empty values.
351
 
352
  // If field is multiple, value is saved as multiple entries in the database (WordPress behaviour).
353
  if ( $field['multiple'] ) {
354
+ $old = (array) $old;
355
+ $new = (array) $new;
356
  $new_values = array_diff( $new, $old );
357
  foreach ( $new_values as $new_value ) {
358
  $storage->add( $post_id, $name, $new_value, false );
376
  * @return array
377
  */
378
  public static function normalize( $field ) {
379
+ $field = wp_parse_args(
380
+ $field,
381
+ array(
382
+ 'id' => '',
383
+ 'name' => '',
384
+ 'label_description' => '',
385
+ 'multiple' => false,
386
+ 'std' => '',
387
+ 'desc' => '',
388
+ 'format' => '',
389
+ 'before' => '',
390
+ 'after' => '',
391
+ 'field_name' => isset( $field['id'] ) ? $field['id'] : '',
392
+ 'placeholder' => '',
393
+ 'save_field' => true,
394
+
395
+ 'clone' => false,
396
+ 'max_clone' => 0,
397
+ 'sort_clone' => false,
398
+ 'add_button' => __( '+ Add more', 'meta-box' ),
399
+ 'clone_default' => false,
400
+ 'clone_as_multiple' => false,
401
+
402
+ 'class' => '',
403
+ 'disabled' => false,
404
+ 'required' => false,
405
+ 'autofocus' => false,
406
+ 'attributes' => array(),
407
+ )
408
+ );
409
 
410
  if ( $field['clone_default'] ) {
411
+ $field['attributes'] = wp_parse_args(
412
+ $field['attributes'],
413
+ array(
414
+ 'data-default' => $field['std'],
415
+ 'data-clone-default' => 'true',
416
+ )
417
+ );
418
  }
419
 
420
  return $field;
429
  * @return array
430
  */
431
  public static function get_attributes( $field, $value = null ) {
432
+ $attributes = wp_parse_args(
433
+ $field['attributes'],
434
+ array(
435
+ 'disabled' => $field['disabled'],
436
+ 'autofocus' => $field['autofocus'],
437
+ 'required' => $field['required'],
438
+ 'id' => $field['id'],
439
+ 'class' => '',
440
+ 'name' => $field['field_name'],
441
+ )
442
+ );
443
 
444
+ $attributes['class'] = trim( implode( ' ', array_merge( array( "rwmb-{$field['type']}" ), (array) $attributes['class'] ) ) );
445
 
446
  return $attributes;
447
  }
497
  }
498
 
499
  // Get raw meta value in the database, no escape.
500
+ $value = self::call( $field, 'raw_meta', $post_id, $args );
501
 
502
  // Make sure meta value is an array for cloneable and multiple fields.
503
  if ( $field['clone'] || $field['multiple'] ) {
629
  * @return string Field mapped type.
630
  */
631
  public static function map_types( $field ) {
632
+ $type = isset( $field['type'] ) ? $field['type'] : 'input';
633
  $type_map = apply_filters(
634
  'rwmb_type_map',
635
  array(
649
  * @return string Field class name.
650
  */
651
  public static function get_class_name( $field ) {
652
+ $type = self::map_types( $field );
653
  $type = str_replace( array( '-', '_' ), ' ', $type );
654
  $class = 'RWMB_' . ucwords( $type ) . '_Field';
655
  $class = str_replace( ' ', '_', $class );
inc/libraries/meta-box/inc/fields/autocomplete.php CHANGED
@@ -16,9 +16,13 @@ class RWMB_Autocomplete_Field extends RWMB_Multiple_Values_Field {
16
  wp_enqueue_style( 'rwmb-autocomplete', RWMB_CSS_URL . 'autocomplete.css', '', RWMB_VER );
17
  wp_enqueue_script( 'rwmb-autocomplete', RWMB_JS_URL . 'autocomplete.js', array( 'jquery-ui-autocomplete' ), RWMB_VER, true );
18
 
19
- self::localize_script( 'rwmb-autocomplete', 'RWMB_Autocomplete', array(
20
- 'delete' => __( 'Delete', 'learnpress' ),
21
- ) );
 
 
 
 
22
  }
23
 
24
  /**
@@ -78,7 +82,7 @@ class RWMB_Autocomplete_Field extends RWMB_Multiple_Values_Field {
78
  $html .= sprintf(
79
  $tpl,
80
  esc_html( $label ),
81
- esc_html__( 'Delete', 'learnpress' ),
82
  esc_attr( $field['field_name'] ),
83
  esc_attr( $value )
84
  );
@@ -90,7 +94,7 @@ class RWMB_Autocomplete_Field extends RWMB_Multiple_Values_Field {
90
  $html .= sprintf(
91
  $tpl,
92
  esc_html( $label ),
93
- esc_html__( 'Delete', 'learnpress' ),
94
  esc_attr( $field['field_name'] ),
95
  esc_attr( $value )
96
  );
@@ -110,9 +114,12 @@ class RWMB_Autocomplete_Field extends RWMB_Multiple_Values_Field {
110
  */
111
  public static function normalize( $field ) {
112
  $field = parent::normalize( $field );
113
- $field = wp_parse_args( $field, array(
114
- 'size' => 30,
115
- ) );
 
 
 
116
  return $field;
117
  }
118
  }
16
  wp_enqueue_style( 'rwmb-autocomplete', RWMB_CSS_URL . 'autocomplete.css', '', RWMB_VER );
17
  wp_enqueue_script( 'rwmb-autocomplete', RWMB_JS_URL . 'autocomplete.js', array( 'jquery-ui-autocomplete' ), RWMB_VER, true );
18
 
19
+ self::localize_script(
20
+ 'rwmb-autocomplete',
21
+ 'RWMB_Autocomplete',
22
+ array(
23
+ 'delete' => __( 'Delete', 'meta-box' ),
24
+ )
25
+ );
26
  }
27
 
28
  /**
82
  $html .= sprintf(
83
  $tpl,
84
  esc_html( $label ),
85
+ esc_html__( 'Delete', 'meta-box' ),
86
  esc_attr( $field['field_name'] ),
87
  esc_attr( $value )
88
  );
94
  $html .= sprintf(
95
  $tpl,
96
  esc_html( $label ),
97
+ esc_html__( 'Delete', 'meta-box' ),
98
  esc_attr( $field['field_name'] ),
99
  esc_attr( $value )
100
  );
114
  */
115
  public static function normalize( $field ) {
116
  $field = parent::normalize( $field );
117
+ $field = wp_parse_args(
118
+ $field,
119
+ array(
120
+ 'size' => 30,
121
+ )
122
+ );
123
  return $field;
124
  }
125
  }
inc/libraries/meta-box/inc/fields/background.php ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The background field.
4
+ *
5
+ * @package Meta Box.
6
+ */
7
+
8
+ /**
9
+ * The Background field.
10
+ */
11
+ class RWMB_Background_Field extends RWMB_Field {
12
+ /**
13
+ * Enqueue scripts and styles.
14
+ */
15
+ public static function admin_enqueue_scripts() {
16
+ wp_enqueue_style( 'rwmb-background', RWMB_CSS_URL . 'background.css', '', RWMB_VER );
17
+
18
+ RWMB_Color_Field::admin_enqueue_scripts();
19
+ RWMB_File_Input_Field::admin_enqueue_scripts();
20
+ }
21
+
22
+ /**
23
+ * Get field HTML.
24
+ *
25
+ * @param mixed $meta Meta value.
26
+ * @param array $field Field settings.
27
+ *
28
+ * @return string
29
+ */
30
+ public static function html( $meta, $field ) {
31
+ $meta = wp_parse_args(
32
+ $meta,
33
+ array(
34
+ 'color' => '',
35
+ 'image' => '',
36
+ 'repeat' => '',
37
+ 'attachment' => '',
38
+ 'position' => '',
39
+ 'size' => '',
40
+ )
41
+ );
42
+
43
+ $output = '<div class="rwmb-background-row">';
44
+
45
+ // Color.
46
+ $color = RWMB_Color_Field::normalize(
47
+ array(
48
+ 'type' => 'color',
49
+ 'id' => "{$field['id']}_color",
50
+ 'field_name' => "{$field['field_name']}[color]",
51
+ )
52
+ );
53
+ $output .= RWMB_Color_Field::html( $meta['color'], $color );
54
+
55
+ $output .= '</div><!-- .rwmb-background-row -->';
56
+ $output .= '<div class="rwmb-background-row">';
57
+
58
+ // Image.
59
+ $image = RWMB_File_Input_Field::normalize(
60
+ array(
61
+ 'type' => 'file_input',
62
+ 'id' => "{$field['id']}_image",
63
+ 'field_name' => "{$field['field_name']}[image]",
64
+ 'placeholder' => __( 'Background Image', 'meta-box' ),
65
+ )
66
+ );
67
+ $output .= RWMB_File_Input_Field::html( $meta['image'], $image );
68
+
69
+ $output .= '</div><!-- .rwmb-background-row -->';
70
+ $output .= '<div class="rwmb-background-row">';
71
+
72
+ // Repeat.
73
+ $repeat = RWMB_Select_Field::normalize(
74
+ array(
75
+ 'type' => 'select',
76
+ 'id' => "{$field['id']}_repeat",
77
+ 'field_name' => "{$field['field_name']}[repeat]",
78
+ 'placeholder' => esc_html__( '-- Background Repeat --', 'meta-box' ),
79
+ 'options' => array(
80
+ 'no-repeat' => esc_html__( 'No Repeat', 'meta-box' ),
81
+ 'repeat' => esc_html__( 'Repeat All', 'meta-box' ),
82
+ 'repeat-x' => esc_html__( 'Repeat Horizontally', 'meta-box' ),
83
+ 'repeat-y' => esc_html__( 'Repeat Vertically', 'meta-box' ),
84
+ 'inherit' => esc_html__( 'Inherit', 'meta-box' ),
85
+ ),
86
+ )
87
+ );
88
+ $output .= RWMB_Select_Field::html( $meta['repeat'], $repeat );
89
+
90
+ // Position.
91
+ $position = RWMB_Select_Field::normalize(
92
+ array(
93
+ 'type' => 'select',
94
+ 'id' => "{$field['id']}_position",
95
+ 'field_name' => "{$field['field_name']}[position]",
96
+ 'placeholder' => esc_html__( '-- Background Position --', 'meta-box' ),
97
+ 'options' => array(
98
+ 'top left' => esc_html__( 'Top Left', 'meta-box' ),
99
+ 'top center' => esc_html__( 'Top Center', 'meta-box' ),
100
+ 'top right' => esc_html__( 'Top Right', 'meta-box' ),
101
+ 'center left' => esc_html__( 'Center Left', 'meta-box' ),
102
+ 'center center' => esc_html__( 'Center Center', 'meta-box' ),
103
+ 'center right' => esc_html__( 'Center Right', 'meta-box' ),
104
+ 'bottom left' => esc_html__( 'Bottom Left', 'meta-box' ),
105
+ 'bottom center' => esc_html__( 'Bottom Center', 'meta-box' ),
106
+ 'bottom right' => esc_html__( 'Bottom Right', 'meta-box' ),
107
+ ),
108
+ )
109
+ );
110
+ $output .= RWMB_Select_Field::html( $meta['position'], $position );
111
+
112
+ // Attachment.
113
+ $attachment = RWMB_Select_Field::normalize(
114
+ array(
115
+ 'type' => 'select',
116
+ 'id' => "{$field['id']}_attachment",
117
+ 'field_name' => "{$field['field_name']}[attachment]",
118
+ 'placeholder' => esc_html__( '-- Background Attachment --', 'meta-box' ),
119
+ 'options' => array(
120
+ 'fixed' => esc_html__( 'Fixed', 'meta-box' ),
121
+ 'scroll' => esc_html__( 'Scroll', 'meta-box' ),
122
+ 'inherit' => esc_html__( 'Inherit', 'meta-box' ),
123
+ ),
124
+ )
125
+ );
126
+ $output .= RWMB_Select_Field::html( $meta['attachment'], $attachment );
127
+
128
+ // Size.
129
+ $size = RWMB_Select_Field::normalize(
130
+ array(
131
+ 'type' => 'select',
132
+ 'id' => "{$field['id']}_size",
133
+ 'field_name' => "{$field['field_name']}[size]",
134
+ 'placeholder' => esc_html__( '-- Background Size --', 'meta-box' ),
135
+ 'options' => array(
136
+ 'inherit' => esc_html__( 'Inherit', 'meta-box' ),
137
+ 'cover' => esc_html__( 'Cover', 'meta-box' ),
138
+ 'contain' => esc_html__( 'Contain', 'meta-box' ),
139
+ ),
140
+ )
141
+ );
142
+ $output .= RWMB_Select_Field::html( $meta['size'], $size );
143
+ $output .= '</div><!-- .rwmb-background-row -->';
144
+
145
+ return $output;
146
+ }
147
+
148
+ /**
149
+ * Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
150
+ *
151
+ * @param array $field Field parameters.
152
+ * @param array $value The value.
153
+ * @param array $args Additional arguments. Rarely used. See specific fields for details.
154
+ * @param int|null $post_id Post ID. null for current post. Optional.
155
+ *
156
+ * @return string
157
+ */
158
+ public static function format_single_value( $field, $value, $args, $post_id ) {
159
+ $output = '';
160
+ $value = array_filter( $value );
161
+ foreach ( $value as $key => $subvalue ) {
162
+ $subvalue = 'image' === $key ? 'url(' . esc_url( $subvalue ) . ')' : $subvalue;
163
+ $output .= 'background-' . $key . ': ' . $subvalue . ';';
164
+ }
165
+ return $output;
166
+ }
167
+ }
inc/libraries/meta-box/inc/fields/button-group.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The Button group.
4
+ *
5
+ * @package Meta Box
6
+ */
7
+
8
+ /**
9
+ * Button group class.
10
+ */
11
+ class RWMB_Button_Group_Field extends RWMB_Choice_Field {
12
+ /**
13
+ * Enqueue scripts and styles.
14
+ */
15
+ public static function admin_enqueue_scripts() {
16
+ wp_enqueue_style( 'rwmb-button-group', RWMB_CSS_URL . 'button-group.css', '', RWMB_VER );
17
+ wp_enqueue_script( 'rwmb-button-group', RWMB_JS_URL . 'button-group.js', array(), RWMB_VER, true );
18
+ }
19
+
20
+ /**
21
+ * Get field HTML.
22
+ *
23
+ * @param mixed $meta Meta value.
24
+ * @param array $field Field parameters.
25
+ * @return string
26
+ */
27
+ public static function html( $meta, $field ) {
28
+ $options = self::transform_options( $field['options'] );
29
+ $walker = new RWMB_Walker_Input_List( $field, $meta );
30
+
31
+ $output = sprintf(
32
+ '<ul class="rwmb-button-input-list %s">',
33
+ $field['inline'] ? ' rwmb-inline' : ''
34
+ );
35
+ $output .= $walker->walk( $options, -1 );
36
+ $output .= '</ul>';
37
+
38
+ return $output;
39
+ }
40
+
41
+ /**
42
+ * Normalize parameters for field.
43
+ *
44
+ * @param array $field Field parameters.
45
+ *
46
+ * @return array
47
+ */
48
+ public static function normalize( $field ) {
49
+ $field = parent::normalize( $field );
50
+ $field = wp_parse_args(
51
+ $field,
52
+ array(
53
+ 'inline' => null,
54
+ )
55
+ );
56
+
57
+ $field = $field['multiple'] ? RWMB_Multiple_Values_Field::normalize( $field ) : $field;
58
+ $field = RWMB_Input_Field::normalize( $field );
59
+
60
+ $field['flatten'] = true;
61
+ $field['inline'] = ! $field['multiple'] && ! isset( $field['inline'] ) ? true : $field['inline'];
62
+
63
+ return $field;
64
+ }
65
+
66
+ /**
67
+ * Get the attributes for a field.
68
+ *
69
+ * @param array $field Field parameters.
70
+ * @param mixed $value Meta value.
71
+ *
72
+ * @return array
73
+ */
74
+ public static function get_attributes( $field, $value = null ) {
75
+ $attributes = RWMB_Input_Field::get_attributes( $field, $value );
76
+ $attributes['id'] = false;
77
+ $attributes['type'] = $field['multiple'] ? 'checkbox' : 'radio';
78
+ $attributes['value'] = $value;
79
+
80
+ return $attributes;
81
+ }
82
+ }
inc/libraries/meta-box/inc/fields/button.php CHANGED
@@ -28,9 +28,12 @@ class RWMB_Button_Field extends RWMB_Field {
28
  * @return array
29
  */
30
  public static function normalize( $field ) {
31
- $field = wp_parse_args( $field, array(
32
- 'std' => __( 'Click me', 'learnpress' ),
33
- ) );
 
 
 
34
  $field = parent::normalize( $field );
35
  return $field;
36
  }
@@ -44,9 +47,12 @@ class RWMB_Button_Field extends RWMB_Field {
44
  */
45
  public static function get_attributes( $field, $value = null ) {
46
  $attributes = parent::get_attributes( $field, $value );
47
- $attributes = wp_parse_args( $attributes, array(
48
- 'type' => $field['type'],
49
- ) );
 
 
 
50
  $attributes['class'] .= ' button hide-if-no-js';
51
 
52
  return $attributes;
28
  * @return array
29
  */
30
  public static function normalize( $field ) {
31
+ $field = wp_parse_args(
32
+ $field,
33
+ array(
34
+ 'std' => __( 'Click me', 'meta-box' ),
35
+ )
36
+ );
37
  $field = parent::normalize( $field );
38
  return $field;
39
  }
47
  */
48
  public static function get_attributes( $field, $value = null ) {
49
  $attributes = parent::get_attributes( $field, $value );
50
+ $attributes = wp_parse_args(
51
+ $attributes,
52
+ array(
53
+ 'type' => $field['type'],
54
+ )
55
+ );
56
  $attributes['class'] .= ' button hide-if-no-js';
57
 
58
  return $attributes;
inc/libraries/meta-box/inc/fields/checkbox-list.php CHANGED
@@ -17,7 +17,7 @@ class RWMB_Checkbox_List_Field extends RWMB_Input_List_Field {
17
  */
18
  public static function normalize( $field ) {
19
  $field['multiple'] = true;
20
- $field = parent::normalize( $field );
21
 
22
  return $field;
23
  }
17
  */
18
  public static function normalize( $field ) {
19
  $field['multiple'] = true;
20
+ $field = parent::normalize( $field );
21
 
22
  return $field;
23
  }
inc/libraries/meta-box/inc/fields/checkbox.php CHANGED
@@ -50,6 +50,6 @@ class RWMB_Checkbox_Field extends RWMB_Input_Field {
50
  * @return string
51
  */
52
  public static function format_single_value( $field, $value, $args, $post_id ) {
53
- return $value ? __( 'Yes', 'learnpress' ) : __( 'No', 'learnpress' );
54
  }
55
  }
50
  * @return string
51
  */
52
  public static function format_single_value( $field, $value, $args, $post_id ) {
53
+ return $value ? __( 'Yes', 'meta-box' ) : __( 'No', 'meta-box' );
54
  }
55
  }
inc/libraries/meta-box/inc/fields/choice.php CHANGED
@@ -9,19 +9,6 @@
9
  * Abstract class for any kind of choice field.
10
  */
11
  abstract class RWMB_Choice_Field extends RWMB_Field {
12
- /**
13
- * Walk options.
14
- *
15
- * @param array $field Field parameters.
16
- * @param mixed $options Select options.
17
- * @param mixed $db_fields Database fields to use in the output.
18
- * @param mixed $meta Meta value.
19
- * @return string
20
- */
21
- public static function walk( $field, $options, $db_fields, $meta ) {
22
- return '';
23
- }
24
-
25
  /**
26
  * Get field HTML.
27
  *
@@ -30,11 +17,7 @@ abstract class RWMB_Choice_Field extends RWMB_Field {
30
  * @return string
31
  */
32
  public static function html( $meta, $field ) {
33
- $meta = (array) $meta;
34
- $options = self::call( 'get_options', $field );
35
- $options = self::call( 'filter_options', $field, $options );
36
- $db_fields = self::call( 'get_db_fields', $field );
37
- return ! empty( $options ) ? self::call( 'walk', $field, $options, $db_fields, $meta ) : null;
38
  }
39
 
40
  /**
@@ -45,64 +28,37 @@ abstract class RWMB_Choice_Field extends RWMB_Field {
45
  */
46
  public static function normalize( $field ) {
47
  $field = parent::normalize( $field );
48
- $field = wp_parse_args( $field, array(
49
- 'flatten' => true,
50
- 'options' => array(),
51
- ) );
 
 
 
52
 
53
  return $field;
54
  }
55
 
56
  /**
57
- * Get field names of object to be used by walker.
58
- *
59
- * @return array
60
- */
61
- public static function get_db_fields() {
62
- return array(
63
- 'parent' => 'parent',
64
- 'id' => 'value',
65
- 'label' => 'label',
66
- );
67
- }
68
-
69
- /**
70
- * Get options for walker.
71
  *
72
- * @param array $field Field parameters.
73
  *
74
  * @return array
75
  */
76
- public static function get_options( $field ) {
77
- $options = array();
78
- foreach ( (array) $field['options'] as $value => $label ) {
 
79
  $option = is_array( $label ) ? $label : array(
80
  'label' => (string) $label,
81
  'value' => (string) $value,
82
  );
83
  if ( isset( $option['label'] ) && isset( $option['value'] ) ) {
84
- $options[ $option['value'] ] = (object) $option;
85
  }
86
  }
87
- return $options;
88
- }
89
-
90
- /**
91
- * Filter options for walker.
92
- *
93
- * @param array $field Field parameters.
94
- * @param array $options Array of choice options.
95
- *
96
- * @return array
97
- */
98
- public static function filter_options( $field, $options ) {
99
- $db_fields = self::call( 'get_db_fields', $field );
100
- $label = $db_fields['label'];
101
- foreach ( $options as &$option ) {
102
- $option = apply_filters( 'rwmb_option', $option, $field );
103
- $option->$label = apply_filters( 'rwmb_option_label', $option->$label, $option, $field );
104
- }
105
- return $options;
106
  }
107
 
108
  /**
@@ -116,19 +72,7 @@ abstract class RWMB_Choice_Field extends RWMB_Field {
116
  * @return string
117
  */
118
  public static function format_single_value( $field, $value, $args, $post_id ) {
119
- return self::call( 'get_option_label', $field, $value );
120
- }
121
-
122
- /**
123
- * Get option label.
124
- *
125
- * @param array $field Field parameters.
126
- * @param string $value Option value.
127
- *
128
- * @return string
129
- */
130
- public static function get_option_label( $field, $value ) {
131
- $options = self::call( 'get_options', $field );
132
  return isset( $options[ $value ] ) ? $options[ $value ]->label : '';
133
  }
134
  }
9
  * Abstract class for any kind of choice field.
10
  */
11
  abstract class RWMB_Choice_Field extends RWMB_Field {
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  /**
13
  * Get field HTML.
14
  *
17
  * @return string
18
  */
19
  public static function html( $meta, $field ) {
20
+ return '';
 
 
 
 
21
  }
22
 
23
  /**
28
  */
29
  public static function normalize( $field ) {
30
  $field = parent::normalize( $field );
31
+ $field = wp_parse_args(
32
+ $field,
33
+ array(
34
+ 'flatten' => true,
35
+ 'options' => array(),
36
+ )
37
+ );
38
 
39
  return $field;
40
  }
41
 
42
  /**
43
+ * Transform field options into the verbose format.
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  *
45
+ * @param array $options Field options.
46
  *
47
  * @return array
48
  */
49
+ public static function transform_options( $options ) {
50
+ $transformed = array();
51
+ $options = (array) $options;
52
+ foreach ( $options as $value => $label ) {
53
  $option = is_array( $label ) ? $label : array(
54
  'label' => (string) $label,
55
  'value' => (string) $value,
56
  );
57
  if ( isset( $option['label'] ) && isset( $option['value'] ) ) {
58
+ $transformed[ $option['value'] ] = (object) $option;
59
  }
60
  }
61
+ return $transformed;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  }
63
 
64
  /**
72
  * @return string
73
  */
74
  public static function format_single_value( $field, $value, $args, $post_id ) {
75
+ $options = self::transform_options( $field['options'] );
 
 
 
 
 
 
 
 
 
 
 
 
76
  return isset( $options[ $value ] ) ? $options[ $value ]->label : '';
77
  }
78
  }
inc/libraries/meta-box/inc/fields/color.php CHANGED
@@ -33,16 +33,22 @@ class RWMB_Color_Field extends RWMB_Text_Field {
33
  * @return array
34
  */
35
  public static function normalize( $field ) {
36
- $field = wp_parse_args( $field, array(
37
- 'alpha_channel' => false,
38
- 'js_options' => array(),
39
- ) );
 
 
 
40
 
41
- $field['js_options'] = wp_parse_args( $field['js_options'], array(
42
- 'defaultColor' => false,
43
- 'hide' => true,
44
- 'palettes' => true,
45
- ) );
 
 
 
46
 
47
  $field = parent::normalize( $field );
48
 
@@ -59,9 +65,12 @@ class RWMB_Color_Field extends RWMB_Text_Field {
59
  */
60
  public static function get_attributes( $field, $value = null ) {
61
  $attributes = parent::get_attributes( $field, $value );
62
- $attributes = wp_parse_args( $attributes, array(
63
- 'data-options' => wp_json_encode( $field['js_options'] ),
64
- ) );
 
 
 
65
  $attributes['type'] = 'text';
66
 
67
  if ( $field['alpha_channel'] ) {
33
  * @return array
34
  */
35
  public static function normalize( $field ) {
36
+ $field = wp_parse_args(
37
+ $field,
38
+ array(
39
+ 'alpha_channel' => false,
40
+ 'js_options' => array(),
41
+ )
42
+ );
43
 
44
+ $field['js_options'] = wp_parse_args(
45
+ $field['js_options'],
46
+ array(
47
+ 'defaultColor' => false,
48
+ 'hide' => true,
49
+ 'palettes' => true,
50
+ )
51
+ );
52
 
53
  $field = parent::normalize( $field );
54
 
65
  */
66
  public static function get_attributes( $field, $value = null ) {
67
  $attributes = parent::get_attributes( $field, $value );
68
+ $attributes = wp_parse_args(
69
+ $attributes,
70
+ array(
71
+ 'data-options' => wp_json_encode( $field['js_options'] ),
72
+ )
73
+ );
74
  $attributes['type'] = 'text';
75
 
76
  if ( $field['alpha_channel'] ) {
inc/libraries/meta-box/inc/fields/datetime.php CHANGED
@@ -104,16 +104,19 @@ class RWMB_Datetime_Field extends RWMB_Text_Field {
104
  $output = '';
105
 
106
  if ( $field['timestamp'] ) {
107
- $name = $field['field_name'];
108
- $field = wp_parse_args( array(
109
- 'field_name' => $name . '[formatted]',
110
- ), $field );
 
 
 
111
  $output .= sprintf(
112
  '<input type="hidden" name="%s" class="rwmb-datetime-timestamp" value="%s">',
113
  esc_attr( $name . '[timestamp]' ),
114
  isset( $meta['timestamp'] ) ? intval( $meta['timestamp'] ) : ''
115
  );
116
- $meta = isset( $meta['formatted'] ) ? $meta['formatted'] : '';
117
  }
118
 
119
  $output .= parent::html( $meta, $field );
@@ -183,25 +186,34 @@ class RWMB_Datetime_Field extends RWMB_Text_Field {
183
  * @return array
184
  */
185
  public static function normalize( $field ) {
186
- $field = wp_parse_args( $field, array(
187
- 'timestamp' => false,
188
- 'inline' => false,
189
- 'js_options' => array(),
190
- ) );
 
 
 
191
 
192
  // Deprecate 'format', but keep it for backward compatible.
193
  // Use 'js_options' instead.
194
- $field['js_options'] = wp_parse_args( $field['js_options'], array(
195
- 'timeFormat' => 'HH:mm',
196
- 'separator' => ' ',
197
- 'dateFormat' => empty( $field['format'] ) ? 'yy-mm-dd' : $field['format'],
198
- 'showButtonPanel' => true,
199
- ) );
 
 
 
200
 
201
  if ( $field['inline'] ) {
202
- $field['js_options'] = wp_parse_args( $field['js_options'], array(
203
- 'altFieldTimeOnly' => false,
204
- ) );
 
 
 
205
  }
206
 
207
  $field = parent::normalize( $field );
@@ -218,10 +230,13 @@ class RWMB_Datetime_Field extends RWMB_Text_Field {
218
  * @return array
219
  */
220
  public static function get_attributes( $field, $value = null ) {
221
- $attributes = parent::get_attributes( $field, $value );
222
- $attributes = wp_parse_args( $attributes, array(
223
- 'data-options' => wp_json_encode( $field['js_options'] ),
224
- ) );
 
 
 
225
  $attributes['type'] = 'text';
226
 
227
  return $attributes;
@@ -252,7 +267,7 @@ class RWMB_Datetime_Field extends RWMB_Text_Field {
252
  * @return string
253
  */
254
  public static function format_single_value( $field, $value, $args, $post_id ) {
255
- if ( ! isset( $args['format'] ) ) {
256
  return $value;
257
  }
258
  if ( ! $field['timestamp'] ) {
104
  $output = '';
105
 
106
  if ( $field['timestamp'] ) {
107
+ $name = $field['field_name'];
108
+ $field = wp_parse_args(
109
+ array(
110
+ 'field_name' => $name . '[formatted]',
111
+ ),
112
+ $field
113
+ );
114
  $output .= sprintf(
115
  '<input type="hidden" name="%s" class="rwmb-datetime-timestamp" value="%s">',
116
  esc_attr( $name . '[timestamp]' ),
117
  isset( $meta['timestamp'] ) ? intval( $meta['timestamp'] ) : ''
118
  );
119
+ $meta = isset( $meta['formatted'] ) ? $meta['formatted'] : '';
120
  }
121
 
122
  $output .= parent::html( $meta, $field );
186
  * @return array
187
  */
188
  public static function normalize( $field ) {
189
+ $field = wp_parse_args(
190
+ $field,
191
+ array(
192
+ 'timestamp' => false,
193
+ 'inline' => false,
194
+ 'js_options' => array(),
195
+ )
196
+ );
197
 
198
  // Deprecate 'format', but keep it for backward compatible.
199
  // Use 'js_options' instead.
200
+ $field['js_options'] = wp_parse_args(
201
+ $field['js_options'],
202
+ array(
203
+ 'timeFormat' => 'HH:mm',
204
+ 'separator' => ' ',
205
+ 'dateFormat' => empty( $field['format'] ) ? 'yy-mm-dd' : $field['format'],
206
+ 'showButtonPanel' => true,
207
+ )
208
+ );
209
 
210
  if ( $field['inline'] ) {
211
+ $field['js_options'] = wp_parse_args(
212
+ $field['js_options'],
213
+ array(
214
+ 'altFieldTimeOnly' => false,
215
+ )
216
+ );
217
  }
218
 
219
  $field = parent::normalize( $field );
230
  * @return array
231
  */
232
  public static function get_attributes( $field, $value = null ) {
233
+ $attributes = parent::get_attributes( $field, $value );
234
+ $attributes = wp_parse_args(
235
+ $attributes,
236
+ array(
237
+ 'data-options' => wp_json_encode( $field['js_options'] ),
238
+ )
239
+ );
240
  $attributes['type'] = 'text';
241
 
242
  return $attributes;
267
  * @return string
268
  */
269
  public static function format_single_value( $field, $value, $args, $post_id ) {
270
+ if ( empty( $args['format'] ) ) {
271
  return $value;
272
  }
273
  if ( ! $field['timestamp'] ) {
inc/libraries/meta-box/inc/fields/file-input.php CHANGED
@@ -14,11 +14,15 @@ class RWMB_File_Input_Field extends RWMB_Input_Field {
14
  */
15
  public static function admin_enqueue_scripts() {
16
  wp_enqueue_media();
17
- wp_enqueue_style( 'rwmb-file-input', RWMB_CSS_URL . 'file-input.css' );
18
  wp_enqueue_script( 'rwmb-file-input', RWMB_JS_URL . 'file-input.js', array( 'jquery' ), RWMB_VER, true );
19
- self::localize_script('rwmb-file-input', 'rwmbFileInput', array(
20
- 'frameTitle' => esc_html__( 'Select File', 'learnpress' ),
21
- ) );
 
 
 
 
22
  }
23
 
24
  /**
@@ -36,9 +40,9 @@ class RWMB_File_Input_Field extends RWMB_Input_Field {
36
  <a href="#" class="rwmb-file-input-select button">%s</a>
37
  <a href="#" class="rwmb-file-input-remove button %s">%s</a>',
38
  self::render_attributes( $attributes ),
39
- esc_html__( 'Select', 'learnpress' ),
40
  $meta ? '' : 'hidden',
41
- esc_html__( 'Remove', 'learnpress' )
42
  );
43
  }
44
 
@@ -50,7 +54,7 @@ class RWMB_File_Input_Field extends RWMB_Input_Field {
50
  * @return array
51
  */
52
  public static function get_attributes( $field, $value = null ) {
53
- $attributes = parent::get_attributes( $field, $value );
54
  $attributes['type'] = 'text';
55
 
56
  return $attributes;
14
  */
15
  public static function admin_enqueue_scripts() {
16
  wp_enqueue_media();
17
+ wp_enqueue_style( 'rwmb-file-input', RWMB_CSS_URL . 'file-input.css', array(), RWMB_VER );
18
  wp_enqueue_script( 'rwmb-file-input', RWMB_JS_URL . 'file-input.js', array( 'jquery' ), RWMB_VER, true );
19
+ self::localize_script(
20
+ 'rwmb-file-input',
21
+ 'rwmbFileInput',
22
+ array(
23
+ 'frameTitle' => esc_html__( 'Select File', 'meta-box' ),
24
+ )
25
+ );
26
  }
27
 
28
  /**
40
  <a href="#" class="rwmb-file-input-select button">%s</a>
41
  <a href="#" class="rwmb-file-input-remove button %s">%s</a>',
42
  self::render_attributes( $attributes ),
43
+ esc_html__( 'Select', 'meta-box' ),
44
  $meta ? '' : 'hidden',
45
+ esc_html__( 'Remove', 'meta-box' )
46
  );
47
  }
48
 
54
  * @return array
55
  */
56
  public static function get_attributes( $field, $value = null ) {
57
+ $attributes = parent::get_attributes( $field, $value );
58
  $attributes['type'] = 'text';
59
 
60
  return $attributes;
inc/libraries/meta-box/inc/fields/file-upload.php CHANGED
@@ -27,13 +27,19 @@ class RWMB_File_Upload_Field extends RWMB_Media_Field {
27
  */
28
  public static function normalize( $field ) {
29
  $field = parent::normalize( $field );
30
- $field = wp_parse_args( $field, array(
31
- 'max_file_size' => 0,
32
- ) );
 
 
 
33
 
34
- $field['js_options'] = wp_parse_args( $field['js_options'], array(
35
- 'maxFileSize' => $field['max_file_size'],
36
- ) );
 
 
 
37
 
38
  return $field;
39
  }
27
  */
28
  public static function normalize( $field ) {
29
  $field = parent::normalize( $field );
30
+ $field = wp_parse_args(
31
+ $field,
32
+ array(
33
+ 'max_file_size' => 0,
34
+ )
35
+ );
36
 
37
+ $field['js_options'] = wp_parse_args(
38
+ $field['js_options'],
39
+ array(
40
+ 'maxFileSize' => $field['max_file_size'],
41
+ )
42
+ );
43
 
44
  return $field;
45
  }
inc/libraries/meta-box/inc/fields/file.php CHANGED
@@ -16,12 +16,16 @@ class RWMB_File_Field extends RWMB_Field {
16
  wp_enqueue_style( 'rwmb-file', RWMB_CSS_URL . 'file.css', array(), RWMB_VER );
17
  wp_enqueue_script( 'rwmb-file', RWMB_JS_URL . 'file.js', array( 'jquery-ui-sortable' ), RWMB_VER, true );
18
 
19
- self::localize_script( 'rwmb-file', 'rwmbFile', array(
20
- // Translators: %d is the number of files in singular form.
21
- 'maxFileUploadsSingle' => __( 'You may only upload maximum %d file', 'learnpress' ),
22
- // Translators: %d is the number of files in plural form.
23
- 'maxFileUploadsPlural' => __( 'You may only upload maximum %d files', 'learnpress' ),
24
- ) );
 
 
 
 
25
  }
26
 
27
  /**
@@ -50,7 +54,7 @@ class RWMB_File_Field extends RWMB_Field {
50
  if ( wp_delete_attachment( $attachment_id ) ) {
51
  wp_send_json_success();
52
  }
53
- wp_send_json_error( __( 'Error: Cannot delete file', 'learnpress' ) );
54
  }
55
 
56
  /**
@@ -63,7 +67,7 @@ class RWMB_File_Field extends RWMB_Field {
63
  */
64
  public static function html( $meta, $field ) {
65
  $meta = array_filter( (array) $meta );
66
- $i18n_more = apply_filters( 'rwmb_file_add_string', _x( '+ Add new file', 'file upload', 'learnpress' ), $field );
67
  $html = self::get_uploaded_files( $meta, $field );
68
 
69
  // Show form upload.
@@ -118,8 +122,8 @@ class RWMB_File_Field extends RWMB_Field {
118
  * @return string
119
  */
120
  protected static function file_html( $file, $index, $field ) {
121
- $i18n_delete = apply_filters( 'rwmb_file_delete_string', _x( 'Delete', 'file upload', 'learnpress' ) );
122
- $i18n_edit = apply_filters( 'rwmb_file_edit_string', _x( 'Edit', 'file upload', 'learnpress' ) );
123
  $attributes = self::get_attributes( $field, $file );
124
  $path = get_attached_file( $file );
125
  $icon = wp_get_attachment_image( $file, array( 60, 60 ), true );
@@ -137,12 +141,18 @@ class RWMB_File_Field extends RWMB_Field {
137
  </div>
138
  <input type="hidden" name="%s[%s]" value="%s">
139
  </li>',
140
- wp_get_attachment_url( $file ), $icon,
141
- wp_get_attachment_url( $file ), get_the_title( $file ),
 
 
142
  basename( $path ),
143
- get_edit_post_link( $file ), $i18n_edit,
144
- $file, $i18n_delete,
145
- $attributes['name'], $index, $file
 
 
 
 
146
  );
147
  }
148
 
@@ -256,12 +266,15 @@ class RWMB_File_Field extends RWMB_Field {
256
  */
257
  public static function normalize( $field ) {
258
  $field = parent::normalize( $field );
259
- $field = wp_parse_args( $field, array(
260
- 'std' => array(),
261
- 'force_delete' => false,
262
- 'max_file_uploads' => 0,
263
- 'mime_type' => '',
264
- ) );
 
 
 
265
  $field['multiple'] = true;
266
 
267
  $field['file_input_name'] = '_file_' . $field['id'];
@@ -328,13 +341,16 @@ class RWMB_File_Field extends RWMB_Field {
328
  return false;
329
  }
330
 
331
- return wp_parse_args( array(
332
- 'ID' => $file,
333
- 'name' => basename( $path ),
334
- 'path' => $path,
335
- 'url' => wp_get_attachment_url( $file ),
336
- 'title' => get_the_title( $file ),
337
- ), wp_get_attachment_metadata( $file ) );
 
 
 
338
  }
339
 
340
  /**
16
  wp_enqueue_style( 'rwmb-file', RWMB_CSS_URL . 'file.css', array(), RWMB_VER );
17
  wp_enqueue_script( 'rwmb-file', RWMB_JS_URL . 'file.js', array( 'jquery-ui-sortable' ), RWMB_VER, true );
18
 
19
+ self::localize_script(
20
+ 'rwmb-file',
21
+ 'rwmbFile',
22
+ array(
23
+ // Translators: %d is the number of files in singular form.
24
+ 'maxFileUploadsSingle' => __( 'You may only upload maximum %d file', 'meta-box' ),
25
+ // Translators: %d is the number of files in plural form.
26
+ 'maxFileUploadsPlural' => __( 'You may only upload maximum %d files', 'meta-box' ),
27
+ )
28
+ );
29
  }
30
 
31
  /**
54
  if ( wp_delete_attachment( $attachment_id ) ) {
55
  wp_send_json_success();
56
  }
57
+ wp_send_json_error( __( 'Error: Cannot delete file', 'meta-box' ) );
58
  }
59
 
60
  /**
67
  */
68
  public static function html( $meta, $field ) {
69
  $meta = array_filter( (array) $meta );
70
+ $i18n_more = apply_filters( 'rwmb_file_add_string', _x( '+ Add new file', 'file upload', 'meta-box' ), $field );
71
  $html = self::get_uploaded_files( $meta, $field );
72
 
73
  // Show form upload.
122
  * @return string
123
  */
124
  protected static function file_html( $file, $index, $field ) {
125
+ $i18n_delete = apply_filters( 'rwmb_file_delete_string', _x( 'Delete', 'file upload', 'meta-box' ) );
126
+ $i18n_edit = apply_filters( 'rwmb_file_edit_string', _x( 'Edit', 'file upload', 'meta-box' ) );
127
  $attributes = self::get_attributes( $field, $file );
128
  $path = get_attached_file( $file );
129
  $icon = wp_get_attachment_image( $file, array( 60, 60 ), true );
141
  </div>
142
  <input type="hidden" name="%s[%s]" value="%s">
143
  </li>',
144
+ wp_get_attachment_url( $file ),
145
+ $icon,
146
+ wp_get_attachment_url( $file ),
147
+ get_the_title( $file ),
148
  basename( $path ),
149
+ get_edit_post_link( $file ),
150
+ $i18n_edit,
151
+ $file,
152
+ $i18n_delete,
153
+ $attributes['name'],
154
+ $index,
155
+ $file
156
  );
157
  }
158
 
266
  */
267
  public static function normalize( $field ) {
268
  $field = parent::normalize( $field );
269
+ $field = wp_parse_args(
270
+ $field,
271
+ array(
272
+ 'std' => array(),
273
+ 'force_delete' => false,
274
+ 'max_file_uploads' => 0,
275
+ 'mime_type' => '',
276
+ )
277
+ );
278
  $field['multiple'] = true;
279
 
280
  $field['file_input_name'] = '_file_' . $field['id'];
341
  return false;
342
  }
343
 
344
+ return wp_parse_args(
345
+ array(
346
+ 'ID' => $file,
347
+ 'name' => basename( $path ),
348
+ 'path' => $path,
349
+ 'url' => wp_get_attachment_url( $file ),
350
+ 'title' => get_the_title( $file ),
351
+ ),
352
+ wp_get_attachment_metadata( $file )
353
+ );
354
  }
355
 
356
  /**
inc/libraries/meta-box/inc/fields/image-advanced.php CHANGED
@@ -27,15 +27,21 @@ class RWMB_Image_Advanced_Field extends RWMB_Media_Field {
27
  */
28
  public static function normalize( $field ) {
29
  $field['mime_type'] = 'image';
30
- $field = wp_parse_args( $field, array(
31
- 'image_size' => 'thumbnail',
32
- ) );
 
 
 
33
 
34
  $field = parent::normalize( $field );
35
 
36
- $field['js_options'] = wp_parse_args( $field['js_options'], array(
37
- 'imageSize' => $field['image_size'],
38
- ) );
 
 
 
39
 
40
  return $field;
41
  }
27
  */
28
  public static function normalize( $field ) {
29
  $field['mime_type'] = 'image';
30
+ $field = wp_parse_args(
31
+ $field,
32
+ array(
33
+ 'image_size' => 'thumbnail',
34
+ )
35
+ );
36
 
37
  $field = parent::normalize( $field );
38
 
39
+ $field['js_options'] = wp_parse_args(
40
+ $field['js_options'],
41
+ array(
42
+ 'imageSize' => $field['image_size'],
43
+ )
44
+ );
45
 
46
  return $field;
47
  }
inc/libraries/meta-box/inc/fields/image-select.php CHANGED
@@ -50,7 +50,7 @@ class RWMB_Image_Select_Field extends RWMB_Field {
50
  * @return array
51
  */
52
  public static function normalize( $field ) {
53
- $field = parent::normalize( $field );
54
  $field['field_name'] .= $field['multiple'] ? '[]' : '';
55
 
56
  return $field;
50
  * @return array
51
  */
52
  public static function normalize( $field ) {
53
+ $field = parent::normalize( $field );
54
  $field['field_name'] .= $field['multiple'] ? '[]' : '';
55
 
56
  return $field;
inc/libraries/meta-box/inc/fields/image.php CHANGED
@@ -47,7 +47,9 @@ class RWMB_Image_Field extends RWMB_File_Field {
47
  </div>
48
  </li>',
49
  esc_attr( $field['image_size'] ),
50
- $attributes['name'], $index, $file,
 
 
51
  wp_get_attachment_image( $file, $field['image_size'] ),
52
  get_edit_post_link( $file ),
53
  $file
@@ -64,9 +66,12 @@ class RWMB_Image_Field extends RWMB_File_Field {
64
  */
65
  public static function normalize( $field ) {
66
  $field = parent::normalize( $field );
67
- $field = wp_parse_args( $field, array(
68
- 'image_size' => 'thumbnail',
69
- ) );
 
 
 
70
 
71
  return $field;
72
  }
@@ -105,9 +110,12 @@ class RWMB_Image_Field extends RWMB_File_Field {
105
  return false;
106
  }
107
 
108
- $args = wp_parse_args( $args, array(
109
- 'size' => 'thumbnail',
110
- ) );
 
 
 
111
  $image = wp_get_attachment_image_src( $file, $args['size'] );
112
  $attachment = get_post( $file );
113
  $info = array(
@@ -122,7 +130,7 @@ class RWMB_Image_Field extends RWMB_File_Field {
122
  'alt' => get_post_meta( $file, '_wp_attachment_image_alt', true ),
123
  );
124
  if ( function_exists( 'wp_get_attachment_image_srcset' ) ) {
125
- $info['srcset'] = wp_get_attachment_image_srcset( $file );
126
  }
127
 
128
  $info = wp_parse_args( $info, wp_get_attachment_metadata( $file ) );
47
  </div>
48
  </li>',
49
  esc_attr( $field['image_size'] ),
50
+ $attributes['name'],
51
+ $index,
52
+ $file,
53
  wp_get_attachment_image( $file, $field['image_size'] ),
54
  get_edit_post_link( $file ),
55
  $file
66
  */
67
  public static function normalize( $field ) {
68
  $field = parent::normalize( $field );
69
+ $field = wp_parse_args(
70
+ $field,
71
+ array(
72
+ 'image_size' => 'thumbnail',
73
+ )
74
+ );
75
 
76
  return $field;
77
  }
110
  return false;
111
  }
112
 
113
+ $args = wp_parse_args(
114
+ $args,
115
+ array(
116
+ 'size' => 'thumbnail',
117
+ )
118
+ );
119
  $image = wp_get_attachment_image_src( $file, $args['size'] );
120
  $attachment = get_post( $file );
121
  $info = array(
130
  'alt' => get_post_meta( $file, '_wp_attachment_image_alt', true ),
131
  );
132
  if ( function_exists( 'wp_get_attachment_image_srcset' ) ) {
133
+ $info['srcset'] = wp_get_attachment_image_srcset( $file, $args['size'] );
134
  }
135
 
136
  $info = wp_parse_args( $info, wp_get_attachment_metadata( $file ) );
inc/libraries/meta-box/inc/fields/input-list.php CHANGED
@@ -18,23 +18,22 @@ class RWMB_Input_List_Field extends RWMB_Choice_Field {
18
  }
19
 
20
  /**
21
- * Walk options.
22
- *
23
- * @param array $field Field parameters.
24
- * @param mixed $options Select options.
25
- * @param mixed $db_fields Database fields to use in the output.
26
- * @param mixed $meta Meta value.
27
  *
 
 
28
  * @return string
29
  */
30
- public static function walk( $field, $options, $db_fields, $meta ) {
31
- $walker = new RWMB_Walker_Input_List( $db_fields, $field, $meta );
32
- $output = self::get_select_all_html( $field );
33
- $output .= sprintf( '<ul class="rwmb-input-list %s %s">',
34
- $field['collapse'] ? 'collapse' : '',
35
- $field['inline'] ? 'inline' : ''
 
 
36
  );
37
- $output .= $walker->walk( $options, $field['flatten'] ? - 1 : 0 );
38
  $output .= '</ul>';
39
 
40
  return $output;
@@ -50,14 +49,17 @@ class RWMB_Input_List_Field extends RWMB_Choice_Field {
50
  $field = $field['multiple'] ? RWMB_Multiple_Values_Field::normalize( $field ) : $field;
51
  $field = RWMB_Input_Field::normalize( $field );
52
  $field = parent::normalize( $field );
53
- $field = wp_parse_args( $field, array(
54
- 'collapse' => true,
55
- 'inline' => null,
56
- 'select_all_none' => false,
57
- ) );
 
 
 
58
 
59
  $field['flatten'] = $field['multiple'] ? $field['flatten'] : true;
60
- $field['inline'] = ! $field['multiple'] && ! isset( $field['inline'] ) ? true : $field['inline'];
61
 
62
  return $field;
63
  }
@@ -71,10 +73,10 @@ class RWMB_Input_List_Field extends RWMB_Choice_Field {
71
  * @return array
72
  */
73
  public static function get_attributes( $field, $value = null ) {
74
- $attributes = RWMB_Input_Field::get_attributes( $field, $value );
75
- $attributes['id'] = false;
76
- $attributes['type'] = $field['multiple'] ? 'checkbox' : 'radio';
77
- $attributes['value'] = $value;
78
 
79
  return $attributes;
80
  }
@@ -87,7 +89,7 @@ class RWMB_Input_List_Field extends RWMB_Choice_Field {
87
  */
88
  public static function get_select_all_html( $field ) {
89
  if ( $field['multiple'] && $field['select_all_none'] ) {
90
- return sprintf( '<p><button class="rwmb-input-list-select-all-none button" data-name="%s">%s</button></p>', $field['id'], __( 'Select All / None', 'learnpress' ) );
91
  }
92
  return '';
93
  }
18
  }
19
 
20
  /**
21
+ * Get field HTML.
 
 
 
 
 
22
  *
23
+ * @param mixed $meta Meta value.
24
+ * @param array $field Field parameters.
25
  * @return string
26
  */
27
+ public static function html( $meta, $field ) {
28
+ $options = self::transform_options( $field['options'] );
29
+ $walker = new RWMB_Walker_Input_List( $field, $meta );
30
+ $output = self::get_select_all_html( $field );
31
+ $output .= sprintf(
32
+ '<ul class="rwmb-input-list%s%s">',
33
+ $field['collapse'] ? ' rwmb-collapse' : '',
34
+ $field['inline'] ? ' rwmb-inline' : ''
35
  );
36
+ $output .= $walker->walk( $options, $field['flatten'] ? -1 : 0 );
37
  $output .= '</ul>';
38
 
39
  return $output;
49
  $field = $field['multiple'] ? RWMB_Multiple_Values_Field::normalize( $field ) : $field;
50
  $field = RWMB_Input_Field::normalize( $field );
51
  $field = parent::normalize( $field );
52
+ $field = wp_parse_args(
53
+ $field,
54
+ array(
55
+ 'collapse' => true,
56
+ 'inline' => null,
57
+ 'select_all_none' => false,
58
+ )
59
+ );
60
 
61
  $field['flatten'] = $field['multiple'] ? $field['flatten'] : true;
62
+ $field['inline'] = ! $field['multiple'] && ! isset( $field['inline'] ) ? true : $field['inline'];
63
 
64
  return $field;
65
  }
73
  * @return array
74
  */
75
  public static function get_attributes( $field, $value = null ) {
76
+ $attributes = RWMB_Input_Field::get_attributes( $field, $value );
77
+ $attributes['id'] = false;
78
+ $attributes['type'] = $field['multiple'] ? 'checkbox' : 'radio';
79
+ $attributes['value'] = $value;
80
 
81
  return $attributes;
82
  }
89
  */
90
  public static function get_select_all_html( $field ) {
91
  if ( $field['multiple'] && $field['select_all_none'] ) {
92
+ return sprintf( '<p><button class="rwmb-input-list-select-all-none button" data-name="%s">%s</button></p>', $field['id'], __( 'Select All / None', 'meta-box' ) );
93
  }
94
  return '';
95
  }
inc/libraries/meta-box/inc/fields/input.php CHANGED
@@ -29,17 +29,23 @@ abstract class RWMB_Input_Field extends RWMB_Field {
29
  */
30
  public static function normalize( $field ) {
31
  $field = parent::normalize( $field );
32
- $field = wp_parse_args( $field, array(
33
- 'autocomplete' => false,
34
- 'size' => 30,
35
- 'datalist' => false,
36
- 'readonly' => false,
37
- ) );
 
 
 
38
  if ( $field['datalist'] ) {
39
- $field['datalist'] = wp_parse_args( $field['datalist'], array(
40
- 'id' => $field['id'] . '_list',
41
- 'options' => array(),
42
- ) );
 
 
 
43
  }
44
  return $field;
45
  }
@@ -53,15 +59,18 @@ abstract class RWMB_Input_Field extends RWMB_Field {
53
  */
54
  public static function get_attributes( $field, $value = null ) {
55
  $attributes = parent::get_attributes( $field, $value );
56
- $attributes = wp_parse_args( $attributes, array(
57
- 'autocomplete' => $field['autocomplete'],
58
- 'list' => $field['datalist'] ? $field['datalist']['id'] : false,
59
- 'readonly' => $field['readonly'],
60
- 'value' => $value,
61
- 'placeholder' => $field['placeholder'],
62
- 'type' => $field['type'],
63
- 'size' => $field['size'],
64
- ) );
 
 
 
65
 
66
  return $attributes;
67
  }
29
  */
30
  public static function normalize( $field ) {
31
  $field = parent::normalize( $field );
32
+ $field = wp_parse_args(
33
+ $field,
34
+ array(
35
+ 'autocomplete' => false,
36
+ 'size' => 30,
37
+ 'datalist' => false,
38
+ 'readonly' => false,
39
+ )
40
+ );
41
  if ( $field['datalist'] ) {
42
+ $field['datalist'] = wp_parse_args(
43
+ $field['datalist'],
44
+ array(
45
+ 'id' => $field['id'] . '_list',
46
+ 'options' => array(),
47
+ )
48
+ );
49
  }
50
  return $field;
51
  }
59
  */
60
  public static function get_attributes( $field, $value = null ) {
61
  $attributes = parent::get_attributes( $field, $value );
62
+ $attributes = wp_parse_args(
63
+ $attributes,
64
+ array(
65
+ 'autocomplete' => $field['autocomplete'],
66
+ 'list' => $field['datalist'] ? $field['datalist']['id'] : false,
67
+ 'readonly' => $field['readonly'],
68
+ 'value' => $value,
69
+ 'placeholder' => $field['placeholder'],
70
+ 'type' => $field['type'],
71
+ 'size' => $field['size'],
72
+ )
73
+ );
74
 
75
  return $attributes;
76
  }
inc/libraries/meta-box/inc/fields/key-value.php CHANGED
@@ -28,7 +28,7 @@ class RWMB_Key_Value_Field extends RWMB_Text_Field {
28
  $val = isset( $meta[1] ) ? $meta[1] : '';
29
  $attributes = self::get_attributes( $field, $val );
30
  $attributes['placeholder'] = $field['placeholder']['value'];
31
- $html .= sprintf( '<input %s>', self::render_attributes( $attributes ) );
32
 
33
  return $html;
34
  }
@@ -128,10 +128,13 @@ class RWMB_Key_Value_Field extends RWMB_Text_Field {
128
  $field['clone'] = true;
129
  $field['multiple'] = true;
130
  $field['attributes']['type'] = 'text';
131
- $field['placeholder'] = wp_parse_args( (array) $field['placeholder'], array(
132
- 'key' => __( 'Key', 'learnpress' ),
133
- 'value' => __( 'Value', 'learnpress' ),
134
- ) );
 
 
 
135
  return $field;
136
  }
137
 
28
  $val = isset( $meta[1] ) ? $meta[1] : '';
29
  $attributes = self::get_attributes( $field, $val );
30
  $attributes['placeholder'] = $field['placeholder']['value'];
31
+ $html .= sprintf( '<input %s>', self::render_attributes( $attributes ) );
32
 
33
  return $html;
34
  }
128
  $field['clone'] = true;
129
  $field['multiple'] = true;
130
  $field['attributes']['type'] = 'text';
131
+ $field['placeholder'] = wp_parse_args(
132
+ (array) $field['placeholder'],
133
+ array(
134
+ 'key' => __( 'Key', 'meta-box' ),
135
+ 'value' => __( 'Value', 'meta-box' ),
136
+ )
137
+ );
138
  return $field;
139
  }
140
 
inc/libraries/meta-box/inc/fields/map.php CHANGED
@@ -13,6 +13,8 @@ class RWMB_Map_Field extends RWMB_Field {
13
  * Enqueue scripts and styles.
14
  */
15
  public static function admin_enqueue_scripts() {
 
 
16
  /**
17
  * Since June 2016, Google Maps requires a valid API key.
18
  *
@@ -35,12 +37,24 @@ class RWMB_Map_Field extends RWMB_Field {
35
  * @link https://developers.google.com/maps/documentation/javascript/libraries
36
  */
37
  $google_maps_url = apply_filters( 'rwmb_google_maps_url', $google_maps_url );
38
- wp_register_script( 'google-maps', esc_url_raw( $google_maps_url ), array(), '', true );
39
- wp_enqueue_style( 'rwmb-map', RWMB_CSS_URL . 'map.css', array(), RWMB_VER );
40
- wp_enqueue_script( 'rwmb-map', RWMB_JS_URL . 'map.js', array(
41
- 'jquery-ui-autocomplete',
42
- 'google-maps',
43
- ), RWMB_VER, true );
 
 
 
 
 
 
 
 
 
 
 
 
44
  }
45
 
46
  /**
@@ -70,7 +84,7 @@ class RWMB_Map_Field extends RWMB_Field {
70
  if ( $field['address_field'] ) {
71
  $html .= sprintf(
72
  '<button class="button rwmb-map-goto-address-button">%s</button>',
73
- esc_html__( 'Find Address', 'learnpress' )
74
  );
75
  }
76
 
@@ -88,16 +102,19 @@ class RWMB_Map_Field extends RWMB_Field {
88
  */
89
  public static function normalize( $field ) {
90
  $field = parent::normalize( $field );
91
- $field = wp_parse_args( $field, array(
92
- 'std' => '',
93
- 'address_field' => '',
94
- 'language' => '',
95
- 'region' => '',
96
-
97
- // Default API key, required by Google Maps since June 2016.
98
- // Users should overwrite this key with their own key.
99
- 'api_key' => 'AIzaSyC1mUh87SGFyf133tpZQJa-s96p0tgnraQ',
100
- ) );
 
 
 
101
 
102
  return $field;
103
  }
@@ -114,7 +131,7 @@ class RWMB_Map_Field extends RWMB_Field {
114
  * @return mixed Array(latitude, longitude, zoom)
115
  */
116
  public static function get_value( $field, $args = array(), $post_id = null ) {
117
- $value = parent::get_value( $field, $args, $post_id );
118
  list( $latitude, $longitude, $zoom ) = explode( ',', $value . ',,' );
119
  return compact( 'latitude', 'longitude', 'zoom' );
120
  }
@@ -131,9 +148,12 @@ class RWMB_Map_Field extends RWMB_Field {
131
  */
132
  public static function the_value( $field, $args = array(), $post_id = null ) {
133
  $value = parent::get_value( $field, $args, $post_id );
134
- $args = wp_parse_args( $args, array(
135
- 'api_key' => isset( $field['api_key'] ) ? $field['api_key'] : '',
136
- ) );
 
 
 
137
  return self::render_map( $value, $args );
138
  }
139
 
@@ -151,20 +171,24 @@ class RWMB_Map_Field extends RWMB_Field {
151
  return '';
152
  }
153
 
154
- $args = wp_parse_args( $args, array(
155
- 'latitude' => $latitude,
156
- 'longitude' => $longitude,
157
- 'width' => '100%',
158
- 'height' => '480px',
159
- 'marker' => true, // Display marker?
160
- 'marker_title' => '', // Marker title, when hover.
161
- 'info_window' => '', // Content of info window (when click on marker). HTML allowed.
162
- 'js_options' => array(),
163
-
164
- // Default API key, required by Google Maps since June 2016.
165
- // Users should overwrite this key with their own key.
166
- 'api_key' => 'AIzaSyC1mUh87SGFyf133tpZQJa-s96p0tgnraQ',
167
- ) );
 
 
 
 
168
 
169
  $google_maps_url = add_query_arg( 'key', $args['api_key'], 'https://maps.google.com/maps/api/js' );
170
 
@@ -182,13 +206,16 @@ class RWMB_Map_Field extends RWMB_Field {
182
  * This array will be convert to Javascript Object and pass as map options.
183
  * @link https://developers.google.com/maps/documentation/javascript/reference
184
  */
185
- $args['js_options'] = wp_parse_args( $args['js_options'], array(
186
- // Default to 'zoom' level set in admin, but can be overwritten.
187
- 'zoom' => $zoom,
 
 
188
 
189
- // Map type, see https://developers.google.com/maps/documentation/javascript/reference#MapTypeId.
190
- 'mapTypeId' => 'ROADMAP',
191
- ) );
 
192
 
193
  $output = sprintf(
194
  '<div class="rwmb-map-canvas" data-map_options="%s" style="width:%s;height:%s"></div>',
13
  * Enqueue scripts and styles.
14
  */
15
  public static function admin_enqueue_scripts() {
16
+ wp_enqueue_style( 'rwmb-map', RWMB_CSS_URL . 'map.css', array(), RWMB_VER );
17
+
18
  /**
19
  * Since June 2016, Google Maps requires a valid API key.
20
  *
37
  * @link https://developers.google.com/maps/documentation/javascript/libraries
38
  */
39
  $google_maps_url = apply_filters( 'rwmb_google_maps_url', $google_maps_url );
40
+ wp_register_script( 'google-maps', esc_url_raw( $google_maps_url ), array(), RWMB_VER, true );
41
+ wp_enqueue_script(
42
+ 'rwmb-map',
43
+ RWMB_JS_URL . 'map.js',
44
+ array(
45
+ 'jquery-ui-autocomplete',
46
+ 'google-maps',
47
+ ),
48
+ RWMB_VER,
49
+ true
50
+ );
51
+ self::localize_script(
52
+ 'rwmb-map',
53
+ 'RWMB_Map',
54
+ array(
55
+ 'no_results_string' => __( 'No results found', 'meta-box' ),
56
+ )
57
+ );
58
  }
59
 
60
  /**
84
  if ( $field['address_field'] ) {
85
  $html .= sprintf(
86
  '<button class="button rwmb-map-goto-address-button">%s</button>',
87
+ esc_html__( 'Find Address', 'meta-box' )
88
  );
89
  }
90
 
102
  */
103
  public static function normalize( $field ) {
104
  $field = parent::normalize( $field );
105
+ $field = wp_parse_args(
106
+ $field,
107
+ array(
108
+ 'std' => '',
109
+ 'address_field' => '',
110
+ 'language' => '',
111
+ 'region' => '',
112
+
113
+ // Default API key, required by Google Maps since June 2016.
114
+ // Users should overwrite this key with their own key.
115
+ 'api_key' => 'AIzaSyC1mUh87SGFyf133tpZQJa-s96p0tgnraQ',
116
+ )
117
+ );
118
 
119
  return $field;
120
  }
131
  * @return mixed Array(latitude, longitude, zoom)
132
  */
133
  public static function get_value( $field, $args = array(), $post_id = null ) {
134
+ $value = parent::get_value( $field, $args, $post_id );
135
  list( $latitude, $longitude, $zoom ) = explode( ',', $value . ',,' );
136
  return compact( 'latitude', 'longitude', 'zoom' );
137
  }
148
  */
149
  public static function the_value( $field, $args = array(), $post_id = null ) {
150
  $value = parent::get_value( $field, $args, $post_id );
151
+ $args = wp_parse_args(
152
+ $args,
153
+ array(
154
+ 'api_key' => isset( $field['api_key'] ) ? $field['api_key'] : '',
155
+ )
156
+ );
157
  return self::render_map( $value, $args );
158
  }
159
 
171
  return '';
172
  }
173
 
174
+ $args = wp_parse_args(
175
+ $args,
176
+ array(
177
+ 'latitude' => $latitude,
178
+ 'longitude' => $longitude,
179
+ 'width' => '100%',
180
+ 'height' => '480px',
181
+ 'marker' => true, // Display marker?
182
+ 'marker_title' => '', // Marker title, when hover.
183
+ 'info_window' => '', // Content of info window (when click on marker). HTML allowed.
184
+ 'js_options' => array(),
185
+ 'zoom' => $zoom,
186
+
187
+ // Default API key, required by Google Maps since June 2016.
188
+ // Users should overwrite this key with their own key.
189
+ 'api_key' => 'AIzaSyC1mUh87SGFyf133tpZQJa-s96p0tgnraQ',
190
+ )
191
+ );
192
 
193
  $google_maps_url = add_query_arg( 'key', $args['api_key'], 'https://maps.google.com/maps/api/js' );
194
 
206
  * This array will be convert to Javascript Object and pass as map options.
207
  * @link https://developers.google.com/maps/documentation/javascript/reference
208
  */
209
+ $args['js_options'] = wp_parse_args(
210
+ $args['js_options'],
211
+ array(
212
+ // Default to 'zoom' level set in admin, but can be overwritten.
213
+ 'zoom' => $args['zoom'],
214
 
215
+ // Map type, see https://developers.google.com/maps/documentation/javascript/reference#MapTypeId.
216
+ 'mapTypeId' => 'ROADMAP',
217
+ )
218
+ );
219
 
220
  $output = sprintf(
221
  '<div class="rwmb-map-canvas" data-map_options="%s" style="width:%s;height:%s"></div>',
inc/libraries/meta-box/inc/fields/media.php CHANGED
@@ -15,25 +15,29 @@ class RWMB_Media_Field extends RWMB_File_Field {
15
  public static function admin_enqueue_scripts() {
16
  wp_enqueue_media();
17
  if ( ! is_admin() ) {
18
- wp_register_script( 'media-grid', includes_url( 'js/media-grid.min.js' ), array( 'media-editor' ), '', true );
19
  }
20
  wp_enqueue_style( 'rwmb-media', RWMB_CSS_URL . 'media.css', array(), RWMB_VER );
21
  wp_enqueue_script( 'rwmb-media', RWMB_JS_URL . 'media.js', array( 'jquery-ui-sortable', 'underscore', 'backbone', 'media-grid' ), RWMB_VER, true );
22
 
23
- self::localize_script( 'rwmb-media', 'i18nRwmbMedia', array(
24
- 'add' => apply_filters( 'rwmb_media_add_string', _x( '+ Add Media', 'media', 'learnpress' ) ),
25
- 'single' => apply_filters( 'rwmb_media_single_files_string', _x( ' file', 'media', 'learnpress' ) ),
26
- 'multiple' => apply_filters( 'rwmb_media_multiple_files_string', _x( ' files', 'media', 'learnpress' ) ),
27
- 'remove' => apply_filters( 'rwmb_media_remove_string', _x( 'Remove', 'media', 'learnpress' ) ),
28
- 'edit' => apply_filters( 'rwmb_media_edit_string', _x( 'Edit', 'media', 'learnpress' ) ),
29
- 'view' => apply_filters( 'rwmb_media_view_string', _x( 'View', 'media', 'learnpress' ) ),
30
- 'noTitle' => _x( 'No Title', 'media', 'learnpress' ),
31
- 'loadingUrl' => admin_url( 'images/spinner.gif' ),
32
- 'extensions' => self::get_mime_extensions(),
33
- 'select' => apply_filters( 'rwmb_media_select_string', _x( 'Select Files', 'media', 'learnpress' ) ),
34
- 'or' => apply_filters( 'rwmb_media_or_string', _x( 'or', 'media', 'learnpress' ) ),
35
- 'uploadInstructions' => apply_filters( 'rwmb_media_upload_instructions_string', _x( 'Drop files here to upload', 'media', 'learnpress' ) ),
36
- ) );
 
 
 
 
37
  }
38
 
39
  /**
@@ -76,21 +80,27 @@ class RWMB_Media_Field extends RWMB_File_Field {
76
  */
77
  public static function normalize( $field ) {
78
  $field = parent::normalize( $field );
79
- $field = wp_parse_args( $field, array(
80
- 'std' => array(),
81
- 'mime_type' => '',
82
- 'max_file_uploads' => 0,
83
- 'force_delete' => false,
84
- 'max_status' => true,
85
- 'js_options' => array(),
86
- ) );
87
-
88
- $field['js_options'] = wp_parse_args( $field['js_options'], array(
89
- 'mimeType' => $field['mime_type'],
90
- 'maxFiles' => $field['max_file_uploads'],
91
- 'forceDelete' => $field['force_delete'] ? true : false,
92
- 'maxStatus' => $field['max_status'],
93
- ) );
 
 
 
 
 
 
94
 
95
  $field['multiple'] = true;
96
 
@@ -149,7 +159,7 @@ class RWMB_Media_Field extends RWMB_File_Field {
149
  * @return array|mixed
150
  */
151
  public static function value( $new, $old, $post_id, $field ) {
152
- $new = ! is_array( $new ) && is_string( $new ) ? explode( ',', $new ) : $new;
153
  array_walk( $new, 'absint' );
154
  return array_filter( array_unique( $new ) );
155
  }
@@ -163,6 +173,9 @@ class RWMB_Media_Field extends RWMB_File_Field {
163
  * @param array $field The field parameters.
164
  */
165
  public static function save( $new, $old, $post_id, $field ) {
 
 
 
166
  $storage = $field['storage'];
167
  $storage->delete( $post_id, $field['id'] );
168
  parent::save( $new, array(), $post_id, $field );
15
  public static function admin_enqueue_scripts() {
16
  wp_enqueue_media();
17
  if ( ! is_admin() ) {
18
+ wp_register_script( 'media-grid', includes_url( 'js/media-grid.min.js' ), array( 'media-editor' ), '4.9.7', true );
19
  }
20
  wp_enqueue_style( 'rwmb-media', RWMB_CSS_URL . 'media.css', array(), RWMB_VER );
21
  wp_enqueue_script( 'rwmb-media', RWMB_JS_URL . 'media.js', array( 'jquery-ui-sortable', 'underscore', 'backbone', 'media-grid' ), RWMB_VER, true );
22
 
23
+ self::localize_script(
24
+ 'rwmb-media',
25
+ 'i18nRwmbMedia',
26
+ array(
27
+ 'add' => apply_filters( 'rwmb_media_add_string', _x( '+ Add Media', 'media', 'meta-box' ) ),
28
+ 'single' => apply_filters( 'rwmb_media_single_files_string', _x( ' file', 'media', 'meta-box' ) ),
29
+ 'multiple' => apply_filters( 'rwmb_media_multiple_files_string', _x( ' files', 'media', 'meta-box' ) ),
30
+ 'remove' => apply_filters( 'rwmb_media_remove_string', _x( 'Remove', 'media', 'meta-box' ) ),
31
+ 'edit' => apply_filters( 'rwmb_media_edit_string', _x( 'Edit', 'media', 'meta-box' ) ),
32
+ 'view' => apply_filters( 'rwmb_media_view_string', _x( 'View', 'media', 'meta-box' ) ),
33
+ 'noTitle' => _x( 'No Title', 'media', 'meta-box' ),
34
+ 'loadingUrl' => admin_url( 'images/spinner.gif' ),
35
+ 'extensions' => self::get_mime_extensions(),
36
+ 'select' => apply_filters( 'rwmb_media_select_string', _x( 'Select Files', 'media', 'meta-box' ) ),
37
+ 'or' => apply_filters( 'rwmb_media_or_string', _x( 'or', 'media', 'meta-box' ) ),
38
+ 'uploadInstructions' => apply_filters( 'rwmb_media_upload_instructions_string', _x( 'Drop files here to upload', 'media', 'meta-box' ) ),
39
+ )
40
+ );
41
  }
42
 
43
  /**
80
  */
81
  public static function normalize( $field ) {
82
  $field = parent::normalize( $field );
83
+ $field = wp_parse_args(
84
+ $field,
85
+ array(
86
+ 'std' => array(),
87
+ 'mime_type' => '',
88
+ 'max_file_uploads' => 0,
89
+ 'force_delete' => false,
90
+ 'max_status' => true,
91
+ 'js_options' => array(),
92
+ )
93
+ );
94
+
95
+ $field['js_options'] = wp_parse_args(
96
+ $field['js_options'],
97
+ array(
98
+ 'mimeType' => $field['mime_type'],
99
+ 'maxFiles' => $field['max_file_uploads'],
100
+ 'forceDelete' => $field['force_delete'] ? true : false,
101
+ 'maxStatus' => $field['max_status'],
102
+ )
103
+ );
104
 
105
  $field['multiple'] = true;
106
 
159
  * @return array|mixed
160
  */
161
  public static function value( $new, $old, $post_id, $field ) {
162
+ $new = rwmb_csv_to_array( $new );
163
  array_walk( $new, 'absint' );
164
  return array_filter( array_unique( $new ) );
165
  }
173
  * @param array $field The field parameters.
174
  */
175
  public static function save( $new, $old, $post_id, $field ) {
176
+ if ( empty( $field['id'] ) || ! $field['save_field'] ) {
177
+ return;
178
+ }
179
  $storage = $field['storage'];
180
  $storage->delete( $post_id, $field['id'] );
181
  parent::save( $new, array(), $post_id, $field );
inc/libraries/meta-box/inc/fields/number.php CHANGED
@@ -19,11 +19,14 @@ class RWMB_Number_Field extends RWMB_Input_Field {
19
  public static function normalize( $field ) {
20
  $field = parent::normalize( $field );
21
 
22
- $field = wp_parse_args( $field, array(
23
- 'step' => 1,
24
- 'min' => 0,
25
- 'max' => false,
26
- ) );
 
 
 
27
 
28
  return $field;
29
  }
@@ -38,11 +41,14 @@ class RWMB_Number_Field extends RWMB_Input_Field {
38
  */
39
  public static function get_attributes( $field, $value = null ) {
40
  $attributes = parent::get_attributes( $field, $value );
41
- $attributes = wp_parse_args( $attributes, array(
42
- 'step' => $field['step'],
43
- 'max' => $field['max'],
44
- 'min' => $field['min'],
45
- ) );
 
 
 
46
  return $attributes;
47
  }
48
  }
19
  public static function normalize( $field ) {
20
  $field = parent::normalize( $field );
21
 
22
+ $field = wp_parse_args(
23
+ $field,
24
+ array(
25
+ 'step' => 1,
26
+ 'min' => 0,
27
+ 'max' => false,
28
+ )
29
+ );
30
 
31
  return $field;
32
  }
41
  */
42
  public static function get_attributes( $field, $value = null ) {
43
  $attributes = parent::get_attributes( $field, $value );
44
+ $attributes = wp_parse_args(
45
+ $attributes,
46
+ array(
47
+ 'step' => $field['step'],
48
+ 'max' => $field['max'],
49
+ 'min' => $field['min'],
50
+ )
51
+ );
52
  return $attributes;
53
  }
54
  }
inc/libraries/meta-box/inc/fields/object-choice.php CHANGED
@@ -10,16 +10,40 @@
10
  */
11
  abstract class RWMB_Object_Choice_Field extends RWMB_Choice_Field {
12
  /**
13
- * Get field HTML
 
14
  *
15
- * @param array $field Field parameters.
16
- * @param mixed $options Select options.
17
- * @param mixed $db_fields Database fields to use in the output.
18
- * @param mixed $meta Meta value.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  * @return string
20
  */
21
- public static function walk( $field, $options, $db_fields, $meta ) {
22
- return call_user_func( array( self::get_type_class( $field ), 'walk' ), $field, $options, $db_fields, $meta );
23
  }
24
 
25
  /**
@@ -31,11 +55,14 @@ abstract class RWMB_Object_Choice_Field extends RWMB_Choice_Field {
31
  */
32
  public static function normalize( $field ) {
33
  $field = parent::normalize( $field );
34
- $field = wp_parse_args( $field, array(
35
- 'flatten' => true,
36
- 'query_args' => array(),
37
- 'field_type' => 'select_advanced',
38
- ) );
 
 
 
39
 
40
  if ( 'checkbox_tree' === $field['field_type'] ) {
41
  $field['field_type'] = 'checkbox_list';
@@ -62,23 +89,12 @@ abstract class RWMB_Object_Choice_Field extends RWMB_Choice_Field {
62
  $attributes = call_user_func( array( self::get_type_class( $field ), 'get_attributes' ), $field, $value );
63
  if ( 'select_advanced' === $field['field_type'] ) {
64
  $attributes['class'] .= ' rwmb-select_advanced';
 
 
65
  }
66
  return $attributes;
67
  }
68
 
69
- /**
70
- * Get field names of object to be used by walker.
71
- *
72
- * @return array
73
- */
74
- public static function get_db_fields() {
75
- return array(
76
- 'parent' => '',
77
- 'id' => '',
78
- 'label' => '',
79
- );
80
- }
81
-
82
  /**
83
  * Enqueue scripts and styles.
84
  */
@@ -99,8 +115,10 @@ abstract class RWMB_Object_Choice_Field extends RWMB_Choice_Field {
99
  if ( in_array( $field['field_type'], array( 'checkbox_list', 'radio_list' ), true ) ) {
100
  return 'RWMB_Input_List_Field';
101
  }
102
- return self::get_class_name( array(
103
- 'type' => $field['field_type'],
104
- ) );
 
 
105
  }
106
  }
10
  */
11
  abstract class RWMB_Object_Choice_Field extends RWMB_Choice_Field {
12
  /**
13
+ * Show field HTML.
14
+ * Populate field options before showing to make sure query is made only once.
15
  *
16
+ * @param array $field Field parameters.
17
+ * @param bool $saved Whether the meta box is saved at least once.
18
+ * @param int $post_id Post ID.
19
+ */
20
+ public static function show( $field, $saved, $post_id = 0 ) {
21
+ $field['options'] = self::call( $field, 'query' );
22
+
23
+ parent::show( $field, $saved, $post_id );
24
+ }
25
+
26
+ /**
27
+ * Get field HTML.
28
+ *
29
+ * @param mixed $meta Meta value.
30
+ * @param array $field Field parameters.
31
+ * @return string
32
+ */
33
+ public static function html( $meta, $field ) {
34
+ $html = call_user_func( array( self::get_type_class( $field ), 'html' ), $meta, $field );
35
+ $html .= self::call( 'add_new_form', $field );
36
+ return $html;
37
+ }
38
+
39
+ /**
40
+ * Render "Add New" form
41
+ *
42
+ * @param array $field Field settings.
43
  * @return string
44
  */
45
+ public static function add_new_form( $field ) {
46
+ return '';
47
  }
48
 
49
  /**
55
  */
56
  public static function normalize( $field ) {
57
  $field = parent::normalize( $field );
58
+ $field = wp_parse_args(
59
+ $field,
60
+ array(
61
+ 'flatten' => true,
62
+ 'query_args' => array(),
63
+ 'field_type' => 'select_advanced',
64
+ )
65
+ );
66
 
67
  if ( 'checkbox_tree' === $field['field_type'] ) {
68
  $field['field_type'] = 'checkbox_list';
89
  $attributes = call_user_func( array( self::get_type_class( $field ), 'get_attributes' ), $field, $value );
90
  if ( 'select_advanced' === $field['field_type'] ) {
91
  $attributes['class'] .= ' rwmb-select_advanced';
92
+ } elseif ( 'select' === $field['field_type'] ) {
93
+ $attributes['class'] .= ' rwmb-select';
94
  }
95
  return $attributes;
96
  }
97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  /**
99
  * Enqueue scripts and styles.
100
  */
115
  if ( in_array( $field['field_type'], array( 'checkbox_list', 'radio_list' ), true ) ) {
116
  return 'RWMB_Input_List_Field';
117
  }
118
+ return self::get_class_name(
119
+ array(
120
+ 'type' => $field['field_type'],
121
+ )
122
+ );
123
  }
124
  }
inc/libraries/meta-box/inc/fields/oembed.php CHANGED
@@ -9,11 +9,36 @@
9
  * OEmbed field class.
10
  */
11
  class RWMB_OEmbed_Field extends RWMB_Text_Field {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  /**
13
  * Enqueue scripts and styles.
14
  */
15
  public static function admin_enqueue_scripts() {
16
- wp_enqueue_style( 'rwmb-oembed', RWMB_CSS_URL . 'oembed.css' );
17
  wp_enqueue_script( 'rwmb-oembed', RWMB_JS_URL . 'oembed.js', array( 'jquery', 'underscore' ), RWMB_VER, true );
18
  }
19
 
@@ -28,17 +53,19 @@ class RWMB_OEmbed_Field extends RWMB_Text_Field {
28
  * Ajax callback for returning oEmbed HTML.
29
  */
30
  public static function wp_ajax_get_embed() {
31
- $url = (string) filter_input( INPUT_POST, 'url', FILTER_SANITIZE_URL );
32
- wp_send_json_success( self::get_embed( $url ) );
 
33
  }
34
 
35
  /**
36
  * Get embed html from url.
37
  *
38
- * @param string $url URL.
 
39
  * @return string
40
  */
41
- public static function get_embed( $url ) {
42
  /**
43
  * Set arguments for getting embeded HTML.
44
  * Without arguments, default width will be taken from global $content_width, which can break UI in the admin.
@@ -58,10 +85,19 @@ class RWMB_OEmbed_Field extends RWMB_Text_Field {
58
 
59
  // If no oembed provides found, try WordPress auto embed.
60
  if ( ! $embed ) {
61
- $embed = $GLOBALS['wp_embed']->shortcode( $args, $url );
 
 
 
 
 
 
 
 
62
  }
 
63
 
64
- return $embed ? $embed : __( 'Embed HTML not available.', 'learnpress' );
65
  }
66
 
67
  /**
@@ -75,7 +111,7 @@ class RWMB_OEmbed_Field extends RWMB_Text_Field {
75
  return parent::html( $meta, $field ) . sprintf(
76
  '<span class="spinner"></span>
77
  <div class="rwmb-embed-media">%s</div>',
78
- $meta ? self::get_embed( $meta ) : ''
79
  );
80
  }
81
 
@@ -88,7 +124,7 @@ class RWMB_OEmbed_Field extends RWMB_Text_Field {
88
  * @return array
89
  */
90
  public static function get_attributes( $field, $value = null ) {
91
- $attributes = parent::get_attributes( $field, $value );
92
  $attributes['type'] = 'url';
93
  return $attributes;
94
  }
@@ -104,6 +140,6 @@ class RWMB_OEmbed_Field extends RWMB_Text_Field {
104
  * @return string
105
  */
106
  public static function format_single_value( $field, $value, $args, $post_id ) {
107
- return self::get_embed( $value );
108
  }
109
  }
9
  * OEmbed field class.
10
  */
11
  class RWMB_OEmbed_Field extends RWMB_Text_Field {
12
+ /**
13
+ * Normalize parameters for field.
14
+ *
15
+ * @param array $field Field parameters.
16
+ * @return array
17
+ */
18
+ public static function normalize( $field ) {
19
+ $field = parent::normalize( $field );
20
+
21
+ $field = wp_parse_args(
22
+ $field,
23
+ array(
24
+ 'not_available_string' => __( 'Embed HTML not available.', 'meta-box' ),
25
+ )
26
+ );
27
+ $field['attributes'] = wp_parse_args(
28
+ $field['attributes'],
29
+ array(
30
+ 'data-not-available' => $field['not_available_string'],
31
+ )
32
+ );
33
+
34
+ return $field;
35
+ }
36
+
37
  /**
38
  * Enqueue scripts and styles.
39
  */
40
  public static function admin_enqueue_scripts() {
41
+ wp_enqueue_style( 'rwmb-oembed', RWMB_CSS_URL . 'oembed.css', '', RWMB_VER );
42
  wp_enqueue_script( 'rwmb-oembed', RWMB_JS_URL . 'oembed.js', array( 'jquery', 'underscore' ), RWMB_VER, true );
43
  }
44
 
53
  * Ajax callback for returning oEmbed HTML.
54
  */
55
  public static function wp_ajax_get_embed() {
56
+ $url = (string) filter_input( INPUT_POST, 'url', FILTER_SANITIZE_URL );
57
+ $not_available = (string) filter_input( INPUT_POST, 'not_available' );
58
+ wp_send_json_success( self::get_embed( $url, $not_available ) );
59
  }
60
 
61
  /**
62
  * Get embed html from url.
63
  *
64
+ * @param string $url URL.
65
+ * @param string $not_available Not available string displayed to users.
66
  * @return string
67
  */
68
+ public static function get_embed( $url, $not_available = '' ) {
69
  /**
70
  * Set arguments for getting embeded HTML.
71
  * Without arguments, default width will be taken from global $content_width, which can break UI in the admin.
85
 
86
  // If no oembed provides found, try WordPress auto embed.
87
  if ( ! $embed ) {
88
+ global $wp_embed;
89
+ $temp = $wp_embed->return_false_on_fail;
90
+ $wp_embed->return_false_on_fail = true; // Do not fallback to make a link.
91
+ $embed = $wp_embed->shortcode( $args, $url );
92
+ $wp_embed->return_false_on_fail = $temp;
93
+ }
94
+
95
+ if ( $not_available ) {
96
+ $not_available = '<div class="rwmb-oembed-not-available">' . wp_kses_post( $not_available ) . '</div>';
97
  }
98
+ $not_available = apply_filters( 'rwmb_oembed_not_available_string', $not_available );
99
 
100
+ return $embed ? $embed : $not_available;
101
  }
102
 
103
  /**
111
  return parent::html( $meta, $field ) . sprintf(
112
  '<span class="spinner"></span>
113
  <div class="rwmb-embed-media">%s</div>',
114
+ $meta ? self::get_embed( $meta, $field['not_available_string'] ) : ''
115
  );
116
  }
117
 
124
  * @return array
125
  */
126
  public static function get_attributes( $field, $value = null ) {
127
+ $attributes = parent::get_attributes( $field, $value );
128
  $attributes['type'] = 'url';
129
  return $attributes;
130
  }
140
  * @return string
141
  */
142
  public static function format_single_value( $field, $value, $args, $post_id ) {
143
+ return self::get_embed( $value, $field['not_available_string'] );
144
  }
145
  }
inc/libraries/meta-box/inc/fields/osm.php ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The Open Street Map field.
4
+ *
5
+ * @package Meta Box
6
+ * @since 4.15.0
7
+ */
8
+
9
+ /**
10
+ * Open Street Map field class.
11
+ */
12
+ class RWMB_OSM_Field extends RWMB_Field {
13
+ /**
14
+ * Enqueue scripts and styles.
15
+ */
16
+ public static function admin_enqueue_scripts() {
17
+ // Because map is a hosted service, it's ok to use hosted Leaflet scripts.
18
+ wp_enqueue_style( 'leaflet', 'https://unpkg.com/leaflet@1.3.1/dist/leaflet.css', array(), '1.3.1' );
19
+ wp_enqueue_script( 'leaflet', 'https://unpkg.com/leaflet@1.3.1/dist/leaflet.js', array(), '1.3.1', true );
20
+
21
+ wp_enqueue_style( 'rwmb-osm', RWMB_CSS_URL . 'osm.css', array( 'leaflet' ), RWMB_VER );
22
+ wp_enqueue_script( 'rwmb-osm', RWMB_JS_URL . 'osm.js', array( 'jquery', 'leaflet' ), RWMB_VER, true );
23
+ self::localize_script(
24
+ 'rwmb-osm',
25
+ 'RWMB_Osm',
26
+ array(
27
+ 'no_results_string' => __( 'No results found', 'meta-box' ),
28
+ )
29
+ );
30
+ }
31
+
32
+ /**
33
+ * Get field HTML.
34
+ *
35
+ * @param mixed $meta Meta value.
36
+ * @param array $field Field parameters.
37
+ *
38
+ * @return string
39
+ */
40
+ public static function html( $meta, $field ) {
41
+ $address = is_array( $field['address_field'] ) ? implode( ',', $field['address_field'] ) : $field['address_field'];
42
+ $html = sprintf(
43
+ '<div class="rwmb-osm-field" data-address-field="%s">',
44
+ esc_attr( $address )
45
+ );
46
+
47
+ $html .= sprintf(
48
+ '<div class="rwmb-osm-canvas" data-default-loc="%s" data-region="%s" data-language="%s"></div>
49
+ <input type="hidden" name="%s" class="rwmb-osm-coordinate" value="%s">',
50
+ esc_attr( $field['std'] ),
51
+ esc_attr( $field['region'] ),
52
+ esc_attr( $field['language'] ),
53
+ esc_attr( $field['field_name'] ),
54
+ esc_attr( $meta )
55
+ );
56
+
57
+ if ( $field['address_field'] ) {
58
+ $html .= sprintf(
59
+ '<button class="button rwmb-osm-goto-address-button">%s</button>',
60
+ esc_html__( 'Find Address', 'meta-box' )
61
+ );
62
+ }
63
+
64
+ $html .= '</div>';
65
+
66
+ return $html;
67
+ }
68
+
69
+ /**
70
+ * Normalize parameters for field.
71
+ *
72
+ * @param array $field Field parameters.
73
+ *
74
+ * @return array
75
+ */
76
+ public static function normalize( $field ) {
77
+ $field = parent::normalize( $field );
78
+ $field = wp_parse_args(
79
+ $field,
80
+ array(
81
+ 'std' => '',
82
+ 'address_field' => '',
83
+ 'language' => '',
84
+ 'region' => '',
85
+ )
86
+ );
87
+
88
+ return $field;
89
+ }
90
+
91
+ /**
92
+ * Get the field value.
93
+ * The difference between this function and 'meta' function is 'meta' function always returns the escaped value
94
+ * of the field saved in the database, while this function returns more meaningful value of the field.
95
+ *
96
+ * @param array $field Field parameters.
97
+ * @param array $args Not used for this field.
98
+ * @param int|null $post_id Post ID. null for current post. Optional.
99
+ *
100
+ * @return mixed Array(latitude, longitude, zoom)
101
+ */
102
+ public static function get_value( $field, $args = array(), $post_id = null ) {
103
+ $value = parent::get_value( $field, $args, $post_id );
104
+ list( $latitude, $longitude, $zoom ) = explode( ',', $value . ',,' );
105
+ return compact( 'latitude', 'longitude', 'zoom' );
106
+ }
107
+
108
+ /**
109
+ * Output the field value.
110
+ * Display Google maps.
111
+ *
112
+ * @param array $field Field parameters.
113
+ * @param array $args Additional arguments for the map.
114
+ * @param int|null $post_id Post ID. null for current post. Optional.
115
+ *
116
+ * @return string HTML output of the field
117
+ */
118
+ public static function the_value( $field, $args = array(), $post_id = null ) {
119
+ $value = parent::get_value( $field, $args, $post_id );
120
+ return self::render_map( $value, $args );
121
+ }
122
+
123
+ /**
124
+ * Render a map in the frontend.
125
+ *
126
+ * @param array $location The [latitude, longitude[, zoom]] location.
127
+ * @param array $args Additional arguments for the map.
128
+ *
129
+ * @return string
130
+ */
131
+ public static function render_map( $location, $args = array() ) {
132
+ list( $latitude, $longitude, $zoom ) = explode( ',', $location . ',,' );
133
+ if ( ! $latitude || ! $longitude ) {
134
+ return '';
135
+ }
136
+
137
+ $args = wp_parse_args(
138
+ $args,
139
+ array(
140
+ 'latitude' => $latitude,
141
+ 'longitude' => $longitude,
142
+ 'width' => '100%',
143
+ 'height' => '480px',
144
+ 'marker' => true, // Display marker?
145
+ 'marker_title' => '', // Marker title, when hover.
146
+ 'info_window' => '', // Content of info window (when click on marker). HTML allowed.
147
+ 'js_options' => array(),
148
+ )
149
+ );
150
+
151
+ wp_enqueue_style( 'leaflet', 'https://unpkg.com/leaflet@1.3.1/dist/leaflet.css', array(), '1.3.1' );
152
+ wp_enqueue_script( 'leaflet', 'https://unpkg.com/leaflet@1.3.1/dist/leaflet.js', array(), '1.3.1', true );
153
+ wp_enqueue_script( 'rwmb-osm-frontend', RWMB_JS_URL . 'osm-frontend.js', array( 'jquery', 'leaflet' ), RWMB_VER, true );
154
+
155
+ /*
156
+ * More Open Street Map options
157
+ * @link https://leafletjs.com/reference-1.3.0.html#map-option
158
+ */
159
+ $args['js_options'] = wp_parse_args(
160
+ $args['js_options'],
161
+ array(
162
+ // Default to 'zoom' level set in admin, but can be overwritten.
163
+ 'zoom' => $zoom,
164
+ )
165
+ );
166
+
167
+ $output = sprintf(
168
+ '<div class="rwmb-osm-canvas" data-osm_options="%s" style="width:%s;height:%s"></div>',
169
+ esc_attr( wp_json_encode( $args ) ),
170
+ esc_attr( $args['width'] ),
171
+ esc_attr( $args['height'] )
172
+ );
173
+ return $output;
174
+ }
175
+ }
inc/libraries/meta-box/inc/fields/post.php CHANGED
@@ -16,31 +16,37 @@ class RWMB_Post_Field extends RWMB_Object_Choice_Field {
16
  * @return array
17
  */
18
  public static function normalize( $field ) {
19
- // Set default field args.
20
- $field = parent::normalize( $field );
21
- $field = wp_parse_args( $field, array(
22
- 'post_type' => 'post',
23
- 'parent' => false,
24
- ) );
 
 
25
 
26
- if ( ! isset( $field['query_args']['post_type'] ) ) {
27
- $field['query_args']['post_type'] = $field['post_type'];
28
- }
29
 
30
- /**
31
- * Set default placeholder.
32
  * - If multiple post types: show 'Select a post'.
33
  * - If single post type: show 'Select a %post_type_name%'.
34
  */
35
- if ( empty( $field['placeholder'] ) ) {
36
- $field['placeholder'] = __( 'Select a post', 'learnpress' );
37
- if ( is_string( $field['query_args']['post_type'] ) && post_type_exists( $field['query_args']['post_type'] ) ) {
38
- $post_type_object = get_post_type_object( $field['query_args']['post_type'] );
39
-
40
- // Translators: %s is the post type singular label.
41
- $field['placeholder'] = sprintf( __( 'Select a %s', 'learnpress' ), $post_type_object->labels->singular_name );
42
  }
43
  }
 
 
 
 
 
 
44
 
45
  // Set parent option, which will change field name to `parent_id` to save as post parent.
46
  if ( $field['parent'] ) {
@@ -48,26 +54,42 @@ class RWMB_Post_Field extends RWMB_Object_Choice_Field {
48
  $field['field_name'] = 'parent_id';
49
  }
50
 
51
- // Set default query args.
52
- $field['query_args'] = wp_parse_args( $field['query_args'], array(
53
- 'post_status' => 'publish',
54
- 'posts_per_page' => - 1,
55
- ) );
56
 
57
  return $field;
58
  }
59
 
60
  /**
61
- * Get field names of object to be used by walker.
62
  *
63
- * @return array
 
64
  */
65
- public static function get_db_fields() {
66
- return array(
67
- 'parent' => 'post_parent',
68
- 'id' => 'ID',
69
- 'label' => 'post_title',
 
 
 
 
 
 
70
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  }
72
 
73
  /**
@@ -88,32 +110,25 @@ class RWMB_Post_Field extends RWMB_Object_Choice_Field {
88
  }
89
 
90
  /**
91
- * Get options for walker.
92
- *
93
- * @param array $field Field parameters.
94
- * @return array
95
- */
96
- public static function get_options( $field ) {
97
- $query = new WP_Query( $field['query_args'] );
98
- return $query->have_posts() ? $query->posts : array();
99
- }
100
-
101
- /**
102
- * Get option label.
103
  *
104
- * @param array $field Field parameters.
105
- * @param string $value Option value.
 
 
106
  *
107
  * @return string
108
  */
109
- public static function get_option_label( $field, $value ) {
110
- return sprintf(
111
  '<a href="%s" title="%s">%s</a>',
112
  esc_url( get_permalink( $value ) ),
113
- the_title_attribute( array(
114
- 'post' => $value,
115
- 'echo' => false,
116
- ) ),
 
 
117
  get_the_title( $value )
118
  );
119
  }
16
  * @return array
17
  */
18
  public static function normalize( $field ) {
19
+ $field = wp_parse_args(
20
+ $field,
21
+ array(
22
+ 'post_type' => 'post',
23
+ 'parent' => false,
24
+ 'query_args' => array(),
25
+ )
26
+ );
27
 
28
+ $field['post_type'] = (array) $field['post_type'];
 
 
29
 
30
+ /*
31
+ * Set default placeholder:
32
  * - If multiple post types: show 'Select a post'.
33
  * - If single post type: show 'Select a %post_type_name%'.
34
  */
35
+ $placeholder = __( 'Select a post', 'meta-box' );
36
+ if ( 1 === count( $field['post_type'] ) ) {
37
+ $post_type = reset( $field['post_type'] );
38
+ $post_type_object = get_post_type_object( $post_type );
39
+ if ( ! empty( $post_type_object ) ) {
40
+ // Translators: %s is the taxonomy singular label.
41
+ $placeholder = sprintf( __( 'Select a %s', 'meta-box' ), strtolower( $post_type_object->labels->singular_name ) );
42
  }
43
  }
44
+ $field = wp_parse_args(
45
+ $field,
46
+ array(
47
+ 'placeholder' => $placeholder,
48
+ )
49
+ );
50
 
51
  // Set parent option, which will change field name to `parent_id` to save as post parent.
52
  if ( $field['parent'] ) {
54
  $field['field_name'] = 'parent_id';
55
  }
56
 
57
+ $field = parent::normalize( $field );
 
 
 
 
58
 
59
  return $field;
60
  }
61
 
62
  /**
63
+ * Query posts for field options.
64
  *
65
+ * @param array $field Field settings.
66
+ * @return array Field options array.
67
  */
68
+ public static function query( $field ) {
69
+ $args = wp_parse_args(
70
+ $field['query_args'],
71
+ array(
72
+ 'post_type' => $field['post_type'],
73
+ 'post_status' => 'publish',
74
+ 'posts_per_page' => -1,
75
+ 'no_found_rows' => true,
76
+ 'update_post_meta_cache' => false,
77
+ 'update_post_term_cache' => false,
78
+ )
79
  );
80
+ $query = new WP_Query( $args );
81
+ $options = array();
82
+ foreach ( $query->posts as $post ) {
83
+ $options[ $post->ID ] = array_merge(
84
+ array(
85
+ 'value' => $post->ID,
86
+ 'label' => $post->post_title,
87
+ 'parent' => $post->post_parent,
88
+ ),
89
+ (array) $post
90
+ );
91
+ }
92
+ return $options;
93
  }
94
 
95
  /**
110
  }
111
 
112
  /**
113
+ * Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
 
 
 
 
 
 
 
 
 
 
 
114
  *
115
+ * @param array $field Field parameters.
116
+ * @param string $value The value.
117
+ * @param array $args Additional arguments. Rarely used. See specific fields for details.
118
+ * @param int|null $post_id Post ID. null for current post. Optional.
119
  *
120
  * @return string
121
  */
122
+ public static function format_single_value( $field, $value, $args, $post_id ) {
123
+ return ! $value ? '' : sprintf(
124
  '<a href="%s" title="%s">%s</a>',
125
  esc_url( get_permalink( $value ) ),
126
+ the_title_attribute(
127
+ array(
128
+ 'post' => $value,
129
+ 'echo' => false,
130
+ )
131
+ ),
132
  get_the_title( $value )
133
  );
134
  }
inc/libraries/meta-box/inc/fields/radio.php CHANGED
@@ -17,7 +17,7 @@ class RWMB_Radio_Field extends RWMB_Input_List_Field {
17
  */
18
  public static function normalize( $field ) {
19
  $field['multiple'] = false;
20
- $field = parent::normalize( $field );
21
 
22
  return $field;
23
  }
17
  */
18
  public static function normalize( $field ) {
19
  $field['multiple'] = false;
20
+ $field = parent::normalize( $field );
21
 
22
  return $field;
23
  }
inc/libraries/meta-box/inc/fields/range.php CHANGED
@@ -17,7 +17,7 @@ class RWMB_Range_Field extends RWMB_Number_Field {
17
  * @return string
18
  */
19
  public static function html( $meta, $field ) {
20
- $output = parent::html( $meta, $field );
21
  $output .= sprintf( '<span class="rwmb-output">%s</span>', $meta );
22
  return $output;
23
  }
@@ -37,9 +37,12 @@ class RWMB_Range_Field extends RWMB_Number_Field {
37
  * @return array
38
  */
39
  public static function normalize( $field ) {
40
- $field = wp_parse_args( $field, array(
41
- 'max' => 10,
42
- ) );
 
 
 
43
  $field = parent::normalize( $field );
44
  return $field;
45
  }
17
  * @return string
18
  */
19
  public static function html( $meta, $field ) {
20
+ $output = parent::html( $meta, $field );
21
  $output .= sprintf( '<span class="rwmb-output">%s</span>', $meta );
22
  return $output;
23
  }
37
  * @return array
38
  */
39
  public static function normalize( $field ) {
40
+ $field = wp_parse_args(
41
+ $field,
42
+ array(
43
+ 'max' => 10,
44
+ )
45
+ );
46
  $field = parent::normalize( $field );
47
  return $field;
48
  }
inc/libraries/meta-box/inc/fields/select-advanced.php CHANGED
@@ -40,18 +40,24 @@ class RWMB_Select_Advanced_Field extends RWMB_Select_Field {
40
  * @return array
41
  */
42
  public static function normalize( $field ) {
43
- $field = wp_parse_args( $field, array(
44
- 'js_options' => array(),
45
- 'placeholder' => __( 'Select an item', 'learnpress' ),
46
- ) );
 
 
 
47
 
48
  $field = parent::normalize( $field );
49
 
50
- $field['js_options'] = wp_parse_args( $field['js_options'], array(
51
- 'allowClear' => true,
52
- 'width' => 'none',
53
- 'placeholder' => $field['placeholder'],
54
- ) );
 
 
 
55
 
56
  return $field;
57
  }
@@ -65,9 +71,12 @@ class RWMB_Select_Advanced_Field extends RWMB_Select_Field {
65
  */
66
  public static function get_attributes( $field, $value = null ) {
67
  $attributes = parent::get_attributes( $field, $value );
68
- $attributes = wp_parse_args( $attributes, array(
69
- 'data-options' => wp_json_encode( $field['js_options'] ),
70
- ) );
 
 
 
71
 
72
  return $attributes;
73
  }
40
  * @return array
41
  */
42
  public static function normalize( $field ) {
43
+ $field = wp_parse_args(
44
+ $field,
45
+ array(
46
+ 'js_options' => array(),
47
+ 'placeholder' => __( 'Select an item', 'meta-box' ),
48
+ )
49
+ );
50
 
51
  $field = parent::normalize( $field );
52
 
53
+ $field['js_options'] = wp_parse_args(
54
+ $field['js_options'],
55
+ array(
56
+ 'allowClear' => true,
57
+ 'width' => 'none',
58
+ 'placeholder' => $field['placeholder'],
59
+ )
60
+ );
61
 
62
  return $field;
63
  }
71
  */
72
  public static function get_attributes( $field, $value = null ) {
73
  $attributes = parent::get_attributes( $field, $value );
74
+ $attributes = wp_parse_args(
75
+ $attributes,
76
+ array(
77
+ 'data-options' => wp_json_encode( $field['js_options'] ),
78
+ )
79
+ );
80
 
81
  return $attributes;
82
  }
inc/libraries/meta-box/inc/fields/select-tree.php CHANGED
@@ -10,18 +10,16 @@
10
  */
11
  class RWMB_Select_Tree_Field extends RWMB_Select_Field {
12
  /**
13
- * Walk options.
14
- *
15
- * @param array $field Field parameters.
16
- * @param mixed $options Select options.
17
- * @param mixed $db_fields Database fields to use in the output.
18
- * @param mixed $meta Meta value.
19
  *
 
 
20
  * @return string
21
  */
22
- public static function walk( $field, $options, $db_fields, $meta ) {
23
- $walker = new RWMB_Walker_Select_Tree( $db_fields, $field, $meta );
24
- return $walker->walk( $options );
 
25
  }
26
 
27
  /**
10
  */
11
  class RWMB_Select_Tree_Field extends RWMB_Select_Field {
12
  /**
13
+ * Get field HTML.
 
 
 
 
 
14
  *
15
+ * @param mixed $meta Meta value.
16
+ * @param array $field Field parameters.
17
  * @return string
18
  */
19
+ public static function html( $meta, $field ) {
20
+ $options = self::transform_options( $field['options'] );
21
+ $walker = new RWMB_Walker_Select_Tree( $field, $meta );
22
+ return $options ? $walker->walk( $options ) : '';
23
  }
24
 
25
  /**
inc/libraries/meta-box/inc/fields/select.php CHANGED
@@ -18,26 +18,25 @@ class RWMB_Select_Field extends RWMB_Choice_Field {
18
  }
19
 
20
  /**
21
- * Walk options.
22
- *
23
- * @param array $field Field parameters.
24
- * @param mixed $options Select options.
25
- * @param mixed $db_fields Database fields to use in the output.
26
- * @param mixed $meta Meta value.
27
  *
 
 
28
  * @return string
29
  */
30
- public static function walk( $field, $options, $db_fields, $meta ) {
31
- $attributes = self::call( 'get_attributes', $field, $meta );
32
- $walker = new RWMB_Walker_Select( $db_fields, $field, $meta );
33
- $output = sprintf(
 
 
34
  '<select %s>',
35
  self::render_attributes( $attributes )
36
  );
37
- if ( false === $field['multiple'] ) {
38
- $output .= $field['placeholder'] ? '<option value="">' . esc_html( $field['placeholder'] ) . '</option>' : '';
39
  }
40
- $output .= $walker->walk( $options, $field['flatten'] ? - 1 : 0 );
41
  $output .= '</select>';
42
  $output .= self::get_select_all_html( $field );
43
  return $output;
@@ -52,9 +51,12 @@ class RWMB_Select_Field extends RWMB_Choice_Field {
52
  public static function normalize( $field ) {
53
  $field = parent::normalize( $field );
54
  $field = $field['multiple'] ? RWMB_Multiple_Values_Field::normalize( $field ) : $field;
55
- $field = wp_parse_args( $field, array(
56
- 'select_all_none' => false,
57
- ) );
 
 
 
58
 
59
  return $field;
60
  }
@@ -69,9 +71,12 @@ class RWMB_Select_Field extends RWMB_Choice_Field {
69
  */
70
  public static function get_attributes( $field, $value = null ) {
71
  $attributes = parent::get_attributes( $field, $value );
72
- $attributes = wp_parse_args( $attributes, array(
73
- 'multiple' => $field['multiple'],
74
- ) );
 
 
 
75
 
76
  return $attributes;
77
  }
@@ -84,7 +89,7 @@ class RWMB_Select_Field extends RWMB_Choice_Field {
84
  */
85
  public static function get_select_all_html( $field ) {
86
  if ( $field['multiple'] && $field['select_all_none'] ) {
87
- return '<div class="rwmb-select-all-none">' . __( 'Select', 'learnpress' ) . ': <a data-type="all" href="#">' . __( 'All', 'learnpress' ) . '</a> | <a data-type="none" href="#">' . __( 'None', 'learnpress' ) . '</a></div>';
88
  }
89
  return '';
90
  }
18
  }
19
 
20
  /**
21
+ * Get field HTML.
 
 
 
 
 
22
  *
23
+ * @param mixed $meta Meta value.
24
+ * @param array $field Field parameters.
25
  * @return string
26
  */
27
+ public static function html( $meta, $field ) {
28
+ $options = self::transform_options( $field['options'] );
29
+ $attributes = self::call( 'get_attributes', $field, $meta );
30
+ $attributes['data-selected'] = $meta;
31
+ $walker = new RWMB_Walker_Select( $field, $meta );
32
+ $output = sprintf(
33
  '<select %s>',
34
  self::render_attributes( $attributes )
35
  );
36
+ if ( ! $field['multiple'] && $field['placeholder'] ) {
37
+ $output .= '<option value="">' . esc_html( $field['placeholder'] ) . '</option>';
38
  }
39
+ $output .= $walker->walk( $options, $field['flatten'] ? -1 : 0 );
40
  $output .= '</select>';
41
  $output .= self::get_select_all_html( $field );
42
  return $output;
51
  public static function normalize( $field ) {
52
  $field = parent::normalize( $field );
53
  $field = $field['multiple'] ? RWMB_Multiple_Values_Field::normalize( $field ) : $field;
54
+ $field = wp_parse_args(
55
+ $field,
56
+ array(
57
+ 'select_all_none' => false,
58
+ )
59
+ );
60
 
61
  return $field;
62
  }
71
  */
72
  public static function get_attributes( $field, $value = null ) {
73
  $attributes = parent::get_attributes( $field, $value );
74
+ $attributes = wp_parse_args(
75
+ $attributes,
76
+ array(
77
+ 'multiple' => $field['multiple'],
78
+ )
79
+ );
80
 
81
  return $attributes;
82
  }
89
  */
90
  public static function get_select_all_html( $field ) {
91
  if ( $field['multiple'] && $field['select_all_none'] ) {
92
+ return '<div class="rwmb-select-all-none">' . __( 'Select', 'meta-box' ) . ': <a data-type="all" href="#">' . __( 'All', 'meta-box' ) . '</a> | <a data-type="none" href="#">' . __( 'None', 'meta-box' ) . '</a></div>';
93
  }
94
  return '';
95
  }
inc/libraries/meta-box/inc/fields/sidebar.php ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The sidebar select field.
4
+ *
5
+ * @package Meta Box
6
+ */
7
+
8
+ /**
9
+ * Sidebar field class.
10
+ */
11
+ class RWMB_Sidebar_Field extends RWMB_Object_Choice_Field {
12
+ /**
13
+ * Normalize parameters for field.
14
+ *
15
+ * @param array $field Field parameters.
16
+ *
17
+ * @return array
18
+ */
19
+ public static function normalize( $field ) {
20
+ $field = wp_parse_args(
21
+ $field,
22
+ array(
23
+ 'placeholder' => __( 'Select a sidebar', 'meta-box' ),
24
+ )
25
+ );
26
+
27
+ $field = parent::normalize( $field );
28
+
29
+ return $field;
30
+ }
31
+
32
+ /**
33
+ * Get sidebars for field options.
34
+ *
35
+ * @param array $field Field settings.
36
+ * @return array Field options array.
37
+ */
38
+ public static function query( $field ) {
39
+ global $wp_registered_sidebars;
40
+ $options = array();
41
+ foreach ( $wp_registered_sidebars as $sidebar ) {
42
+ $options[ $sidebar['id'] ] = array(
43
+ 'value' => $sidebar['id'],
44
+ 'label' => $sidebar['name'],
45
+ );
46
+ }
47
+ return $options;
48
+ }
49
+
50
+ /**
51
+ * Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
52
+ *
53
+ * @param array $field Field parameters.
54
+ * @param string $value The value.
55
+ * @param array $args Additional arguments. Rarely used. See specific fields for details.
56
+ * @param int|null $post_id Post ID. null for current post. Optional.
57
+ *
58
+ * @return string
59
+ */
60
+ public static function format_single_value( $field, $value, $args, $post_id ) {
61
+ if ( ! is_active_sidebar( $value ) ) {
62
+ return '';
63
+ }
64
+ ob_start();
65
+ dynamic_sidebar( $value );
66
+ return ob_get_clean();
67
+ }
68
+ }
inc/libraries/meta-box/inc/fields/single-image.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The advanced image upload field which uses WordPress media popup to upload and select images.
4
+ *
5
+ * @package Meta Box
6
+ */
7
+
8
+ /**
9
+ * Image advanced field class.
10
+ */
11
+ class RWMB_Single_Image_Field extends RWMB_Image_Advanced_Field {
12
+ /**
13
+ * Normalize parameters for field.
14
+ *
15
+ * @param array $field Field parameters.
16
+ *
17
+ * @return array
18
+ */
19
+ public static function normalize( $field ) {
20
+ $field['max_file_uploads'] = 1;
21
+ $field['max_status'] = false;
22
+
23
+ $field = parent::normalize( $field );
24
+
25
+ $field['attributes'] = wp_parse_args(
26
+ $field['attributes'],
27
+ array(
28
+ 'class' => '',
29
+ 'data-single-image' => 1,
30
+ )
31
+ );
32
+
33
+ $field['attributes']['class'] .= ' rwmb-image_advanced';
34
+ $field['multiple'] = false;
35
+
36
+ return $field;
37
+ }
38
+
39
+ /**
40
+ * Get meta values to save.
41
+ *
42
+ * @param mixed $new The submitted meta value.
43
+ * @param mixed $old The existing meta value.
44
+ * @param int $post_id The post ID.
45
+ * @param array $field The field parameters.
46
+ *
47
+ * @return array|mixed
48
+ */
49
+ public static function value( $new, $old, $post_id, $field ) {
50
+ return $new;
51
+ }
52
+
53
+ /**
54
+ * Get the field value. Return meaningful info of the files.
55
+ *
56
+ * @param array $field Field parameters.
57
+ * @param array $args Not used for this field.
58
+ * @param int|null $post_id Post ID. null for current post. Optional.
59
+ *
60
+ * @return mixed Full info of uploaded files
61
+ */
62
+ public static function get_value( $field, $args = array(), $post_id = null ) {
63
+ $value = RWMB_Field::get_value( $field, $args, $post_id );
64
+
65
+ if ( ! is_array( $value ) ) {
66
+ return RWMB_Image_Field::file_info( $value, $args );
67
+ }
68
+
69
+ $return = array();
70
+ foreach ( $value as $image_id ) {
71
+ $return[] = RWMB_Image_Field::file_info( $image_id, $args );
72
+ }
73
+
74
+ return $return;
75
+ }
76
+ }
inc/libraries/meta-box/inc/fields/slider.php CHANGED
@@ -17,7 +17,7 @@ class RWMB_Slider_Field extends RWMB_Field {
17
  wp_enqueue_style( 'jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17' );
18
  wp_enqueue_style( 'jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17' );
19
  wp_enqueue_style( 'jquery-ui-slider', "{$url}/jquery.ui.slider.css", array(), '1.8.17' );
20
- wp_enqueue_style( 'rwmb-slider', RWMB_CSS_URL . 'slider.css' );
21
 
22
  wp_enqueue_script( 'rwmb-slider', RWMB_JS_URL . 'slider.js', array( 'jquery-ui-slider', 'jquery-ui-widget', 'jquery-ui-mouse', 'jquery-ui-core' ), RWMB_VER, true );
23
  }
@@ -37,9 +37,13 @@ class RWMB_Slider_Field extends RWMB_Field {
37
  <span class="rwmb-slider-value-label">%s<span>%s</span>%s</span>
38
  <input type="hidden" name="%s" value="%s" class="rwmb-slider-value">
39
  </div>',
40
- $field['id'], esc_attr( wp_json_encode( $field['js_options'] ) ),
41
- $field['prefix'], ( $meta >= 0 ) ? $meta : $field['std'], $field['suffix'],
42
- $field['field_name'], ( $meta >= 0 ) ? $meta : $field['std']
 
 
 
 
43
  );
44
  }
45
 
@@ -52,16 +56,22 @@ class RWMB_Slider_Field extends RWMB_Field {
52
  */
53
  public static function normalize( $field ) {
54
  $field = parent::normalize( $field );
55
- $field = wp_parse_args( $field, array(
56
- 'prefix' => '',
57
- 'suffix' => '',
58
- 'std' => '',
59
- 'js_options' => array(),
60
- ) );
61
- $field['js_options'] = wp_parse_args( $field['js_options'], array(
62
- 'range' => 'min', // range = 'min' will add a dark background to sliding part, better UI.
63
- 'value' => $field['std'],
64
- ) );
 
 
 
 
 
 
65
 
66
  return $field;
67
  }
17
  wp_enqueue_style( 'jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17' );
18
  wp_enqueue_style( 'jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17' );
19
  wp_enqueue_style( 'jquery-ui-slider', "{$url}/jquery.ui.slider.css", array(), '1.8.17' );
20
+ wp_enqueue_style( 'rwmb-slider', RWMB_CSS_URL . 'slider.css', array(), RWMB_VER );
21
 
22
  wp_enqueue_script( 'rwmb-slider', RWMB_JS_URL . 'slider.js', array( 'jquery-ui-slider', 'jquery-ui-widget', 'jquery-ui-mouse', 'jquery-ui-core' ), RWMB_VER, true );
23
  }
37
  <span class="rwmb-slider-value-label">%s<span>%s</span>%s</span>
38
  <input type="hidden" name="%s" value="%s" class="rwmb-slider-value">
39
  </div>',
40
+ $field['id'],
41
+ esc_attr( wp_json_encode( $field['js_options'] ) ),
42
+ $field['prefix'],
43
+ ( $meta >= 0 ) ? $meta : $field['std'],
44
+ $field['suffix'],
45
+ $field['field_name'],
46
+ ( $meta >= 0 ) ? $meta : $field['std']
47
  );
48
  }
49
 
56
  */
57
  public static function normalize( $field ) {
58
  $field = parent::normalize( $field );
59
+ $field = wp_parse_args(
60
+ $field,
61
+ array(
62
+ 'prefix' => '',
63
+ 'suffix' => '',
64
+ 'std' => '',
65
+ 'js_options' => array(),
66
+ )
67
+ );
68
+ $field['js_options'] = wp_parse_args(
69
+ $field['js_options'],
70
+ array(
71
+ 'range' => 'min', // range = 'min' will add a dark background to sliding part, better UI.
72
+ 'value' => $field['std'],
73
+ )
74
+ );
75
 
76
  return $field;
77
  }
inc/libraries/meta-box/inc/fields/switch.php ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The Switch field.
4
+ *
5
+ * @package Meta Box
6
+ */
7
+
8
+ /**
9
+ * Switch field class.
10
+ */
11
+ class RWMB_Switch_Field extends RWMB_Input_Field {
12
+ /**
13
+ * Enqueue scripts and styles.
14
+ */
15
+ public static function admin_enqueue_scripts() {
16
+ wp_enqueue_style( 'rwmb-switch', RWMB_CSS_URL . 'switch.css', '', RWMB_VER );
17
+ }
18
+
19
+ /**
20
+ * Get field HTML.
21
+ *
22
+ * @param mixed $meta Meta value.
23
+ * @param array $field Field parameters.
24
+ *
25
+ * @return string
26
+ */
27
+ public static function html( $meta, $field ) {
28
+ $attributes = self::get_attributes( $field, 1 );
29
+ $output = sprintf(
30
+ '<label class="rwmb-switch-label rwmb-switch-label--' . esc_attr( $field['style'] ) . '">
31
+ <input %s %s>
32
+ <div class="rwmb-switch-status">
33
+ <span class="rwmb-switch-slider"></span>
34
+ <span class="rwmb-switch-on">' . $field['on_label'] . '</span>
35
+ <span class="rwmb-switch-off">' . $field['off_label'] . '</span>
36
+ </div>
37
+ </label>
38
+ ',
39
+ self::render_attributes( $attributes ),
40
+ checked( ! empty( $meta ), 1, false )
41
+ );
42
+
43
+ return $output;
44
+ }
45
+
46
+ /**
47
+ * Normalize parameters for field.
48
+ *
49
+ * @param array $field Field parameters.
50
+ *
51
+ * @return array
52
+ */
53
+ public static function normalize( $field ) {
54
+ $field = parent::normalize( $field );
55
+ $field = wp_parse_args(
56
+ $field,
57
+ array(
58
+ 'style' => 'rounded',
59
+ 'on_label' => '',
60
+ 'off_label' => '',
61
+ )
62
+ );
63
+
64
+ return $field;
65
+ }
66
+
67
+ /**
68
+ * Get the attributes for a field.
69
+ *
70
+ * @param array $field The field parameters.
71
+ * @param mixed $value The attribute value.
72
+ *
73
+ * @return array
74
+ */
75
+ public static function get_attributes( $field, $value = null ) {
76
+ $attributes = parent::get_attributes( $field, $value );
77
+ $attributes['type'] = 'checkbox';
78
+
79
+ return $attributes;
80
+ }
81
+
82
+ /**
83
+ * Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
84
+ *
85
+ * @param array $field Field parameters.
86
+ * @param string $value The value.
87
+ * @param array $args Additional arguments. Rarely used. See specific fields for details.
88
+ * @param int|null $post_id Post ID. null for current post. Optional.
89
+ *
90
+ * @return string
91
+ */
92
+ public static function format_single_value( $field, $value, $args, $post_id ) {
93
+ $on = $field['on_label'] ? $field['on_label'] : __( 'On', 'meta-box' );
94
+ $off = $field['off_label'] ? $field['on_label'] : __( 'Off', 'meta-box' );
95
+ return $value ? $on : $off;
96
+ }
97
+ }
inc/libraries/meta-box/inc/fields/taxonomy-advanced.php CHANGED
@@ -9,25 +9,6 @@
9
  * The taxonomy advanced field class.
10
  */
11
  class RWMB_Taxonomy_Advanced_Field extends RWMB_Taxonomy_Field {
12
- /**
13
- * Normalize the field parameters.
14
- *
15
- * @param array $field Field parameters.
16
- *
17
- * @return array
18
- */
19
- public static function normalize( $field ) {
20
- $field = wp_parse_args( $field, array(
21
- 'clone' => false,
22
- ) );
23
-
24
- $clone = $field['clone'];
25
- $field = parent::normalize( $field );
26
- $field['clone'] = $clone;
27
-
28
- return $field;
29
- }
30
-
31
  /**
32
  * Get meta values to save.
33
  * Save terms in custom field in form of comma-separated IDs, no more by setting post terms.
@@ -52,12 +33,25 @@ class RWMB_Taxonomy_Advanced_Field extends RWMB_Taxonomy_Field {
52
  * @param array $field The field parameters.
53
  */
54
  public static function save( $new, $old, $post_id, $field ) {
 
 
 
55
  $storage = $field['storage'];
56
 
57
- if ( $new ) {
58
- $storage->update( $post_id, $field['id'], $new );
59
- } else {
60
  $storage->delete( $post_id, $field['id'] );
 
 
 
 
 
 
 
 
 
 
 
 
61
  }
62
  }
63
 
@@ -72,12 +66,14 @@ class RWMB_Taxonomy_Advanced_Field extends RWMB_Taxonomy_Field {
72
  */
73
  public static function raw_meta( $object_id, $field, $args = array() ) {
74
  $args['single'] = true;
75
- $meta = RWMB_Field::raw_meta( $object_id, $field, $args );
76
 
77
  if ( empty( $meta ) ) {
78
  return $field['multiple'] ? array() : '';
79
  }
 
80
  $meta = is_array( $meta ) ? array_map( 'wp_parse_id_list', $meta ) : wp_parse_id_list( $meta );
 
81
  $meta = array_filter( $meta );
82
 
83
  return $meta;
@@ -121,10 +117,13 @@ class RWMB_Taxonomy_Advanced_Field extends RWMB_Taxonomy_Field {
121
  if ( empty( $term_ids ) ) {
122
  return array();
123
  }
124
- $args = wp_parse_args( array(
125
- 'include' => $term_ids,
126
- 'hide_empty' => false,
127
- ), $args );
 
 
 
128
 
129
  $info = get_terms( $field['taxonomy'], $args );
130
  $info = is_array( $info ) ? $info : array();
9
  * The taxonomy advanced field class.
10
  */
11
  class RWMB_Taxonomy_Advanced_Field extends RWMB_Taxonomy_Field {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  /**
13
  * Get meta values to save.
14
  * Save terms in custom field in form of comma-separated IDs, no more by setting post terms.
33
  * @param array $field The field parameters.
34
  */
35
  public static function save( $new, $old, $post_id, $field ) {
36
+ if ( empty( $field['id'] ) || ! $field['save_field'] ) {
37
+ return;
38
+ }
39
  $storage = $field['storage'];
40
 
41
+ if ( ! $new ) {
 
 
42
  $storage->delete( $post_id, $field['id'] );
43
+ return;
44
+ }
45
+
46
+ if ( ! $field['clone'] || ! $field['clone_as_multiple'] ) {
47
+ $storage->update( $post_id, $field['id'], $new );
48
+ return;
49
+ }
50
+
51
+ // clone and clone_as_multiple.
52
+ $storage->delete( $post_id, $field['id'] );
53
+ foreach ( $new as $value ) {
54
+ $storage->add( $post_id, $field['id'], $value );
55
  }
56
  }
57
 
66
  */
67
  public static function raw_meta( $object_id, $field, $args = array() ) {
68
  $args['single'] = true;
69
+ $meta = RWMB_Field::raw_meta( $object_id, $field, $args );
70
 
71
  if ( empty( $meta ) ) {
72
  return $field['multiple'] ? array() : '';
73
  }
74
+
75
  $meta = is_array( $meta ) ? array_map( 'wp_parse_id_list', $meta ) : wp_parse_id_list( $meta );
76
+
77
  $meta = array_filter( $meta );
78
 
79
  return $meta;
117
  if ( empty( $term_ids ) ) {
118
  return array();
119
  }
120
+ $args = wp_parse_args(
121
+ array(
122
+ 'include' => $term_ids,
123
+ 'hide_empty' => false,
124
+ ),
125
+ $args
126
+ );
127
 
128
  $info = get_terms( $field['taxonomy'], $args );
129
  $info = is_array( $info ) ? $info : array();
inc/libraries/meta-box/inc/fields/taxonomy.php CHANGED
@@ -28,62 +28,87 @@ class RWMB_Taxonomy_Field extends RWMB_Object_Choice_Field {
28
  }
29
 
30
  // Set default field args.
31
- $field = parent::normalize( $field );
32
- $field = wp_parse_args( $field, array(
33
- 'taxonomy' => 'category',
34
- ) );
 
 
 
35
 
36
  // Force taxonomy to be an array.
37
  $field['taxonomy'] = (array) $field['taxonomy'];
38
 
39
- // Set default query args.
40
- $field['query_args'] = wp_parse_args( $field['query_args'], array(
41
- 'hide_empty' => false,
42
- ) );
43
-
44
  /*
45
  * Set default placeholder:
46
  * - If multiple taxonomies: show 'Select a term'.
47
  * - If single taxonomy: show 'Select a %taxonomy_name%'.
48
  */
49
- if ( empty( $field['placeholder'] ) ) {
50
- $field['placeholder'] = __( 'Select a term', 'learnpress' );
51
- if ( is_string( $field['taxonomy'] ) && taxonomy_exists( $field['taxonomy'] ) ) {
52
- $taxonomy_object = get_taxonomy( $field['taxonomy'] );
53
-
54
  // Translators: %s is the taxonomy singular label.
55
- $field['placeholder'] = sprintf( __( 'Select a %s', 'learnpress' ), $taxonomy_object->labels->singular_name );
56
  }
57
  }
 
 
 
 
 
 
58
 
59
- // Prevent cloning for taxonomy field.
60
- $field['clone'] = false;
 
 
 
 
 
 
 
 
 
 
 
 
61
 
62
  return $field;
63
  }
64
 
65
  /**
66
- * Get field names of object to be used by walker.
67
  *
68
- * @return array
 
69
  */
70
- public static function get_db_fields() {
71
- return array(
72
- 'parent' => 'parent',
73
- 'id' => 'term_id',
74
- 'label' => 'name',
 
 
 
 
75
  );
76
- }
77
-
78
- /**
79
- * Get options for selects, checkbox list, etc via the terms.
80
- *
81
- * @param array $field Field parameters.
82
- *
83
- * @return array
84
- */
85
- public static function get_options( $field ) {
86
- $options = get_terms( $field['taxonomy'], $field['query_args'] );
 
 
 
 
87
  return $options;
88
  }
89
 
@@ -96,6 +121,9 @@ class RWMB_Taxonomy_Field extends RWMB_Object_Choice_Field {
96
  * @param array $field The field parameters.
97
  */
98
  public static function save( $new, $old, $post_id, $field ) {
 
 
 
99
  $new = array_unique( array_map( 'intval', (array) $new ) );
100
  $new = empty( $new ) ? null : $new;
101
 
@@ -118,7 +146,16 @@ class RWMB_Taxonomy_Field extends RWMB_Object_Choice_Field {
118
  return '';
119
  }
120
 
121
- $meta = wp_get_object_terms( $object_id, $field['taxonomy'] );
 
 
 
 
 
 
 
 
 
122
  $meta = wp_list_pluck( $meta, 'term_id' );
123
 
124
  return $field['multiple'] ? $meta : reset( $meta );
@@ -135,7 +172,16 @@ class RWMB_Taxonomy_Field extends RWMB_Object_Choice_Field {
135
  * @return array List of post term objects.
136
  */
137
  public static function get_value( $field, $args = array(), $post_id = null ) {
138
- $value = wp_get_object_terms( $post_id, $field['taxonomy'] );
 
 
 
 
 
 
 
 
 
139
 
140
  // Get single value if necessary.
141
  if ( ! $field['clone'] && ! $field['multiple'] && is_array( $value ) ) {
@@ -145,20 +191,22 @@ class RWMB_Taxonomy_Field extends RWMB_Object_Choice_Field {
145
  }
146
 
147
  /**
148
- * Get option label.
149
  *
150
- * @param array $field Field parameters.
151
- * @param object $value The term object.
 
 
152
  *
153
  * @return string
154
  */
155
- public static function get_option_label( $field, $value ) {
156
  return sprintf(
157
  '<a href="%s" title="%s">%s</a>',
158
  // @codingStandardsIgnoreLine
159
  esc_url( get_term_link( $value ) ),
160
  esc_attr( $value->name ),
161
- $value->name
162
  );
163
  }
164
  }
28
  }
29
 
30
  // Set default field args.
31
+ $field = wp_parse_args(
32
+ $field,
33
+ array(
34
+ 'taxonomy' => 'category',
35
+ 'query_args' => array(),
36
+ )
37
+ );
38
 
39
  // Force taxonomy to be an array.
40
  $field['taxonomy'] = (array) $field['taxonomy'];
41
 
 
 
 
 
 
42
  /*
43
  * Set default placeholder:
44
  * - If multiple taxonomies: show 'Select a term'.
45
  * - If single taxonomy: show 'Select a %taxonomy_name%'.
46
  */
47
+ $placeholder = __( 'Select a term', 'meta-box' );
48
+ if ( 1 === count( $field['taxonomy'] ) ) {
49
+ $taxonomy = reset( $field['taxonomy'] );
50
+ $taxonomy_object = get_taxonomy( $taxonomy );
51
+ if ( false !== $taxonomy_object ) {
52
  // Translators: %s is the taxonomy singular label.
53
+ $placeholder = sprintf( __( 'Select a %s', 'meta-box' ), strtolower( $taxonomy_object->labels->singular_name ) );
54
  }
55
  }
56
+ $field = wp_parse_args(
57
+ $field,
58
+ array(
59
+ 'placeholder' => $placeholder,
60
+ )
61
+ );
62
 
63
+ // Set default query args.
64
+ $field['query_args'] = wp_parse_args(
65
+ $field['query_args'],
66
+ array(
67
+ 'hide_empty' => false,
68
+ )
69
+ );
70
+
71
+ // Prevent cloning for taxonomy field, not for child fields (taxonomy_advanced).
72
+ if ( 'taxonomy' == $field['type'] ) {
73
+ $field['clone'] = false;
74
+ }
75
+
76
+ $field = parent::normalize( $field );
77
 
78
  return $field;
79
  }
80
 
81
  /**
82
+ * Query terms for field options.
83
  *
84
+ * @param array $field Field settings.
85
+ * @return array Field options array.
86
  */
87
+ public static function query( $field ) {
88
+ $args = wp_parse_args(
89
+ $field['query_args'],
90
+ array(
91
+ 'taxonomy' => $field['taxonomy'],
92
+ 'hide_empty' => false,
93
+ 'count' => false,
94
+ 'update_term_meta_cache' => false,
95
+ )
96
  );
97
+ $terms = get_terms( $args );
98
+ if ( ! is_array( $terms ) ) {
99
+ return array();
100
+ }
101
+ $options = array();
102
+ foreach ( $terms as $term ) {
103
+ $options[ $term->term_id ] = array_merge(
104
+ array(
105
+ 'value' => $term->term_id,
106
+ 'label' => $term->name,
107
+ 'parent' => $term->parent,
108
+ ),
109
+ (array) $term
110
+ );
111
+ }
112
  return $options;
113
  }
114
 
121
  * @param array $field The field parameters.
122
  */
123
  public static function save( $new, $old, $post_id, $field ) {
124
+ if ( empty( $field['id'] ) || ! $field['save_field'] ) {
125
+ return;
126
+ }
127
  $new = array_unique( array_map( 'intval', (array) $new ) );
128
  $new = empty( $new ) ? null : $new;
129
 
146
  return '';
147
  }
148
 
149
+ $meta = wp_get_object_terms(
150
+ $object_id,
151
+ $field['taxonomy'],
152
+ array(
153
+ 'orderby' => 'term_order',
154
+ )
155
+ );
156
+ if ( is_wp_error( $meta ) ) {
157
+ return '';
158
+ }
159
  $meta = wp_list_pluck( $meta, 'term_id' );
160
 
161
  return $field['multiple'] ? $meta : reset( $meta );
172
  * @return array List of post term objects.
173
  */
174
  public static function get_value( $field, $args = array(), $post_id = null ) {
175
+ if ( ! $post_id ) {
176
+ $post_id = get_the_ID();
177
+ }
178
+ $value = wp_get_object_terms(
179
+ $post_id,
180
+ $field['taxonomy'],
181
+ array(
182
+ 'orderby' => 'term_order',
183
+ )
184
+ );
185
 
186
  // Get single value if necessary.
187
  if ( ! $field['clone'] && ! $field['multiple'] && is_array( $value ) ) {
191
  }
192
 
193
  /**
194
+ * Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
195
  *
196
+ * @param array $field Field parameters.
197
+ * @param string $value The value.
198
+ * @param array $args Additional arguments. Rarely used. See specific fields for details.
199
+ * @param int|null $post_id Post ID. null for current post. Optional.
200
  *
201
  * @return string
202
  */
203
+ public static function format_single_value( $field, $value, $args, $post_id ) {
204
  return sprintf(
205
  '<a href="%s" title="%s">%s</a>',
206
  // @codingStandardsIgnoreLine
207
  esc_url( get_term_link( $value ) ),
208
  esc_attr( $value->name ),
209
+ esc_html( $value->name )
210
  );
211
  }
212
  }
inc/libraries/meta-box/inc/fields/text-list.php CHANGED
@@ -9,6 +9,13 @@
9
  * Text list field class.
10
  */
11
  class RWMB_Text_List_Field extends RWMB_Multiple_Values_Field {
 
 
 
 
 
 
 
12
  /**
13
  * Get field HTML.
14
  *
@@ -18,26 +25,42 @@ class RWMB_Text_List_Field extends RWMB_Multiple_Values_Field {
18
  * @return string
19
  */
20
  public static function html( $meta, $field ) {
 
 
 
21
  $html = array();
22
- $input = '<label><input type="text" class="rwmb-text-list" name="%s" value="%s" placeholder="%s"> %s</label>';
23
 
24
  $count = 0;
25
- if ( ! empty( $field['options'] ) ) :
26
- foreach ( $field['options'] as $placeholder => $label ) {
27
- $html[] = sprintf(
28
- $input,
29
- $field['field_name'],
30
- isset( $meta[ $count ] ) ? esc_attr( $meta[ $count ] ) : '',
31
- $placeholder,
32
- $label
33
- );
34
- $count ++;
35
- }
36
- endif;
37
 
38
  return implode( ' ', $html );
39
  }
40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  /**
42
  * Format value for the helper functions.
43
  *
@@ -94,6 +117,9 @@ class RWMB_Text_List_Field extends RWMB_Multiple_Values_Field {
94
  * @param array $field The field parameters.
95
  */
96
  public static function save( $new, $old, $post_id, $field ) {
 
 
 
97
  $storage = $field['storage'];
98
  $storage->delete( $post_id, $field['id'] );
99
  parent::save( $new, array(), $post_id, $field );
9
  * Text list field class.
10
  */
11
  class RWMB_Text_List_Field extends RWMB_Multiple_Values_Field {
12
+ /**
13
+ * Enqueue scripts and styles.
14
+ */
15
+ public static function admin_enqueue_scripts() {
16
+ wp_enqueue_style( 'rwmb-text-list', RWMB_CSS_URL . 'text-list.css', '', RWMB_VER );
17
+ }
18
+
19
  /**
20
  * Get field HTML.
21
  *
25
  * @return string
26
  */
27
  public static function html( $meta, $field ) {
28
+ if ( empty( $field['options'] ) ) {
29
+ return '';
30
+ }
31
  $html = array();
32
+ $input = '<label><span class="rwmb-text-list-label">%s</span> <input type="text" class="rwmb-text-list" name="%s" value="%s" placeholder="%s"></label>';
33
 
34
  $count = 0;
35
+ foreach ( $field['options'] as $placeholder => $label ) {
36
+ $html[] = sprintf(
37
+ $input,
38
+ $label,
39
+ $field['field_name'],
40
+ isset( $meta[ $count ] ) ? esc_attr( $meta[ $count ] ) : '',
41
+ $placeholder
42
+ );
43
+ $count ++;
44
+ }
 
 
45
 
46
  return implode( ' ', $html );
47
  }
48
 
49
+ /**
50
+ * Normalize parameters for field.
51
+ *
52
+ * @param array $field Field parameters.
53
+ *
54
+ * @return array
55
+ */
56
+ public static function normalize( $field ) {
57
+ $field = parent::normalize( $field );
58
+ if ( ! $field['clone'] ) {
59
+ $field['class'] .= ' rwmb-text_list-non-cloneable';
60
+ }
61
+ return $field;
62
+ }
63
+
64
  /**
65
  * Format value for the helper functions.
66
  *
117
  * @param array $field The field parameters.
118
  */
119
  public static function save( $new, $old, $post_id, $field ) {
120
+ if ( empty( $field['id'] ) || ! $field['save_field'] ) {
121
+ return;
122
+ }
123
  $storage = $field['storage'];
124
  $storage->delete( $post_id, $field['id'] );
125
  parent::save( $new, array(), $post_id, $field );
inc/libraries/meta-box/inc/fields/text.php CHANGED
@@ -18,11 +18,14 @@ class RWMB_Text_Field extends RWMB_Input_Field {
18
  public static function normalize( $field ) {
19
  $field = parent::normalize( $field );
20
 
21
- $field = wp_parse_args( $field, array(
22
- 'size' => 30,
23
- 'maxlength' => false,
24
- 'pattern' => false,
25
- ) );
 
 
 
26
 
27
  return $field;
28
  }
@@ -37,12 +40,15 @@ class RWMB_Text_Field extends RWMB_Input_Field {
37
  */
38
  public static function get_attributes( $field, $value = null ) {
39
  $attributes = parent::get_attributes( $field, $value );
40
- $attributes = wp_parse_args( $attributes, array(
41
- 'size' => $field['size'],
42
- 'maxlength' => $field['maxlength'],
43
- 'pattern' => $field['pattern'],
44
- 'placeholder' => $field['placeholder'],
45
- ) );
 
 
 
46
 
47
  return $attributes;
48
  }
18
  public static function normalize( $field ) {
19
  $field = parent::normalize( $field );
20
 
21
+ $field = wp_parse_args(
22
+ $field,
23
+ array(
24
+ 'size' => 30,
25
+ 'maxlength' => false,
26
+ 'pattern' => false,
27
+ )
28
+ );
29
 
30
  return $field;
31
  }
40
  */
41
  public static function get_attributes( $field, $value = null ) {
42
  $attributes = parent::get_attributes( $field, $value );
43
+ $attributes = wp_parse_args(
44
+ $attributes,
45
+ array(
46
+ 'size' => $field['size'],
47
+ 'maxlength' => $field['maxlength'],
48
+ 'pattern' => $field['pattern'],
49
+ 'placeholder' => $field['placeholder'],
50
+ )
51
+ );
52
 
53
  return $attributes;
54
  }
inc/libraries/meta-box/inc/fields/textarea.php CHANGED
@@ -44,14 +44,17 @@ class RWMB_Textarea_Field extends RWMB_Field {
44
  */
45
  public static function normalize( $field ) {
46
  $field = parent::normalize( $field );
47
- $field = wp_parse_args( $field, array(
48
- 'autocomplete' => false,
49
- 'cols' => 60,
50
- 'rows' => 3,
51
- 'maxlength' => false,
52
- 'wrap' => false,
53
- 'readonly' => false,
54
- ) );
 
 
 
55
 
56
  return $field;
57
  }
@@ -65,16 +68,19 @@ class RWMB_Textarea_Field extends RWMB_Field {
65
  * @return array
66
  */
67
  public static function get_attributes( $field, $value = null ) {
68
- $attributes = parent::get_attributes( $field, $value );
69
- $attributes = wp_parse_args( $attributes, array(
70
- 'autocomplete' => $field['autocomplete'],
71
- 'cols' => $field['cols'],
72
- 'rows' => $field['rows'],
73
- 'maxlength' => $field['maxlength'],
74
- 'wrap' => $field['wrap'],
75
- 'readonly' => $field['readonly'],
76
- 'placeholder' => $field['placeholder'],
77
- ) );
 
 
 
78
  $attributes['class'] .= ' large-text';
79
 
80
  return $attributes;
44
  */
45
  public static function normalize( $field ) {
46
  $field = parent::normalize( $field );
47
+ $field = wp_parse_args(
48
+ $field,
49
+ array(
50
+ 'autocomplete' => false,
51
+ 'cols' => 60,
52
+ 'rows' => 3,
53
+ 'maxlength' => false,
54
+ 'wrap' => false,
55
+ 'readonly' => false,
56
+ )
57
+ );
58
 
59
  return $field;
60
  }
68
  * @return array
69
  */
70
  public static function get_attributes( $field, $value = null ) {
71
+ $attributes = parent::get_attributes( $field, $value );
72
+ $attributes = wp_parse_args(
73
+ $attributes,
74
+ array(
75
+ 'autocomplete' => $field['autocomplete'],
76
+ 'cols' => $field['cols'],
77
+ 'rows' => $field['rows'],
78
+ 'maxlength' => $field['maxlength'],
79
+ 'wrap' => $field['wrap'],
80
+ 'readonly' => $field['readonly'],
81
+ 'placeholder' => $field['placeholder'],
82
+ )
83
+ );
84
  $attributes['class'] .= ' large-text';
85
 
86
  return $attributes;
inc/libraries/meta-box/inc/fields/time.php CHANGED
@@ -25,7 +25,7 @@ class RWMB_Time_Field extends RWMB_Datetime_Field {
25
  * @return array
26
  */
27
  public static function normalize( $field ) {
28
- $field = parent::normalize( $field );
29
  $field['js_options']['timeFormat'] = empty( $field['format'] ) ? $field['js_options']['timeFormat'] : $field['format'];
30
  return $field;
31
  }
25
  * @return array
26
  */
27
  public static function normalize( $field ) {
28
+ $field = parent::normalize( $field );
29
  $field['js_options']['timeFormat'] = empty( $field['format'] ) ? $field['js_options']['timeFormat'] : $field['format'];
30
  return $field;
31
  }
inc/libraries/meta-box/inc/fields/user.php CHANGED
@@ -18,63 +18,63 @@ class RWMB_User_Field extends RWMB_Object_Choice_Field {
18
  */
19
  public static function normalize( $field ) {
20
  // Set default field args.
21
- $field = parent::normalize( $field );
22
-
23
- // Prevent select tree for user since it's not hierarchical.
24
- $field['field_type'] = 'select_tree' === $field['field_type'] ? 'select' : $field['field_type'];
25
-
26
- // Set to always flat.
27
- $field['flatten'] = true;
28
-
29
- // Set default placeholder.
30
- $field['placeholder'] = empty( $field['placeholder'] ) ? __( 'Select an user', 'learnpress' ) : $field['placeholder'];
31
 
32
- // Set default query args.
33
- $field['query_args'] = wp_parse_args( $field['query_args'], array(
34
- 'orderby' => 'display_name',
35
- 'order' => 'asc',
36
- 'role' => '',
37
- 'fields' => 'all',
38
- ) );
39
 
40
  return $field;
41
  }
42
 
43
  /**
44
- * Get users.
45
- *
46
- * @param array $field Field parameters.
47
  *
48
- * @return array
49
- */
50
- public static function get_options( $field ) {
51
- $query = new WP_User_Query( $field['query_args'] );
52
- return $query->get_results();
53
- }
54
-
55
- /**
56
- * Get field names of object to be used by walker.
57
- *
58
- * @return array
59
  */
60
- public static function get_db_fields() {
61
- return array(
62
- 'parent' => 'parent',
63
- 'id' => 'ID',
64
- 'label' => 'display_name',
 
 
 
 
65
  );
 
 
 
 
 
 
 
 
 
 
 
 
66
  }
67
 
68
  /**
69
- * Get option label.
70
  *
71
- * @param array $field Field parameters.
72
- * @param string $value Option value.
 
 
73
  *
74
  * @return string
75
  */
76
- public static function get_option_label( $field, $value ) {
77
- $user = get_userdata( $value );
78
- return '<a href="' . get_author_posts_url( $value ) . '">' . $user->display_name . '</a>';
 
79
  }
80
  }
18
  */
19
  public static function normalize( $field ) {
20
  // Set default field args.
21
+ $field = wp_parse_args(
22
+ $field,
23
+ array(
24
+ 'placeholder' => __( 'Select an user', 'meta-box' ),
25
+ 'query_args' => array(),
26
+ 'display_field' => 'display_name',
27
+ )
28
+ );
 
 
29
 
30
+ $field = parent::normalize( $field );
 
 
 
 
 
 
31
 
32
  return $field;
33
  }
34
 
35
  /**
36
+ * Query users for field options.
 
 
37
  *
38
+ * @param array $field Field settings.
39
+ * @return array Field options array.
 
 
 
 
 
 
 
 
 
40
  */
41
+ public static function query( $field ) {
42
+ $display_field = $field['display_field'];
43
+ $args = wp_parse_args(
44
+ $field['query_args'],
45
+ array(
46
+ 'orderby' => $display_field,
47
+ 'order' => 'asc',
48
+ 'fields' => array( 'ID', $display_field ),
49
+ )
50
  );
51
+ $users = get_users( $args );
52
+ $options = array();
53
+ foreach ( $users as $user ) {
54
+ $options[ $user->ID ] = array_merge(
55
+ array(
56
+ 'value' => $user->ID,
57
+ 'label' => $user->$display_field,
58
+ ),
59
+ (array) $user
60
+ );
61
+ }
62
+ return $options;
63
  }
64
 
65
  /**
66
+ * Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
67
  *
68
+ * @param array $field Field parameters.
69
+ * @param string $value The value.
70
+ * @param array $args Additional arguments. Rarely used. See specific fields for details.
71
+ * @param int|null $post_id Post ID. null for current post. Optional.
72
  *
73
  * @return string
74
  */
75
+ public static function format_single_value( $field, $value, $args, $post_id ) {
76
+ $display_field = $field['display_field'];
77
+ $user = get_userdata( $value );
78
+ return '<a href="' . esc_url( get_author_posts_url( $value ) ) . '">' . esc_html( $user->$display_field ) . '</a>';
79
  }
80
  }
inc/libraries/meta-box/inc/fields/video.php CHANGED
@@ -17,9 +17,13 @@ class RWMB_Video_Field extends RWMB_Media_Field {
17
  parent::admin_enqueue_scripts();
18
  wp_enqueue_style( 'rwmb-video', RWMB_CSS_URL . 'video.css', array( 'rwmb-media' ), RWMB_VER );
19
  wp_enqueue_script( 'rwmb-video', RWMB_JS_URL . 'video.js', array( 'rwmb-media' ), RWMB_VER, true );
20
- self::localize_script( 'rwmb-video', 'i18nRwmbVideo', array(
21
- 'extensions' => wp_get_video_extensions(),
22
- ) );
 
 
 
 
23
  }
24
 
25
  /**
@@ -85,9 +89,9 @@ class RWMB_Video_Field extends RWMB_Media_Field {
85
  $thumb_id = get_post_thumbnail_id( $attachment->ID );
86
  if ( ! empty( $thumb_id ) ) {
87
  list( $src, $width, $height ) = wp_get_attachment_image_src( $thumb_id, 'full' );
88
- $data['image'] = compact( 'src', 'width', 'height' );
89
  list( $src, $width, $height ) = wp_get_attachment_image_src( $thumb_id, 'thumbnail' );
90
- $data['thumb'] = compact( 'src', 'width', 'height' );
91
  } else {
92
  $src = wp_mime_type_icon( $attachment->ID );
93
  $width = 48;
@@ -115,18 +119,22 @@ class RWMB_Video_Field extends RWMB_Media_Field {
115
  // Display single video.
116
  if ( 1 === count( $value ) ) {
117
  $video = reset( $value );
118
- return wp_video_shortcode( array(
119
- 'src' => $video['src'],
120
- 'width' => $video['dimensions']['width'],
121
- 'height' => $video['dimensions']['height'],
122
- ) );
 
 
123
  }
124
 
125
  // Display multiple videos in a playlist.
126
- return wp_playlist_shortcode( array(
127
- 'ids' => $ids,
128
- 'type' => 'video',
129
- ) );
 
 
130
  }
131
 
132
  /**
@@ -134,6 +142,6 @@ class RWMB_Video_Field extends RWMB_Media_Field {
134
  */
135
  public static function print_templates() {
136
  parent::print_templates();
137
- require_once( RWMB_INC_DIR . 'templates/video.php' );
138
  }
139
  }
17
  parent::admin_enqueue_scripts();
18
  wp_enqueue_style( 'rwmb-video', RWMB_CSS_URL . 'video.css', array( 'rwmb-media' ), RWMB_VER );
19
  wp_enqueue_script( 'rwmb-video', RWMB_JS_URL . 'video.js', array( 'rwmb-media' ), RWMB_VER, true );
20
+ self::localize_script(
21
+ 'rwmb-video',
22
+ 'i18nRwmbVideo',
23
+ array(
24
+ 'extensions' => wp_get_video_extensions(),
25
+ )
26
+ );
27
  }
28
 
29
  /**
89
  $thumb_id = get_post_thumbnail_id( $attachment->ID );
90
  if ( ! empty( $thumb_id ) ) {
91
  list( $src, $width, $height ) = wp_get_attachment_image_src( $thumb_id, 'full' );
92
+ $data['image'] = compact( 'src', 'width', 'height' );
93
  list( $src, $width, $height ) = wp_get_attachment_image_src( $thumb_id, 'thumbnail' );
94
+ $data['thumb'] = compact( 'src', 'width', 'height' );
95
  } else {
96
  $src = wp_mime_type_icon( $attachment->ID );
97
  $width = 48;
119
  // Display single video.
120
  if ( 1 === count( $value ) ) {
121
  $video = reset( $value );
122
+ return wp_video_shortcode(
123
+ array(
124
+ 'src' => $video['src'],
125
+ 'width' => $video['dimensions']['width'],
126
+ 'height' => $video['dimensions']['height'],
127
+ )
128
+ );
129
  }
130
 
131
  // Display multiple videos in a playlist.
132
+ return wp_playlist_shortcode(
133
+ array(
134
+ 'ids' => $ids,
135
+ 'type' => 'video',
136
+ )
137
+ );
138
  }
139
 
140
  /**
142
  */
143
  public static function print_templates() {
144
  parent::print_templates();
145
+ require_once RWMB_INC_DIR . 'templates/video.php';
146
  }
147
  }
inc/libraries/meta-box/inc/fields/wysiwyg.php CHANGED
@@ -49,7 +49,7 @@ class RWMB_Wysiwyg_Field extends RWMB_Field {
49
  ob_start();
50
 
51
  $field['options']['textarea_name'] = $field['field_name'];
52
- $attributes = self::get_attributes( $field );
53
 
54
  // Use new wp_editor() since WP 3.3.
55
  wp_editor( $meta, $attributes['id'], $field['options'] );
@@ -75,15 +75,21 @@ class RWMB_Wysiwyg_Field extends RWMB_Field {
75
  */
76
  public static function normalize( $field ) {
77
  $field = parent::normalize( $field );
78
- $field = wp_parse_args( $field, array(
79
- 'raw' => false,
80
- 'options' => array(),
81
- ) );
 
 
 
82
 
83
- $field['options'] = wp_parse_args( $field['options'], array(
84
- 'editor_class' => 'rwmb-wysiwyg',
85
- 'dfw' => true, // Use default WordPress full screen UI.
86
- ) );
 
 
 
87
 
88
  // Keep the filter to be compatible with previous versions.
89
  $field['options'] = apply_filters( 'rwmb_wysiwyg_settings', $field['options'] );
49
  ob_start();
50
 
51
  $field['options']['textarea_name'] = $field['field_name'];
52
+ $attributes = self::get_attributes( $field );
53
 
54
  // Use new wp_editor() since WP 3.3.
55
  wp_editor( $meta, $attributes['id'], $field['options'] );
75
  */
76
  public static function normalize( $field ) {
77
  $field = parent::normalize( $field );
78
+ $field = wp_parse_args(
79
+ $field,
80
+ array(
81
+ 'raw' => false,
82
+ 'options' => array(),
83
+ )
84
+ );
85
 
86
+ $field['options'] = wp_parse_args(
87
+ $field['options'],
88
+ array(
89
+ 'editor_class' => 'rwmb-wysiwyg',
90
+ 'dfw' => true, // Use default WordPress full screen UI.
91
+ )
92
+ );
93
 
94
  // Keep the filter to be compatible with previous versions.
95
  $field['options'] = apply_filters( 'rwmb_wysiwyg_settings', $field['options'] );
inc/libraries/meta-box/inc/functions.php CHANGED
@@ -26,7 +26,7 @@ if ( ! function_exists( 'rwmb_meta' ) ) {
26
  if ( false === $field ) {
27
  return apply_filters( 'rwmb_meta', rwmb_meta_legacy( $key, $args, $post_id ) );
28
  }
29
- $meta = in_array( $field['type'], array( 'oembed', 'map' ), true ) ?
30
  rwmb_the_value( $key, $args, $post_id, false ) :
31
  rwmb_get_value( $key, $args, $post_id );
32
  return apply_filters( 'rwmb_meta', $meta, $key, $args, $post_id );
@@ -44,10 +44,12 @@ if ( ! function_exists( 'rwmb_get_field_settings' ) ) {
44
  * @return array
45
  */
46
  function rwmb_get_field_settings( $key, $args = array(), $object_id = null ) {
47
- $args = wp_parse_args( $args, array(
48
- 'object_type' => 'post',
49
- ) );
50
- $type = get_post_type( $object_id );
 
 
51
 
52
  /**
53
  * Filter meta type from object type and object id.
@@ -56,7 +58,10 @@ if ( ! function_exists( 'rwmb_get_field_settings' ) ) {
56
  * @var string Object type.
57
  * @var string|int Object id.
58
  */
59
- $type = apply_filters( 'rwmb_meta_type', $type, $args['object_type'], $object_id );
 
 
 
60
 
61
  return rwmb_get_registry( 'field' )->get( $key, $type, $args['object_type'] );
62
  }
@@ -73,11 +78,14 @@ if ( ! function_exists( 'rwmb_meta_legacy' ) ) {
73
  * @return mixed
74
  */
75
  function rwmb_meta_legacy( $key, $args = array(), $post_id = null ) {
76
- $args = wp_parse_args( $args, array(
77
- 'type' => 'text',
78
- 'multiple' => false,
79
- 'clone' => false,
80
- ) );
 
 
 
81
  $field = array(
82
  'id' => $key,
83
  'type' => $args['type'],
@@ -92,6 +100,7 @@ if ( ! function_exists( 'rwmb_meta_legacy' ) ) {
92
  $field['taxonomy'] = $args['taxonomy'];
93
  break;
94
  case 'map':
 
95
  case 'oembed':
96
  $method = 'the_value';
97
  break;
@@ -175,6 +184,64 @@ if ( ! function_exists( 'rwmb_the_value' ) ) {
175
  }
176
  } // End if().
177
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  if ( ! function_exists( 'rwmb_meta_shortcode' ) ) {
179
  /**
180
  * Shortcode to display meta value.
@@ -184,9 +251,12 @@ if ( ! function_exists( 'rwmb_meta_shortcode' ) ) {
184
  * @return string
185
  */
186
  function rwmb_meta_shortcode( $atts ) {
187
- $atts = wp_parse_args( $atts, array(
188
- 'post_id' => get_the_ID(),
189
- ) );
 
 
 
190
  if ( empty( $atts['meta_key'] ) ) {
191
  return '';
192
  }
@@ -235,7 +305,7 @@ if ( ! function_exists( 'rwmb_get_storage_class_name' ) ) {
235
  $object_type = str_replace( array( '-', '_' ), ' ', $object_type );
236
  $object_type = ucwords( $object_type );
237
  $object_type = str_replace( ' ', '_', $object_type );
238
- $class_name = 'RWMB_' . $object_type . '_Storage';
239
 
240
  if ( ! class_exists( $class_name ) ) {
241
  $class_name = 'RWMB_Post_Storage';
@@ -255,7 +325,7 @@ if ( ! function_exists( 'rwmb_get_storage' ) ) {
255
  */
256
  function rwmb_get_storage( $object_type, $meta_box = null ) {
257
  $class_name = rwmb_get_storage_class_name( $object_type );
258
- $storage = rwmb_get_registry( 'storage' )->get( $class_name );
259
 
260
  return apply_filters( 'rwmb_get_storage', $storage, $object_type, $meta_box );
261
  }
@@ -280,3 +350,36 @@ if ( ! function_exists( 'rwmb_get_meta_box' ) ) {
280
  return new $class_name( $meta_box );
281
  }
282
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  if ( false === $field ) {
27
  return apply_filters( 'rwmb_meta', rwmb_meta_legacy( $key, $args, $post_id ) );
28
  }
29
+ $meta = in_array( $field['type'], array( 'oembed', 'map', 'osm' ), true ) ?
30
  rwmb_the_value( $key, $args, $post_id, false ) :
31
  rwmb_get_value( $key, $args, $post_id );
32
  return apply_filters( 'rwmb_meta', $meta, $key, $args, $post_id );
44
  * @return array
45
  */
46
  function rwmb_get_field_settings( $key, $args = array(), $object_id = null ) {
47
+ $args = wp_parse_args(
48
+ $args,
49
+ array(
50
+ 'object_type' => 'post',
51
+ )
52
+ );
53
 
54
  /**
55
  * Filter meta type from object type and object id.
58
  * @var string Object type.
59
  * @var string|int Object id.
60
  */
61
+ $type = apply_filters( 'rwmb_meta_type', '', $args['object_type'], $object_id );
62
+ if ( ! $type ) {
63
+ $type = get_post_type( $object_id );
64
+ }
65
 
66
  return rwmb_get_registry( 'field' )->get( $key, $type, $args['object_type'] );
67
  }
78
  * @return mixed
79
  */
80
  function rwmb_meta_legacy( $key, $args = array(), $post_id = null ) {
81
+ $args = wp_parse_args(
82
+ $args,
83
+ array(
84
+ 'type' => 'text',
85
+ 'multiple' => false,
86
+ 'clone' => false,
87
+ )
88
+ );
89
  $field = array(
90
  'id' => $key,
91
  'type' => $args['type'],
100
  $field['taxonomy'] = $args['taxonomy'];
101
  break;
102
  case 'map':
103
+ case 'osm':
104
  case 'oembed':
105
  $method = 'the_value';
106
  break;
184
  }
185
  } // End if().
186
 
187
+ if ( ! function_exists( 'rwmb_get_object_fields' ) ) {
188
+ /**
189
+ * Get defined meta fields for object.
190
+ *
191
+ * @param int|string $type_or_id Object ID or post type / taxonomy (for terms) / user (for users).
192
+ * @param string $object_type Object type. Use post, term.
193
+ *
194
+ * @return array
195
+ */
196
+ function rwmb_get_object_fields( $type_or_id, $object_type = 'post' ) {
197
+ $meta_boxes = rwmb_get_registry( 'meta_box' )->get_by( array( 'object_type' => $object_type ) );
198
+ array_walk( $meta_boxes, 'rwmb_check_meta_box_supports', array( $object_type, $type_or_id ) );
199
+ $meta_boxes = array_filter( $meta_boxes );
200
+
201
+ $fields = array();
202
+ foreach ( $meta_boxes as $meta_box ) {
203
+ foreach ( $meta_box->fields as $field ) {
204
+ $fields[ $field['id'] ] = $field;
205
+ }
206
+ }
207
+
208
+ return $fields;
209
+ }
210
+ }
211
+
212
+ if ( ! function_exists( 'rwmb_check_meta_box_supports' ) ) {
213
+ /**
214
+ * Check if a meta box supports an object.
215
+ *
216
+ * @param object $meta_box Meta Box object.
217
+ * @param int $key Not used.
218
+ * @param array $object_data Object data (type and ID).
219
+ */
220
+ function rwmb_check_meta_box_supports( &$meta_box, $key, $object_data ) {
221
+ list( $object_type, $type_or_id ) = $object_data;
222
+
223
+ $type = null;
224
+ $prop = null;
225
+ switch ( $object_type ) {
226
+ case 'post':
227
+ $type = is_numeric( $type_or_id ) ? get_post_type( $type_or_id ) : $type_or_id;
228
+ $prop = 'post_types';
229
+ break;
230
+ case 'term':
231
+ $type = $type_or_id;
232
+ if ( is_numeric( $type_or_id ) ) {
233
+ $term = get_term( $type_or_id );
234
+ $type = is_array( $term ) ? $term->taxonomy : null;
235
+ }
236
+ $prop = 'taxonomies';
237
+ break;
238
+ }
239
+ if ( ! $type || ! in_array( $type, $meta_box->meta_box[ $prop ], true ) ) {
240
+ $meta_box = false;
241
+ }
242
+ }
243
+ }
244
+
245
  if ( ! function_exists( 'rwmb_meta_shortcode' ) ) {
246
  /**
247
  * Shortcode to display meta value.
251
  * @return string
252
  */
253
  function rwmb_meta_shortcode( $atts ) {
254
+ $atts = wp_parse_args(
255
+ $atts,
256
+ array(
257
+ 'post_id' => get_the_ID(),
258
+ )
259
+ );
260
  if ( empty( $atts['meta_key'] ) ) {
261
  return '';
262
  }
305
  $object_type = str_replace( array( '-', '_' ), ' ', $object_type );
306
  $object_type = ucwords( $object_type );
307
  $object_type = str_replace( ' ', '_', $object_type );
308
+ $class_name = 'RWMB_' . $object_type . '_Storage';
309
 
310
  if ( ! class_exists( $class_name ) ) {
311
  $class_name = 'RWMB_Post_Storage';
325
  */
326
  function rwmb_get_storage( $object_type, $meta_box = null ) {
327
  $class_name = rwmb_get_storage_class_name( $object_type );
328
+ $storage = rwmb_get_registry( 'storage' )->get( $class_name );
329
 
330
  return apply_filters( 'rwmb_get_storage', $storage, $object_type, $meta_box );
331
  }
350
  return new $class_name( $meta_box );
351
  }
352
  }
353
+
354
+ /**
355
+ * Helper functions
356
+ */
357
+
358
+ if ( ! function_exists( 'rwmb_change_array_key' ) ) {
359
+ /**
360
+ * Change array key.
361
+ *
362
+ * @param array $array Input array.
363
+ * @param string $from From key.
364
+ * @param string $to To key.
365
+ */
366
+ function rwmb_change_array_key( &$array, $from, $to ) {
367
+ if ( isset( $array[ $from ] ) ) {
368
+ $array[ $to ] = $array[ $from ];
369
+ }
370
+ unset( $array[ $from ] );
371
+ }
372
+ }
373
+
374
+ if ( ! function_exists( 'rwmb_csv_to_array' ) ) {
375
+ /**
376
+ * Convert a comma separated string to array.
377
+ *
378
+ * @param string $string Comma separated string.
379
+ *
380
+ * @return array
381
+ */
382
+ function rwmb_csv_to_array( $string ) {
383
+ return is_array( $string ) ? $string : array_filter( array_map( 'trim', explode( ',', $string . ',' ) ) );
384
+ }
385
+ }
inc/libraries/meta-box/inc/loader.php CHANGED
@@ -18,7 +18,7 @@ class RWMB_Loader {
18
  */
19
  protected function constants() {
20
  // Script version, used to add version for scripts and styles.
21
- define( 'RWMB_VER', '4.14.2' );
22
 
23
  list( $path, $url ) = self::get_path( dirname( dirname( __FILE__ ) ) );
24
 
18
  */
19
  protected function constants() {
20
  // Script version, used to add version for scripts and styles.
21
+ define( 'RWMB_VER', '4.15.7' );
22
 
23
  list( $path, $url ) = self::get_path( dirname( dirname( __FILE__ ) ) );
24
 
inc/libraries/meta-box/inc/meta-box.php CHANGED
@@ -49,7 +49,7 @@ class RW_Meta_Box {
49
  * @param array $meta_box Meta box definition.
50
  */
51
  public function __construct( $meta_box ) {
52
- $meta_box = self::normalize( $meta_box );
53
  $this->meta_box = $meta_box;
54
 
55
  $storage = $this->get_storage();
@@ -88,7 +88,7 @@ class RW_Meta_Box {
88
  *
89
  * @return bool
90
  */
91
- protected function is_shown() {
92
  $show = apply_filters( 'rwmb_show', true, $this->meta_box );
93
 
94
  return apply_filters( "rwmb_show_{$this->id}", $show, $this->meta_box );
@@ -144,10 +144,6 @@ class RW_Meta_Box {
144
  wp_enqueue_style( 'rwmb-rtl', RWMB_CSS_URL . 'style-rtl.css', array(), RWMB_VER );
145
  }
146
 
147
- if ( 'seamless' === $this->style ) {
148
- wp_enqueue_script( 'rwmb', RWMB_JS_URL . 'script.js', array( 'jquery' ), RWMB_VER, true );
149
- }
150
-
151
  // Load clone script conditionally.
152
  foreach ( $this->fields as $field ) {
153
  if ( $field['clone'] ) {
@@ -178,6 +174,9 @@ class RW_Meta_Box {
178
  * Add meta box for multiple post types
179
  */
180
  public function add_meta_boxes() {
 
 
 
181
  foreach ( $this->post_types as $post_type ) {
182
  add_meta_box(
183
  $this->id,
@@ -190,6 +189,23 @@ class RW_Meta_Box {
190
  }
191
  }
192
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193
  /**
194
  * Hide meta box if it's set 'default_hidden'
195
  *
@@ -210,13 +226,14 @@ class RW_Meta_Box {
210
  * Callback function to show fields in meta box
211
  */
212
  public function show() {
213
- $this->set_object_id( $this->get_current_object_id() );
 
 
214
  $saved = $this->is_saved();
215
 
216
  // Container.
217
  printf(
218
- '<div class="rwmb-meta-box%s" data-autosave="%s" data-object-type="%s">',
219
- esc_attr( 'seamless' === $this->style ? ' rwmb-meta-box--seamless' : '' ),
220
  esc_attr( $this->autosave ? 'true' : 'false' ),
221
  esc_attr( $this->object_type )
222
  );
@@ -295,6 +312,9 @@ class RW_Meta_Box {
295
  }
296
  $new = RWMB_Field::filter( 'value', $new, $field, $old );
297
 
 
 
 
298
  // Call defined method to save meta value, if there's no methods, call common one.
299
  RWMB_Field::call( $field, 'save', $new, $old, $post_id );
300
 
@@ -327,27 +347,28 @@ class RW_Meta_Box {
327
  */
328
  public static function normalize( $meta_box ) {
329
  // Set default values for meta box.
330
- $meta_box = wp_parse_args( $meta_box, array(
331
- 'id' => sanitize_title( $meta_box['title'] ),
332
- 'context' => 'normal',
333
- 'priority' => 'high',
334
- 'post_types' => 'post',
335
- 'autosave' => false,
336
- 'default_hidden' => false,
337
- 'style' => 'default',
338
- ) );
 
 
 
339
 
340
  /**
341
  * Use 'post_types' for better understanding and fallback to 'pages' for previous versions.
342
  *
343
  * @since 4.4.1
344
  */
345
- if ( ! empty( $meta_box['pages'] ) ) {
346
- $meta_box['post_types'] = $meta_box['pages'];
347
- }
348
 
349
  // Make sure the post type is an array and is sanitized.
350
- $meta_box['post_types'] = array_map( 'sanitize_key', (array) $meta_box['post_types'] );
351
 
352
  return $meta_box;
353
  }
@@ -391,10 +412,14 @@ class RW_Meta_Box {
391
  if ( empty( $field['id'] ) ) {
392
  continue;
393
  }
 
394
  $value = RWMB_Field::call( $field, 'raw_meta', $this->object_id );
 
 
 
395
  if (
396
  ( ! $field['multiple'] && '' !== $value )
397
- || ( $field['multiple'] && array() !== $value )
398
  ) {
399
  return true;
400
  }
49
  * @param array $meta_box Meta box definition.
50
  */
51
  public function __construct( $meta_box ) {
52
+ $meta_box = self::normalize( $meta_box );
53
  $this->meta_box = $meta_box;
54
 
55
  $storage = $this->get_storage();
88
  *
89
  * @return bool
90
  */
91
+ public function is_shown() {
92
  $show = apply_filters( 'rwmb_show', true, $this->meta_box );
93
 
94
  return apply_filters( "rwmb_show_{$this->id}", $show, $this->meta_box );
144
  wp_enqueue_style( 'rwmb-rtl', RWMB_CSS_URL . 'style-rtl.css', array(), RWMB_VER );
145
  }
146
 
 
 
 
 
147
  // Load clone script conditionally.
148
  foreach ( $this->fields as $field ) {
149
  if ( $field['clone'] ) {
174
  * Add meta box for multiple post types
175
  */
176
  public function add_meta_boxes() {
177
+ $screen = get_current_screen();
178
+ add_filter( "postbox_classes_{$screen->id}_{$this->id}", array( $this, 'postbox_classes' ) );
179
+
180
  foreach ( $this->post_types as $post_type ) {
181
  add_meta_box(
182
  $this->id,
189
  }
190
  }
191
 
192
+ /**
193
+ * Modify meta box postbox classes.
194
+ *
195
+ * @param array $classes Array of classes.
196
+ * @return array
197
+ */
198
+ public function postbox_classes( $classes ) {
199
+ if ( $this->closed && ! in_array( 'closed', $classes ) ) {
200
+ $classes[] = 'closed';
201
+ }
202
+ if ( 'seamless' === $this->style ) {
203
+ $classes[] = 'rwmb-seamless';
204
+ }
205
+
206
+ return $classes;
207
+ }
208
+
209
  /**
210
  * Hide meta box if it's set 'default_hidden'
211
  *
226
  * Callback function to show fields in meta box
227
  */
228
  public function show() {
229
+ if ( null === $this->object_id ) {
230
+ $this->set_object_id( $this->get_current_object_id() );
231
+ }
232
  $saved = $this->is_saved();
233
 
234
  // Container.
235
  printf(
236
+ '<div class="rwmb-meta-box" data-autosave="%s" data-object-type="%s">',
 
237
  esc_attr( $this->autosave ? 'true' : 'false' ),
238
  esc_attr( $this->object_type )
239
  );
312
  }
313
  $new = RWMB_Field::filter( 'value', $new, $field, $old );
314
 
315
+ // Filter to allow the field to be modified.
316
+ $field = RWMB_Field::filter( 'field', $field, $field, $new, $old );
317
+
318
  // Call defined method to save meta value, if there's no methods, call common one.
319
  RWMB_Field::call( $field, 'save', $new, $old, $post_id );
320
 
347
  */
348
  public static function normalize( $meta_box ) {
349
  // Set default values for meta box.
350
+ $meta_box = wp_parse_args(
351
+ $meta_box,
352
+ array(
353
+ 'id' => sanitize_title( $meta_box['title'] ),
354
+ 'context' => 'normal',
355
+ 'priority' => 'high',
356
+ 'post_types' => 'post',
357
+ 'autosave' => false,
358
+ 'default_hidden' => false,
359
+ 'style' => 'default',
360
+ )
361
+ );
362
 
363
  /**
364
  * Use 'post_types' for better understanding and fallback to 'pages' for previous versions.
365
  *
366
  * @since 4.4.1
367
  */
368
+ rwmb_change_array_key( $meta_box, 'pages', 'post_types' );
 
 
369
 
370
  // Make sure the post type is an array and is sanitized.
371
+ $meta_box['post_types'] = array_map( 'sanitize_key', rwmb_csv_to_array( $meta_box['post_types'] ) );
372
 
373
  return $meta_box;
374
  }
412
  if ( empty( $field['id'] ) ) {
413
  continue;
414
  }
415
+
416
  $value = RWMB_Field::call( $field, 'raw_meta', $this->object_id );
417
+ if ( false === $value ) {
418
+ continue;
419
+ }
420
  if (
421
  ( ! $field['multiple'] && '' !== $value )
422
+ || ( $field['multiple'] && is_array( $value ) && array() !== $value )
423
  ) {
424
  return true;
425
  }
inc/libraries/meta-box/inc/sanitizer.php CHANGED
@@ -32,9 +32,10 @@ class RWMB_Sanitizer {
32
  }
33
 
34
  // Custom callback.
35
- $types = array_diff( get_class_methods( __CLASS__ ), array( 'init' ) );
36
- foreach ( $types as $type ) {
37
- add_filter( "rwmb_{$type}_sanitize", array( $this, $type ) );
 
38
  }
39
  }
40
 
@@ -46,7 +47,18 @@ class RWMB_Sanitizer {
46
  * @param string $value Checkbox value.
47
  * @return int
48
  */
49
- public function checkbox( $value ) {
 
 
 
 
 
 
 
 
 
 
 
50
  return (int) ! empty( $value );
51
  }
52
  }
32
  }
33
 
34
  // Custom callback.
35
+ $methods = array_diff( get_class_methods( __CLASS__ ), array( 'init' ) );
36
+ foreach ( $methods as $method ) {
37
+ $type = substr( $method, 9 );
38
+ add_filter( "rwmb_{$type}_sanitize", array( $this, $method ) );
39
  }
40
  }
41
 
47
  * @param string $value Checkbox value.
48
  * @return int
49
  */
50
+ public function sanitize_checkbox( $value ) {
51
+ return (int) ! empty( $value );
52
+ }
53
+
54
+ /**
55
+ * Set the value of switch to 1 or 0 instead of 'checked' and empty string.
56
+ * This prevents using default value once the switch has been unchecked.
57
+ *
58
+ * @param string $value Switch value.
59
+ * @return int
60
+ */
61
+ public function sanitize_switch( $value ) {
62
  return (int) ! empty( $value );
63
  }
64
  }
inc/libraries/meta-box/inc/validation.php CHANGED
@@ -43,8 +43,12 @@ class RWMB_Validation {
43
  wp_enqueue_script( 'jquery-validation-additional-methods', RWMB_JS_URL . 'jquery-validation/additional-methods.min.js', array( 'jquery-validation' ), '1.15.0', true );
44
  wp_enqueue_script( 'rwmb-validate', RWMB_JS_URL . 'validate.js', array( 'jquery-validation', 'jquery-validation-additional-methods' ), RWMB_VER, true );
45
 
46
- RWMB_Field::localize_script( 'rwmb-validate', 'rwmbValidate', array(
47
- 'summaryMessage' => esc_html__( 'Please correct the errors highlighted below and try again.', 'learnpress' ),
48
- ) );
 
 
 
 
49
  }
50
  }
43
  wp_enqueue_script( 'jquery-validation-additional-methods', RWMB_JS_URL . 'jquery-validation/additional-methods.min.js', array( 'jquery-validation' ), '1.15.0', true );
44
  wp_enqueue_script( 'rwmb-validate', RWMB_JS_URL . 'validate.js', array( 'jquery-validation', 'jquery-validation-additional-methods' ), RWMB_VER, true );
45
 
46
+ RWMB_Field::localize_script(
47
+ 'rwmb-validate',
48
+ 'rwmbValidate',
49
+ array(
50
+ 'summaryMessage' => esc_html__( 'Please correct the errors highlighted below and try again.', 'meta-box' ),
51
+ )
52
+ );
53
  }
54
  }
inc/libraries/meta-box/inc/walkers/base.php CHANGED
@@ -11,35 +11,32 @@
11
  */
12
  abstract class RWMB_Walker_Base extends Walker {
13
  /**
14
- * Field data.
15
  *
16
- * @access public
17
  * @var array
18
  */
19
  public $field;
20
 
21
  /**
22
- * Meta data.
23
  *
24
- * @access public
25
  * @var array
26
  */
27
- public $meta = array();
28
 
29
  /**
30
  * Constructor.
31
  *
32
- * @param array $db_fields Database fields.
33
- * @param array $field Field parameters.
34
- * @param mixed $meta Meta value.
35
  */
36
- public function __construct( $db_fields, $field, $meta ) {
37
- $this->db_fields = wp_parse_args( (array) $db_fields, array(
38
- 'parent' => '',
39
- 'id' => '',
40
- 'label' => '',
41
- ) );
42
- $this->field = $field;
43
- $this->meta = (array) $meta;
44
  }
45
  }
11
  */
12
  abstract class RWMB_Walker_Base extends Walker {
13
  /**
14
+ * Field settings.
15
  *
 
16
  * @var array
17
  */
18
  public $field;
19
 
20
  /**
21
+ * Field meta data.
22
  *
 
23
  * @var array
24
  */
25
+ public $meta;
26
 
27
  /**
28
  * Constructor.
29
  *
30
+ * @param array $field Field parameters.
31
+ * @param mixed $meta Meta value.
 
32
  */
33
+ public function __construct( $field, $meta ) {
34
+ $this->db_fields = array(
35
+ 'id' => 'value',
36
+ 'parent' => 'parent',
37
+ );
38
+
39
+ $this->field = $field;
40
+ $this->meta = (array) $meta;
41
  }
42
  }
inc/libraries/meta-box/inc/walkers/input-list.php CHANGED
@@ -41,15 +41,13 @@ class RWMB_Walker_Input_List extends RWMB_Walker_Base {
41
  * @param int $current_object_id ID of the current item.
42
  */
43
  public function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) {
44
- $label = $this->db_fields['label'];
45
- $id = $this->db_fields['id'];
46
- $attributes = RWMB_Field::call( 'get_attributes', $this->field, $object->$id );
47
 
48
  $output .= sprintf(
49
  '<li><label><input %s %s>%s</label>',
50
  RWMB_Field::render_attributes( $attributes ),
51
- checked( in_array( $object->$id, $this->meta ), 1, false ),
52
- RWMB_Field::filter( 'choice_label', $object->$label, $this->field, $object )
53
  );
54
  }
55
 
41
  * @param int $current_object_id ID of the current item.
42
  */
43
  public function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) {
44
+ $attributes = RWMB_Field::call( 'get_attributes', $this->field, $object->value );
 
 
45
 
46
  $output .= sprintf(
47
  '<li><label><input %s %s>%s</label>',
48
  RWMB_Field::render_attributes( $attributes ),
49
+ checked( in_array( $object->value, $this->meta ), true, false ),
50
+ RWMB_Field::filter( 'choice_label', $object->label, $this->field, $object )
51
  );
52
  }
53
 
inc/libraries/meta-box/inc/walkers/select-tree.php CHANGED
@@ -10,7 +10,7 @@
10
  */
11
  class RWMB_Walker_Select_Tree {
12
  /**
13
- * Field data.
14
  *
15
  * @var string
16
  */
@@ -21,23 +21,17 @@ class RWMB_Walker_Select_Tree {
21
  *
22
  * @var array
23
  */
24
- public $meta = array();
25
 
26
  /**
27
  * Constructor.
28
  *
29
- * @param array $db_fields Database fields.
30
- * @param array $field Field parameters.
31
- * @param mixed $meta Meta value.
32
  */
33
- public function __construct( $db_fields, $field, $meta ) {
34
- $this->db_fields = wp_parse_args( (array) $db_fields, array(
35
- 'parent' => '',
36
- 'id' => '',
37
- 'label' => '',
38
- ) );
39
- $this->field = $field;
40
- $this->meta = (array) $meta;
41
  }
42
 
43
  /**
@@ -48,15 +42,14 @@ class RWMB_Walker_Select_Tree {
48
  * @return string
49
  */
50
  public function walk( $options ) {
51
- $parent = $this->db_fields['parent'];
52
  $children = array();
53
 
54
  foreach ( $options as $option ) {
55
- $index = isset( $option->$parent ) ? $option->$parent : 0;
56
- $children[ $index ][] = $option;
57
  }
58
 
59
- $top_level = isset( $children[0] ) ? 0 : $options[0]->$parent;
60
  return $this->display_level( $children, $top_level, true );
61
  }
62
 
@@ -70,25 +63,24 @@ class RWMB_Walker_Select_Tree {
70
  * @return string
71
  */
72
  public function display_level( $options, $parent_id = 0, $active = false ) {
73
- $id = $this->db_fields['id'];
74
  $field = $this->field;
75
- $walker = new RWMB_Walker_Select( $this->db_fields, $field, $this->meta );
76
  $attributes = RWMB_Field::call( 'get_attributes', $field, $this->meta );
77
 
78
  $children = $options[ $parent_id ];
79
  $output = sprintf(
80
  '<div class="rwmb-select-tree %s" data-parent-id="%s"><select %s>',
81
  $active ? '' : 'hidden',
82
- $parent_id,
83
  RWMB_Field::render_attributes( $attributes )
84
  );
85
- $output .= isset( $field['placeholder'] ) ? "<option value=''>{$field['placeholder']}</option>" : '<option></option>';
86
- $output .= $walker->walk( $children, - 1 );
87
- $output .= '</select>';
88
 
89
- foreach ( $children as $c ) {
90
- if ( isset( $options[ $c->$id ] ) ) {
91
- $output .= $this->display_level( $options, $c->$id, in_array( $c->$id, $this->meta ) && $active );
92
  }
93
  }
94
 
10
  */
11
  class RWMB_Walker_Select_Tree {
12
  /**
13
+ * Field settings.
14
  *
15
  * @var string
16
  */
21
  *
22
  * @var array
23
  */
24
+ public $meta;
25
 
26
  /**
27
  * Constructor.
28
  *
29
+ * @param array $field Field parameters.
30
+ * @param mixed $meta Meta value.
 
31
  */
32
+ public function __construct( $field, $meta ) {
33
+ $this->field = $field;
34
+ $this->meta = (array) $meta;
 
 
 
 
 
35
  }
36
 
37
  /**
42
  * @return string
43
  */
44
  public function walk( $options ) {
 
45
  $children = array();
46
 
47
  foreach ( $options as $option ) {
48
+ $parent = isset( $option->parent ) ? $option->parent : 0;
49
+ $children[ $parent ][] = $option;
50
  }
51
 
52
+ $top_level = isset( $children[0] ) ? 0 : $options[0]->parent;
53
  return $this->display_level( $children, $top_level, true );
54
  }
55
 
63
  * @return string
64
  */
65
  public function display_level( $options, $parent_id = 0, $active = false ) {
 
66
  $field = $this->field;
67
+ $walker = new RWMB_Walker_Select( $field, $this->meta );
68
  $attributes = RWMB_Field::call( 'get_attributes', $field, $this->meta );
69
 
70
  $children = $options[ $parent_id ];
71
  $output = sprintf(
72
  '<div class="rwmb-select-tree %s" data-parent-id="%s"><select %s>',
73
  $active ? '' : 'hidden',
74
+ esc_attr( $parent_id ),
75
  RWMB_Field::render_attributes( $attributes )
76
  );
77
+ $output .= $field['placeholder'] ? "<option value=''>{$field['placeholder']}</option>" : '<option></option>';
78
+ $output .= $walker->walk( $children, - 1 );
79
+ $output .= '</select>';
80
 
81
+ foreach ( $children as $child ) {
82
+ if ( isset( $options[ $child->value ] ) ) {
83
+ $output .= $this->display_level( $options, $child->value, in_array( $child->value, $this->meta ) && $active );
84
  }
85
  }
86
 
inc/libraries/meta-box/inc/walkers/select.php CHANGED
@@ -21,17 +21,15 @@ class RWMB_Walker_Select extends RWMB_Walker_Base {
21
  * @param int $current_object_id ID of the current item.
22
  */
23
  public function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) {
24
- $label = $this->db_fields['label'];
25
- $id = $this->db_fields['id'];
26
  $meta = $this->meta;
27
  $indent = str_repeat( '&nbsp;', $depth * 4 );
28
 
29
  $output .= sprintf(
30
  '<option value="%s" %s>%s%s</option>',
31
- esc_attr( $object->$id ),
32
- selected( in_array( $object->$id, $meta ), true, false ),
33
  $indent,
34
- esc_html( RWMB_Field::filter( 'choice_label', $object->$label, $this->field, $object ) )
35
  );
36
  }
37
  }
21
  * @param int $current_object_id ID of the current item.
22
  */
23
  public function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) {
 
 
24
  $meta = $this->meta;
25
  $indent = str_repeat( '&nbsp;', $depth * 4 );
26
 
27
  $output .= sprintf(
28
  '<option value="%s" %s>%s%s</option>',
29
+ esc_attr( $object->value ),
30
+ selected( in_array( $object->value, $meta ), true, false ),
31
  $indent,
32
+ esc_html( RWMB_Field::filter( 'choice_label', $object->label, $this->field, $object ) )
33
  );
34
  }
35
  }
inc/libraries/meta-box/js/autosave.js CHANGED
@@ -2,7 +2,7 @@
2
  'use strict';
3
 
4
  $( document ).ajaxSend( function ( event, xhr, settings ) {
5
- if ( typeof settings.data === 'undefined' || -1 === settings.data.indexOf( 'wp_autosave' ) ) {
6
  return;
7
  }
8
  var inputSelectors = 'input[class*="rwmb"], textarea[class*="rwmb"], select[class*="rwmb"], button[class*="rwmb"], input[name^="nonce_"]';
2
  'use strict';
3
 
4
  $( document ).ajaxSend( function ( event, xhr, settings ) {
5
+ if ( ! Array.isArray( settings.data ) || -1 === settings.data.indexOf( 'wp_autosave' ) ) {
6
  return;
7
  }
8
  var inputSelectors = 'input[class*="rwmb"], textarea[class*="rwmb"], select[class*="rwmb"], button[class*="rwmb"], input[name^="nonce_"]';
inc/libraries/meta-box/js/input-list.js CHANGED
@@ -14,16 +14,16 @@ jQuery( function ( $ ) {
14
  }
15
 
16
  $( '.rwmb-input' )
17
- .on( 'change', '.rwmb-input-list.collapse :checkbox', update )
18
- .on( 'clone', '.rwmb-input-list.collapse :checkbox', update );
19
- $( '.rwmb-input-list.collapse :checkbox' ).each( update );
20
 
21
  $( '.rwmb-input-list-select-all-none' ).toggle(
22
  function () {
23
- $('input[name="' + $(this).data('name') + '[]"]').prop('checked', true);
24
  },
25
  function () {
26
- $('input[name="' + $(this).data('name') + '[]"]').prop('checked', false);
27
  }
28
  );
29
  } );
14
  }
15
 
16
  $( '.rwmb-input' )
17
+ .on( 'change', '.rwmb-input-list.rwmb-collapse input[type="checkbox"]', update )
18
+ .on( 'clone', '.rwmb-input-list.rwmb-collapse input[type="checkbox"]', update );
19
+ $( '.rwmb-input-list.rwmb-collapse input[type="checkbox"]' ).each( update );
20
 
21
  $( '.rwmb-input-list-select-all-none' ).toggle(
22
  function () {
23
+ $( this ).parent().siblings( '.rwmb-input-list' ).find( 'input' ).prop( 'checked', true );
24
  },
25
  function () {
26
+ $( this ).parent().siblings( '.rwmb-input-list' ).find( 'input' ).prop( 'checked', false );
27
  }
28
  );
29
  } );
inc/libraries/meta-box/js/map.js CHANGED
@@ -63,8 +63,7 @@
63
 
64
  this.map.setCenter( this.marker.position );
65
  this.map.setZoom( zoom );
66
- }
67
- else if ( this.addressField ) {
68
  this.geocodeAddress();
69
  }
70
  },
@@ -92,7 +91,7 @@
92
 
93
  /**
94
  * Add a custom event that allows other scripts to refresh the maps when needed
95
- * For example: when maps is in tabs or hidden div (this is known issue of Google Maps)
96
  *
97
  * @see https://developers.google.com/maps/documentation/javascript/reference ('resize' Event)
98
  */
@@ -111,32 +110,26 @@
111
  },
112
 
113
  refresh: function () {
 
 
 
114
  var zoom = this.map.getZoom(),
115
  center = this.map.getCenter();
116
 
117
- if ( this.map ) {
118
- google.maps.event.trigger( this.map, 'resize' );
119
- this.map.setZoom( zoom );
120
- this.map.setCenter( center );
121
- }
122
  },
123
 
124
  // Autocomplete address
125
  autocomplete: function () {
126
- var that = this;
 
127
 
128
- // No address field or more than 1 address fields, ignore
129
- if ( ! this.addressField || this.addressField.split( ',' ).length > 1 ) {
130
  return;
131
  }
132
 
133
- var $address = $( 'input[name="' + this.addressField + '"]');
134
-
135
- // If map and address is inside a group, the input name of address field is changed.
136
- if ( 0 === $address.length ) {
137
- $address = this.$container.closest( '.rwmb-group-wrapper' ).find( 'input[name*="[' + this.addressField + ']"]' );
138
- }
139
-
140
  // If Meta Box Geo Location installed. Do not run auto complete.
141
  if ( $( '.rwmb-geo-binding' ).length ) {
142
  $address.on( 'selected_address', function () {
@@ -153,7 +146,14 @@
153
  'region': that.$canvas.data( 'region' )
154
  };
155
  geocoder.geocode( options, function ( results ) {
156
- response( $.map( results, function ( item ) {
 
 
 
 
 
 
 
157
  return {
158
  label: item.formatted_address,
159
  value: item.formatted_address,
@@ -165,7 +165,6 @@
165
  },
166
  select: function ( event, ui ) {
167
  var latLng = new google.maps.LatLng( ui.item.latitude, ui.item.longitude );
168
-
169
  that.map.setCenter( latLng );
170
  that.marker.setPosition( latLng );
171
  that.updateCoordinate( latLng );
@@ -181,18 +180,8 @@
181
 
182
  // Find coordinates by address
183
  geocodeAddress: function () {
184
- var address,
185
- addressList = [],
186
- fieldList = this.addressField.split( ',' ),
187
- loop,
188
  that = this;
189
-
190
- for ( loop = 0; loop < fieldList.length; loop ++ ) {
191
- addressList[loop] = $( '#' + fieldList[loop] ).val();
192
- }
193
-
194
- address = addressList.join( ',' ).replace( /\n/g, ',' ).replace( /,,/g, ',' );
195
-
196
  if ( ! address ) {
197
  return;
198
  }
@@ -205,6 +194,50 @@
205
  that.marker.setPosition( results[0].geometry.location );
206
  that.updateCoordinate( results[0].geometry.location );
207
  } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
  }
209
  };
210
 
@@ -216,7 +249,7 @@
216
  return;
217
  }
218
 
219
- controller = new MapField( $( this ) );
220
  controller.init();
221
  $this.data( 'mapController', controller );
222
  } );
63
 
64
  this.map.setCenter( this.marker.position );
65
  this.map.setZoom( zoom );
66
+ } else if ( this.addressField ) {
 
67
  this.geocodeAddress();
68
  }
69
  },
91
 
92
  /**
93
  * Add a custom event that allows other scripts to refresh the maps when needed
94
+ * For example: when maps is in tabs or hidden div.
95
  *
96
  * @see https://developers.google.com/maps/documentation/javascript/reference ('resize' Event)
97
  */
110
  },
111
 
112
  refresh: function () {
113
+ if ( ! this.map ) {
114
+ return;
115
+ }
116
  var zoom = this.map.getZoom(),
117
  center = this.map.getCenter();
118
 
119
+ google.maps.event.trigger( this.map, 'resize' );
120
+ this.map.setZoom( zoom );
121
+ this.map.panTo( center );
 
 
122
  },
123
 
124
  // Autocomplete address
125
  autocomplete: function () {
126
+ var that = this,
127
+ $address = this.getAddressField();
128
 
129
+ if ( null === $address ) {
 
130
  return;
131
  }
132
 
 
 
 
 
 
 
 
133
  // If Meta Box Geo Location installed. Do not run auto complete.
134
  if ( $( '.rwmb-geo-binding' ).length ) {
135
  $address.on( 'selected_address', function () {
146
  'region': that.$canvas.data( 'region' )
147
  };
148
  geocoder.geocode( options, function ( results ) {
149
+ if ( ! results.length ) {
150
+ response( [ {
151
+ value: '',
152
+ label: RWMB_Map.no_results_string
153
+ } ] );
154
+ return;
155
+ }
156
+ response( results.map( function ( item ) {
157
  return {
158
  label: item.formatted_address,
159
  value: item.formatted_address,
165
  },
166
  select: function ( event, ui ) {
167
  var latLng = new google.maps.LatLng( ui.item.latitude, ui.item.longitude );
 
168
  that.map.setCenter( latLng );
169
  that.marker.setPosition( latLng );
170
  that.updateCoordinate( latLng );
180
 
181
  // Find coordinates by address
182
  geocodeAddress: function () {
183
+ var address = this.getAddress(),
 
 
 
184
  that = this;
 
 
 
 
 
 
 
185
  if ( ! address ) {
186
  return;
187
  }
194
  that.marker.setPosition( results[0].geometry.location );
195
  that.updateCoordinate( results[0].geometry.location );
196
  } );
197
+ },
198
+
199
+ // Get the address field.
200
+ getAddressField: function() {
201
+ // No address field or more than 1 address fields, ignore
202
+ if ( ! this.addressField || this.addressField.split( ',' ).length > 1 ) {
203
+ return null;
204
+ }
205
+ return this.findAddressField( this.addressField );
206
+ },
207
+
208
+ // Get the address value for geocoding.
209
+ getAddress: function() {
210
+ var that = this;
211
+
212
+ return this.addressField.split( ',' )
213
+ .map( function( part ) {
214
+ part = that.findAddressField( part );
215
+ return null === part ? '' : part.val();
216
+ } )
217
+ .join( ',' ).replace( /\n/g, ',' ).replace( /,,/g, ',' );
218
+ },
219
+
220
+ // Find address field based on its name attribute. Auto search inside groups when needed.
221
+ findAddressField: function( fieldName ) {
222
+ // Not in a group.
223
+ var $address = $( 'input[name="' + fieldName + '"]');
224
+ if ( $address.length ) {
225
+ return $address;
226
+ }
227
+
228
+ // If map and address is inside a cloneable group.
229
+ $address = this.$container.closest( '.rwmb-group-clone' ).find( 'input[name*="[' + fieldName + ']"]' );
230
+ if ( $address.length ) {
231
+ return $address;
232
+ }
233
+
234
+ // If map and address is inside a non-cloneable group.
235
+ $address = this.$container.closest( '.rwmb-group-wrapper' ).find( 'input[name*="[' + fieldName + ']"]' );
236
+ if ( $address.length ) {
237
+ return $address;
238
+ }
239
+
240
+ return null;
241
  }
242
  };
243
 
249
  return;
250
  }
251
 
252
+ controller = new MapField( $this );
253
  controller.init();
254
  $this.data( 'mapController', controller );
255
  } );
inc/libraries/meta-box/js/media.js CHANGED
@@ -256,9 +256,9 @@ jQuery( function ( $ ) {
256
  this.collection.remove( item );
257
  },
258
 
259
- resetItemViews: function( items, options ){
260
  var that = this;
261
- _.each( options.previousModels, function( item ){
262
  that.removeItemView( item );
263
  } );
264
  items.each( function( item ) {
256
  this.collection.remove( item );
257
  },
258
 
259
+ resetItemViews: function( items ){
260
  var that = this;
261
+ _.each( that.models, function( item ){
262
  that.removeItemView( item );
263
  } );
264
  items.each( function( item ) {
inc/libraries/meta-box/js/oembed.js CHANGED
@@ -11,7 +11,8 @@ jQuery( function ( $ ) {
11
  $spinner = $this.siblings( '.spinner' ),
12
  data = {
13
  action: 'rwmb_get_embed',
14
- url: $this.val()
 
15
  };
16
 
17
  $spinner.css( 'visibility', 'visible' );
11
  $spinner = $this.siblings( '.spinner' ),
12
  data = {
13
  action: 'rwmb_get_embed',
14
+ url: this.value,
15
+ not_available: $this.data( 'not-available' ),
16
  };
17
 
18
  $spinner.css( 'visibility', 'visible' );
inc/libraries/meta-box/js/osm-frontend.js ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery( function( $ ) {
2
+ 'use strict';
3
+
4
+ var osmTileLayer = L.tileLayer( 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
5
+ attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
6
+ } );
7
+
8
+ /**
9
+ * Display Open Street Map
10
+ */
11
+ function displayMap() {
12
+ var options = $( this ).data( 'osm_options' ),
13
+ mapOptions = options.js_options,
14
+ center = L.latLng( options.latitude, options.longitude ),
15
+ map;
16
+
17
+ mapOptions.center = center;
18
+
19
+ // Typcast zoom to a number
20
+ mapOptions.zoom *= 1;
21
+
22
+ map = L.map( this, mapOptions );
23
+ map.addLayer( osmTileLayer );
24
+
25
+ // Set marker
26
+ if ( options.marker ) {
27
+ var markerOptions = {};
28
+
29
+ // Set marker title
30
+ if ( options.marker_title ) {
31
+ markerOptions.title = options.marker_title;
32
+ }
33
+
34
+ // Set marker icon
35
+ if ( options.marker_icon ) {
36
+ markerOptions.icon = L.icon( options.marker_icon );
37
+ }
38
+
39
+ var marker = L.marker( center, markerOptions ).addTo( map )
40
+ }
41
+
42
+ // Set info window
43
+ if ( options.info_window ) {
44
+ marker.bindPopup( options.info_window ).openPopup();
45
+ }
46
+ }
47
+
48
+ // Loop through all map instances and display them
49
+ $( '.rwmb-osm-canvas' ).each( displayMap );
50
+ } );
inc/libraries/meta-box/js/osm.js ADDED
@@ -0,0 +1,266 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ( function( $, L ) {
2
+ 'use strict';
3
+
4
+ var osmTileLayer = L.tileLayer( 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
5
+ attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
6
+ } );
7
+
8
+ // Use function construction to store map & DOM elements separately for each instance
9
+ var OsmField = function ( $container ) {
10
+ this.$container = $container;
11
+ };
12
+
13
+ // Use prototype for better performance
14
+ OsmField.prototype = {
15
+ // Initialize everything
16
+ init: function () {
17
+ this.initDomElements();
18
+ this.initMapElements();
19
+
20
+ this.initMarkerPosition();
21
+ this.addListeners();
22
+ this.autocomplete();
23
+ },
24
+
25
+ // Initialize DOM elements
26
+ initDomElements: function () {
27
+ this.$canvas = this.$container.find( '.rwmb-osm-canvas' );
28
+ this.canvas = this.$canvas[0];
29
+ this.$coordinate = this.$container.find( '.rwmb-osm-coordinate' );
30
+ this.$findButton = this.$container.find( '.rwmb-osm-goto-address-button' );
31
+ this.addressField = this.$container.data( 'address-field' );
32
+ },
33
+
34
+ // Initialize map elements
35
+ initMapElements: function () {
36
+ var defaultLoc = this.$canvas.data( 'default-loc' ),
37
+ latLng;
38
+
39
+ defaultLoc = defaultLoc ? defaultLoc.split( ',' ) : [53.346881, -6.258860];
40
+ latLng = L.latLng( defaultLoc[0], defaultLoc[1] ); // Initial position for map.
41
+
42
+ this.map = L.map( this.canvas, {
43
+ center: latLng,
44
+ zoom: 14
45
+ } );
46
+ this.map.addLayer( osmTileLayer );
47
+ this.marker = L.marker( latLng, {
48
+ draggable: true
49
+ } ).addTo( this.map );
50
+ },
51
+
52
+ // Initialize marker position
53
+ initMarkerPosition: function () {
54
+ var coordinate = this.$coordinate.val(),
55
+ location,
56
+ zoom;
57
+
58
+ if ( coordinate ) {
59
+ location = coordinate.split( ',' );
60
+ var latLng = L.latLng( location[0], location[1] );
61
+ this.marker.setLatLng( latLng );
62
+
63
+ zoom = location.length > 2 ? parseInt( location[2], 10 ) : 14;
64
+
65
+ this.map.panTo( latLng );
66
+ this.map.setZoom( zoom );
67
+ } else if ( this.addressField ) {
68
+ this.geocodeAddress();
69
+ }
70
+ },
71
+
72
+ // Add event listeners for 'click' & 'drag'
73
+ addListeners: function () {
74
+ var that = this;
75
+ this.map.on( 'click', function ( event ) {
76
+ that.marker.setLatLng( event.latlng );
77
+ that.updateCoordinate( event.latlng );
78
+ } );
79
+
80
+ this.map.on( 'zoom', function () {
81
+ that.updateCoordinate( that.marker.getLatLng() );
82
+ } );
83
+
84
+ this.marker.on( 'drag', function () {
85
+ that.updateCoordinate( that.marker.getLatLng() );
86
+ } );
87
+
88
+ this.$findButton.on( 'click', function ( e ) {
89
+ e.preventDefault();
90
+ that.geocodeAddress();
91
+ } );
92
+
93
+ /**
94
+ * Add a custom event that allows other scripts to refresh the maps when needed
95
+ * For example: when maps is in tabs or hidden div (this is known issue of Google Maps)
96
+ *
97
+ * @see https://developers.google.com/maps/documentation/javascript/reference ('resize' Event)
98
+ */
99
+ $( window ).on( 'rwmb_map_refresh', function () {
100
+ that.refresh();
101
+ } );
102
+
103
+ // Refresh on meta box hide and show
104
+ $( document ).on( 'postbox-toggled', function () {
105
+ that.refresh();
106
+ } );
107
+ // Refresh on sorting meta boxes
108
+ $( '.meta-box-sortables' ).on( 'sortstop', function () {
109
+ that.refresh();
110
+ } );
111
+ },
112
+
113
+ refresh: function () {
114
+ if ( ! this.map ) {
115
+ return;
116
+ }
117
+ this.map.invalidateSize();
118
+ this.map.panTo( this.map.getCenter() );
119
+ },
120
+
121
+ // Autocomplete address
122
+ autocomplete: function () {
123
+ var that = this,
124
+ $address = this.getAddressField();
125
+
126
+ if ( null === $address ) {
127
+ return;
128
+ }
129
+
130
+ // If Meta Box Geo Location installed. Do not run auto complete.
131
+ if ( $( '.rwmb-geo-binding' ).length ) {
132
+ $address.on( 'selected_address', that.geocodeAddress );
133
+ return;
134
+ }
135
+
136
+ $address.autocomplete( {
137
+ source: function ( request, response ) {
138
+ $.get( 'https://nominatim.openstreetmap.org/search', {
139
+ format: 'json',
140
+ q: request.term,
141
+ countrycodes: that.$canvas.data( 'region' ),
142
+ "accept-language": that.$canvas.data( 'language' )
143
+ }, function( results ) {
144
+ if ( ! results.length ) {
145
+ response( [ {
146
+ value: '',
147
+ label: RWMB_Osm.no_results_string
148
+ } ] );
149
+ return;
150
+ }
151
+ response( results.map( function ( item ) {
152
+ return {
153
+ label: item.display_name,
154
+ value: item.display_name,
155
+ latitude: item.lat,
156
+ longitude: item.lon
157
+ };
158
+ } ) );
159
+ }, 'json' );
160
+ },
161
+ select: function ( event, ui ) {
162
+ var latLng = L.latLng( ui.item.latitude, ui.item.longitude );
163
+
164
+ that.map.panTo( latLng );
165
+ that.marker.setLatLng( latLng );
166
+ that.updateCoordinate( latLng );
167
+ }
168
+ } );
169
+ },
170
+
171
+ // Update coordinate to input field
172
+ updateCoordinate: function ( latLng ) {
173
+ var zoom = this.map.getZoom();
174
+ this.$coordinate.val( latLng.lat + ',' + latLng.lng + ',' + zoom );
175
+ },
176
+
177
+ // Find coordinates by address
178
+ geocodeAddress: function () {
179
+ var address = this.getAddress(),
180
+ that = this;
181
+ if ( ! address ) {
182
+ return;
183
+ }
184
+
185
+ $.get( 'https://nominatim.openstreetmap.org/search', {
186
+ format: 'json',
187
+ q: address,
188
+ limit: 1,
189
+ countrycodes: that.$canvas.data( 'region' ),
190
+ "accept-language": that.$canvas.data( 'language' )
191
+ }, function( result ) {
192
+ if ( result.length !== 1 ) {
193
+ return;
194
+ }
195
+ var latLng = L.latLng( result[0].lat, result[0].lon );
196
+ that.map.panTo( latLng );
197
+ that.marker.setLatLng( latLng );
198
+ that.updateCoordinate( latLng );
199
+ }, 'json' );
200
+ },
201
+
202
+ // Get the address field.
203
+ getAddressField: function() {
204
+ // No address field or more than 1 address fields, ignore
205
+ if ( ! this.addressField || this.addressField.split( ',' ).length > 1 ) {
206
+ return null;
207
+ }
208
+ return this.findAddressField( this.addressField );
209
+ },
210
+
211
+ // Get the address value for geocoding.
212
+ getAddress: function() {
213
+ var that = this;
214
+
215
+ return this.addressField.split( ',' )
216
+ .map( function( part ) {
217
+ part = that.findAddressField( part );
218
+ return null === part ? '' : part.val();
219
+ } )
220
+ .join( ',' ).replace( /\n/g, ',' ).replace( /,,/g, ',' );
221
+ },
222
+
223
+ // Find address field based on its name attribute. Auto search inside groups when needed.
224
+ findAddressField: function( fieldName ) {
225
+ // Not in a group.
226
+ var $address = $( 'input[name="' + fieldName + '"]');
227
+ if ( $address.length ) {
228
+ return $address;
229
+ }
230
+
231
+ // If map and address is inside a cloneable group.
232
+ $address = this.$container.closest( '.rwmb-group-clone' ).find( 'input[name*="[' + fieldName + ']"]' );
233
+ if ( $address.length ) {
234
+ return $address;
235
+ }
236
+
237
+ // If map and address is inside a non-cloneable group.
238
+ $address = this.$container.closest( '.rwmb-group-wrapper' ).find( 'input[name*="[' + fieldName + ']"]' );
239
+ if ( $address.length ) {
240
+ return $address;
241
+ }
242
+
243
+ return null;
244
+ }
245
+ };
246
+
247
+ function update() {
248
+ $( '.rwmb-osm-field' ).each( function () {
249
+ var $this = $( this ),
250
+ controller = $this.data( 'osmController' );
251
+ if ( controller ) {
252
+ return;
253
+ }
254
+
255
+ controller = new OsmField( $this );
256
+ controller.init();
257
+ $this.data( 'osmController', controller );
258
+ } );
259
+ }
260
+
261
+ $( function () {
262
+ update();
263
+ $( '.rwmb-input' ).on( 'clone', update );
264
+ } );
265
+
266
+ } )( jQuery, L );
inc/libraries/meta-box/js/select-advanced.js CHANGED
@@ -1,6 +1,23 @@
1
  jQuery( function ( $ ) {
2
  'use strict';
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  /**
5
  * Turn select field into beautiful dropdown with select2 library
6
  * This function is called when document ready and when clone button is clicked (to update the new cloned field)
@@ -10,10 +27,27 @@ jQuery( function ( $ ) {
10
  function update() {
11
  var $this = $( this ),
12
  options = $this.data( 'options' );
 
13
  $this.siblings( '.select2-container' ).remove();
14
  $this.show().select2( options );
15
 
16
  rwmbSelect.bindEvents( $this );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  }
18
 
19
  $( '.rwmb-select_advanced' ).each( update );
1
  jQuery( function ( $ ) {
2
  'use strict';
3
 
4
+ /**
5
+ * Reorder selected values in correct order that they were selected.
6
+ * @param $select2 jQuery element of the select2.
7
+ */
8
+ function reorderSelected( $select2 ) {
9
+ var selected = $select2.data( 'selected' );
10
+ if ( ! selected ) {
11
+ return;
12
+ }
13
+ selected.forEach( function ( value ) {
14
+ var option = $select2.children( '[value="' + value + '"]' );
15
+ option.detach();
16
+ $select2.append( option );
17
+ } );
18
+ $select2.trigger( 'change' );
19
+ }
20
+
21
  /**
22
  * Turn select field into beautiful dropdown with select2 library
23
  * This function is called when document ready and when clone button is clicked (to update the new cloned field)
27
  function update() {
28
  var $this = $( this ),
29
  options = $this.data( 'options' );
30
+ $this.removeClass( 'select2-hidden-accessible' );
31
  $this.siblings( '.select2-container' ).remove();
32
  $this.show().select2( options );
33
 
34
  rwmbSelect.bindEvents( $this );
35
+
36
+ if ( ! $this.attr( 'multiple' ) ) {
37
+ return;
38
+ }
39
+
40
+ reorderSelected( $this );
41
+
42
+ /**
43
+ * Preserve the order that options are selected.
44
+ * @see https://github.com/select2/select2/issues/3106#issuecomment-255492815
45
+ */
46
+ $this.on( 'select2:select', function ( event ) {
47
+ var option = $this.children( '[value="' + event.params.data.id + '"]' );
48
+ option.detach();
49
+ $this.append( option ).trigger( 'change' );
50
+ } );
51
  }
52
 
53
  $( '.rwmb-select_advanced' ).each( update );
inc/libraries/meta-box/js/select.js CHANGED
@@ -5,68 +5,47 @@ jQuery( function ( $ ) {
5
  * Object stores all necessary methods for select All/None actions
6
  * Assign to global variable so we can access to this object from select advanced field
7
  */
8
- var select = window.rwmbSelect = {
9
  /**
10
  * Select all/none for select tag
11
- *
12
- * @param $input jQuery selector for input wrapper
13
- *
14
- * @return void
15
  */
16
- selectAllNone: function ( $input ) {
17
- var $element = $input.find( 'select' );
 
 
18
 
19
- $input.on( 'click', '.rwmb-select-all-none a', function ( e ) {
20
- e.preventDefault();
21
- if ( 'all' == $( this ).data( 'type' ) ) {
22
- var selected = [];
23
- $element.find( 'option' ).each( function ( i, e ) {
24
- var $value = $( e ).attr( 'value' );
25
-
26
- if ( $value != '' ) {
27
- selected.push( $value );
28
- }
29
- } );
30
- $element.val( selected ).trigger( 'change' );
31
- }
32
- else {
33
- $element.val( '' );
34
- }
35
  } );
 
36
  },
37
 
38
  /**
39
  * Add event listener for select all/none links when click
40
- *
41
- * @param $el jQuery element
42
- *
43
- * @return void
44
  */
45
  bindEvents: function ( $el ) {
46
- var $input = $el.closest( '.rwmb-input' ),
47
- $clone = $input.find( '.rwmb-clone' );
48
-
49
- if ( $clone.length ) {
50
- $clone.each( function () {
51
- select.selectAllNone( $( this ) );
52
- } );
53
- }
54
- else {
55
- select.selectAllNone( $input );
56
- }
57
  }
58
  };
59
 
60
  /**
61
  * Update select field when clicking clone button
62
- *
63
- * @return void
64
  */
65
  function update() {
66
  select.bindEvents( $( this ) );
67
  }
68
 
69
- // Run for select field
70
  $( '.rwmb-select' ).each( update );
71
  $( document ).on( 'clone', '.rwmb-select', update );
 
 
 
72
  } );
5
  * Object stores all necessary methods for select All/None actions
6
  * Assign to global variable so we can access to this object from select advanced field
7
  */
8
+ var select = {
9
  /**
10
  * Select all/none for select tag
11
+ * @param event Click event.
 
 
 
12
  */
13
+ selectAllNone: function ( event ) {
14
+ event.preventDefault();
15
+ var $this = $( this ),
16
+ $element = $this.parent().siblings( 'select' );
17
 
18
+ if ( 'none' === $this.data( 'type' ) ) {
19
+ $element.val( [] ).trigger( 'change' );
20
+ return;
21
+ }
22
+ var selected = [];
23
+ $element.find( 'option' ).each( function ( index, option ) {
24
+ selected.push( option.value );
 
 
 
 
 
 
 
 
 
25
  } );
26
+ $element.val( selected ).trigger( 'change' );
27
  },
28
 
29
  /**
30
  * Add event listener for select all/none links when click
31
+ * @param $el jQuery select element
 
 
 
32
  */
33
  bindEvents: function ( $el ) {
34
+ $el.closest( '.rwmb-input' ).on( 'click', '.rwmb-select-all-none a', select.selectAllNone );
 
 
 
 
 
 
 
 
 
 
35
  }
36
  };
37
 
38
  /**
39
  * Update select field when clicking clone button
 
 
40
  */
41
  function update() {
42
  select.bindEvents( $( this ) );
43
  }
44
 
45
+ // Run for select field.
46
  $( '.rwmb-select' ).each( update );
47
  $( document ).on( 'clone', '.rwmb-select', update );
48
+
49
+ // Export to use for select_advanced.
50
+ window.rwmbSelect = select;
51
  } );
inc/libraries/meta-box/js/select2/i18n/af.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/af",[],function(){return{errorLoading:function(){return"Die resultate kon nie gelaai word nie."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Verwyders asseblief "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Voer asseblief "+t+" of meer karakters";return n},loadingMore:function(){return"Meer resultate word gelaai…"},maximumSelected:function(e){var t="Kies asseblief net "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"Geen resultate gevind"},searching:function(){return"Besig…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/ar.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
- (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="الرجاء حذف "+t+" عناصر";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="الرجاء إضافة "+t+" عناصر";return n},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(e){var t="تستطيع إختيار "+e.maximum+" بنود فقط";return t},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(e){var t=e.input.length-e.maximum;return"الرجاء حذف "+t+" عناصر"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"الرجاء إضافة "+t+" عناصر"},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(e){return"تستطيع إختيار "+e.maximum+" بنود فقط"},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/az.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/az",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return t+" simvol silin"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(e){return"Sadəcə "+e.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/az",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return t+" simvol silin"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(e){return"Sadəcə "+e.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/bg.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bg",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Моля въведете с "+t+" по-малко символ";return t>1&&(n+="a"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Моля въведете още "+t+" символ";return t>1&&(n+="a"),n},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(e){var t="Можете да направите до "+e.maximum+" ";return e.maximum>1?t+="избора":t+="избор",t},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bg",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Моля въведете с "+t+" по-малко символ";return t>1&&(n+="a"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Моля въведете още "+t+" символ";return t>1&&(n+="a"),n},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(e){var t="Можете да направите до "+e.maximum+" ";return e.maximum>1?t+="избора":t+="избор",t},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/bs.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bs",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspijelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/ca.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Si us plau, elimina "+t+" car";return t==1?n+="àcter":n+="àcters",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Si us plau, introdueix "+t+" car";return t==1?n+="àcter":n+="àcters",n},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var t="Només es pot seleccionar "+e.maximum+" element";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Si us plau, elimina "+t+" car";return t==1?n+="àcter":n+="àcters",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Si us plau, introdueix "+t+" car";return t==1?n+="àcter":n+="àcters",n},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var t="Només es pot seleccionar "+e.maximum+" element";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/cs.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
- (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/cs",[],function(){function e(e,t){switch(e){case 2:return t?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím zadejte o jeden znak méně":n<=4?"Prosím zadejte o "+e(n,!0)+" znaky méně":"Prosím zadejte o "+n+" znaků méně"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím zadejte ještě jeden znak":n<=4?"Prosím zadejte ještě další "+e(n,!0)+" znaky":"Prosím zadejte ještě dalších "+n+" znaků"},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(t){var n=t.maximum;return n==1?"Můžete zvolit jen jednu položku":n<=4?"Můžete zvolit maximálně "+e(n,!1)+" položky":"Můžete zvolit maximálně "+n+" položek"},noResults:function(){return"Nenalezeny žádné položky"},searching:function(){return"Vyhledávání…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/cs",[],function(){function e(e,t){switch(e){case 2:return t?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadejte o jeden znak méně.":n<=4?"Prosím, zadejte o "+e(n,!0)+" znaky méně.":"Prosím, zadejte o "+n+" znaků méně."},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadejte ještě jeden znak.":n<=4?"Prosím, zadejte ještě další "+e(n,!0)+" znaky.":"Prosím, zadejte ještě dalších "+n+" znaků."},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(t){var n=t.maximum;return n==1?"Můžete zvolit jen jednu položku.":n<=4?"Můžete zvolit maximálně "+e(n,!1)+" položky.":"Můžete zvolit maximálně "+n+" položek."},noResults:function(){return"Nenalezeny žádné položky."},searching:function(){return"Vyhledávání…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/da.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
- (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Angiv venligst "+t+" tegn mindre";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Angiv venligst "+t+" tegn mere";return n},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var t="Du kan kun vælge "+e.maximum+" emne";return e.maximum!=1&&(t+="r"),t},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Angiv venligst "+t+" tegn mindre"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Angiv venligst "+t+" tegn mere"},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var t="Du kan kun vælge "+e.maximum+" emne";return e.maximum!=1&&(t+="r"),t},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/de.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
- (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/de",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Bitte "+t+" Zeichen weniger eingeben"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Bitte "+t+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var t="Sie können nur "+e.maximum+" Eintr";return e.maximum===1?t+="ag":t+="äge",t+=" auswählen",t},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/de",[],function(){return{errorLoading:function(){return"Die Ergebnisse konnten nicht geladen werden."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Bitte "+t+" Zeichen weniger eingeben"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Bitte "+t+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var t="Sie können nur "+e.maximum+" Eintr";return e.maximum===1?t+="ag":t+="äge",t+=" auswählen",t},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/dsb.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/dsb",[],function(){var e=["znamuško","znamušce","znamuška","znamuškow"],t=["zapisk","zapiska","zapiski","zapiskow"],n=function(t,n){if(t===1)return n[0];if(t===2)return n[1];if(t>2&&t<=4)return n[2];if(t>=5)return n[3]};return{errorLoading:function(){return"Wuslědki njejsu se dali zacytaś."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Pšosym lašuj "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Pšosym zapódaj nanejmjenjej "+r+" "+n(r,e)},loadingMore:function(){return"Dalšne wuslědki se zacytaju…"},maximumSelected:function(e){return"Móžoš jano "+e.maximum+" "+n(e.maximum,t)+"wubraś."},noResults:function(){return"Žedne wuslědki namakane"},searching:function(){return"Pyta se…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/el.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Παρακαλώ διαγράψτε "+t+" χαρακτήρ";return t==1&&(n+="α"),t!=1&&(n+="ες"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Παρακαλώ συμπληρώστε "+t+" ή περισσότερους χαρακτήρες";return n},loadingMore:function(){return"Φόρτωση περισσότερων αποτελεσμάτων…"},maximumSelected:function(e){var t="Μπορείτε να επιλέξετε μόνο "+e.maximum+" επιλογ";return e.maximum==1&&(t+="ή"),e.maximum!=1&&(t+="ές"),t},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/en.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/es.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
- (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"La carga falló"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor, elimine "+t+" car";return t==1?n+="ácter":n+="acteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Por favor, introduzca "+t+" car";return t==1?n+="ácter":n+="acteres",n},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var t="Sólo puede seleccionar "+e.maximum+" elemento";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"No se pudieron cargar los resultados"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor, elimine "+t+" car";return t==1?n+="ácter":n+="acteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Por favor, introduzca "+t+" car";return t==1?n+="ácter":n+="acteres",n},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var t="Sólo puede seleccionar "+e.maximum+" elemento";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/et.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" vähem",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" rohkem",n},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var t="Saad vaid "+e.maximum+" tulemus";return e.maximum==1?t+="e":t+="t",t+=" valida",t},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" vähem",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" rohkem",n},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var t="Saad vaid "+e.maximum+" tulemus";return e.maximum==1?t+="e":t+="t",t+=" valida",t},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/eu.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gutxiago",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gehiago",n},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return e.maximum===1?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gutxiago",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gehiago",n},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return e.maximum===1?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/fa.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="لطفاً "+t+" کاراکتر را حذف نمایید";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لطفاً تعداد "+t+" کاراکتر یا بیشتر وارد نمایید";return n},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(e){var t="شما تنها می‌توانید "+e.maximum+" آیتم را انتخاب نمایید";return t},noResults:function(){return"هیچ نتیجه‌ای یافت نشد"},searching:function(){return"در حال جستجو..."}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="لطفاً "+t+" کاراکتر را حذف نمایید";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لطفاً تعداد "+t+" کاراکتر یا بیشتر وارد نمایید";return n},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(e){var t="شما تنها می‌توانید "+e.maximum+" آیتم را انتخاب نمایید";return t},noResults:function(){return"هیچ نتیجه‌ای یافت نشد"},searching:function(){return"در حال جستجو..."}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/fi.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
- (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Ole hyvä ja anna "+t+" merkkiä vähemmän"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Ole hyvä ja anna "+t+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(e){return"Voit valita ainoastaan "+e.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fi",[],function(){return{errorLoading:function(){return"Tuloksia ei saatu ladattua."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Ole hyvä ja anna "+t+" merkkiä vähemmän"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Ole hyvä ja anna "+t+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(e){return"Voit valita ainoastaan "+e.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){return"Haetaan…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/fr.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
- (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Supprimez "+t+" caractère";return t!==1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Saisissez "+t+" caractère";return t!==1&&(n+="s"),n},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){var t="Vous pouvez seulement sélectionner "+e.maximum+" élément";return e.maximum!==1&&(t+="s"),t},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Supprimez "+t+" caractère"+(t>1)?"s":""},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Saisissez au moins "+t+" caractère"+(t>1)?"s":""},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){return"Vous pouvez seulement sélectionner "+e.maximum+" élément"+(e.maximum>1)?"s":""},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/gl.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
- (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/gl",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Elimine ";return t===1?n+="un carácter":n+=t+" caracteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Engada ";return t===1?n+="un carácter":n+=t+" caracteres",n},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){var t="Só pode ";return e.maximum===1?t+="un elemento":t+=e.maximum+" elementos",t},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/gl",[],function(){return{errorLoading:function(){return"Non foi posíbel cargar os resultados."},inputTooLong:function(e){var t=e.input.length-e.maximum;return t===1?"Elimine un carácter":"Elimine "+t+" caracteres"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t===1?"Engada un carácter":"Engada "+t+" caracteres"},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){return e.maximum===1?"Só pode seleccionar un elemento":"Só pode seleccionar "+e.maximum+" elementos"},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/he.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="נא למחוק ";return t===1?n+="תו אחד":n+=t+" תווים",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="נא להכניס ";return t===1?n+="תו אחד":n+=t+" תווים",n+=" או יותר",n},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(e){var t="באפשרותך לבחור עד ";return e.maximum===1?t+="פריט אחד":t+=e.maximum+" פריטים",t},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="נא למחוק ";return t===1?n+="תו אחד":n+=t+" תווים",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="נא להכניס ";return t===1?n+="תו אחד":n+=t+" תווים",n+=" או יותר",n},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(e){var t="באפשרותך לבחור עד ";return e.maximum===1?t+="פריט אחד":t+=e.maximum+" פריטים",t},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/hi.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" अक्षर को हटा दें";return t>1&&(n=t+" अक्षरों को हटा दें "),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="कृपया "+t+" या अधिक अक्षर दर्ज करें";return n},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(e){var t="आप केवल "+e.maximum+" आइटम का चयन कर सकते हैं";return t},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" अक्षर को हटा दें";return t>1&&(n=t+" अक्षरों को हटा दें "),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="कृपया "+t+" या अधिक अक्षर दर्ज करें";return n},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(e){var t="आप केवल "+e.maximum+" आइटम का चयन कर सकते हैं";return t},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/hr.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hr",[],function(){function e(e){var t=" "+e+" znak";return e%10<5&&e%10>0&&(e%100<5||e%100>19)?e%10>1&&(t+="a"):t+="ova",t}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Unesite "+e(n)},inputTooShort:function(t){var n=t.minimum-t.input.length;return"Unesite još "+e(n)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(e){return"Maksimalan broj odabranih stavki je "+e.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hr",[],function(){function e(e){var t=" "+e+" znak";return e%10<5&&e%10>0&&(e%100<5||e%100>19)?e%10>1&&(t+="a"):t+="ova",t}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Unesite "+e(n)},inputTooShort:function(t){var n=t.minimum-t.input.length;return"Unesite još "+e(n)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(e){return"Maksimalan broj odabranih stavki je "+e.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/hsb.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hsb",[],function(){var e=["znamješko","znamješce","znamješka","znamješkow"],t=["zapisk","zapiskaj","zapiski","zapiskow"],n=function(t,n){if(t===1)return n[0];if(t===2)return n[1];if(t>2&&t<=4)return n[2];if(t>=5)return n[3]};return{errorLoading:function(){return"Wuslědki njedachu so začitać."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Prošu zhašej "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Prošu zapodaj znajmjeńša "+r+" "+n(r,e)},loadingMore:function(){return"Dalše wuslědki so začitaja…"},maximumSelected:function(e){return"Móžeš jenož "+e.maximum+" "+n(e.maximum,t)+"wubrać"},noResults:function(){return"Žane wuslědki namakane"},searching:function(){return"Pyta so…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/hu.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
- (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Túl hosszú. "+t+" karakterrel több, mint kellene."},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Túl rövid. Még "+t+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hu",[],function(){return{errorLoading:function(){return"Az eredmények betöltése nem sikerült."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Túl hosszú. "+t+" karakterrel több, mint kellene."},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Túl rövid. Még "+t+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/hy.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hy",[],function(){return{errorLoading:function(){return"Արդյունքները հնարավոր չէ բեռնել։"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Խնդրում ենք հեռացնել "+t+" նշան";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Խնդրում ենք մուտքագրել "+t+" կամ ավել նշաններ";return n},loadingMore:function(){return"Բեռնվում են նոր արդյունքներ․․․"},maximumSelected:function(e){var t="Դուք կարող եք ընտրել առավելագույնը "+e.maximum+" կետ";return t},noResults:function(){return"Արդյունքներ չեն գտնվել"},searching:function(){return"Որոնում․․․"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/id.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Hapuskan "+t+" huruf"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Masukkan "+t+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(e){return"Anda hanya dapat memilih "+e.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Hapuskan "+t+" huruf"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Masukkan "+t+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(e){return"Anda hanya dapat memilih "+e.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/is.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/is",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vinsamlegast styttið texta um "+t+" staf";return t<=1?n:n+"i"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vinsamlegast skrifið "+t+" staf";return t>1&&(n+="i"),n+=" í viðbót",n},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(e){return"Þú getur aðeins valið "+e.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/is",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vinsamlegast styttið texta um "+t+" staf";return t<=1?n:n+"i"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vinsamlegast skrifið "+t+" staf";return t>1&&(n+="i"),n+=" í viðbót",n},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(e){return"Þú getur aðeins valið "+e.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/it.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Per favore cancella "+t+" caratter";return t!==1?n+="i":n+="e",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Per favore inserisci "+t+" o più caratteri";return n},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var t="Puoi selezionare solo "+e.maximum+" element";return e.maximum!==1?t+="i":t+="o",t},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Per favore cancella "+t+" caratter";return t!==1?n+="i":n+="e",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Per favore inserisci "+t+" o più caratteri";return n},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var t="Puoi selezionare solo "+e.maximum+" element";return e.maximum!==1?t+="i":t+="o",t},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/ja.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" 文字を削除してください";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="少なくとも "+t+" 文字を入力してください";return n},loadingMore:function(){return"読み込み中…"},maximumSelected:function(e){var t=e.maximum+" 件しか選択できません";return t},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" 文字を削除してください";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="少なくとも "+t+" 文字を入力してください";return n},loadingMore:function(){return"読み込み中…"},maximumSelected:function(e){var t=e.maximum+" 件しか選択できません";return t},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/km.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/km",[],function(){return{errorLoading:function(){return"មិនអាចទាញយកទិន្នន័យ"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="សូមលុបចេញ "+t+" អក្សរ";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="សូមបញ្ចូល"+t+" អក្សរ រឺ ច្រើនជាងនេះ";return n},loadingMore:function(){return"កំពុងទាញយកទិន្នន័យបន្ថែម..."},maximumSelected:function(e){var t="អ្នកអាចជ្រើសរើសបានតែ "+e.maximum+" ជម្រើសប៉ុណ្ណោះ";return t},noResults:function(){return"មិនមានលទ្ធផល"},searching:function(){return"កំពុងស្វែងរក..."}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/ko.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/lt.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
- (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lt",[],function(){function e(e,t,n,r){return e%100>9&&e%100<21||e%10===0?e%10>1?n:r:t}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"","ius","į"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"","ius","į"),r},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(t){var n="Jūs galite pasirinkti tik "+t.maximum+" element";return n+=e(t.maximum,"ų","us","ą"),n},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lt",[],function(){function e(e,t,n,r){return e%10===1&&(e%100<11||e%100>19)?t:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"į","ius",""),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"į","ius",""),r},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(t){var n="Jūs galite pasirinkti tik "+t.maximum+" element";return n+=e(t.maximum,"ą","us","ų"),n},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/lv.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lv",[],function(){function e(e,t,n,r){return e===11?t:e%10===1?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Lūdzu ievadiet par "+n;return r+=" simbol"+e(n,"iem","u","iem"),r+" mazāk"},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Lūdzu ievadiet vēl "+n;return r+=" simbol"+e(n,"us","u","us"),r},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(t){var n="Jūs varat izvēlēties ne vairāk kā "+t.maximum;return n+=" element"+e(t.maximum,"us","u","us"),n},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lv",[],function(){function e(e,t,n,r){return e===11?t:e%10===1?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Lūdzu ievadiet par "+n;return r+=" simbol"+e(n,"iem","u","iem"),r+" mazāk"},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Lūdzu ievadiet vēl "+n;return r+=" simbol"+e(n,"us","u","us"),r},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(t){var n="Jūs varat izvēlēties ne vairāk kā "+t.maximum;return n+=" element"+e(t.maximum,"us","u","us"),n},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/mk.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/mk",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Ве молиме внесете "+e.maximum+" помалку карактер";return e.maximum!==1&&(n+="и"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Ве молиме внесете уште "+e.maximum+" карактер";return e.maximum!==1&&(n+="и"),n},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(e){var t="Можете да изберете само "+e.maximum+" ставк";return e.maximum===1?t+="а":t+="и",t},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/mk",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Ве молиме внесете "+e.maximum+" помалку карактер";return e.maximum!==1&&(n+="и"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Ве молиме внесете уште "+e.maximum+" карактер";return e.maximum!==1&&(n+="и"),n},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(e){var t="Можете да изберете само "+e.maximum+" ставк";return e.maximum===1?t+="а":t+="и",t},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/ms.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Sila hapuskan "+t+" aksara"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Sila masukkan "+t+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(e){return"Anda hanya boleh memilih "+e.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Sila hapuskan "+t+" aksara"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Sila masukkan "+t+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(e){return"Anda hanya boleh memilih "+e.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/nb.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
- (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nb",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Vennligst fjern "+t+" tegn"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vennligst skriv inn ";return t>1?n+=" flere tegn":n+=" tegn til",n},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nb",[],function(){return{errorLoading:function(){return"Kunne ikke hente resultater."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Vennligst fjern "+t+" tegn"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vennligst skriv inn "+t+" tegn til";return n+" tegn til"},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/nl.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Gelieve "+t+" karakters te verwijderen";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Gelieve "+t+" of meer karakters in te voeren";return n},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var t=e.maximum==1?"kan":"kunnen",n="Er "+t+" maar "+e.maximum+" item";return e.maximum!=1&&(n+="s"),n+=" worden geselecteerd",n},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Gelieve "+t+" karakters te verwijderen";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Gelieve "+t+" of meer karakters in te voeren";return n},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var t=e.maximum==1?"kan":"kunnen",n="Er "+t+" maar "+e.maximum+" item";return e.maximum!=1&&(n+="s"),n+=" worden geselecteerd",n},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/pl.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pl",[],function(){var e=["znak","znaki","znaków"],t=["element","elementy","elementów"],n=function(t,n){if(t===1)return n[0];if(t>1&&t<=4)return n[1];if(t>=5)return n[2]};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Usuń "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Podaj przynajmniej "+r+" "+n(r,e)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(e){return"Możesz zaznaczyć tylko "+e.maximum+" "+n(e.maximum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pl",[],function(){var e=["znak","znaki","znaków"],t=["element","elementy","elementów"],n=function(t,n){if(t===1)return n[0];if(t>1&&t<=4)return n[1];if(t>=5)return n[2]};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Usuń "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Podaj przynajmniej "+r+" "+n(r,e)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(e){return"Możesz zaznaczyć tylko "+e.maximum+" "+n(e.maximum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/ps.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ps",[],function(){return{errorLoading:function(){return"پايلي نه سي ترلاسه کېدای"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="د مهربانۍ لمخي "+t+" توری ړنګ کړئ";return t!=1&&(n=n.replace("توری","توري")),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لږ تر لږه "+t+" يا ډېر توري وليکئ";return n},loadingMore:function(){return"نوري پايلي ترلاسه کيږي..."},maximumSelected:function(e){var t="تاسو يوازي "+e.maximum+" قلم په نښه کولای سی";return e.maximum!=1&&(t=t.replace("قلم","قلمونه")),t},noResults:function(){return"پايلي و نه موندل سوې"},searching:function(){return"لټول کيږي..."}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/pt-BR.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Apague "+t+" caracter";return t!=1&&(n+="es"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Digite "+t+" ou mais caracteres";return n},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var t="Você só pode selecionar "+e.maximum+" ite";return e.maximum==1?t+="m":t+="ns",t},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Apague "+t+" caracter";return t!=1&&(n+="es"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Digite "+t+" ou mais caracteres";return n},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var t="Você só pode selecionar "+e.maximum+" ite";return e.maximum==1?t+="m":t+="ns",t},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/pt.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
- (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor apague "+t+" ";return n+=t!=1?"caracteres":"carácter",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Introduza "+t+" ou mais caracteres";return n},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var t="Apenas pode seleccionar "+e.maximum+" ";return t+=e.maximum!=1?"itens":"item",t},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor apague "+t+" ";return n+=t!=1?"caracteres":"caractere",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Introduza "+t+" ou mais caracteres";return n},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var t="Apenas pode seleccionar "+e.maximum+" ";return t+=e.maximum!=1?"itens":"item",t},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/ro.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
- (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return t!==1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vă rugăm să introduceți "+t+"sau mai multe caractere";return n},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",e.maximum!==1&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ro",[],function(){return{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return t!==1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vă rugăm să introduceți "+t+" sau mai multe caractere";return n},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",e.maximum!==1&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/ru.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ru",[],function(){function e(e,t,n,r){return e%10<5&&e%10>0&&e%100<5||e%100>20?e%10>1?n:t:r}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Пожалуйста, введите на "+n+" символ";return r+=e(n,"","a","ов"),r+=" меньше",r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Пожалуйста, введите еще хотя бы "+n+" символ";return r+=e(n,"","a","ов"),r},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(t){var n="Вы можете выбрать не более "+t.maximum+" элемент";return n+=e(t.maximum,"","a","ов"),n},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ru",[],function(){function e(e,t,n,r){return e%10<5&&e%10>0&&e%100<5||e%100>20?e%10>1?n:t:r}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Пожалуйста, введите на "+n+" символ";return r+=e(n,"","a","ов"),r+=" меньше",r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Пожалуйста, введите еще хотя бы "+n+" символ";return r+=e(n,"","a","ов"),r},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(t){var n="Вы можете выбрать не более "+t.maximum+" элемент";return n+=e(t.maximum,"","a","ов"),n},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/sk.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
- (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadajte o jeden znak menej":n>=2&&n<=4?"Prosím, zadajte o "+e[n](!0)+" znaky menej":"Prosím, zadajte o "+n+" znakov menej"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadajte ešte jeden znak":n<=4?"Prosím, zadajte ešte ďalšie "+e[n](!0)+" znaky":"Prosím, zadajte ešte ďalších "+n+" znakov"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){return t.maximum==1?"Môžete zvoliť len jednu položku":t.maximum>=2&&t.maximum<=4?"Môžete zvoliť najviac "+e[t.maximum](!1)+" položky":"Môžete zvoliť najviac "+t.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{errorLoading:function(){return"Výsledky sa nepodarilo načítať."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadajte o jeden znak menej":n>=2&&n<=4?"Prosím, zadajte o "+e[n](!0)+" znaky menej":"Prosím, zadajte o "+n+" znakov menej"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadajte ešte jeden znak":n<=4?"Prosím, zadajte ešte ďalšie "+e[n](!0)+" znaky":"Prosím, zadajte ešte ďalších "+n+" znakov"},loadingMore:function(){return"Načítanie ďalších výsledkov…"},maximumSelected:function(t){return t.maximum==1?"Môžete zvoliť len jednu položku":t.maximum>=2&&t.maximum<=4?"Môžete zvoliť najviac "+e[t.maximum](!1)+" položky":"Môžete zvoliť najviac "+t.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/sl.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sl",[],function(){return{errorLoading:function(){return"Zadetkov iskanja ni bilo mogoče naložiti."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Prosim zbrišite "+t+" znak";return t==2?n+="a":t!=1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Prosim vpišite še "+t+" znak";return t==2?n+="a":t!=1&&(n+="e"),n},loadingMore:function(){return"Nalagam več zadetkov…"},maximumSelected:function(e){var t="Označite lahko največ "+e.maximum+" predmet";return e.maximum==2?t+="a":e.maximum!=1&&(t+="e"),t},noResults:function(){return"Ni zadetkov."},searching:function(){return"Iščem…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/sr-Cyrl.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr-Cyrl",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Обришите "+n+" симбол";return r+=e(n,"","а","а"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Укуцајте бар још "+n+" симбол";return r+=e(n,"","а","а"),r},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(t){var n="Можете изабрати само "+t.maximum+" ставк";return n+=e(t.maximum,"у","е","и"),n},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr-Cyrl",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Обришите "+n+" симбол";return r+=e(n,"","а","а"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Укуцајте бар још "+n+" симбол";return r+=e(n,"","а","а"),r},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(t){var n="Можете изабрати само "+t.maximum+" ставк";return n+=e(t.maximum,"у","е","и"),n},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/sr.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/sv.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vänligen sudda ut "+t+" tecken";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vänligen skriv in "+t+" eller fler tecken";return n},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(e){var t="Du kan max välja "+e.maximum+" element";return t},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vänligen sudda ut "+t+" tecken";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vänligen skriv in "+t+" eller fler tecken";return n},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(e){var t="Du kan max välja "+e.maximum+" element";return t},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/th.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
- (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/th",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="โปรดลบออก "+t+" ตัวอักษร";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="โปรดพิมพ์เพิ่มอีก "+t+" ตัวอักษร";return n},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(e){var t="คุณสามารถเลือกได้ไม่เกิน "+e.maximum+" รายการ";return t},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/th",[],function(){return{errorLoading:function(){return"ไม่สามารถค้นข้อมูลได้"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="โปรดลบออก "+t+" ตัวอักษร";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="โปรดพิมพ์เพิ่มอีก "+t+" ตัวอักษร";return n},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(e){var t="คุณสามารถเลือกได้ไม่เกิน "+e.maximum+" รายการ";return t},noResults:function(){return"ไม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/tr.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
- (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/tr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" karakter daha girmelisiniz";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="En az "+t+" karakter daha girmelisiniz";return n},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(e){var t="Sadece "+e.maximum+" seçim yapabilirsiniz";return t},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/tr",[],function(){return{errorLoading:function(){return"Sonuç yüklenemedi"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" karakter daha girmelisiniz";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="En az "+t+" karakter daha girmelisiniz";return n},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(e){var t="Sadece "+e.maximum+" seçim yapabilirsiniz";return t},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/uk.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/uk",[],function(){function e(e,t,n,r){return e%100>10&&e%100<15?r:e%10===1?t:e%10>1&&e%10<5?n:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Будь ласка, видаліть "+n+" "+e(t.maximum,"літеру","літери","літер")},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Будь ласка, введіть "+t+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(t){return"Ви можете вибрати лише "+t.maximum+" "+e(t.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/uk",[],function(){function e(e,t,n,r){return e%100>10&&e%100<15?r:e%10===1?t:e%10>1&&e%10<5?n:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Будь ласка, видаліть "+n+" "+e(t.maximum,"літеру","літери","літер")},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Будь ласка, введіть "+t+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(t){return"Ви можете вибрати лише "+t.maximum+" "+e(t.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/vi.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
- (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/vi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vui lòng nhập ít hơn "+t+" ký tự";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vui lòng nhập nhiều hơn "+t+' ký tự"';return n},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(e){var t="Chỉ có thể chọn được "+e.maximum+" lựa chọn";return t},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
+ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/vi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vui lòng nhập ít hơn "+t+" ký tự";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vui lòng nhập nhiều hơn "+t+" ký tự";return n},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(e){var t="Chỉ có thể chọn được "+e.maximum+" lựa chọn";return t},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/zh-CN.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="请删除"+t+"个字符";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="请再输入至少"+t+"个字符";return n},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(e){var t="最多只能选择"+e.maximum+"个项目";return t},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="请删除"+t+"个字符";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="请再输入至少"+t+"个字符";return n},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(e){var t="最多只能选择"+e.maximum+"个项目";return t},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/i18n/zh-TW.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="請刪掉"+t+"個字元";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="請再輸入"+t+"個字元";return n},loadingMore:function(){return"載入中…"},maximumSelected:function(e){var t="你只能選擇最多"+e.maximum+"項";return t},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
 
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="請刪掉"+t+"個字元";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="請再輸入"+t+"個字元";return n},loadingMore:function(){return"載入中…"},maximumSelected:function(e){var t="你只能選擇最多"+e.maximum+"項";return t},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"}}}),{define:e.define,require:e.require}})();
inc/libraries/meta-box/js/select2/select2.min.js CHANGED
@@ -1,2 +1 @@
1
- /*! Select2 4.0.2 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice;this.listeners=this.listeners||{},a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return e!==f||"hidden"!==f&&"visible"!==f?"scroll"===e||"scroll"===f?!0:d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth:!1},c.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")});var f=e.filter("[aria-selected=true]");f.length>0?f.first().trigger("mouseenter"):e.first().trigger("mouseenter")})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&d.setClasses()}),b.on("unselect",function(){b.isOpen()&&d.setClasses()}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">&times;</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple"))return a.selected=!1,
2
- c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&""!==a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=i.text===b.term;if(k||j)return f?!1:(a.data=g,void c(a))}if(f)return!0;var l=e.createTag(b);if(null!=l){var m=e.option(l);m.attr("data-select2-tag",!0),e.addOptions([m]),e.insertTag(g,l)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){var c=(this._lastTag,this.$element.find("option[data-select2-tag]"));c.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(a,b,c){function d(a){e.trigger("select",{data:a})}var e=this;b.term=b.term||"";var f=this.tokenizer(b,this.options,d);f.term!==b.term&&(this.$search.length&&(this.$search.val(f.term),this.$search.focus()),b.term=f.term),a.call(this,b,c)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return a(c.data.results)<this.minimumResultsForSearch?!1:b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(){d._handleSelectOnClose()})},a.prototype._handleSelectOnClose=function(){var a=this.getHighlightedResults();if(!(a.length<1)){var b=a.data("data");null!=b.element&&b.element.selected||null==b.element&&b.selected||this.trigger("select",{data:b})}},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this._sync=c.bind(this._syncAttributes,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._sync);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._sync)}),this._observer.observe(this.$element[0],{attributes:!0,subtree:!1})):this.$element[0].addEventListener&&this.$element[0].addEventListener("DOMAttrModified",b._sync,!1)},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._sync),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&this.$element[0].removeEventListener("DOMAttrModified",this._sync,!1),this._sync=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d;return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2.");var e=Array.prototype.slice.call(arguments,1);d=c[b].apply(c,e)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
1
+ /*! Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=function(b,c){return void 0===c&&(c="undefined"!=typeof window?require("jquery"):require("jquery")(b)),a(c),c}:a(jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return v.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o=b&&b.split("/"),p=t.map,q=p&&p["*"]||{};if(a){for(a=a.split("/"),g=a.length-1,t.nodeIdCompat&&x.test(a[g])&&(a[g]=a[g].replace(x,"")),"."===a[0].charAt(0)&&o&&(n=o.slice(0,o.length-1),a=n.concat(a)),k=0;k<a.length;k++)if("."===(m=a[k]))a.splice(k,1),k-=1;else if(".."===m){if(0===k||1===k&&".."===a[2]||".."===a[k-1])continue;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}if((o||q)&&p){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),o)for(l=o.length;l>0;l-=1)if((e=p[o.slice(0,l).join("/")])&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&q&&q[d]&&(i=q[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=w.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),o.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){r[a]=b}}function j(a){if(e(s,a)){var c=s[a];delete s[a],u[a]=!0,n.apply(b,c)}if(!e(r,a)&&!e(u,a))throw new Error("No "+a);return r[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return a?k(a):[]}function m(a){return function(){return t&&t.config&&t.config[a]||{}}}var n,o,p,q,r={},s={},t={},u={},v=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/;p=function(a,b){var c,d=k(a),e=d[0],g=b[1];return a=d[1],e&&(e=f(e,g),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(g)):f(a,g):(a=f(a,g),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},q={require:function(a){return g(a)},exports:function(a){var b=r[a];return void 0!==b?b:r[a]={}},module:function(a){return{id:a,uri:"",exports:r[a],config:m(a)}}},n=function(a,c,d,f){var h,k,m,n,o,t,v,w=[],x=typeof d;if(f=f||a,t=l(f),"undefined"===x||"function"===x){for(c=!c.length&&d.length?["require","exports","module"]:c,o=0;o<c.length;o+=1)if(n=p(c[o],t),"require"===(k=n.f))w[o]=q.require(a);else if("exports"===k)w[o]=q.exports(a),v=!0;else if("module"===k)h=w[o]=q.module(a);else if(e(r,k)||e(s,k)||e(u,k))w[o]=j(k);else{if(!n.p)throw new Error(a+" missing "+k);n.p.load(n.n,g(f,!0),i(k),{}),w[o]=r[k]}m=d?d.apply(r[a],w):void 0,a&&(h&&h.exports!==b&&h.exports!==r[a]?r[a]=h.exports:m===b&&v||(r[a]=m))}else a&&(r[a]=d)},a=c=o=function(a,c,d,e,f){if("string"==typeof a)return q[a]?q[a](c):j(p(a,l(c)).f);if(!a.splice){if(t=a,t.deps&&o(t.deps,t.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?n(b,a,c,d):setTimeout(function(){n(b,a,c,d)},4),o},o.config=function(a){return o(a)},a._defined=r,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(r,a)||e(s,a)||(s[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){"function"==typeof b[d]&&("constructor"!==d&&c.push(d))}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){return Array.prototype.unshift.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),c[0]._type=a,a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;c<d;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;c<a;c++){b+=Math.floor(36*Math.random()).toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return(e!==f||"hidden"!==f&&"visible"!==f)&&("scroll"===e||"scroll"===f||(d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth))},c.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){b.find(".select2-results").append(a)},c.prototype.sort=function(a){return this.options.get("sorter")(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");b.length>0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()});b.$results.find(".select2-results__option[aria-selected]").each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("unselect",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):h-g<0&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");if("true"===c.attr("aria-selected"))return void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{}));d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),c<=2?this.$results.scrollTop(0):(g>this.$results.outerHeight()||g<0)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id,a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2");a(".select2.select2-container--open").each(function(){var b=a(this);this!=d[0]&&b.data("element").select2("close")})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){b.find(".selection").append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection");return this.options.get("escapeMarkup")(c(a,b))},d.prototype.selectionContainer=function(){return a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id;if(b.length>1||c)return a.call(this,b);this.clear();var d=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(d)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||c.which!=b.DELETE&&c.which!=b.BACKSPACE||this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">&times;</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){if(a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented(),a.which===c.BACKSPACE&&""===e.$search.val()){var b=e.$searchContainer.prev(".select2-selection__choice");if(b.length>0){var d=b.data("data");e.searchRemoveChoice(d),a.preventDefault()}}});var f=document.documentMode,g=f&&f<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){if(g)return void e.$selection.off("input.search input.searchcheck");e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{a=.75*(this.$search.val().length+1)+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),null!=c.id?d+="-"+c.id.toString():d+="-"+a.generateChars(4),d},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple")){if(a.selected=!1,c(a.element).is("option"))return a.element.selected=!1,void this.$element.trigger("change");this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})}},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this;this.$element.children().each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),void 0!==a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(null!=(b=c.data(a[0],"data")))return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){return this.options.get("matcher")(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){d.status&&"0"===d.status||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0);if((i.text||"").toUpperCase()===(b.term||"").toUpperCase()||j)return!f&&(a.data=g,void c(a))}if(f)return!0;var k=e.createTag(b);if(null!=k){var l=e.option(k);l.attr("data-select2-tag",!0),e.addOptions([l]),e.insertTag(g,k)}a.results=g,c(a)}var e=this;if(this._removeOldTags(),null==b.term||null!=b.page)return void a.call(this,b,c);a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){this._lastTag;this.$element.find("option[data-select2-tag]").each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){function e(b){var c=g._normalizeItem(b);if(!g.$element.find("option").filter(function(){return a(this).val()===c.id}).length){var d=g.option(c);d.attr("data-select2-tag",!0),g._removeOldTags(),g.addOptions([d])}f(c)}function f(a){g.trigger("select",{data:a})}var g=this;c.term=c.term||"";var h=this.tokenizer(c,this.options,e);h.term!==c.term&&(this.$search.length&&(this.$search.val(h.term),this.$search.focus()),c.term=h.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){if(b.term=b.term||"",b.term.length<this.minimumInputLength)return void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}});a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){if(b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength)return void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}});a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;if(d.maximumSelectionLength>0&&f>=d.maximumSelectionLength)return void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}});a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("focus",function(){c.isOpen()||e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){e.showSearch(a)?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){e.$results.offset().top+e.$results.outerHeight(!1)+50>=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1)&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id;this.$container.parents().filter(b.hasScroll).off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return!(a(c.data.results)<this.minimumResultsForSearch)&&b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},a.prototype._handleSelectOnClose=function(a,b){if(b&&null!=b.originalSelect2Event){var c=b.originalSelect2Event;if("select"===c._type||"unselect"===c._type)return}var d=this.getHighlightedResults();if(!(d.length<1)){var e=d.data("data");null!=e.element&&e.element.selected||null==e.element&&e.selected||this.trigger("select",{data:e})}},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){return"Please enter "+(a.minimum-a.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}return D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),null==l.tokenSeparators&&null==l.tokenizer||(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(a){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(a){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var O=k.loadPath(this.defaults.amdLanguageBase+"en"),P=new k(l.language);P.extend(O),l.translations=P}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){null==c(d,e.children[g])&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var h=b(e.text).toUpperCase(),i=b(d.term).toUpperCase();return h.indexOf(i)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)},new D}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return e<=0?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;h<i;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e<b.addedNodes.length;e++){var f=b.addedNodes[e];f.selected&&(c=!0)}else b.removedNodes&&b.removedNodes.length>0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=a&&0!==a.length||(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if("object"==typeof(b=b||{}))return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,f=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=c[b].apply(c,f)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
 
inc/libraries/meta-box/js/validate.js CHANGED
@@ -37,9 +37,14 @@ jQuery( function ( $ ) {
37
 
38
  // Required field styling
39
  $.each( subRules.rules, function ( k, v ) {
40
- if ( v['required'] ) {
41
- $( '#' + k ).parent().siblings( '.rwmb-label' ).append( '<span class="rwmb-required">*</span>' );
42
  }
 
 
 
 
 
43
  } );
44
  } );
45
 
37
 
38
  // Required field styling
39
  $.each( subRules.rules, function ( k, v ) {
40
+ if ( ! v['required'] ) {
41
+ return;
42
  }
43
+ var $el = $( '[name="' + k + '"]' );
44
+ if ( ! $el.length ) {
45
+ return;
46
+ }
47
+ $el.closest( '.rwmb-input' ).siblings( '.rwmb-label' ).append( '<span class="rwmb-required">*</span>' );
48
  } );
49
  } );
50
 
inc/libraries/meta-box/js/wysiwyg.js CHANGED
@@ -70,7 +70,7 @@ jQuery( function ( $ ) {
70
  function updateDom( $wrapper, id ) {
71
  // Wrapper div and media buttons
72
  $wrapper.attr( 'id', 'wp-' + id + '-wrap' )
73
- .removeClass( 'html-active' ).addClass( 'mce-active' ) // Active the visual mode by default
74
  .find( '.mce-container' ).remove().end() // Remove rendered tinyMCE editor
75
  .find( '.wp-editor-tools' ).attr( 'id', 'wp-' + id + '-editor-tools' )
76
  .find( '.wp-media-buttons' ).attr( 'id', 'wp-' + id + '-media-buttons' )
70
  function updateDom( $wrapper, id ) {
71
  // Wrapper div and media buttons
72
  $wrapper.attr( 'id', 'wp-' + id + '-wrap' )
73
+ .removeClass( 'html-active' ).addClass( 'tmce-active' ) // Active the visual mode by default
74
  .find( '.mce-container' ).remove().end() // Remove rendered tinyMCE editor
75
  .find( '.wp-editor-tools' ).attr( 'id', 'wp-' + id + '-editor-tools' )
76
  .find( '.wp-media-buttons' ).attr( 'id', 'wp-' + id + '-media-buttons' )
inc/libraries/meta-box/languages/default.pot ADDED
@@ -0,0 +1,353 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # <!=Copyright (C) 2014 Rilwis
2
+ # This file is distributed under the GPL2+.=!>
3
+ #, fuzzy
4
+ msgid ""
5
+ msgstr ""
6
+ "Project-Id-Version: Meta Box\n"
7
+ "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/meta-box\n"
8
+ "POT-Creation-Date: 2018-04-19 08:43+0700\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
13
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
+ "Language-Team: Meta Box <info@metabox.io>\n"
15
+ "X-Generator: Poedit 2.0.6\n"
16
+ "X-Poedit-KeywordsList: __;_x;_e;_ex;_n;_nx;esc_attr__;esc_attr_e;esc_attr_x;esc_html__;esc_html_e;esc_html_x;_n_noop;_nx_noop\n"
17
+ "X-Poedit-Basepath: ..\n"
18
+ "X-Poedit-SearchPath-0: .\n"
19
+ "X-Poedit-SearchPathExcluded-0: js\n"
20
+ "X-Poedit-SearchPathExcluded-1: demo\n"
21
+ "X-Poedit-SearchPathExcluded-2: tests\n"
22
+ "X-Poedit-SearchPathExcluded-3: css\n"
23
+ "X-Poedit-SearchPathExcluded-4: lang\n"
24
+
25
+ #: inc/about/about.php:50
26
+ msgid "About"
27
+ msgstr ""
28
+
29
+ #: inc/about/about.php:59 inc/about/about.php:60
30
+ msgid "Welcome to Meta Box"
31
+ msgstr ""
32
+
33
+ #: inc/about/sections/getting-started.php:13
34
+ msgid "Getting Started With Online Generator"
35
+ msgstr ""
36
+
37
+ #: inc/about/sections/getting-started.php:14
38
+ msgid "The fastest way to getting started with Meta Box is use our online generator to generate meta boxes with custom fields. It provides a friendly UI for you to create meta boxes and custom fields just by drag and drop fields."
39
+ msgstr ""
40
+
41
+ #: inc/about/sections/getting-started.php:16
42
+ msgid "online generator"
43
+ msgstr ""
44
+
45
+ #: inc/about/sections/getting-started.php:18
46
+ msgid "Go to Online Generator"
47
+ msgstr ""
48
+
49
+ #: inc/about/sections/getting-started.php:22
50
+ msgid "Understand The Basics"
51
+ msgstr ""
52
+
53
+ #: inc/about/sections/getting-started.php:23
54
+ msgid "Meta Box doesn't have any admin page for configuration or settings. Instead of that, it provides a very powerful API to speed up the process of creating meta boxes and custom fields. It might take you a little time at first, but then you'll love the way it work because it helps you do and customize almost everything."
55
+ msgstr ""
56
+
57
+ #: inc/about/sections/getting-started.php:24
58
+ msgid "Learn More"
59
+ msgstr ""
60
+
61
+ #: inc/about/sections/getting-started.php:26 inc/core.php:39
62
+ msgid "Extensions"
63
+ msgstr ""
64
+
65
+ #: inc/about/sections/getting-started.php:27
66
+ msgid "Wanna see more features that transform your WordPress website into a powerful CMS? Check out some extensions below:"
67
+ msgstr ""
68
+
69
+ #: inc/about/sections/getting-started.php:29
70
+ msgid "Meta Box Group"
71
+ msgstr ""
72
+
73
+ #: inc/about/sections/getting-started.php:30
74
+ msgid "Meta Box Conditional Logic"
75
+ msgstr ""
76
+
77
+ #: inc/about/sections/getting-started.php:31
78
+ msgid "MB Settings Page"
79
+ msgstr ""
80
+
81
+ #: inc/about/sections/getting-started.php:32
82
+ msgid "MB Term Meta"
83
+ msgstr ""
84
+
85
+ #: inc/about/sections/getting-started.php:34
86
+ msgid "More Extensions"
87
+ msgstr ""
88
+
89
+ #: inc/about/sections/getting-started.php:39
90
+ msgid "Go to MetaBox.IO &rarr;"
91
+ msgstr ""
92
+
93
+ #: inc/about/sections/tabs.php:11
94
+ msgid "Getting Started"
95
+ msgstr ""
96
+
97
+ #: inc/about/sections/welcome.php:13
98
+ #, php-format
99
+ msgid "Welcome to %1$s %2$s"
100
+ msgstr ""
101
+
102
+ #: inc/about/sections/welcome.php:16
103
+ msgid "This plugin is a lightweight and powerful toolkit that helps you to create custom meta boxes and custom fields in WordPress fast and easy. Follow the instruction below to get started."
104
+ msgstr ""
105
+
106
+ #: inc/core.php:38
107
+ msgid "Documentation"
108
+ msgstr ""
109
+
110
+ #: inc/field.php:359
111
+ msgid "+ Add more"
112
+ msgstr ""
113
+
114
+ #: inc/fields/autocomplete.php:20 inc/fields/autocomplete.php:81
115
+ #: inc/fields/autocomplete.php:93 inc/fields/file.php:121
116
+ msgid "Delete"
117
+ msgstr ""
118
+
119
+ #: inc/fields/background.php:58
120
+ msgid "Background Image"
121
+ msgstr ""
122
+
123
+ #: inc/fields/background.php:70
124
+ msgid "-- Background Repeat --"
125
+ msgstr ""
126
+
127
+ #: inc/fields/background.php:72
128
+ msgid "No Repeat"
129
+ msgstr ""
130
+
131
+ #: inc/fields/background.php:73
132
+ msgid "Repeat All"
133
+ msgstr ""
134
+
135
+ #: inc/fields/background.php:74
136
+ msgid "Repeat Horizontally"
137
+ msgstr ""
138
+
139
+ #: inc/fields/background.php:75
140
+ msgid "Repeat Vertically"
141
+ msgstr ""
142
+
143
+ #: inc/fields/background.php:76 inc/fields/background.php:110
144
+ #: inc/fields/background.php:122
145
+ msgid "Inherit"
146
+ msgstr ""
147
+
148
+ #: inc/fields/background.php:86
149
+ msgid "-- Background Position --"
150
+ msgstr ""
151
+
152
+ #: inc/fields/background.php:88
153
+ msgid "Top Left"
154
+ msgstr ""
155
+
156
+ #: inc/fields/background.php:89
157
+ msgid "Top Center"
158
+ msgstr ""
159
+
160
+ #: inc/fields/background.php:90
161
+ msgid "Top Right"
162
+ msgstr ""
163
+
164
+ #: inc/fields/background.php:91
165
+ msgid "Center Left"
166
+ msgstr ""
167
+
168
+ #: inc/fields/background.php:92
169
+ msgid "Center Center"
170
+ msgstr ""
171
+
172
+ #: inc/fields/background.php:93
173
+ msgid "Center Right"
174
+ msgstr ""
175
+
176
+ #: inc/fields/background.php:94
177
+ msgid "Bottom Left"
178
+ msgstr ""
179
+
180
+ #: inc/fields/background.php:95
181
+ msgid "Bottom Center"
182
+ msgstr ""
183
+
184
+ #: inc/fields/background.php:96
185
+ msgid "Bottom Right"
186
+ msgstr ""
187
+
188
+ #: inc/fields/background.php:106
189
+ msgid "-- Background Attachment --"
190
+ msgstr ""
191
+
192
+ #: inc/fields/background.php:108
193
+ msgid "Fixed"
194
+ msgstr ""
195
+
196
+ #: inc/fields/background.php:109
197
+ msgid "Scroll"
198
+ msgstr ""
199
+
200
+ #: inc/fields/background.php:120
201
+ msgid "-- Background Size --"
202
+ msgstr ""
203
+
204
+ #: inc/fields/background.php:123
205
+ msgid "Cover"
206
+ msgstr ""
207
+
208
+ #: inc/fields/background.php:124
209
+ msgid "Contain"
210
+ msgstr ""
211
+
212
+ #: inc/fields/button.php:32
213
+ msgid "Click me"
214
+ msgstr ""
215
+
216
+ #: inc/fields/checkbox.php:53
217
+ msgid "Yes"
218
+ msgstr ""
219
+
220
+ #: inc/fields/checkbox.php:53
221
+ msgid "No"
222
+ msgstr ""
223
+
224
+ #: inc/fields/file-input.php:20
225
+ msgid "Select File"
226
+ msgstr ""
227
+
228
+ #: inc/fields/file-input.php:39 inc/fields/select.php:87
229
+ msgid "Select"
230
+ msgstr ""
231
+
232
+ #: inc/fields/file-input.php:41 inc/fields/media.php:27
233
+ msgid "Remove"
234
+ msgstr ""
235
+
236
+ #: inc/fields/file.php:21
237
+ #, php-format
238
+ msgid "You may only upload maximum %d file"
239
+ msgstr ""
240
+
241
+ #: inc/fields/file.php:23
242
+ #, php-format
243
+ msgid "You may only upload maximum %d files"
244
+ msgstr ""
245
+
246
+ #: inc/fields/file.php:53
247
+ msgid "Error: Cannot delete file"
248
+ msgstr ""
249
+
250
+ #: inc/fields/file.php:66
251
+ msgid "+ Add new file"
252
+ msgstr ""
253
+
254
+ #: inc/fields/file.php:122 inc/fields/media.php:28
255
+ msgid "Edit"
256
+ msgstr ""
257
+
258
+ #: inc/fields/input-list.php:90
259
+ msgid "Select All / None"
260
+ msgstr ""
261
+
262
+ #: inc/fields/key-value.php:132
263
+ msgid "Key"
264
+ msgstr ""
265
+
266
+ #: inc/fields/key-value.php:133
267
+ msgid "Value"
268
+ msgstr ""
269
+
270
+ #: inc/fields/map.php:73
271
+ msgid "Find Address"
272
+ msgstr ""
273
+
274
+ #: inc/fields/media.php:24
275
+ msgid "+ Add Media"
276
+ msgstr ""
277
+
278
+ #: inc/fields/media.php:25
279
+ msgid " file"
280
+ msgstr ""
281
+
282
+ #: inc/fields/media.php:26
283
+ msgid " files"
284
+ msgstr ""
285
+
286
+ #: inc/fields/media.php:29
287
+ msgid "View"
288
+ msgstr ""
289
+
290
+ #: inc/fields/media.php:30
291
+ msgid "No Title"
292
+ msgstr ""
293
+
294
+ #: inc/fields/media.php:33
295
+ msgid "Select Files"
296
+ msgstr ""
297
+
298
+ #: inc/fields/media.php:34
299
+ msgid "or"
300
+ msgstr ""
301
+
302
+ #: inc/fields/media.php:35
303
+ msgid "Drop files here to upload"
304
+ msgstr ""
305
+
306
+ #: inc/fields/oembed.php:64
307
+ msgid "Embed HTML not available."
308
+ msgstr ""
309
+
310
+ #: inc/fields/post.php:32
311
+ msgid "Select a post"
312
+ msgstr ""
313
+
314
+ #: inc/fields/post.php:38 inc/fields/taxonomy.php:49
315
+ #, php-format
316
+ msgid "Select a %s"
317
+ msgstr ""
318
+
319
+ #: inc/fields/select-advanced.php:45
320
+ msgid "Select an item"
321
+ msgstr ""
322
+
323
+ #: inc/fields/select.php:87
324
+ msgid "All"
325
+ msgstr ""
326
+
327
+ #: inc/fields/select.php:87
328
+ msgid "None"
329
+ msgstr ""
330
+
331
+ #: inc/fields/sidebar.php:30
332
+ msgid "Select a sidebar"
333
+ msgstr ""
334
+
335
+ #: inc/fields/switch.php:90
336
+ msgid "On"
337
+ msgstr ""
338
+
339
+ #: inc/fields/switch.php:91
340
+ msgid "Off"
341
+ msgstr ""
342
+
343
+ #: inc/fields/taxonomy.php:43
344
+ msgid "Select a term"
345
+ msgstr ""
346
+
347
+ #: inc/fields/user.php:22
348
+ msgid "Select an user"
349
+ msgstr ""
350
+
351
+ #: inc/validation.php:47
352
+ msgid "Please correct the errors highlighted below and try again."
353
+ msgstr ""
inc/libraries/meta-box/languages/meta-box-ar.mo ADDED
Binary file
inc/libraries/meta-box/languages/meta-box-ar.po ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Meta Box Script For WordPress\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-06-03 15:09+0700\n"
6
+ "PO-Revision-Date: 2012-12-29 23:40-0500\n"
7
+ "Last-Translator: Adel Qalieh <aqalieh95@gmail.com>\n"
8
+ "Language-Team: Adel Qalieh <aqalieh95@gmail.com>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: __;_e;_x:2c,1;_n:1,2;_n_noop:1,2;_nx:1,2;"
13
+ "_nx_noop:1,2\n"
14
+ "X-Poedit-Basepath: .\n"
15
+ "X-Poedit-SourceCharset: UTF-8\n"
16
+ "Plural-Forms: nplurals=6; plural= n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
17
+ "&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n"
18
+ "X-Language: ar\n"
19
+ "X-Source-Language: en\n"
20
+ "Language: ar\n"
21
+ "X-Poedit-SearchPath-0: ..\n"
22
+ "X-Poedit-SearchPath-1: ../inc/fields\n"
23
+
24
+ #: ../meta-box.php:79
25
+ msgid "RW_Meta_Box Debug:"
26
+ msgstr "RW_Meta_Box Debug:"
27
+
28
+ #: ../inc/classes/meta-box.php:316
29
+ msgid "+"
30
+ msgstr "+"
31
+
32
+ #: ../inc/classes/meta-box.php:340
33
+ msgid "&#8211;"
34
+ msgstr "&#8211;"
35
+
36
+ #: ../inc/fields/file.php:69
37
+ msgid "Error: Cannot delete file"
38
+ msgstr "خطأ: لا يمكن حذف الملف"
39
+
40
+ #: ../inc/fields/file.php:83
41
+ msgctxt "file upload"
42
+ msgid "Uploaded files"
43
+ msgstr "ملفات محملة"
44
+
45
+ #: ../inc/fields/file.php:84
46
+ msgctxt "file upload"
47
+ msgid "Delete this file"
48
+ msgstr "حذف هذا الملف"
49
+
50
+ #: ../inc/fields/file.php:85
51
+ msgctxt "file upload"
52
+ msgid "Delete"
53
+ msgstr "حذف"
54
+
55
+ #: ../inc/fields/file.php:86
56
+ msgctxt "file upload"
57
+ msgid "Upload files"
58
+ msgstr "تحميل الملفات"
59
+
60
+ #: ../inc/fields/file.php:87
61
+ msgctxt "file upload"
62
+ msgid "+ Add new file"
63
+ msgstr "+ إضافة ملف جديد"
64
+
65
+ #: ../inc/fields/image.php:75
66
+ msgid "Order saved"
67
+ msgstr "حفظ الترتيب"
68
+
69
+ #: ../inc/fields/image.php:91 ../inc/fields/plupload-image.php:156
70
+ msgctxt "image upload"
71
+ msgid "Uploaded files"
72
+ msgstr "ملفات محملة"
73
+
74
+ #: ../inc/fields/image.php:92 ../inc/fields/plupload-image.php:112
75
+ msgctxt "image upload"
76
+ msgid "Delete this file"
77
+ msgstr "حذف هذا الملف"
78
+
79
+ #: ../inc/fields/image.php:93 ../inc/fields/plupload-image.php:113
80
+ msgctxt "image upload"
81
+ msgid "Delete"
82
+ msgstr "حذف"
83
+
84
+ #: ../inc/fields/image.php:94 ../inc/fields/plupload-image.php:114
85
+ msgctxt "image upload"
86
+ msgid "Edit"
87
+ msgstr "حرر"
88
+
89
+ #: ../inc/fields/image.php:95 ../inc/fields/plupload-image.php:157
90
+ msgctxt "image upload"
91
+ msgid "Upload files"
92
+ msgstr "تحميل الملفات"
93
+
94
+ #: ../inc/fields/image.php:96
95
+ msgctxt "image upload"
96
+ msgid "+ Add new image"
97
+ msgstr "إضافة صورة جديدة"
98
+
99
+ #: ../inc/fields/plupload-image.php:95
100
+ msgctxt "image upload"
101
+ msgid "Allowed Image Files"
102
+ msgstr "أنواع الصور المسموحة"
103
+
104
+ #: ../inc/fields/plupload-image.php:160
105
+ msgctxt "image upload"
106
+ msgid "Drop images here"
107
+ msgstr "إفلت الصور هنا"
108
+
109
+ #: ../inc/fields/plupload-image.php:161
110
+ msgctxt "image upload"
111
+ msgid "or"
112
+ msgstr "أو"
113
+
114
+ #: ../inc/fields/plupload-image.php:162
115
+ msgctxt "image upload"
116
+ msgid "Select Files"
117
+ msgstr "إختر الملفات"
118
+
119
+ #: ../inc/fields/thickbox-image.php:45
120
+ msgctxt "image upload"
121
+ msgid "Upload image"
122
+ msgstr "حمل الصورة"
inc/libraries/meta-box/languages/meta-box-fa_IR.mo ADDED
Binary file
inc/libraries/meta-box/languages/meta-box-fa_IR.po ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # <!=Copyright (C) 2014 Rilwis
2
+ # This file is distributed under the GPL2+.=!>
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Meta Box 4.8.7\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/meta-box\n"
7
+ "POT-Creation-Date: 2017-05-20 18:41+0430\n"
8
+ "PO-Revision-Date: 2017-05-20 18:46+0430\n"
9
+ "Last-Translator: Morteza Gholami <Morteza.Gholami@Yahoo.Com>\n"
10
+ "Language-Team: Meta Box <admin@metabox.io>\n"
11
+ "Language: fa_IR\n"
12
+ "MIME-Version: 1.0\n"
13
+ "Content-Type: text/plain; charset=UTF-8\n"
14
+ "Content-Transfer-Encoding: 8bit\n"
15
+ "X-Generator: Poedit 1.8.6\n"
16
+ "X-Poedit-KeywordsList: __;_x;_e;_ex;_n;_nx;esc_attr__;esc_attr_e;esc_attr_x;"
17
+ "esc_html__;esc_html_e;esc_html_x;_n_noop;_nx_noop\n"
18
+ "X-Poedit-Basepath: ..\n"
19
+ "Plural-Forms: nplurals=1; plural=0;\n"
20
+ "X-Poedit-SearchPath-0: .\n"
21
+ "X-Poedit-SearchPathExcluded-0: js\n"
22
+ "X-Poedit-SearchPathExcluded-1: demo\n"
23
+ "X-Poedit-SearchPathExcluded-2: tests\n"
24
+ "X-Poedit-SearchPathExcluded-3: css\n"
25
+ "X-Poedit-SearchPathExcluded-4: lang\n"
26
+
27
+ #: inc/core.php:33
28
+ msgid "Documentation"
29
+ msgstr "مستندات"
30
+
31
+ #: inc/core.php:34
32
+ msgid "Extensions"
33
+ msgstr "افزونه‌ها"
34
+
35
+ #: inc/field.php:343
36
+ msgid "+ Add more"
37
+ msgstr "+ افزودن بیشتر"
38
+
39
+ #: inc/fields/autocomplete.php:20 inc/fields/autocomplete.php:81
40
+ #: inc/fields/autocomplete.php:93 inc/fields/file.php:143
41
+ msgid "Delete"
42
+ msgstr "حذف"
43
+
44
+ #: inc/fields/button.php:32
45
+ msgid "Click me"
46
+ msgstr "کلیک کنید"
47
+
48
+ #: inc/fields/checkbox.php:50
49
+ msgid "Yes"
50
+ msgstr "بله"
51
+
52
+ #: inc/fields/checkbox.php:50
53
+ msgid "No"
54
+ msgstr "خیر"
55
+
56
+ #: inc/fields/file-input.php:19
57
+ msgid "Select File"
58
+ msgstr "انتخاب فایل"
59
+
60
+ #: inc/fields/file-input.php:38 inc/fields/select.php:87
61
+ msgid "Select"
62
+ msgstr "انتخاب"
63
+
64
+ #: inc/fields/file-input.php:40 inc/fields/media.php:27
65
+ msgid "Remove"
66
+ msgstr "حذف"
67
+
68
+ #: inc/fields/file.php:21
69
+ #, php-format
70
+ msgid "You may only upload maximum %d file"
71
+ msgstr "شما تنها می‌بایست نهایتا %d فایل بارگذاری کنید"
72
+
73
+ #: inc/fields/file.php:23
74
+ #, php-format
75
+ msgid "You may only upload maximum %d files"
76
+ msgstr "شما تنها می‌بایست نهایتا %d فایل بارگذاری کنید"
77
+
78
+ #: inc/fields/file.php:79
79
+ msgid "Error: Cannot delete file"
80
+ msgstr "خطا: عدم توانایی حذف فایل"
81
+
82
+ #: inc/fields/file.php:93
83
+ msgid "+ Add new file"
84
+ msgstr "+ افزودن فایل جدید"
85
+
86
+ #: inc/fields/file.php:144 inc/fields/media.php:28
87
+ msgid "Edit"
88
+ msgstr "ویرایش"
89
+
90
+ #: inc/fields/input-list.php:90
91
+ msgid "Select All / None"
92
+ msgstr "انتخاب همه / هیچ‌کدام"
93
+
94
+ #: inc/fields/key-value.php:126
95
+ msgid "Key"
96
+ msgstr "کلید"
97
+
98
+ #: inc/fields/key-value.php:127
99
+ msgid "Value"
100
+ msgstr "مقدار"
101
+
102
+ #: inc/fields/map.php:62
103
+ msgid "Find Address"
104
+ msgstr "پیدا کردن آدرس"
105
+
106
+ #: inc/fields/media.php:24
107
+ msgid "+ Add Media"
108
+ msgstr "+ افزودن رسانه"
109
+
110
+ #: inc/fields/media.php:25
111
+ msgid " file"
112
+ msgstr " فایل"
113
+
114
+ #: inc/fields/media.php:26
115
+ msgid " files"
116
+ msgstr " فایل‌ها"
117
+
118
+ #: inc/fields/media.php:29
119
+ msgid "View"
120
+ msgstr "نمایش"
121
+
122
+ #: inc/fields/media.php:30
123
+ msgid "No Title"
124
+ msgstr "بدون عنوان"
125
+
126
+ #: inc/fields/media.php:33
127
+ msgid "Select Files"
128
+ msgstr "انتخاب فایل‌ها"
129
+
130
+ #: inc/fields/media.php:34
131
+ msgid "or"
132
+ msgstr "یا"
133
+
134
+ #: inc/fields/media.php:35
135
+ msgid "Drop files here to upload"
136
+ msgstr "فایل‌ها را برای بارگذاری اینجا بیاندازید"
137
+
138
+ #: inc/fields/oembed.php:64
139
+ msgid "Embed HTML not available."
140
+ msgstr "قراردادن HTML امکان‌پذیر نیست"
141
+
142
+ #: inc/fields/oembed.php:79
143
+ msgid "Preview"
144
+ msgstr "پیشنمایش"
145
+
146
+ #: inc/fields/post.php:36
147
+ msgid "Select a post"
148
+ msgstr "انتخاب یک پست"
149
+
150
+ #: inc/fields/post.php:41 inc/fields/taxonomy.php:52
151
+ #, php-format
152
+ msgid "Select a %s"
153
+ msgstr "انتخاب یک %s"
154
+
155
+ #: inc/fields/select-advanced.php:45
156
+ msgid "Select an item"
157
+ msgstr "انتخاب یک آیتم"
158
+
159
+ #: inc/fields/select.php:87
160
+ msgid "All"
161
+ msgstr "همه"
162
+
163
+ #: inc/fields/select.php:87
164
+ msgid "None"
165
+ msgstr "هیچکدام"
166
+
167
+ #: inc/fields/taxonomy.php:47
168
+ msgid "Select a term"
169
+ msgstr "انتخاب یک دسته"
170
+
171
+ #: inc/fields/thickbox-image.php:55
172
+ msgid "Upload Images"
173
+ msgstr "بارگذاری تصاویر"
174
+
175
+ #: inc/fields/user.php:30
176
+ msgid "Select an user"
177
+ msgstr "انتخاب یک کاربر"
178
+
179
+ #: inc/validation.php:47
180
+ msgid "Please correct the errors highlighted below and try again."
181
+ msgstr "لطفا خطاهای پررنگ شده زیر را تصحیح و مجددا تلاش نمایید."
182
+
183
+ #~ msgid "Upload Files"
184
+ #~ msgstr "بارگذاری فایل‌ها"
inc/libraries/meta-box/languages/meta-box-fr_FR.mo ADDED
Binary file
inc/libraries/meta-box/languages/meta-box-fr_FR.po ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Meta Box\n"
4
+ "POT-Creation-Date: 2017-08-11 10:11+0000\n"
5
+ "PO-Revision-Date: 2017-08-11 10:17+0000\n"
6
+ "Last-Translator: Ludovic <me@ludovicmeyer.com>\n"
7
+ "Language-Team: French (France)\n"
8
+ "Language: fr-FR\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Loco - https://localise.biz/\n"
13
+ "X-Poedit-Basepath: ..\n"
14
+ "X-Poedit-SourceCharset: UTF-8\n"
15
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
16
+ "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
17
+ "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
18
+ "Plural-Forms: nplurals=2; plural=n > 1\n"
19
+ "X-Poedit-SearchPath-0: .\n"
20
+ "X-Poedit-SearchPathExcluded-0: *.js\n"
21
+ "Report-Msgid-Bugs-To: "
22
+
23
+ #: inc/field.php:356
24
+ msgid "+ Add more"
25
+ msgstr "+ Ajouter"
26
+
27
+ #: inc/fields/input-list.php:90
28
+ msgid "Select All / None"
29
+ msgstr "Sélectionner tout / acucun"
30
+
31
+ #: inc/fields/select.php:87
32
+ msgid "All"
33
+ msgstr "Tout"
34
+
35
+ #: inc/fields/select.php:87
36
+ msgid "None"
37
+ msgstr "Aucun"
38
+
39
+ #: inc/fields/media.php:24
40
+ msgctxt "media"
41
+ msgid "+ Add Media"
42
+ msgstr "+ Ajouter un média"
43
+
44
+ #: inc/fields/media.php:25
45
+ msgctxt "media"
46
+ msgid " file"
47
+ msgstr "fichier"
48
+
49
+ #: inc/fields/media.php:26
50
+ msgctxt "media"
51
+ msgid " files"
52
+ msgstr "fichiers"
53
+
54
+ #: inc/fields/media.php:27
55
+ msgctxt "media"
56
+ msgid "Remove"
57
+ msgstr "Supprimer"
58
+
59
+ #: inc/fields/media.php:28
60
+ msgctxt "media"
61
+ msgid "Edit"
62
+ msgstr "Éditer"
63
+
64
+ #: inc/fields/media.php:29
65
+ msgctxt "media"
66
+ msgid "View"
67
+ msgstr "Voir"
68
+
69
+ #: inc/fields/media.php:30
70
+ msgctxt "media"
71
+ msgid "No Title"
72
+ msgstr "Pas de titre"
73
+
74
+ #: inc/fields/media.php:33
75
+ msgctxt "media"
76
+ msgid "Select Files"
77
+ msgstr "Sélectionner un fichier"
78
+
79
+ #: inc/fields/media.php:34
80
+ msgctxt "media"
81
+ msgid "or"
82
+ msgstr "ou"
83
+
84
+ #: inc/fields/media.php:35
85
+ msgctxt "media"
86
+ msgid "Drop files here to upload"
87
+ msgstr "Déposer un fichier ici pour l'envoyer"
88
+
89
+ #: inc/fields/post.php:36
90
+ msgid "Select a post"
91
+ msgstr "Sélectionner un article"
92
+
93
+ #: inc/fields/checkbox.php:50
94
+ msgid "Yes"
95
+ msgstr "Oui"
96
+
97
+ #: inc/fields/checkbox.php:50
98
+ msgid "No"
99
+ msgstr "Non"
100
+
101
+ #: inc/fields/user.php:30
102
+ msgid "Select an user"
103
+ msgstr "Sélectionner un utilisateur"
104
+
105
+ #: inc/fields/select-advanced.php:45
106
+ msgid "Select an item"
107
+ msgstr "Sélectionner un élément"
108
+
109
+ #: inc/fields/key-value.php:126
110
+ msgid "Key"
111
+ msgstr "Clé"
112
+
113
+ #: inc/fields/key-value.php:127
114
+ msgid "Value"
115
+ msgstr "Valeur"
116
+
117
+ #: inc/fields/taxonomy.php:47
118
+ msgid "Select a term"
119
+ msgstr "Sélectionner un terme"
120
+
121
+ #. Name of the plugin
122
+ msgid "Meta Box"
123
+ msgstr ""
124
+
125
+ #. Description of the plugin
126
+ msgid "Create custom meta boxes and custom fields in WordPress."
127
+ msgstr ""
128
+
129
+ #. URI of the plugin
130
+ #. Author URI of the plugin
131
+ msgid "https://metabox.io"
132
+ msgstr ""
133
+
134
+ #. Author of the plugin
135
+ msgid "MetaBox.io"
136
+ msgstr ""
137
+
138
+ #: inc/core.php:33
139
+ msgid "Documentation"
140
+ msgstr "Documentation"
141
+
142
+ #: inc/core.php:34
143
+ msgid "Extensions"
144
+ msgstr "Extensions"
145
+
146
+ #: inc/validation.php:47
147
+ msgid "Please correct the errors highlighted below and try again."
148
+ msgstr ""
149
+ "Merci de corriger les erreurs mises en évidence ci-dessous et de réessayer."
150
+
151
+ #: inc/fields/file.php:21
152
+ #, php-format
153
+ msgid "You may only upload maximum %d file"
154
+ msgstr "Vous ne pouvez mettre en ligne qu'un fichier de %d maximum"
155
+
156
+ #: inc/fields/file.php:23
157
+ #, php-format
158
+ msgid "You may only upload maximum %d files"
159
+ msgstr "Vous ne pouvez mettre en ligne que des fichiers de %d maximum"
160
+
161
+ #: inc/fields/file.php:83
162
+ msgid "Error: Cannot delete file"
163
+ msgstr "Erreur : Impossible de supprimer le fichier"
164
+
165
+ #: inc/fields/file.php:97
166
+ msgctxt "file upload"
167
+ msgid "+ Add new file"
168
+ msgstr "+ Ajouter un nouveau fichier"
169
+
170
+ #: inc/fields/file.php:147
171
+ msgctxt "file upload"
172
+ msgid "Delete"
173
+ msgstr "Supprimer"
174
+
175
+ #: inc/fields/file.php:148
176
+ msgctxt "file upload"
177
+ msgid "Edit"
178
+ msgstr "Modifier"
179
+
180
+ #: inc/fields/oembed.php:64
181
+ msgid "Embed HTML not available."
182
+ msgstr "Intégration du code HTML non disponible."
183
+
184
+ #: inc/fields/select.php:87 inc/fields/file-input.php:38
185
+ msgid "Select"
186
+ msgstr "Choisissez"
187
+
188
+ #: inc/fields/thickbox-image.php:55
189
+ msgctxt "image upload"
190
+ msgid "Upload Images"
191
+ msgstr "Mettez en ligne des images"
192
+
193
+ #: inc/fields/post.php:41 inc/fields/taxonomy.php:52
194
+ #, php-format
195
+ msgid "Select a %s"
196
+ msgstr "Choisissez un %s"
197
+
198
+ #: inc/fields/button.php:32
199
+ msgid "Click me"
200
+ msgstr "Cliquez-ici"
201
+
202
+ #: inc/fields/autocomplete.php:20 inc/fields/autocomplete.php:81
203
+ #: inc/fields/autocomplete.php:93
204
+ msgid "Delete"
205
+ msgstr "Supprimer"
206
+
207
+ #: inc/fields/map.php:62
208
+ msgid "Find Address"
209
+ msgstr "Trouver une adresse"
210
+
211
+ #: inc/fields/file-input.php:19
212
+ msgid "Select File"
213
+ msgstr "Choisissez un fichier"
214
+
215
+ #: inc/fields/file-input.php:40
216
+ msgid "Remove"
217
+ msgstr "Supprimer"
inc/libraries/meta-box/languages/meta-box-it_IT.mo ADDED
Binary file
inc/libraries/meta-box/languages/meta-box-it_IT.po ADDED
@@ -0,0 +1,318 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Meta Box 4.8.7\n"
4
+ "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/meta-box\n"
5
+ "POT-Creation-Date: 2017-12-14 12:13+0100\n"
6
+ "PO-Revision-Date: 2017-12-14 13:06+0100\n"
7
+ "Last-Translator: Giacomo Antolini <giacomo.antolini@gmail.com>\n"
8
+ "Language-Team: Meta Box <admin@metabox.io>\n"
9
+ "Language: it_IT\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Poedit-KeywordsList: __;_x;_e;_ex;_n;_nx;esc_attr__;esc_attr_e;esc_attr_x;"
14
+ "esc_html__;esc_html_e;esc_html_x;_n_noop;_nx_noop\n"
15
+ "X-Poedit-Basepath: ..\n"
16
+ "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Generator: Poedit 2.0.4\n"
18
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
+ "X-Poedit-SearchPath-0: .\n"
20
+ "X-Poedit-SearchPathExcluded-0: js\n"
21
+ "X-Poedit-SearchPathExcluded-1: demo\n"
22
+ "X-Poedit-SearchPathExcluded-2: tests\n"
23
+ "X-Poedit-SearchPathExcluded-3: css\n"
24
+ "X-Poedit-SearchPathExcluded-4: lang\n"
25
+
26
+ #: inc/about/about.php:50
27
+ msgid "About"
28
+ msgstr "Informazioni"
29
+
30
+ #: inc/about/about.php:59 inc/about/about.php:60
31
+ msgid "Welcome to Meta Box"
32
+ msgstr "Benvenuto su Meta Box"
33
+
34
+ #: inc/about/sections/getting-started.php:13
35
+ msgid "Getting Started With Online Generator"
36
+ msgstr "Inizia Con Il Generatore Online"
37
+
38
+ #: inc/about/sections/getting-started.php:14
39
+ msgid ""
40
+ "The fastest way to getting started with Meta Box is use our online generator "
41
+ "to generate meta boxes with custom fields. It provides a friendly UI for you "
42
+ "to create meta boxes and custom fields just by drag and drop fields."
43
+ msgstr ""
44
+ "Il modo più facile per iniziare con Meta Box è utilizzando il nostro "
45
+ "generatore online. Fornisce una semplice interfaccia grafica che permette di "
46
+ "creare le meta box e i campi personalizzati tramite il drag-and-drop."
47
+
48
+ #: inc/about/sections/getting-started.php:16
49
+ msgid "online generator"
50
+ msgstr "generatore online"
51
+
52
+ #: inc/about/sections/getting-started.php:18
53
+ msgid "Go to Online Generator"
54
+ msgstr "Vai al Generatore Online"
55
+
56
+ #: inc/about/sections/getting-started.php:22
57
+ msgid "Understand The Basics"
58
+ msgstr "Capire Le Basi"
59
+
60
+ #: inc/about/sections/getting-started.php:23
61
+ msgid ""
62
+ "Meta Box doesn't have any admin page for configuration or settings. Instead "
63
+ "of that, it provides a very powerful API to speed up the process of creating "
64
+ "meta boxes and custom fields. It might take you a little time at first, but "
65
+ "then you'll love the way it work because it helps you do and customize "
66
+ "almost everything."
67
+ msgstr ""
68
+ "Meta Box non ha una pagina di gestione per la configurazione e le "
69
+ "impostazioni. Al suo posto, fornisce delle potenti API per velocizzare il "
70
+ "processo di creazione delle meta box e dei campi personalizzati. Può "
71
+ "richiedere un po’ di tempo all’inizio, ma poi amerai il modo in cui funziona "
72
+ "perché ti dà la possibilità di personalizzare quasi tutto."
73
+
74
+ #: inc/about/sections/getting-started.php:24
75
+ msgid "Learn More"
76
+ msgstr "Scopri di Più"
77
+
78
+ #: inc/about/sections/getting-started.php:26 inc/core.php:39
79
+ msgid "Extensions"
80
+ msgstr "Estensioni"
81
+
82
+ #: inc/about/sections/getting-started.php:27
83
+ msgid ""
84
+ "Wanna see more features that transform your WordPress website into a "
85
+ "powerful CMS? Check out some extensions below:"
86
+ msgstr ""
87
+
88
+ #: inc/about/sections/getting-started.php:29
89
+ msgid "Meta Box Group"
90
+ msgstr ""
91
+
92
+ #: inc/about/sections/getting-started.php:30
93
+ msgid "Meta Box Conditional Logic"
94
+ msgstr ""
95
+
96
+ #: inc/about/sections/getting-started.php:31
97
+ msgid "MB Settings Page"
98
+ msgstr ""
99
+
100
+ #: inc/about/sections/getting-started.php:32
101
+ msgid "MB Term Meta"
102
+ msgstr ""
103
+
104
+ #: inc/about/sections/getting-started.php:34
105
+ msgid "More Extensions"
106
+ msgstr "Altre Estensioni"
107
+
108
+ #: inc/about/sections/getting-started.php:39
109
+ msgid "Go to MetaBox.IO &rarr;"
110
+ msgstr "Vai su MetaBox.IO &rarr;"
111
+
112
+ #: inc/about/sections/tabs.php:11
113
+ msgid "Getting Started"
114
+ msgstr "Inizia"
115
+
116
+ #: inc/about/sections/welcome.php:13
117
+ #, php-format
118
+ msgid "Welcome to %1$s %2$s"
119
+ msgstr "Benvenuto su %1$s %2$s"
120
+
121
+ #: inc/about/sections/welcome.php:16
122
+ msgid ""
123
+ "This plugin is a lightweight and powerful toolkit that helps you to create "
124
+ "custom meta boxes and custom fields in WordPress fast and easy. Follow the "
125
+ "instruction below to get started."
126
+ msgstr ""
127
+
128
+ #: inc/core.php:38
129
+ msgid "Documentation"
130
+ msgstr "Documentazione"
131
+
132
+ #: inc/field.php:356
133
+ msgid "+ Add more"
134
+ msgstr "+ Aggiungine altre"
135
+
136
+ #: inc/fields/autocomplete.php:20 inc/fields/autocomplete.php:81
137
+ #: inc/fields/autocomplete.php:93
138
+ msgid "Delete"
139
+ msgstr "Elimina"
140
+
141
+ #: inc/fields/file.php:121
142
+ msgctxt "file upload"
143
+ msgid "Delete"
144
+ msgstr "Elimina"
145
+
146
+ #: inc/fields/button.php:32
147
+ msgid "Click me"
148
+ msgstr "Cliccami"
149
+
150
+ #: inc/fields/checkbox.php:53
151
+ msgid "Yes"
152
+ msgstr "Sì"
153
+
154
+ #: inc/fields/checkbox.php:53
155
+ msgid "No"
156
+ msgstr "No"
157
+
158
+ #: inc/fields/file-input.php:19
159
+ msgid "Select File"
160
+ msgstr "Seleziona File"
161
+
162
+ #: inc/fields/file-input.php:38 inc/fields/select.php:87
163
+ msgid "Select"
164
+ msgstr "Seleziona"
165
+
166
+ #: inc/fields/file-input.php:40
167
+ msgid "Remove"
168
+ msgstr "Rimuovi"
169
+
170
+ #: inc/fields/media.php:27
171
+ msgctxt "media"
172
+ msgid "Remove"
173
+ msgstr "Rimuovi"
174
+
175
+ #: inc/fields/file.php:21
176
+ #, php-format
177
+ msgid "You may only upload maximum %d file"
178
+ msgstr "Puoi caricare al massimo %d file"
179
+
180
+ #: inc/fields/file.php:23
181
+ #, php-format
182
+ msgid "You may only upload maximum %d files"
183
+ msgstr "Puoi caricare al massimo %d file"
184
+
185
+ #: inc/fields/file.php:53
186
+ msgid "Error: Cannot delete file"
187
+ msgstr "Errore: Non posso cancellare il file"
188
+
189
+ #: inc/fields/file.php:66
190
+ msgctxt "file upload"
191
+ msgid "+ Add new file"
192
+ msgstr "+ Aggiungi un nuovo file"
193
+
194
+ #: inc/fields/file.php:122
195
+ msgctxt "file upload"
196
+ msgid "Edit"
197
+ msgstr "Modifica"
198
+
199
+ #: inc/fields/media.php:28
200
+ msgctxt "media"
201
+ msgid "Edit"
202
+ msgstr "Modifica"
203
+
204
+ #: inc/fields/input-list.php:90
205
+ msgid "Select All / None"
206
+ msgstr "Seleziona Tutti / Nessuno"
207
+
208
+ #: inc/fields/key-value.php:126
209
+ msgid "Key"
210
+ msgstr "Chiave"
211
+
212
+ #: inc/fields/key-value.php:127
213
+ msgid "Value"
214
+ msgstr "Valore"
215
+
216
+ #: inc/fields/map.php:64
217
+ msgid "Find Address"
218
+ msgstr "Trova l'Indirizzo"
219
+
220
+ #: inc/fields/media.php:24
221
+ msgctxt "media"
222
+ msgid "+ Add Media"
223
+ msgstr "+ Aggiungi Media"
224
+
225
+ #: inc/fields/media.php:25
226
+ msgctxt "media"
227
+ msgid " file"
228
+ msgstr " file"
229
+
230
+ #: inc/fields/media.php:26
231
+ msgctxt "media"
232
+ msgid " files"
233
+ msgstr " file"
234
+
235
+ #: inc/fields/media.php:29
236
+ msgctxt "media"
237
+ msgid "View"
238
+ msgstr "Mostra"
239
+
240
+ #: inc/fields/media.php:30
241
+ msgctxt "media"
242
+ msgid "No Title"
243
+ msgstr "Nessun Titolo"
244
+
245
+ #: inc/fields/media.php:33
246
+ msgctxt "media"
247
+ msgid "Select Files"
248
+ msgstr "Seleziona File"
249
+
250
+ #: inc/fields/media.php:34
251
+ msgctxt "media"
252
+ msgid "or"
253
+ msgstr "o"
254
+
255
+ #: inc/fields/media.php:35
256
+ msgctxt "media"
257
+ msgid "Drop files here to upload"
258
+ msgstr "Trascina i file qui per caricarli"
259
+
260
+ #: inc/fields/oembed.php:64
261
+ msgid "Embed HTML not available."
262
+ msgstr "Incorporazione dell'HTML non disponibile."
263
+
264
+ #: inc/fields/post.php:36
265
+ msgid "Select a post"
266
+ msgstr "Seleziona un post"
267
+
268
+ #: inc/fields/post.php:41 inc/fields/taxonomy.php:52
269
+ #, php-format
270
+ msgid "Select a %s"
271
+ msgstr "Seleziona un %s"
272
+
273
+ #: inc/fields/select-advanced.php:45
274
+ msgid "Select an item"
275
+ msgstr "Seleziona un oggetto"
276
+
277
+ #: inc/fields/select.php:87
278
+ msgid "All"
279
+ msgstr "Tutto"
280
+
281
+ #: inc/fields/select.php:87
282
+ msgid "None"
283
+ msgstr "Nessuno"
284
+
285
+ #: inc/fields/sidebar.php:30
286
+ msgid "Select a sidebar"
287
+ msgstr "Seleziona una sidecar"
288
+
289
+ #: inc/fields/switch.php:90
290
+ msgid "On"
291
+ msgstr "Acceso"
292
+
293
+ #: inc/fields/switch.php:91
294
+ msgid "Off"
295
+ msgstr "Spento"
296
+
297
+ #: inc/fields/taxonomy.php:47
298
+ msgid "Select a term"
299
+ msgstr "Seleziona un termine"
300
+
301
+ #: inc/fields/thickbox-image.php:55
302
+ msgctxt "image upload"
303
+ msgid "Upload Images"
304
+ msgstr "Carica Immagini"
305
+
306
+ #: inc/fields/user.php:30
307
+ msgid "Select an user"
308
+ msgstr "Seleziona un utente"
309
+
310
+ #: inc/validation.php:47
311
+ msgid "Please correct the errors highlighted below and try again."
312
+ msgstr "Correggere gli errori evidenziati qui sotto e riprovare."
313
+
314
+ #~ msgid "Upload Files"
315
+ #~ msgstr "Carica i File"
316
+
317
+ #~ msgid "Preview"
318
+ #~ msgstr "Anteprima"
inc/libraries/meta-box/languages/meta-box-nb_NO.mo ADDED
Binary file
inc/libraries/meta-box/languages/meta-box-nb_NO.po ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Meta Box Script For WordPress\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-03-02 14:08+0700\n"
6
+ "PO-Revision-Date: 2012-03-05 22:32+0100\n"
7
+ "Last-Translator: \n"
8
+ "Language-Team: Magnus Kolstad <mrkolby@gmail.com>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: __;_n:1,2;_n_noop:1,2;_nx:1,2;_nx_noop:1,2;_x:2c,1\n"
13
+ "X-Poedit-Basepath: .\n"
14
+ "X-Poedit-Language: Norwegian (Bokmål)\n"
15
+ "X-Poedit-Country: Norwegian\n"
16
+ "X-Poedit-SourceCharset: utf-8\n"
17
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
18
+ "X-Poedit-SearchPath-0: ..\n"
19
+ "X-Poedit-SearchPath-1: ../inc/fields\n"
20
+
21
+ #: ../meta-box.php:334
22
+ msgid "+"
23
+ msgstr "+"
24
+
25
+ #: ../meta-box.php:358
26
+ msgid "&#8211;"
27
+ msgstr "&#8211;"
28
+
29
+ #: ../meta-box.php:691
30
+ msgid "RW_Meta_Box Debug:"
31
+ msgstr "RW_Meta_Box-debug"
32
+
33
+ #: ../inc/fields/color.php:45
34
+ msgid "Select a color"
35
+ msgstr "Velg en farge"
36
+
37
+ #: ../inc/fields/file.php:69
38
+ msgid "Error: Cannot delete file"
39
+ msgstr "Feil: Kan ikke slette fil"
40
+
41
+ #: ../inc/fields/file.php:83
42
+ msgctxt "file upload"
43
+ msgid "Uploaded files"
44
+ msgstr "Opplastede filer"
45
+
46
+ #: ../inc/fields/file.php:84
47
+ msgctxt "file upload"
48
+ msgid "Delete this file"
49
+ msgstr "Slett denne filen"
50
+
51
+ #: ../inc/fields/file.php:85
52
+ msgctxt "file upload"
53
+ msgid "Delete"
54
+ msgstr "Slett"
55
+
56
+ #: ../inc/fields/file.php:86
57
+ msgctxt "file upload"
58
+ msgid "Upload files"
59
+ msgstr "Last opp filer"
60
+
61
+ #: ../inc/fields/file.php:87
62
+ msgctxt "file upload"
63
+ msgid "Add another file"
64
+ msgstr "Legg til en fil"
65
+
66
+ #: ../inc/fields/image.php:68
67
+ msgid "Order saved"
68
+ msgstr "Sortering lagret"
69
+
70
+ #: ../inc/fields/image.php:84
71
+ #: ../inc/fields/plupload-image.php:178
72
+ msgctxt "image upload"
73
+ msgid "Uploaded files"
74
+ msgstr "Opplastede filer"
75
+
76
+ #: ../inc/fields/image.php:85
77
+ #: ../inc/fields/plupload-image.php:140
78
+ msgctxt "image upload"
79
+ msgid "Delete this file"
80
+ msgstr "Slett denne filen"
81
+
82
+ #: ../inc/fields/image.php:86
83
+ #: ../inc/fields/plupload-image.php:141
84
+ msgctxt "image upload"
85
+ msgid "Delete"
86
+ msgstr "Slett"
87
+
88
+ #: ../inc/fields/image.php:87
89
+ #: ../inc/fields/plupload-image.php:142
90
+ msgctxt "image upload"
91
+ msgid "Edit"
92
+ msgstr "Endre"
93
+
94
+ #: ../inc/fields/image.php:88
95
+ #: ../inc/fields/plupload-image.php:179
96
+ msgctxt "image upload"
97
+ msgid "Upload files"
98
+ msgstr "Last opp filer"
99
+
100
+ #: ../inc/fields/image.php:89
101
+ #: ../inc/fields/plupload-image.php:180
102
+ msgctxt "image upload"
103
+ msgid "Add another file"
104
+ msgstr "Legg til en fil"
105
+
106
+ #: ../inc/fields/plupload-image.php:112
107
+ msgctxt "image upload"
108
+ msgid "Allowed Image Files"
109
+ msgstr "Tillate bilde-filer"
110
+
111
+ #: ../inc/fields/plupload-image.php:183
112
+ msgctxt "image upload"
113
+ msgid "Drop images here"
114
+ msgstr "Slipp bildene her"
115
+
116
+ #: ../inc/fields/plupload-image.php:184
117
+ msgctxt "image upload"
118
+ msgid "or"
119
+ msgstr "eller"
120
+
121
+ #: ../inc/fields/plupload-image.php:185
122
+ #, fuzzy
123
+ msgctxt "image upload"
124
+ msgid "Select Files"
125
+ msgstr "Velg en farge"
126
+
127
+ #~ msgid "Cannot delete file. Something's wrong."
128
+ #~ msgstr "Kan ikke slette filen. Noe er galt."
129
+
130
+ #~ msgid "Uploaded files"
131
+ #~ msgstr "Opplastede filer."
132
+
133
+ #~ msgid "Delete"
134
+ #~ msgstr "Slett"
135
+
136
+ #~ msgid "Upload new files"
137
+ #~ msgstr "Last opp nye filer"
138
+
139
+ #~ msgid "Add more file"
140
+ #~ msgstr "Legg til flere filer"
141
+
142
+ #~ msgid "Uploaded images"
143
+ #~ msgstr "Opplastede bilder"
144
+
145
+ #~ msgid "Delete this image"
146
+ #~ msgstr "Slett dette bildet"
147
+
148
+ #~ msgid "Upload new images"
149
+ #~ msgstr "Last opp nye bilder"
inc/libraries/meta-box/languages/meta-box-nl_NL.mo ADDED
Binary file
inc/libraries/meta-box/languages/meta-box-nl_NL.po ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Meta Box Script For WordPress\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2013-04-21 01:56+0100\n"
6
+ "PO-Revision-Date: 2013-04-21 01:56+0100\n"
7
+ "Last-Translator: Cor van Noorloos <info@webvorm.nl>\n"
8
+ "Language-Team: Rilwis <rilwis@gmail.com>\n"
9
+ "Language: nl_NL\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Poedit-KeywordsList: __;_e;_x:2c,1;_n:1,2;_n_noop:1,2;_nx:1,2;"
14
+ "_nx_noop:1,2\n"
15
+ "X-Poedit-Basepath: .\n"
16
+ "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Generator: Poedit 1.5.5\n"
18
+ "X-Poedit-SearchPath-0: ..\n"
19
+ "X-Poedit-SearchPath-1: ../inc/fields\n"
20
+
21
+ #: ../inc/classes/meta-box.php:299
22
+ msgid "Please correct the errors highlighted below and try again."
23
+ msgstr "Corrigeer de fouten hieronder gemarkeerd en probeer opnieuw."
24
+
25
+ #: ../inc/classes/meta-box.php:360
26
+ msgid "+"
27
+ msgstr "+"
28
+
29
+ #: ../inc/classes/meta-box.php:382
30
+ msgid "&#8211;"
31
+ msgstr "&#8211;"
32
+
33
+ #: ../inc/fields/file-advanced.php:62
34
+ msgctxt "file upload"
35
+ msgid "Select or Upload Files"
36
+ msgstr "Bestanden selecteren of uploaden"
37
+
38
+ #: ../inc/fields/file.php:66
39
+ msgid "Error: Cannot delete file"
40
+ msgstr "Foutmelding: Kan bestand niet verwijderen"
41
+
42
+ #: ../inc/fields/file.php:80
43
+ msgctxt "file upload"
44
+ msgid "Upload Files"
45
+ msgstr "Bestanden uploaden"
46
+
47
+ #: ../inc/fields/file.php:81
48
+ msgctxt "file upload"
49
+ msgid "+ Add new file"
50
+ msgstr "+ Nieuw bestand toevoegen"
51
+
52
+ #: ../inc/fields/file.php:133
53
+ msgctxt "file upload"
54
+ msgid "Delete"
55
+ msgstr "Verwijderen"
56
+
57
+ #: ../inc/fields/file.php:134
58
+ msgctxt "file upload"
59
+ msgid "Edit"
60
+ msgstr "Bewerken"
61
+
62
+ #: ../inc/fields/image-advanced.php:68
63
+ msgctxt "image upload"
64
+ msgid "Select or Upload Images"
65
+ msgstr "Afbeeldingen selecteren of uploaden"
66
+
67
+ #: ../inc/fields/image.php:64
68
+ msgid "Order saved"
69
+ msgstr "Volgorde opgeslagen"
70
+
71
+ #: ../inc/fields/image.php:78 ../inc/fields/thickbox-image.php:35
72
+ msgctxt "image upload"
73
+ msgid "Upload Images"
74
+ msgstr "Afbeeldingen uploaden"
75
+
76
+ #: ../inc/fields/image.php:79
77
+ msgctxt "image upload"
78
+ msgid "+ Add new image"
79
+ msgstr "+ Nieuwe afbeelding toevoegen"
80
+
81
+ #: ../inc/fields/image.php:144
82
+ msgctxt "image upload"
83
+ msgid "Delete"
84
+ msgstr "Verwijderen"
85
+
86
+ #: ../inc/fields/image.php:145
87
+ msgctxt "image upload"
88
+ msgid "Edit"
89
+ msgstr "Bewerken"
90
+
91
+ #: ../inc/fields/map.php:46
92
+ msgid "Find Address"
93
+ msgstr "Adres vinden"
94
+
95
+ #: ../inc/fields/plupload-image.php:104
96
+ msgctxt "image upload"
97
+ msgid "Drop images here"
98
+ msgstr "Afbeeldingen naar hier verslepen"
99
+
100
+ #: ../inc/fields/plupload-image.php:105
101
+ msgctxt "image upload"
102
+ msgid "or"
103
+ msgstr "of"
104
+
105
+ #: ../inc/fields/plupload-image.php:106
106
+ msgctxt "image upload"
107
+ msgid "Select Files"
108
+ msgstr "Bestanden selecteren"
109
+
110
+ #: ../inc/fields/plupload-image.php:181
111
+ msgctxt "image upload"
112
+ msgid "Allowed Image Files"
113
+ msgstr "Toegestane afbeeldingsbestanden"
114
+
115
+ #: ../inc/fields/post.php:54
116
+ msgid "Post"
117
+ msgstr "Bericht"
118
+
119
+ #: ../inc/fields/post.php:68 ../inc/fields/taxonomy.php:40
120
+ #, php-format
121
+ msgid "Select a %s"
122
+ msgstr "Een %s selecteren"
123
+
124
+ #: ../inc/fields/select-advanced.php:71
125
+ msgid "Select a value"
126
+ msgstr "Een waarde selecteren"
127
+
128
+ #~ msgctxt "file upload"
129
+ #~ msgid "Select Files"
130
+ #~ msgstr "Bestanden selecteren"
inc/libraries/meta-box/languages/meta-box-pl_PL.mo ADDED
Binary file
inc/libraries/meta-box/languages/meta-box-pl_PL.po ADDED
@@ -0,0 +1,215 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: meta-box\n"
4
+ "POT-Creation-Date: 2017-02-01 08:56+0000\n"
5
+ "PO-Revision-Date: 2017-02-02 15:01+0000\n"
6
+ "Last-Translator: admin <test@bumerang.vot.pl>\n"
7
+ "Language-Team: Polish\n"
8
+ "Language: pl-PL\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Loco - https://localise.biz/\n"
13
+ "X-Poedit-Basepath: ..\\\n"
14
+ "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10 >= 2 && n%10<=4 "
15
+ "&&(n%100<10||n%100 >= 20)? 1 : 2)\n"
16
+ "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_n_noop:1,2;_nx:1,2;_nx_noop:1,2;_x:1,"
18
+ "2c\n"
19
+ "X-Poedit-SearchPath-0: .\n"
20
+ "Report-Msgid-Bugs-To: "
21
+
22
+ #. Name of the plugin
23
+ msgid "Meta Box"
24
+ msgstr "Meta Box"
25
+
26
+ #. Description of the plugin
27
+ msgid "Create custom meta boxes and custom fields in WordPress."
28
+ msgstr "Twórz customowe meta boxy i custom field w Wordpress"
29
+
30
+ #. URI of the plugin
31
+ msgid "https://metabox.io"
32
+ msgstr "https://metabox.io"
33
+
34
+ #. Author of the plugin
35
+ msgid "Rilwis"
36
+ msgstr "Rilwis"
37
+
38
+ #. Author URI of the plugin
39
+ msgid "http://www.deluxeblogtips.com"
40
+ msgstr "http://www.deluxeblogtips.com"
41
+
42
+ #: inc/clone.php:95
43
+ msgid "+ Add more"
44
+ msgstr "+ Dodaj więcej"
45
+
46
+ #: inc/fields/select-advanced.php:41
47
+ msgid "Select an item"
48
+ msgstr "Wybierz element"
49
+
50
+ #: inc/fields/taxonomy.php:48
51
+ msgid "Select a term"
52
+ msgstr "Wybierz term"
53
+
54
+ #: inc/fields/select.php:84
55
+ msgid "All"
56
+ msgstr "Wszystko"
57
+
58
+ #: inc/fields/select.php:84
59
+ msgid "None"
60
+ msgstr "Żadne"
61
+
62
+ #: inc/fields/media.php:17
63
+ msgctxt "media"
64
+ msgid "+ Add Media"
65
+ msgstr "+ Dodaj plik multimedialny"
66
+
67
+ #: inc/fields/media.php:18
68
+ msgctxt "media"
69
+ msgid " file"
70
+ msgstr "plik"
71
+
72
+ #: inc/fields/media.php:19
73
+ msgctxt "media"
74
+ msgid " files"
75
+ msgstr "pliki"
76
+
77
+ #: inc/fields/media.php:20
78
+ msgctxt "media"
79
+ msgid "Remove"
80
+ msgstr "Usuń"
81
+
82
+ #: inc/fields/media.php:21
83
+ msgctxt "media"
84
+ msgid "Edit"
85
+ msgstr "Edytuj"
86
+
87
+ #: inc/fields/media.php:22
88
+ msgctxt "media"
89
+ msgid "View"
90
+ msgstr "Obejrzyj "
91
+
92
+ #: inc/fields/media.php:23
93
+ msgctxt "media"
94
+ msgid "No Title"
95
+ msgstr "Bez tytułu"
96
+
97
+ #: inc/fields/media.php:26
98
+ msgctxt "media"
99
+ msgid "Select Files"
100
+ msgstr "Wybierz pliki"
101
+
102
+ #: inc/fields/media.php:27
103
+ msgctxt "media"
104
+ msgid "or"
105
+ msgstr "lub"
106
+
107
+ #: inc/fields/media.php:28
108
+ msgctxt "media"
109
+ msgid "Drop files here to upload"
110
+ msgstr "Upuść pliki tutaj,by zuploadować"
111
+
112
+ #: inc/validation.php:47
113
+ msgid "Please correct the errors highlighted below and try again."
114
+ msgstr "Prosze popraw podświetlone błędy i spróbuj ponownie."
115
+
116
+ #: inc/core.php:42
117
+ msgid "Documentation"
118
+ msgstr "Dokumentacja"
119
+
120
+ #: inc/core.php:43
121
+ msgid "Extensions"
122
+ msgstr "Rozszerzenia"
123
+
124
+ #: inc/fields/map.php:57
125
+ msgid "Find Address"
126
+ msgstr "Wyszukaj adres"
127
+
128
+ #: inc/fields/taxonomy.php:51 inc/fields/post.php:36
129
+ #, php-format
130
+ msgid "Select a %s"
131
+ msgstr "Wybierz %s"
132
+
133
+ #: inc/fields/checkbox.php:53
134
+ msgid "Yes"
135
+ msgstr "Tak"
136
+
137
+ #: inc/fields/checkbox.php:53
138
+ msgid "No"
139
+ msgstr "Nie"
140
+
141
+ #: inc/fields/button.php:27
142
+ msgid "Click me"
143
+ msgstr "Kliknij mnie"
144
+
145
+ #: inc/fields/file-input.php:17
146
+ msgid "Select File"
147
+ msgstr "Wybierz plik"
148
+
149
+ #: inc/fields/file-input.php:39 inc/fields/select.php:84
150
+ msgid "Select"
151
+ msgstr "Zaznacz"
152
+
153
+ #: inc/fields/file-input.php:41
154
+ msgid "Remove"
155
+ msgstr "Usuń"
156
+
157
+ #: inc/fields/post.php:33
158
+ msgid "Select a post"
159
+ msgstr "Wybierz wpis"
160
+
161
+ #: inc/fields/autocomplete.php:15 inc/fields/autocomplete.php:74
162
+ #: inc/fields/autocomplete.php:89
163
+ msgid "Delete"
164
+ msgstr "Usuń"
165
+
166
+ #: inc/fields/thickbox-image.php:51
167
+ msgctxt "image upload"
168
+ msgid "Upload Images"
169
+ msgstr "Wyślij obrazki"
170
+
171
+ #: inc/fields/oembed.php:60
172
+ msgid "Embed HTML not available."
173
+ msgstr "Osadzenie HTML nie jest możliwe."
174
+
175
+ #: inc/fields/oembed.php:75
176
+ msgid "Preview"
177
+ msgstr "Podgląd"
178
+
179
+ #: inc/fields/file.php:16
180
+ #, php-format
181
+ msgid "You may only upload maximum %d file"
182
+ msgstr "Możesz wysłać maksymalnie %d plik"
183
+
184
+ #: inc/fields/file.php:17
185
+ #, php-format
186
+ msgid "You may only upload maximum %d files"
187
+ msgstr "Możesz wysłać maksymalnie %d pliki/plików"
188
+
189
+ #: inc/fields/file.php:73
190
+ msgid "Error: Cannot delete file"
191
+ msgstr "Błąd: Nie można usunąć pliku"
192
+
193
+ #: inc/fields/file.php:85
194
+ msgctxt "file upload"
195
+ msgid "Upload Files"
196
+ msgstr "Wyślij pliki"
197
+
198
+ #: inc/fields/file.php:86
199
+ msgctxt "file upload"
200
+ msgid "+ Add new file"
201
+ msgstr "+ Dodaj nowy plik"
202
+
203
+ #: inc/fields/file.php:150
204
+ msgctxt "file upload"
205
+ msgid "Delete"
206
+ msgstr "Usuń"
207
+
208
+ #: inc/fields/file.php:151
209
+ msgctxt "file upload"
210
+ msgid "Edit"
211
+ msgstr "Edytuj"
212
+
213
+ #: inc/fields/user.php:33
214
+ msgid "Select an user"
215
+ msgstr "Wybierz użytkownika"
inc/libraries/meta-box/languages/meta-box-pt_BR.mo ADDED
Binary file
inc/libraries/meta-box/languages/meta-box-pt_BR.po ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Meta Box Script For WordPress\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-03-02 14:08+0700\n"
6
+ "PO-Revision-Date: 2012-03-19 02:59-0300\n"
7
+ "Last-Translator: name <email@domain.com>\n"
8
+ "Language-Team: Rilwis <rilwis@gmail.com>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: __;_e;_x:2c,1;_n:1,2;_n_noop:1,2;_nx:1,2;_nx_noop:1,2\n"
13
+ "X-Poedit-Basepath: .\n"
14
+ "X-Poedit-Language: English\n"
15
+ "X-Poedit-Country: VIET NAM\n"
16
+ "X-Poedit-SourceCharset: utf-8\n"
17
+ "X-Poedit-SearchPath-0: ..\n"
18
+ "X-Poedit-SearchPath-1: ../inc/fields\n"
19
+
20
+ #: ../meta-box.php:334
21
+ msgid "+"
22
+ msgstr ""
23
+
24
+ #: ../meta-box.php:358
25
+ msgid "&#8211;"
26
+ msgstr ""
27
+
28
+ #: ../meta-box.php:691
29
+ msgid "RW_Meta_Box Debug:"
30
+ msgstr ""
31
+
32
+ #: ../inc/fields/color.php:45
33
+ msgid "Select a color"
34
+ msgstr "Selecione a cor"
35
+
36
+ #: ../inc/fields/file.php:69
37
+ msgid "Error: Cannot delete file"
38
+ msgstr ""
39
+
40
+ #: ../inc/fields/file.php:83
41
+ msgctxt "file upload"
42
+ msgid "Uploaded files"
43
+ msgstr "Arquivos carregados"
44
+
45
+ #: ../inc/fields/file.php:84
46
+ msgctxt "file upload"
47
+ msgid "Delete this file"
48
+ msgstr "Deletar esse arquivo"
49
+
50
+ #: ../inc/fields/file.php:85
51
+ msgctxt "file upload"
52
+ msgid "Delete"
53
+ msgstr "Deletar"
54
+
55
+ #: ../inc/fields/file.php:86
56
+ msgctxt "file upload"
57
+ msgid "Upload files"
58
+ msgstr "Carregar arquivos"
59
+
60
+ #: ../inc/fields/file.php:87
61
+ msgctxt "file upload"
62
+ msgid "Add another file"
63
+ msgstr "Adicionar outro arquivo"
64
+
65
+ #: ../inc/fields/image.php:68
66
+ msgid "Order saved"
67
+ msgstr "Salvar ordem"
68
+
69
+ #: ../inc/fields/image.php:84
70
+ #: ../inc/fields/plupload-image.php:178
71
+ msgctxt "image upload"
72
+ msgid "Uploaded files"
73
+ msgstr "Arquivos carregados"
74
+
75
+ #: ../inc/fields/image.php:85
76
+ #: ../inc/fields/plupload-image.php:140
77
+ msgctxt "image upload"
78
+ msgid "Delete this file"
79
+ msgstr "Deletar esse arquivo"
80
+
81
+ #: ../inc/fields/image.php:86
82
+ #: ../inc/fields/plupload-image.php:141
83
+ msgctxt "image upload"
84
+ msgid "Delete"
85
+ msgstr "Deletar"
86
+
87
+ #: ../inc/fields/image.php:87
88
+ #: ../inc/fields/plupload-image.php:142
89
+ msgctxt "image upload"
90
+ msgid "Edit"
91
+ msgstr "Editar"
92
+
93
+ #: ../inc/fields/image.php:88
94
+ #: ../inc/fields/plupload-image.php:179
95
+ msgctxt "image upload"
96
+ msgid "Upload files"
97
+ msgstr "Carregar arquivos"
98
+
99
+ #: ../inc/fields/image.php:89
100
+ #: ../inc/fields/plupload-image.php:180
101
+ msgctxt "image upload"
102
+ msgid "Add another file"
103
+ msgstr "Adicionar outro arquivo"
104
+
105
+ #: ../inc/fields/plupload-image.php:112
106
+ msgctxt "image upload"
107
+ msgid "Allowed Image Files"
108
+ msgstr "Arquivos de imagem permetidos"
109
+
110
+ #: ../inc/fields/plupload-image.php:183
111
+ msgctxt "image upload"
112
+ msgid "Drop images here"
113
+ msgstr "Largue as imagens aqui"
114
+
115
+ #: ../inc/fields/plupload-image.php:184
116
+ msgctxt "image upload"
117
+ msgid "or"
118
+ msgstr "ou"
119
+
120
+ #: ../inc/fields/plupload-image.php:185
121
+ msgctxt "image upload"
122
+ msgid "Select Files"
123
+ msgstr "Selecione os arquivos"
124
+
inc/libraries/meta-box/languages/meta-box-ru_RU.mo ADDED
Binary file
inc/libraries/meta-box/languages/meta-box-ru_RU.po ADDED
@@ -0,0 +1,637 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # <!=Copyright (C) 2014 Rilwis
2
+ # This file is distributed under the GPL2+.=!>
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Meta Box 4.3.10\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/meta-box\n"
7
+ "POT-Creation-Date: 2015-08-28 23:44+0300\n"
8
+ "PO-Revision-Date: 2015-09-02 11:09+0300\n"
9
+ "Last-Translator: \n"
10
+ "Language-Team: \n"
11
+ "Language: ru_RU\n"
12
+ "MIME-Version: 1.0\n"
13
+ "Content-Type: text/plain; charset=UTF-8\n"
14
+ "Content-Transfer-Encoding: 8bit\n"
15
+ "X-Generator: Poedit 1.7.5\n"
16
+ "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
17
+ "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
18
+ "X-Poedit-Basepath: ../\n"
19
+ "X-Poedit-KeywordsList: __;_x\n"
20
+ "X-Poedit-SearchPath-0: .\n"
21
+
22
+ #: demo/all-custom-post-types.php:15
23
+ msgid "Personal Information"
24
+ msgstr ""
25
+
26
+ #: demo/all-custom-post-types.php:20
27
+ msgid "Full name"
28
+ msgstr ""
29
+
30
+ #: demo/better-include.php:16 demo/include-by-ID-or-page-template.php:8
31
+ msgid "Meta Box Title"
32
+ msgstr ""
33
+
34
+ #: demo/better-include.php:19 demo/include-by-ID-or-page-template.php:14
35
+ msgid "Your images"
36
+ msgstr ""
37
+
38
+ #: demo/checkbox.php:10
39
+ msgid "Checkbox Upload Demo"
40
+ msgstr ""
41
+
42
+ #: demo/checkbox.php:14 demo/demo.php:74
43
+ msgid "Checkbox"
44
+ msgstr ""
45
+
46
+ #: demo/checkbox.php:16
47
+ msgid "Check or not check?"
48
+ msgstr ""
49
+
50
+ #: demo/date-time-js-options.php:8
51
+ msgid "Date Time Picker With JS Options"
52
+ msgstr ""
53
+
54
+ #: demo/date-time-js-options.php:12
55
+ msgid "Date"
56
+ msgstr ""
57
+
58
+ #: demo/date-time-js-options.php:18 demo/demo.php:193
59
+ msgid "(yyyy-mm-dd)"
60
+ msgstr ""
61
+
62
+ #: demo/date-time-js-options.php:20
63
+ msgid "Select Date"
64
+ msgstr ""
65
+
66
+ #: demo/date-time-js-options.php:21 demo/demo.php:194
67
+ msgid "yy-mm-dd"
68
+ msgstr ""
69
+
70
+ #: demo/date-time-js-options.php:27
71
+ msgid "Datetime"
72
+ msgstr ""
73
+
74
+ #: demo/date-time-js-options.php:38
75
+ msgid "Time"
76
+ msgstr ""
77
+
78
+ #: demo/demo.php:42
79
+ msgid "Standard Fields"
80
+ msgstr ""
81
+
82
+ #: demo/demo.php:61 demo/text.php:12
83
+ msgid "Text"
84
+ msgstr ""
85
+
86
+ #: demo/demo.php:65 demo/text.php:14
87
+ msgid "Text description"
88
+ msgstr ""
89
+
90
+ #: demo/demo.php:68 demo/text.php:18
91
+ msgid "Default text value"
92
+ msgstr ""
93
+
94
+ #: demo/demo.php:82 demo/radio.php:13
95
+ msgid "Radio"
96
+ msgstr ""
97
+
98
+ #: demo/demo.php:88 demo/demo.php:99 demo/demo.php:242 demo/demo.php:253
99
+ #: demo/demo.php:302 demo/radio.php:20 demo/select.php:21
100
+ #: demo/select.php:41
101
+ msgid "Label1"
102
+ msgstr ""
103
+
104
+ #: demo/demo.php:89 demo/demo.php:100 demo/demo.php:243 demo/demo.php:254
105
+ #: demo/demo.php:303 demo/radio.php:21 demo/select.php:22
106
+ #: demo/select.php:42
107
+ msgid "Label2"
108
+ msgstr ""
109
+
110
+ #: demo/demo.php:94 demo/demo.php:297 demo/select.php:13
111
+ #: inc/fields/file-input.php:40 inc/fields/select.php:207
112
+ msgid "Select"
113
+ msgstr "Выбрать"
114
+
115
+ #: demo/demo.php:105 demo/demo.php:308 demo/demo.php:333 demo/post.php:30
116
+ #: demo/select.php:32 demo/select.php:49
117
+ msgid "Select an Item"
118
+ msgstr ""
119
+
120
+ #: demo/demo.php:112
121
+ msgid "Hidden value"
122
+ msgstr ""
123
+
124
+ #: demo/demo.php:116
125
+ msgid "Password"
126
+ msgstr ""
127
+
128
+ #: demo/demo.php:122 demo/textarea.php:12
129
+ msgid "Textarea"
130
+ msgstr ""
131
+
132
+ #: demo/demo.php:123 demo/textarea.php:14
133
+ msgid "Textarea description"
134
+ msgstr ""
135
+
136
+ #: demo/demo.php:140
137
+ msgid "Password is required"
138
+ msgstr ""
139
+
140
+ #: demo/demo.php:141
141
+ msgid "Password must be at least 7 characters"
142
+ msgstr ""
143
+
144
+ #: demo/demo.php:149
145
+ msgid "Advanced Fields"
146
+ msgstr ""
147
+
148
+ #: demo/demo.php:155
149
+ msgid "Heading"
150
+ msgstr ""
151
+
152
+ #: demo/demo.php:157
153
+ msgid "Optional description for this heading"
154
+ msgstr ""
155
+
156
+ #: demo/demo.php:161 demo/slider.php:12
157
+ msgid "Slider"
158
+ msgstr ""
159
+
160
+ #: demo/demo.php:166 demo/slider.php:17
161
+ msgid "$"
162
+ msgstr ""
163
+
164
+ #: demo/demo.php:167 demo/slider.php:18
165
+ msgid " USD"
166
+ msgstr ""
167
+
168
+ #: demo/demo.php:178 demo/number.php:13
169
+ msgid "Number"
170
+ msgstr ""
171
+
172
+ #: demo/demo.php:187
173
+ msgid "Date picker"
174
+ msgstr ""
175
+
176
+ #: demo/demo.php:202
177
+ msgid "Datetime picker"
178
+ msgstr ""
179
+
180
+ #: demo/demo.php:216
181
+ msgid "Time picker"
182
+ msgstr ""
183
+
184
+ #: demo/demo.php:231
185
+ msgid "Color picker"
186
+ msgstr ""
187
+
188
+ #: demo/demo.php:237
189
+ msgid "Checkbox list"
190
+ msgstr ""
191
+
192
+ #: demo/demo.php:248
193
+ msgid "Autocomplete"
194
+ msgstr ""
195
+
196
+ #: demo/demo.php:263 demo/fieldset-text.php:28 demo/text-list.php:23
197
+ msgid "Email"
198
+ msgstr ""
199
+
200
+ #: demo/demo.php:265
201
+ msgid "Email description"
202
+ msgstr ""
203
+
204
+ #: demo/demo.php:271 demo/range.php:13
205
+ msgid "Range"
206
+ msgstr ""
207
+
208
+ #: demo/demo.php:273
209
+ msgid "Range description"
210
+ msgstr ""
211
+
212
+ #: demo/demo.php:282
213
+ msgid "URL"
214
+ msgstr ""
215
+
216
+ #: demo/demo.php:284
217
+ msgid "URL description"
218
+ msgstr ""
219
+
220
+ #: demo/demo.php:290
221
+ msgid "oEmbed"
222
+ msgstr ""
223
+
224
+ #: demo/demo.php:292
225
+ msgid "oEmbed description"
226
+ msgstr ""
227
+
228
+ #: demo/demo.php:312 demo/taxonomy-advanced.php:12 demo/taxonomy.php:12
229
+ msgid "Taxonomy"
230
+ msgstr ""
231
+
232
+ #: demo/demo.php:326
233
+ msgid "Posts (Pages)"
234
+ msgstr ""
235
+
236
+ #: demo/demo.php:342
237
+ msgid "WYSIWYG / Rich Text Editor"
238
+ msgstr ""
239
+
240
+ #: demo/demo.php:347
241
+ msgid "WYSIWYG default value"
242
+ msgstr ""
243
+
244
+ #: demo/demo.php:363 demo/force-delete.php:12
245
+ msgid "File Upload"
246
+ msgstr ""
247
+
248
+ #: demo/demo.php:369
249
+ msgid "File Advanced Upload"
250
+ msgstr ""
251
+
252
+ #: demo/demo.php:377 demo/force-delete.php:19
253
+ msgid "Image Upload"
254
+ msgstr ""
255
+
256
+ #: demo/demo.php:383 demo/force-delete.php:25
257
+ msgid "Thickbox Image Upload"
258
+ msgstr ""
259
+
260
+ #: demo/demo.php:389 demo/force-delete.php:32
261
+ msgid "Plupload Image Upload"
262
+ msgstr ""
263
+
264
+ #: demo/demo.php:396
265
+ msgid "Image Advanced Upload"
266
+ msgstr ""
267
+
268
+ #: demo/fieldset-text.php:10
269
+ msgid "Fieldset Text Demo"
270
+ msgstr ""
271
+
272
+ #: demo/fieldset-text.php:14
273
+ msgid "Fieldset Text"
274
+ msgstr ""
275
+
276
+ #: demo/fieldset-text.php:17
277
+ msgid "Please enter following details:"
278
+ msgstr ""
279
+
280
+ #: demo/fieldset-text.php:26 demo/text-list.php:22
281
+ msgid "Name"
282
+ msgstr ""
283
+
284
+ #: demo/fieldset-text.php:27 demo/map.php:14
285
+ msgid "Address"
286
+ msgstr ""
287
+
288
+ #: demo/file.php:10
289
+ msgid "File Upload Demo"
290
+ msgstr ""
291
+
292
+ #: demo/file.php:14
293
+ msgid "File"
294
+ msgstr ""
295
+
296
+ #: demo/file.php:26
297
+ msgid "File Advanced"
298
+ msgstr ""
299
+
300
+ #: demo/file.php:38
301
+ msgid "File Input"
302
+ msgstr ""
303
+
304
+ #: demo/file.php:42
305
+ msgid "Please select a file or paste file URL here"
306
+ msgstr ""
307
+
308
+ #: demo/force-delete.php:8
309
+ msgid "Test Meta Box"
310
+ msgstr ""
311
+
312
+ #: demo/image-select.php:9
313
+ msgid "Image Select Demo"
314
+ msgstr ""
315
+
316
+ #: demo/image-select.php:13
317
+ msgid "Layout"
318
+ msgstr ""
319
+
320
+ #: demo/image.php:10
321
+ msgid "Image Upload Demo"
322
+ msgstr ""
323
+
324
+ #: demo/image.php:14
325
+ msgid "Image"
326
+ msgstr ""
327
+
328
+ #: demo/image.php:26
329
+ msgid "Image Advanced"
330
+ msgstr ""
331
+
332
+ #: demo/image.php:38
333
+ msgid "Plupload Image"
334
+ msgstr ""
335
+
336
+ #: demo/image.php:50
337
+ msgid "Thickbox Image"
338
+ msgstr ""
339
+
340
+ #: demo/key-value.php:10
341
+ msgid "Key Value Demo"
342
+ msgstr ""
343
+
344
+ #: demo/key-value.php:14
345
+ msgid "Key Value"
346
+ msgstr ""
347
+
348
+ #: demo/key-value.php:17
349
+ msgid "Add more additional info below:"
350
+ msgstr ""
351
+
352
+ #: demo/map.php:9
353
+ msgid "Google Map"
354
+ msgstr ""
355
+
356
+ #: demo/map.php:16
357
+ msgid "Hanoi, Vietnam"
358
+ msgstr ""
359
+
360
+ #: demo/map.php:20
361
+ msgid "Location"
362
+ msgstr ""
363
+
364
+ #: demo/number.php:9
365
+ msgid "Number Field Demo"
366
+ msgstr ""
367
+
368
+ #: demo/number.php:23
369
+ msgid "Enter number:"
370
+ msgstr ""
371
+
372
+ #: demo/oembed.php:9
373
+ msgid "oEmbed Demo"
374
+ msgstr ""
375
+
376
+ #: demo/oembed.php:13
377
+ msgid "oEmbed(s)"
378
+ msgstr ""
379
+
380
+ #: demo/post.php:9
381
+ msgid "Post Field Demo"
382
+ msgstr ""
383
+
384
+ #: demo/post.php:13
385
+ msgid "Post"
386
+ msgstr ""
387
+
388
+ #: demo/radio.php:9
389
+ msgid "Radio Field Demo"
390
+ msgstr ""
391
+
392
+ #: demo/range.php:9
393
+ msgid "Range Field Demo"
394
+ msgstr ""
395
+
396
+ #: demo/range.php:16
397
+ msgid "Background Opacity"
398
+ msgstr ""
399
+
400
+ #: demo/select.php:9
401
+ msgid "Select Field Demo"
402
+ msgstr ""
403
+
404
+ #: demo/select.php:35
405
+ msgid "Select Advanced"
406
+ msgstr ""
407
+
408
+ #: demo/slider.php:9
409
+ msgid "Slider Demo"
410
+ msgstr ""
411
+
412
+ #: demo/taxonomy-advanced.php:9
413
+ msgid "Taxonomy_Advanced Demo"
414
+ msgstr ""
415
+
416
+ #: demo/taxonomy.php:9
417
+ msgid "Taxonomy Demo"
418
+ msgstr ""
419
+
420
+ #: demo/text-list.php:10
421
+ msgid "Text List Demo"
422
+ msgstr ""
423
+
424
+ #: demo/text-list.php:14
425
+ msgid "Text List"
426
+ msgstr ""
427
+
428
+ #: demo/text.php:9
429
+ msgid "Text Demo"
430
+ msgstr ""
431
+
432
+ #: demo/text.php:24 demo/textarea.php:24
433
+ msgid "Enter something here"
434
+ msgstr ""
435
+
436
+ #: demo/text.php:35
437
+ msgid "What"
438
+ msgstr ""
439
+
440
+ #: demo/text.php:36
441
+ msgid "When"
442
+ msgstr ""
443
+
444
+ #: demo/text.php:37
445
+ msgid "Where"
446
+ msgstr ""
447
+
448
+ #: demo/text.php:38
449
+ msgid "Why"
450
+ msgstr ""
451
+
452
+ #: demo/text.php:39
453
+ msgid "Who"
454
+ msgstr ""
455
+
456
+ #: demo/textarea.php:9
457
+ msgid "Textarea Demo"
458
+ msgstr ""
459
+
460
+ #: demo/textarea.php:18
461
+ msgid "Default textarea value"
462
+ msgstr ""
463
+
464
+ #: demo/url.php:6
465
+ msgid "URL Demo"
466
+ msgstr ""
467
+
468
+ #: demo/url.php:10
469
+ msgid "URL(s)"
470
+ msgstr ""
471
+
472
+ #: demo/user.php:9
473
+ msgid "User Field Demo"
474
+ msgstr ""
475
+
476
+ #: demo/user.php:13
477
+ msgid "User"
478
+ msgstr ""
479
+
480
+ #: demo/user.php:24
481
+ msgid "Select an author"
482
+ msgstr ""
483
+
484
+ #: inc/common.php:53
485
+ msgid "Documentation"
486
+ msgstr ""
487
+
488
+ #: inc/common.php:54
489
+ msgid "Extensions"
490
+ msgstr ""
491
+
492
+ #: inc/field.php:244
493
+ msgid "+"
494
+ msgstr ""
495
+
496
+ #: inc/field.php:257
497
+ msgid "&#8211;"
498
+ msgstr ""
499
+
500
+ #: inc/fields/autocomplete.php:18 inc/fields/autocomplete.php:83
501
+ #: inc/fields/autocomplete.php:100 inc/fields/file-advanced.php:103
502
+ #: inc/fields/file.php:168 inc/fields/image-advanced.php:108
503
+ #: inc/fields/image.php:136
504
+ msgid "Delete"
505
+ msgstr ""
506
+
507
+ #: inc/fields/button.php:35
508
+ msgid "Click me"
509
+ msgstr ""
510
+
511
+ #: inc/fields/checkbox.php:75
512
+ msgid "Yes"
513
+ msgstr ""
514
+
515
+ #: inc/fields/checkbox.php:75
516
+ msgid "No"
517
+ msgstr ""
518
+
519
+ #: inc/fields/file-advanced.php:23 inc/fields/plupload-image.php:107
520
+ msgid "Select Files"
521
+ msgstr "Выберите файлы с компьютера"
522
+
523
+ #: inc/fields/file-advanced.php:66
524
+ msgid "Select or Upload Files"
525
+ msgstr ""
526
+
527
+ #: inc/fields/file-advanced.php:104 inc/fields/file.php:169
528
+ #: inc/fields/image-advanced.php:109 inc/fields/image.php:137
529
+ msgid "Edit"
530
+ msgstr ""
531
+
532
+ #: inc/fields/file-input.php:17
533
+ msgid "Select File"
534
+ msgstr ""
535
+
536
+ #: inc/fields/file-input.php:42
537
+ msgid "Remove"
538
+ msgstr ""
539
+
540
+ #: inc/fields/file.php:19
541
+ #, php-format
542
+ msgid "You may only upload maximum %d file"
543
+ msgstr ""
544
+
545
+ #: inc/fields/file.php:20
546
+ #, php-format
547
+ msgid "You may only upload maximum %d files"
548
+ msgstr ""
549
+
550
+ #: inc/fields/file.php:98
551
+ msgid "Error: Cannot delete file"
552
+ msgstr ""
553
+
554
+ #: inc/fields/file.php:111
555
+ msgid "Upload Files"
556
+ msgstr ""
557
+
558
+ #: inc/fields/file.php:112
559
+ msgid "+ Add new file"
560
+ msgstr ""
561
+
562
+ #: inc/fields/image-advanced.php:23
563
+ msgid "Select Images"
564
+ msgstr ""
565
+
566
+ #: inc/fields/image-advanced.php:71
567
+ msgid "Select or Upload Images"
568
+ msgstr ""
569
+
570
+ #: inc/fields/image.php:70 inc/fields/thickbox-image.php:34
571
+ msgid "Upload Images"
572
+ msgstr ""
573
+
574
+ #: inc/fields/image.php:71
575
+ msgid "+ Add new image"
576
+ msgstr ""
577
+
578
+ #: inc/fields/map.php:46
579
+ msgid "Find Address"
580
+ msgstr "Найти адрес на карте"
581
+
582
+ #: inc/fields/oembed.php:55
583
+ msgid "Embed HTML not available."
584
+ msgstr ""
585
+
586
+ #: inc/fields/oembed.php:77
587
+ msgid "Preview"
588
+ msgstr ""
589
+
590
+ #: inc/fields/plupload-image.php:105
591
+ msgid "Drop images here"
592
+ msgstr "Перетащите файлы сюда"
593
+
594
+ #: inc/fields/plupload-image.php:106
595
+ msgid "or"
596
+ msgstr "или"
597
+
598
+ #: inc/fields/plupload-image.php:182
599
+ msgid "Allowed Image Files"
600
+ msgstr ""
601
+
602
+ #: inc/fields/post.php:67
603
+ msgid "Select a post"
604
+ msgstr ""
605
+
606
+ #: inc/fields/post.php:71 inc/fields/taxonomy.php:40
607
+ #, php-format
608
+ msgid "Select a %s"
609
+ msgstr "Выберите %s"
610
+
611
+ #: inc/fields/select.php:207
612
+ msgid "All"
613
+ msgstr "Все"
614
+
615
+ #: inc/fields/select.php:207
616
+ msgid "None"
617
+ msgstr "Ничего"
618
+
619
+ #: inc/fields/user.php:49
620
+ msgid "Select an user"
621
+ msgstr ""
622
+
623
+ #: inc/meta-box.php:253
624
+ msgid "Please correct the errors highlighted below and try again."
625
+ msgstr ""
626
+
627
+ #~ msgctxt "image upload"
628
+ #~ msgid "Drop images here"
629
+ #~ msgstr "Перетащите файлы сюда"
630
+
631
+ #~ msgctxt "image upload"
632
+ #~ msgid "or"
633
+ #~ msgstr "или"
634
+
635
+ #~ msgctxt "image upload"
636
+ #~ msgid "Select Files"
637
+ #~ msgstr "Загрузите с компьютера"
inc/libraries/meta-box/languages/meta-box-tr_TR.mo ADDED
Binary file
inc/libraries/meta-box/languages/meta-box-tr_TR.po ADDED
@@ -0,0 +1,180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # <!=Copyright (C) 2014 Rilwis
2
+ # This file is distributed under the GPL2+.=!>
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Meta Box 4.8.7\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/meta-box\n"
7
+ "POT-Creation-Date: 2016-11-18 16:09+0300\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2016-11-18 16:13+0300\n"
12
+ "Language-Team: Meta Box <admin@metabox.io>\n"
13
+ "X-Generator: Poedit 1.8.11\n"
14
+ "X-Poedit-KeywordsList: __;_x;_e;_ex;_n;_nx;esc_attr__;esc_attr_e;esc_attr_x;esc_html__;esc_html_e;esc_html_x;_n_noop;_nx_noop\n"
15
+ "X-Poedit-Basepath: ..\n"
16
+ "Last-Translator: \n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+ "Language: tr\n"
19
+ "X-Poedit-SearchPath-0: .\n"
20
+ "X-Poedit-SearchPathExcluded-0: js\n"
21
+ "X-Poedit-SearchPathExcluded-1: demo\n"
22
+ "X-Poedit-SearchPathExcluded-2: tests\n"
23
+ "X-Poedit-SearchPathExcluded-3: css\n"
24
+ "X-Poedit-SearchPathExcluded-4: lang\n"
25
+
26
+ #: inc/core.php:40
27
+ msgid "Documentation"
28
+ msgstr "Dökümantasyon"
29
+
30
+ #: inc/core.php:41
31
+ msgid "Extensions"
32
+ msgstr "Uzantılar"
33
+
34
+ #: inc/field.php:192
35
+ msgid "+ Add more"
36
+ msgstr "+Ekle"
37
+
38
+ #: inc/fields/autocomplete.php:23 inc/fields/autocomplete.php:87
39
+ #: inc/fields/autocomplete.php:104 inc/fields/file.php:162
40
+ msgid "Delete"
41
+ msgstr "Sil"
42
+
43
+ #: inc/fields/button.php:29
44
+ msgid "Click me"
45
+ msgstr "Bena tıkla"
46
+
47
+ #: inc/fields/checkbox.php:82
48
+ msgid "Yes"
49
+ msgstr "Evet"
50
+
51
+ #: inc/fields/checkbox.php:82
52
+ msgid "No"
53
+ msgstr "Hayır"
54
+
55
+ #: inc/fields/file-input.php:25
56
+ msgid "Select File"
57
+ msgstr "Dosya Seç"
58
+
59
+ #: inc/fields/file-input.php:49 inc/fields/select.php:91
60
+ msgid "Select"
61
+ msgstr "Seçim Yapınız"
62
+
63
+ #: inc/fields/file-input.php:51 inc/fields/media.php:28
64
+ msgid "Remove"
65
+ msgstr "Kaldır"
66
+
67
+ #: inc/fields/file.php:24
68
+ #, php-format
69
+ msgid "You may only upload maximum %d file"
70
+ msgstr "En fazla %d dosya yükleyebilirsiniz"
71
+
72
+ #: inc/fields/file.php:25
73
+ #, php-format
74
+ msgid "You may only upload maximum %d files"
75
+ msgstr "En fazla %d dosyası yükleyebilirsiniz"
76
+
77
+ #: inc/fields/file.php:85
78
+ msgid "Error: Cannot delete file"
79
+ msgstr "Hata: Dosya silinemiyor"
80
+
81
+ #: inc/fields/file.php:98
82
+ msgid "Upload Files"
83
+ msgstr "Dosyaları Yükle"
84
+
85
+ #: inc/fields/file.php:99
86
+ msgid "+ Add new file"
87
+ msgstr "+ Yeni dosya ekle"
88
+
89
+ #: inc/fields/file.php:163 inc/fields/media.php:29
90
+ msgid "Edit"
91
+ msgstr "Düzenle"
92
+
93
+ #: inc/fields/key-value.php:20
94
+ msgid "Key"
95
+ msgstr "Anahtar"
96
+
97
+ #: inc/fields/key-value.php:26
98
+ msgid "Value"
99
+ msgstr "Değer"
100
+
101
+ #: inc/fields/map.php:49
102
+ msgid "Find Address"
103
+ msgstr "Adres Bul"
104
+
105
+ #: inc/fields/media.php:25
106
+ msgid "+ Add Media"
107
+ msgstr "+ Media Ekle"
108
+
109
+ #: inc/fields/media.php:26
110
+ msgid " file"
111
+ msgstr "dosya"
112
+
113
+ #: inc/fields/media.php:27
114
+ msgid " files"
115
+ msgstr "dosyalar"
116
+
117
+ #: inc/fields/media.php:30
118
+ msgid "View"
119
+ msgstr "Görüntüle"
120
+
121
+ #: inc/fields/media.php:31
122
+ msgid "No Title"
123
+ msgstr "Başlık Yok"
124
+
125
+ #: inc/fields/media.php:34
126
+ msgid "Select Files"
127
+ msgstr "Dosyaları Seç"
128
+
129
+ #: inc/fields/media.php:35
130
+ msgid "or"
131
+ msgstr "veya"
132
+
133
+ #: inc/fields/media.php:36
134
+ msgid "Drop files here to upload"
135
+ msgstr "Yüklemek istediğiniz dosyaları buraya sürükleyiniz"
136
+
137
+ #: inc/fields/oembed.php:65
138
+ msgid "Embed HTML not available."
139
+ msgstr "HTML gömme mevcut değil."
140
+
141
+ #: inc/fields/oembed.php:81
142
+ msgid "Preview"
143
+ msgstr "Önizle"
144
+
145
+ #: inc/fields/post.php:34
146
+ msgid "Select a post"
147
+ msgstr "Yazı seçin"
148
+
149
+ #: inc/fields/post.php:38 inc/fields/taxonomy.php:51
150
+ #, php-format
151
+ msgid "Select a %s"
152
+ msgstr "Seç %s"
153
+
154
+ #: inc/fields/select-advanced.php:44
155
+ msgid "Select an item"
156
+ msgstr "Bir öğe seçin"
157
+
158
+ #: inc/fields/select.php:91
159
+ msgid "All"
160
+ msgstr "Tümü"
161
+
162
+ #: inc/fields/select.php:91
163
+ msgid "None"
164
+ msgstr "Hiçbiri"
165
+
166
+ #: inc/fields/taxonomy.php:47
167
+ msgid "Select a term"
168
+ msgstr "Bir terim seçin"
169
+
170
+ #: inc/fields/thickbox-image.php:53
171
+ msgid "Upload Images"
172
+ msgstr "Resimler Yükle"
173
+
174
+ #: inc/fields/user.php:34
175
+ msgid "Select an user"
176
+ msgstr "Bir Kullanıcı Seçin"
177
+
178
+ #: inc/validation.php:49
179
+ msgid "Please correct the errors highlighted below and try again."
180
+ msgstr "Lütfen vurgulanan hataları düzeltip tekrar deneyin."
inc/libraries/meta-box/languages/meta-box-zh_CN.mo ADDED
Binary file
inc/libraries/meta-box/languages/meta-box-zh_CN.po ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Meta Box v4.8.7\n"
4
+ "POT-Creation-Date: 2016-06-03 16:24+0800\n"
5
+ "PO-Revision-Date: \n"
6
+ "Last-Translator: OOME <1049879335@qq.com>\n"
7
+ "Language-Team: 偶米工作室 <1049879335@qq.com>\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "X-Generator: Poedit 1.5.7\n"
12
+ "X-Poedit-KeywordsList: __;_e;_x:2c,1;_nx:1,2;_n_noop:1,2\n"
13
+ "X-Poedit-Basepath: C:\\xampp\\htdocs\\000\\wp-content\\plugins\\meta-box"
14
+ "\\lang\n"
15
+ "X-Poedit-SearchPath-0: ..\n"
16
+
17
+ #: ../inc/core.php:40
18
+ msgid "Documentation"
19
+ msgstr "文档"
20
+
21
+ #: ../inc/core.php:41
22
+ msgid "Extensions"
23
+ msgstr "扩展"
24
+
25
+ #: ../inc/field.php:192
26
+ msgid "+ Add more"
27
+ msgstr "+ 新增"
28
+
29
+ #: ../inc/validation.php:49
30
+ msgid "Please correct the errors highlighted below and try again."
31
+ msgstr "请修正高亮位置的错误,并重新尝试。"
32
+
33
+ #: ../inc/fields/autocomplete.php:23 ../inc/fields/autocomplete.php:87
34
+ #: ../inc/fields/autocomplete.php:104
35
+ msgid "Delete"
36
+ msgstr "删除"
37
+
38
+ #: ../inc/fields/button.php:29
39
+ msgid "Click me"
40
+ msgstr "点我"
41
+
42
+ #: ../inc/fields/checkbox.php:82
43
+ msgid "Yes"
44
+ msgstr "是"
45
+
46
+ #: ../inc/fields/checkbox.php:82
47
+ msgid "No"
48
+ msgstr "否"
49
+
50
+ #: ../inc/fields/file-input.php:25
51
+ msgid "Select File"
52
+ msgstr "选择文件"
53
+
54
+ #: ../inc/fields/file-input.php:49 ../inc/fields/select.php:91
55
+ msgid "Select"
56
+ msgstr "选择"
57
+
58
+ #: ../inc/fields/file-input.php:51
59
+ msgid "Remove"
60
+ msgstr "移除"
61
+
62
+ #: ../inc/fields/file.php:24
63
+ #, php-format
64
+ msgid "You may only upload maximum %d file"
65
+ msgstr "您允许上传的文件上限为 %d 个。"
66
+
67
+ #: ../inc/fields/file.php:25
68
+ #, php-format
69
+ msgid "You may only upload maximum %d files"
70
+ msgstr "您允许上传的文件上限为 %d 个。"
71
+
72
+ #: ../inc/fields/file.php:85
73
+ msgid "Error: Cannot delete file"
74
+ msgstr "错误:无法删除文件。"
75
+
76
+ #: ../inc/fields/file.php:98
77
+ msgctxt "file upload"
78
+ msgid "Upload Files"
79
+ msgstr "上传文件"
80
+
81
+ #: ../inc/fields/file.php:99
82
+ msgctxt "file upload"
83
+ msgid "+ Add new file"
84
+ msgstr "+ 新增文件"
85
+
86
+ #: ../inc/fields/file.php:162
87
+ msgctxt "file upload"
88
+ msgid "Delete"
89
+ msgstr "删除"
90
+
91
+ #: ../inc/fields/file.php:163
92
+ msgctxt "file upload"
93
+ msgid "Edit"
94
+ msgstr "编辑"
95
+
96
+ #: ../inc/fields/map.php:49
97
+ msgid "Find Address"
98
+ msgstr "查找地址"
99
+
100
+ #: ../inc/fields/media.php:25
101
+ msgctxt "media"
102
+ msgid "+ Add Media"
103
+ msgstr "从媒体库选择"
104
+
105
+ #: ../inc/fields/media.php:26
106
+ msgctxt "media"
107
+ msgid " file"
108
+ msgstr "文件"
109
+
110
+ #: ../inc/fields/media.php:27
111
+ msgctxt "media"
112
+ msgid " files"
113
+ msgstr "文件"
114
+
115
+ #: ../inc/fields/media.php:28
116
+ msgctxt "media"
117
+ msgid "Remove"
118
+ msgstr "移除"
119
+
120
+ #: ../inc/fields/media.php:29
121
+ msgctxt "media"
122
+ msgid "Edit"
123
+ msgstr "编辑"
124
+
125
+ #: ../inc/fields/media.php:30
126
+ msgctxt "media"
127
+ msgid "View"
128
+ msgstr "查看"
129
+
130
+ #: ../inc/fields/media.php:31
131
+ msgctxt "media"
132
+ msgid "No Title"
133
+ msgstr "无标题"
134
+
135
+ #: ../inc/fields/media.php:34
136
+ msgctxt "media"
137
+ msgid "Select Files"
138
+ msgstr "选择图像"
139
+
140
+ #: ../inc/fields/media.php:35
141
+ msgctxt "media"
142
+ msgid "or"
143
+ msgstr " 或"
144
+
145
+ #: ../inc/fields/media.php:36
146
+ msgctxt "media"
147
+ msgid "Drop files here to upload"
148
+ msgstr "请把文件拖动到该区域上传"
149
+
150
+ #: ../inc/fields/oembed.php:65
151
+ msgid "Embed HTML not available."
152
+ msgstr ""
153
+ "oEmbed 代码无效,请检查。 如需了解更多 oEmbed 信息和支持的网站,请访问 <a "
154
+ "href=\"http://codex.wordpress.org/Embeds\" target=\"_blank\">WordPress 官网</"
155
+ "a>。"
156
+
157
+ #: ../inc/fields/post.php:34
158
+ msgid "Select a post"
159
+ msgstr "选择文章"
160
+
161
+ #: ../inc/fields/post.php:38 ../inc/fields/taxonomy.php:51
162
+ #, php-format
163
+ msgid "Select a %s"
164
+ msgstr "选择%s"
165
+
166
+ #: ../inc/fields/select-advanced.php:44
167
+ msgid "Select an item"
168
+ msgstr "选择项目"
169
+
170
+ #: ../inc/fields/select.php:91
171
+ msgid "All"
172
+ msgstr "全部"
173
+
174
+ #: ../inc/fields/select.php:91
175
+ msgid "None"
176
+ msgstr "无"
177
+
178
+ #: ../inc/fields/taxonomy.php:47
179
+ msgid "Select a term"
180
+ msgstr "选择分类"
181
+
182
+ #: ../inc/fields/thickbox-image.php:53
183
+ msgctxt "image upload"
184
+ msgid "Upload Images"
185
+ msgstr "上传图像"
186
+
187
+ #: ../inc/fields/user.php:34
188
+ msgid "Select an user"
189
+ msgstr "选择用户"
inc/libraries/meta-box/languages/readme.md ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # How To Translate Meta Box
2
+
3
+ ## Who translates Meta Box? How can I get involved?
4
+
5
+ Anyone can help by suggesting new translations [here](https://translate.wordpress.org/projects/wp-plugins/meta-box). No need to use a translation editor, you can do it all from the web interface.
6
+
7
+ Once you've suggested a new translation, a language validator will review it. They will then approve, reject, or change your suggestions. Once your changes get approved, they are automatically included in the next Meta Box release.
8
+
9
+ ## Who decides which languages are available? I want my language added
10
+
11
+ If you can't find your language, [send us an email](https://metabox.io) and we'll add it for you.
12
+
13
+ ## I want to change translations locally. Where can I download the .PO file for my language?
14
+
15
+ You'll find options to create a .PO file and export translations at the bottom of each language page.
inc/libraries/meta-box/meta-box.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Meta Box
4
  * Plugin URI: https://metabox.io
5
  * Description: Create custom meta boxes and custom fields in WordPress.
6
- * Version: 4.14.2
7
  * Author: MetaBox.io
8
  * Author URI: https://metabox.io
9
  * License: GPL2+
@@ -29,8 +29,7 @@ if ( defined( 'ABSPATH' ) && ! defined( 'RWMB_VER' ) ) {
29
  }
30
 
31
  require_once dirname( __FILE__ ) . '/inc/loader.php';
32
-
33
- $loader = new RWMB_Loader;
34
  $loader->init();
35
  }
36
  // Field classes
3
  * Plugin Name: Meta Box
4
  * Plugin URI: https://metabox.io
5
  * Description: Create custom meta boxes and custom fields in WordPress.
6
+ * Version: 4.15.7
7
  * Author: MetaBox.io
8
  * Author URI: https://metabox.io
9
  * License: GPL2+
29
  }
30
 
31
  require_once dirname( __FILE__ ) . '/inc/loader.php';
32
+ $loader = new RWMB_Loader();
 
33
  $loader->init();
34
  }
35
  // Field classes
inc/libraries/meta-box/readme.txt CHANGED
@@ -1,108 +1,140 @@
1
- === Meta Box ===
2
  Contributors: metabox, rilwis, fitwp, f-j-kaiser, funkatronic, PerWiklander, ruanmer, Omnicia
3
  Donate link: https://metabox.io/pricing/
4
  Tags: meta-box, custom fields, custom field, meta, meta-boxes, admin, advanced, custom, edit, field, file, image, magic fields, matrix, more fields, Post, repeater, simple fields, text, textarea, type, cms, fields post
5
  Requires at least: 4.3
6
- Tested up to: 4.9.4
7
- Stable tag: 4.14.2
8
  License: GPLv2 or later
9
 
10
  Meta Box plugin is a powerful, professional developer toolkit to create custom meta boxes and custom fields for WordPress.
11
 
12
  == Description ==
13
 
14
- **Meta Box plugin is a powerful, professional toolkit for developers to create and handle everything related to custom meta boxes and custom fields for WordPress.**
15
 
16
- The plugin provides a **wide range of field types** and **a lot of options to for each field type**, which gives you unlimited possibility to control and customize the custom fields.
17
 
18
- With the extensions, you can easily build meta boxes not only for custom post types (default), but also for **settings page, user meta, term meta**. You can also display the fields the way you want with columns, tabs or groups.
19
 
20
- The plugin requires a little coding, but if you're not familiar with coding or prefer GUI for faster creating custom post types, meta boxes and custom fields, you can use our [Online Generator](https://metabox.io/online-generator/) or use the extensions [MB Custom Post Type](https://wordpress.org/plugins/mb-custom-post-type/) or [Meta Box Builder](https://metabox.io/plugins/meta-box-builder/).
 
 
 
 
 
 
21
 
22
  ### Features
23
 
24
- #### Create any type of meta data
25
 
26
- * Create custom meta boxes for posts, pages or any custom post type.
27
- * Create custom [settings pages or theme option page](https://metabox.io/plugins/mb-settings-page/).
28
- * Create custom meta boxes for [user profile pages](https://metabox.io/plugins/mb-user-meta/).
29
- * Create custom meta boxes for [taxonomy terms](https://metabox.io/plugins/mb-term-meta/).
30
 
31
- #### Wide-range of field types and options
32
 
33
- * Supports 40+ built-in [field types](https://docs.metabox.io/field-settings/) for all your needs (text, textarea, wysiwyg/editor, image, file, post, select, checkbox, radio buttons, date time picker, taxonomy, user, oembed and more to come!). You can also [create your own field type](https://docs.metabox.io/custom-field-type/) easily.
34
- * Support cloning (repeatable) fields for most field types, including WYSIWYG/editor field. Also support [repeatable field groups](https://metabox.io/plugins/meta-box-group/).
35
- * Powerful [actions](https://docs.metabox.io/actions/) and [filters](https://docs.metabox.io/filters/) that developers can build or change the appearance and behavior in the plugin.
 
 
 
 
 
 
36
 
37
- #### Create meta boxes and custom fields with UI
38
 
39
- The plugin is built mostly for developers with a little coding, but if you prefer GUI for faster creating custom post types, meta boxes and custom fields, the plugin has extensions for that:
40
 
41
- - [Online Generator](https://metabox.io/online-generator/)
42
- - [MB Custom Post Type](https://wordpress.org/plugins/mb-custom-post-type/)
43
- - [Meta Box Builder](https://metabox.io/plugins/meta-box-builder/)
 
44
 
45
- <blockquote>To make it easy for all users to create custom meta boxes and custom fields, we have created an <a href="https://metabox.io/online-generator/">Online Generator</a> tool. It has an user-friendly interface with drag and drop features. No custom code anymore!</blockquote>
46
 
47
- #### Developer-friendly
48
 
49
- * Uses the [native WordPress meta data storage](https://docs.metabox.io/database/) and functions for ease of use and fast processing.
50
- * [Easily integrate with themes and plugins](https://docs.metabox.io/integration/).
51
- * [Works with Composer](https://docs.metabox.io/composer/) if you want to include the plugin in your project.
52
- * Compatible with WPML multilingual plugin (officially supported by WPML team).
53
 
54
- #### Detailed Documentation
 
 
 
 
55
 
56
- We provide regular updated and extensive documentation. Not only technical things, but also tutorials on how to use the plugin better.
57
 
58
- - [Quick Start Guide](https://docs.metabox.io/quick-start/)
59
- - [Creating Meta Boxes](https://docs.metabox.io/creating-meta-boxes/)
60
- - [Field Settings](https://docs.metabox.io/field-settings/)
61
- - [Displaying Fields](https://docs.metabox.io/displaying-fields/)
 
 
 
62
 
63
- See more documentation [here](https://docs.metabox.io).
 
 
 
 
 
64
 
65
  ### Extensions
66
 
 
 
 
 
67
  #### Free Extensions
68
 
69
- - [MB Custom Post Type](https://wordpress.org/plugins/mb-custom-post-type/): Create and manage custom post types and taxonomies easily in WordPress with an easy-to-use interface.
70
- - [MB Relationships](https://wordpress.org/plugins/mb-relationships/): Create many-to-many relationships from posts to posts.
71
- - [Meta Box Yoast SEO](https://wordpress.org/plugins/meta-box-yoast-seo/): Add content of custom fields to Yoast SEO Content Analysis to have better/correct SEO score.
72
- - [MB Rest API](https://metabox.io/plugins/mb-rest-api/): Pull all meta value from posts, terms into the WP REST API responses.
73
- - [MB Comment Meta](https://wordpress.org/plugins/mb-comment-meta/): Add custom fields to comments in WordPress. Support all field types and options.
74
- - [MB Custom Taxonomy](https://metabox.io/plugins/custom-taxonomy/): Create and manage custom taxonomies with an easy-to-use interface in WordPress.
75
  - [Meta Box Text Limiter](https://wordpress.org/plugins/meta-box-text-limiter/): Limit the number of characters or words entered for text and textarea fields.
76
- - [Meta Box – FacetWP Integrator](https://metabox.io/plugins/meta-box-facetwp-integrator/): Integrates Meta Box and FacetWP, makes custom fields searchable and filterable in the frontend.
 
77
 
78
  #### Premium Extensions
79
 
80
- - [Meta Box Builder](https://metabox.io/plugins/meta-box-builder/): Create custom meta boxes and custom fields in WordPress using the drag-and-drop interface.
81
- - [Meta Box Group](https://metabox.io/plugins/meta-box-group/): Create repeatable groups of custom fields for better appearance and structure.
82
  - [MB Settings Page](https://metabox.io/plugins/mb-settings-page/): Create settings pages for themes, plugins or websites with beautiful syntax.
83
  - [MB Term Meta](https://metabox.io/plugins/mb-term-meta/): Add meta data to categories, tags or any custom taxonomy with simple syntax.
84
  - [Meta Box Conditional Logic](https://metabox.io/plugins/meta-box-conditional-logic/): Add visibility dependency for custom meta boxes and custom fields in WordPress.
85
- - [Meta Box Include Exclude](https://metabox.io/plugins/meta-box-include-exclude/): Show/hide meta boxes by ID, page template, taxonomy or custom function.
86
- - [MB Frontend Submission](https://metabox.io/plugins/mb-frontend-submission/): Create frontend forms for users to submit custom content. Embed everywhere with shortcode.
87
- - [Meta Box Columns](https://metabox.io/plugins/meta-box-columns/): Display fields more beautiful by putting them into 12-columns grid.
88
- - [Meta Box Tabs](https://metabox.io/plugins/meta-box-tabs/): Create tabs for meta boxes easily. Support 3 WordPress-native tab styles and tab icon.
89
- - [MB Admin Columns](https://metabox.io/plugins/mb-admin-columns/): Display custom fields in table columns in admin screens for All Posts (types).
90
- - [MB Custom Table](https://metabox.io/plugins/mb-custom-table/): Save custom fields data to custom table instead of the default meta tables. Reduce database size and increase performance.
91
- - [MB Revision](https://metabox.io/plugins/mb-revision/): Track changes of custom fields with WordPress revision. Save, compare, restore the changes easily.
92
- - [MB User Meta](https://metabox.io/plugins/mb-user-meta/): Add custom fields to user profile (user meta) quickly with simple syntax.
93
- - [Meta Box Geolocation](https://metabox.io/plugins/meta-box-geolocation/): Automatically and instantly populate location data with the power of Google Maps Geolocation API.
94
- - [Meta Box Template](https://metabox.io/plugins/meta-box-template/): Define custom meta boxes and custom fields easier with templates.
95
- - [Meta Box Tooltip](https://metabox.io/plugins/meta-box-tooltip/): Display help information for fields using beautiful tooltips.
96
- - [Meta Box Show Hide](https://metabox.io/plugins/meta-box-show-hide-javascript/): Toggle meta boxes by page template, post format, taxonomy (including category) via Javascript.
97
-
98
- See all extensions [here](https://metabox.io/plugins/).
99
-
100
- ### Plugin Links
101
-
102
- - [Project Page](https://metabox.io)
103
- - [Documentation](https://docs.metabox.io)
104
- - [Report Bugs/Issues](https://github.com/wpmetabox/meta-box/issues)
105
- - [Premium Extensions](https://metabox.io/plugins/)
 
 
 
 
 
 
 
 
106
 
107
  == Installation ==
108
 
@@ -119,7 +151,7 @@ Manually
119
  1. Upload `meta-box` to the `/wp-content/plugins/` directory
120
  1. Activate the plugin through the 'Plugins' menu in WordPress
121
 
122
- To getting started with the plugin, please read [this tutorial](https://docs.metabox.io/quick-start/).
123
 
124
  == Frequently Asked Questions ==
125
 
1
+ === Meta Box - WordPress Custom Fields Framework ===
2
  Contributors: metabox, rilwis, fitwp, f-j-kaiser, funkatronic, PerWiklander, ruanmer, Omnicia
3
  Donate link: https://metabox.io/pricing/
4
  Tags: meta-box, custom fields, custom field, meta, meta-boxes, admin, advanced, custom, edit, field, file, image, magic fields, matrix, more fields, Post, repeater, simple fields, text, textarea, type, cms, fields post
5
  Requires at least: 4.3
6
+ Tested up to: 4.9.8
7
+ Stable tag: 4.15.7
8
  License: GPLv2 or later
9
 
10
  Meta Box plugin is a powerful, professional developer toolkit to create custom meta boxes and custom fields for WordPress.
11
 
12
  == Description ==
13
 
14
+ **Meta Box is a powerful, professional, and lightweight toolkit for developers to create unlimited custom meta boxes and WordPress custom fields.**
15
 
16
+ Meta Box helps you add [custom fields](https://metabox.io) and details on your website such as pages, posts, forms and anywhere you want using over 40 different field types such as text, images, file upload, checkboxes, and more.
17
 
18
+ On top of that, each WordPress custom field type has extensive internal options for unlimited content possibilities. Complete customization and control is just a few clicks away.
19
 
20
+ Adding WordPress custom fields and custom meta boxes is quick and painless: Select the field types you want in the user-friendly [Online Generator](https://metabox.io/online-generator/), then copy and paste the code into your child theme's `functions.php` file.
21
+
22
+ **Boom! All the power with none of the bloat.**
23
+
24
+ There are also free and premium extensions available to add enhanced capabilities. You can manage the display and organization of your WordPress custom fields, the conditions upon which they appear, and become the ultimate WordPress data wizard.
25
+
26
+ You can also check out the [full list of extensions](https://metabox.io/plugins/) and [MetaBox.io](https://metabox.io) for details.
27
 
28
  ### Features
29
 
30
+ #### Create any type of metadata or custom fields in WordPress
31
 
32
+ That's right – any type. No matter where you need to insert custom data and features, Meta Box's WordPress custom fields have your back, and with infinite options to boot.
 
 
 
33
 
34
+ **Here are just a few of the data types you can customize:**
35
 
36
+ - Posts
37
+ - Pages
38
+ - Custom post types
39
+ - [Taxonomies](https://metabox.io/plugins/mb-term-meta/)
40
+ - [Settings pages](https://metabox.io/plugins/mb-settings-page/)
41
+ - [Theme option pages](https://metabox.io/plugins/mb-settings-page/)
42
+ - [User profile pages](https://metabox.io/plugins/mb-user-profile/)
43
+ - [Post comments](https://metabox.io/plugins/mb-comment-meta/)
44
+ - [And even more data types](https://docs.metabox.io/field-settings/) than Batman has tools on his utility belt.
45
 
46
+ #### A wide-range of field types and options
47
 
48
+ Take your standard WordPress custom field and imagine it infinitely expanded. That's how many options Meta Box gives you:
49
 
50
+ - Meta Box supports [40+ built-in WordPress custom field types](https://docs.metabox.io/field-settings/) for all your needs including text, textarea, WYSIWYG editor, image, file, post, select, checkbox, radio buttons, date/time picker, taxonomy, user, oembed and more to come.
51
+ - Not enough? You can also [effortlessly create your own field type](https://docs.metabox.io/custom-field-type/).
52
+ - Meta Box supports cloning fields for most field types including the WYSIWYG editor field. It also supports [repeatable field groups](https://metabox.io/plugins/meta-box-group/).
53
+ - Utilize WordPress' powerful [action](https://docs.metabox.io/actions/) and [filter](https://docs.metabox.io/filters/) system so you can build or change a site's appearance and behavior in the plugin.
54
 
55
+ #### It's developer-friendly
56
 
57
+ As a developer, you have enough on your plate. You shouldn't have to create an entirely new system for each project. Use Meta Box to your full advantage.
58
 
59
+ You can use Meta Box and its custom fields in WordPress on as many websites as you want so you can use it on client projects as well.
 
 
 
60
 
61
+ - Has an ultra-lightweight, yet powerful API that won't overload your site.
62
+ - Add only what you need instead of getting stuck with a bundle of features you don't even want that bloat your site.
63
+ - Meta Box [easily integrates with any theme and plugin](https://docs.metabox.io/integration/), and also [works with the Composer package dependency manager](https://docs.metabox.io/composer/).
64
+ - We use the [native WordPress meta data storage](https://docs.metabox.io/database/) and functions for ease of use and lightning-fast processing.
65
+ - It's compatible with WPML multilingual plugin, and is officially supported by the WPML team.
66
 
67
+ #### Don't love coding? You're in luck!
68
 
69
+ Meta Box is built mostly for developers since you need to copy and paste some code, but if you prefer a more visual system to create custom fields in WordPress, you can choose one or all of the extensions below:
70
+
71
+ - [MB Custom Post Type](https://wordpress.org/plugins/mb-custom-post-type/)
72
+ - [Meta Box – Beaver Themer Integrator](https://metabox.io/plugins/meta-box-beaver-themer-integrator/)
73
+ - [Meta Box Builder](https://metabox.io/plugins/meta-box-builder/)
74
+
75
+ The [Meta Box Builder extension](https://metabox.io/plugins/meta-box-builder/) has a ton of features to make quick work of any project:
76
 
77
+ - All the power of Meta Box without touching a single line of code.
78
+ - It's designer-friendly, lightweight and works at top-notch speeds.
79
+ - Create an unlimited amount of WordPress custom fields at lightning speeds and with a user-friendly drag-and-drop interface.
80
+ - Over 40 custom field types available that you can drag and drop to where you need ‘em.
81
+ - Export your custom fields and settings to PHP. Then, add it to a new site without needing to install this extension for an incredibly lightweight option.
82
+ - It has the goods with conditional logic, priority and context options ready and waiting.
83
 
84
  ### Extensions
85
 
86
+ Speaking of extensions, there are a ton of free and premium ones available to further extend the already powerful core Meta Box plugin so you can supercharge your custom fields in WordPress.
87
+
88
+ You'll have ultimate control to add whatever meta box and custom fields in WordPress you could ever want. Then, you can tailor it all to fit your exact specifications.
89
+
90
  #### Free Extensions
91
 
92
+ - [MB Custom Post Type](https://wordpress.org/plugins/mb-custom-post-type/): Create and manage custom post types and taxonomies quickly with an easy-to-use interface.
93
+ - [MB Relationships](https://wordpress.org/plugins/mb-relationships/): Create as many connections as you want from post-to-post or page-to-page.
94
+ - [Meta Box Yoast SEO](https://wordpress.org/plugins/meta-box-yoast-seo/): Add WordPress custom fields to Yoast SEO Content Analysis to generate more accurate SEO scores.
95
+ - [MB Rest API](https://metabox.io/plugins/mb-rest-api/): Pull all meta values from posts and terms into the WP REST API responses.
96
+ - [MB Comment Meta](https://wordpress.org/plugins/mb-comment-meta/): Add WordPress custom fields to comments in WordPress. It supports all field types and options.
97
+ - [MB Custom Taxonomy](https://metabox.io/plugins/custom-taxonomy/): Create and manage custom taxonomies in WordPress with a user-friendly interface.
98
  - [Meta Box Text Limiter](https://wordpress.org/plugins/meta-box-text-limiter/): Limit the number of characters or words entered for text and textarea fields.
99
+ - [Meta Box – FacetWP Integrator](https://metabox.io/plugins/meta-box-facetwp-integrator/): Integrates Meta Box, and FacetWP to make WordPress custom fields searchable and filterable in the frontend.
100
+ - [Meta Box – Beaver Themer Integrator](https://metabox.io/plugins/meta-box-beaver-themer-integrator/): Integrates Meta Box, and Beaver Themer to show WordPress custom fields easier in the frontend.
101
 
102
  #### Premium Extensions
103
 
104
+ - [Meta Box Builder](https://metabox.io/plugins/meta-box-builder/): Create custom meta boxes and custom fields in WordPress using a user-friendly drag-and-drop interface.
105
+ - [Meta Box Group](https://metabox.io/plugins/meta-box-group/): Create repeatable groups of WordPress custom fields for better appearance and structure.
106
  - [MB Settings Page](https://metabox.io/plugins/mb-settings-page/): Create settings pages for themes, plugins or websites with beautiful syntax.
107
  - [MB Term Meta](https://metabox.io/plugins/mb-term-meta/): Add meta data to categories, tags or any custom taxonomy with simple syntax.
108
  - [Meta Box Conditional Logic](https://metabox.io/plugins/meta-box-conditional-logic/): Add visibility dependency for custom meta boxes and custom fields in WordPress.
109
+ - [Meta Box Include Exclude](https://metabox.io/plugins/meta-box-include-exclude/): Show or hide meta boxes by ID, page template, taxonomy, or custom function.
110
+ - [MB Frontend Submission](https://metabox.io/plugins/mb-frontend-submission/): Create frontend forms for users to submit custom content and embed them anywhere with a shortcode.
111
+ - [Meta Box Columns](https://metabox.io/plugins/meta-box-columns/): Display eye-catching custom fields in WordPress by putting them into 12-column grids.
112
+ - [Meta Box Tabs](https://metabox.io/plugins/meta-box-tabs/): Painlessly create tabs for meta boxes. There are 3 supported WordPress-native tab styles and icons.
113
+ - [MB Admin Columns](https://metabox.io/plugins/mb-admin-columns/): Display WordPress custom fields in table columns on admin screens for all post types.
114
+ - [MB Custom Table](https://metabox.io/plugins/mb-custom-table/): Save custom field data to custom tables instead of the default meta tables to reduce your database's size and increase its performance.
115
+ - [MB Revision](https://metabox.io/plugins/mb-revision/): Track changes to custom fields in WordPress with revisions. You can save, compare and restore the changes smoothly.
116
+ - [MB User Meta](https://metabox.io/plugins/mb-user-meta/): Quickly add WordPress custom fields to user profiles in the wp_usermeta table with simple syntax.
117
+ - [Meta Box Geolocation](https://metabox.io/plugins/meta-box-geolocation/): Automatically and instantly populate location data with the power of the Google Maps Geolocation API.
118
+ - [Meta Box Template](https://metabox.io/plugins/meta-box-template/): Make defining custom meta boxes and WordPress custom fields way easier with templates.
119
+ - [Meta Box Tooltip](https://metabox.io/plugins/meta-box-tooltip/): Display help information for custom fields in WordPress using beautiful tooltips.
120
+ - [Meta Box Show Hide](https://metabox.io/plugins/meta-box-show-hide-javascript/): Toggle meta boxes by page template, post format, taxonomy and category via JavaScript.
121
+
122
+ See all the available [extensions on the Meta Box website](https://metabox.io/plugins/).
123
+
124
+ ### Detailed Documentation
125
+
126
+ We won't leave you high and dry.
127
+
128
+ We provide regularly updated, and extensive documentation as well as tutorials on how to use MetaBox and custom fields in WordPress to your advantage as well as in the most efficient way possible.
129
+
130
+ Here are a few guides to quickly get you started with Meta Box and creating your own WordPress custom fields:
131
+
132
+ - [Quick Start Guide](https://docs.metabox.io/quick-start/)
133
+ - [Creating Meta Boxes](https://docs.metabox.io/creating-meta-boxes/)
134
+ - [Field Settings](https://docs.metabox.io/field-settings/)
135
+ - [Displaying Fields](https://docs.metabox.io/displaying-fields/)
136
+
137
+ Check out more on the [Meta Box Documentation](https://docs.metabox.io/) page.
138
 
139
  == Installation ==
140
 
151
  1. Upload `meta-box` to the `/wp-content/plugins/` directory
152
  1. Activate the plugin through the 'Plugins' menu in WordPress
153
 
154
+ To getting started with the plugin, please read the [Quick Start Guide](https://docs.metabox.io/quick-start/).
155
 
156
  == Frequently Asked Questions ==
157
 
inc/lp-constants.php CHANGED
@@ -4,7 +4,7 @@
4
  */
5
  $upload_dir = wp_upload_dir();
6
  // version
7
- define( 'LEARNPRESS_VERSION', '3.2.0' );
8
 
9
  define( 'LP_WP_CONTENT', basename( WP_CONTENT_DIR ) );
10
 
4
  */
5
  $upload_dir = wp_upload_dir();
6
  // version
7
+ define( 'LEARNPRESS_VERSION', '3.2.1' );
8
 
9
  define( 'LP_WP_CONTENT', basename( WP_CONTENT_DIR ) );
10
 
inc/lp-template-functions.php CHANGED
@@ -2126,6 +2126,7 @@ function learn_press_setup_object_data( $post ) {
2126
  unset( $GLOBALS['course'] );
2127
  }
2128
  $object = learn_press_get_course( $post );
 
2129
  LP()->global['course'] = $GLOBALS['course'] = $GLOBALS['lp_course'] = $object;
2130
  }
2131
 
2126
  unset( $GLOBALS['course'] );
2127
  }
2128
  $object = learn_press_get_course( $post );
2129
+ $object->prepare();
2130
  LP()->global['course'] = $GLOBALS['course'] = $GLOBALS['lp_course'] = $object;
2131
  }
2132
 
inc/order/class-lp-order.php CHANGED
@@ -1034,7 +1034,6 @@ if ( ! class_exists( 'LP_Order' ) ) {
1034
  public function get_user_data() {
1035
  $data = array();
1036
  if ( $user_ids = $this->get_data( 'user_id' ) ) {
1037
- $user_ids = array($user_ids);
1038
  if ( is_array( $user_ids ) ) {
1039
  foreach ( $user_ids as $user_id ) {
1040
  $user = learn_press_get_user( $user_id );
1034
  public function get_user_data() {
1035
  $data = array();
1036
  if ( $user_ids = $this->get_data( 'user_id' ) ) {
 
1037
  if ( is_array( $user_ids ) ) {
1038
  foreach ( $user_ids as $user_id ) {
1039
  $user = learn_press_get_user( $user_id );
inc/quiz/class-lp-quiz.php CHANGED
@@ -582,7 +582,12 @@ if ( ! class_exists( 'LP_Quiz' ) ) {
582
  if ( '' != get_option( 'permalink_structure' ) && get_post_status( $this->get_id() ) != 'draft' ) {
583
  if ( get_post_type( $question_id ) === LP_QUESTION_CPT ) {
584
  $question_name = get_post_field( 'post_name', $question_id );
585
- $permalink = $permalink . $question_name;
 
 
 
 
 
586
  }
587
  } else {
588
  $permalink = add_query_arg( array( 'question', $question_id ), $permalink );
582
  if ( '' != get_option( 'permalink_structure' ) && get_post_status( $this->get_id() ) != 'draft' ) {
583
  if ( get_post_type( $question_id ) === LP_QUESTION_CPT ) {
584
  $question_name = get_post_field( 'post_name', $question_id );
585
+ preg_match('/\?/i', $permalink, $result);
586
+ if(empty($result)){
587
+ $permalink = $permalink . $question_name;
588
+ } else {
589
+ $permalink = preg_replace('/\?/i', '/'.$question_name.'/?', $permalink);
590
+ }
591
  }
592
  } else {
593
  $permalink = add_query_arg( array( 'question', $question_id ), $permalink );
inc/user-item/class-lp-user-item-course-bk.php ADDED
@@ -0,0 +1,898 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class LP_User_Item_Course
5
+ */
6
+ class LP_User_Item_CourseY extends LP_User_Item implements ArrayAccess {
7
+ /**
8
+ * Course's items
9
+ *
10
+ * @var array
11
+ */
12
+ protected $_items = false;
13
+
14
+ /**
15
+ * Course
16
+ *
17
+ * @var LP_Course
18
+ */
19
+ protected $_course = 0;
20
+
21
+ /**
22
+ * @var LP_User
23
+ */
24
+ protected $_user = 0;
25
+
26
+ /**
27
+ * @var array
28
+ */
29
+ protected $_items_by_item_ids = array();
30
+
31
+ /**
32
+ * @var bool
33
+ */
34
+ protected $_loaded = false;
35
+
36
+ /**
37
+ * @var LP_User_CURD
38
+ */
39
+ protected $_curd = null;
40
+
41
+ /**
42
+ * LP_User_Item_Course constructor.
43
+ *
44
+ * @param null $item
45
+ */
46
+ public function __construct( $item ) {
47
+
48
+ parent::__construct( $item );
49
+
50
+ $this->_curd = new LP_User_CURD();
51
+ $this->_changes = array();
52
+ $this->load();
53
+ }
54
+
55
+ public function load() {
56
+ if ( ! $this->_loaded ) {
57
+ $this->read_items();
58
+ //$this->read_items_meta();
59
+ $this->_loaded = true;
60
+ }
61
+ }
62
+
63
+ /**
64
+ * Read items's data of course for the user.
65
+ */
66
+ public function read_items() {
67
+ $this->_items = array();
68
+ $this->_course = learn_press_get_course( $this->get_id() );
69
+
70
+ if ( ! $this->_course || ( ! $user_course_item_id = $this->get_user_item_id() ) ) {
71
+ return false;
72
+ }
73
+ $course_items = $this->_course->get_item_ids();
74
+
75
+ if ( ! $course_items ) {
76
+ return false;
77
+ }
78
+
79
+ if ( $user_course_items = $this->_curd->read_course_items_by_user_item_id( $user_course_item_id ) ) {
80
+
81
+ // Convert keys of array from numeric to keys is item id
82
+ foreach ( array_keys( $user_course_items ) as $key ) {
83
+ $user_course_item = $user_course_items[ $key ];
84
+ $user_course_items[ $user_course_item->item_id ] = $user_course_item;
85
+ unset( $user_course_items[ $key ] );
86
+ }
87
+ } else {
88
+ $user_course_items = array();
89
+ }
90
+
91
+ foreach ( $course_items as $item_id ) {
92
+
93
+ if ( ! empty( $user_course_items[ $item_id ] ) ) {
94
+ $user_course_item = (array) $user_course_items[ $item_id ];
95
+ } else {
96
+ $user_course_item = array(
97
+ 'item_id' => $item_id,
98
+ 'ref_id' => $this->get_id(),
99
+ 'parent_id' => $user_course_item_id
100
+ );
101
+ }
102
+
103
+ if ( $course_item = apply_filters( 'learn-press/user-course-item', LP_User_Item::get_item_object( $user_course_item ), $user_course_item, $this ) ) {
104
+ $this->_items[ $item_id ] = $course_item;
105
+ $this->_items_by_item_ids[ $course_item->get_user_item_id() ] = $item_id;
106
+ }
107
+ }
108
+
109
+ return true;
110
+ }
111
+
112
+ public function is_exceeded() {
113
+ $exceeded = DAY_IN_SECONDS * 360 * 100;
114
+
115
+ if ( ! $course = $this->get_course() ) {
116
+ return $exceeded;
117
+ }
118
+
119
+ if ( ! $course->get_duration() ) {
120
+ return $exceeded;
121
+ }
122
+
123
+ return parent::is_exceeded();
124
+ }
125
+
126
+ public function get_finishing_type() {
127
+ if ( ! $type = $this->get_meta( 'finishing_type' ) ) {
128
+ $type = $this->is_exceeded() <= 0 ? 'exceeded' : 'click';
129
+ learn_press_update_user_item_meta( $this->get_user_item_id(), 'finishing_type', $type );
130
+ $this->set_meta( 'finishing_type', $type );
131
+ }
132
+
133
+ return $type;
134
+ }
135
+
136
+ /**
137
+ * Read item meta.
138
+ *
139
+ * @return mixed|bool
140
+ */
141
+ public function read_items_meta() {
142
+
143
+ $item_ids = array();
144
+ if ( $this->_items ) {
145
+ foreach ( $this->_items as $item ) {
146
+ if ( $item->get_user_item_id() ) {
147
+ $item_ids[ $item->get_user_item_id() ] = $item->get_item_id();
148
+ }
149
+ }
150
+ }
151
+
152
+ if ( ! $item_ids ) {
153
+ return false;
154
+ }
155
+
156
+ global $wpdb;
157
+ $meta_ids = array_keys( $item_ids );
158
+ $format = array_fill( 0, sizeof( $meta_ids ), '%d' );
159
+ $sql = $wpdb->prepare( "
160
+ SELECT *
161
+ FROM {$wpdb->learnpress_user_itemmeta}
162
+ WHERE learnpress_user_item_id IN(" . join( ',', $format ) . ")
163
+ ", $meta_ids );
164
+
165
+ if ( $results = $wpdb->get_results( $sql ) ) {
166
+ foreach ( $results as $result ) {
167
+ $item_id = $item_ids[ $result->learnpress_user_item_id ];
168
+
169
+ if ( $item_id === $this->get_item_id() ) {
170
+ $this->add_meta( $result );
171
+ } else {
172
+ $item = $this->get_item( $item_id );
173
+ $result->meta_value = LP_Helper::maybe_unserialize( $result->meta_value );
174
+
175
+ $item->add_meta( $result );
176
+ }
177
+ }
178
+ }
179
+
180
+ return $this->_meta_data;
181
+ }
182
+
183
+ public function offsetSet( $offset, $value ) {
184
+ //$this->set_data( $offset, $value );
185
+ // Do not allow to set value directly!
186
+ }
187
+
188
+ public function offsetUnset( $offset ) {
189
+ // Do not allow to unset value directly!
190
+ }
191
+
192
+ public function offsetGet( $offset ) {
193
+ $this->load();
194
+
195
+ return $this->offsetExists( $offset ) ? $this->_items[ $offset ] : false;
196
+ }
197
+
198
+ public function offsetExists( $offset ) {
199
+ $this->load();
200
+
201
+ return array_key_exists( $offset, $this->_items );
202
+ }
203
+
204
+ public function evaluate() {
205
+
206
+ }
207
+
208
+ /**
209
+ * @return LP_User_Item|bool
210
+ */
211
+ public function get_viewing_item() {
212
+ $item = LP_Global::course_item();
213
+ if ( $item ) {
214
+ return $this[ $item->get_id() ];
215
+ }
216
+
217
+ return false;
218
+ }
219
+
220
+ public function get_course( $return = '' ) {
221
+ $cid = $this->get_data( 'item_id' );
222
+ if ( $return == '' ) {
223
+ return $cid ? learn_press_get_course( $cid ) : false;
224
+ }
225
+
226
+ return $cid;
227
+ }
228
+
229
+ /**
230
+ * Get result of course.
231
+ *
232
+ * @param string $prop
233
+ *
234
+ * @return float|int
235
+ */
236
+ public function get_results( $prop = 'result' ) {
237
+
238
+ if ( ! $course = $this->get_course() ) {
239
+ return false;
240
+ }
241
+
242
+ $this->load();
243
+ $course_result = $course->get_data( 'course_result' );
244
+ $results = false;
245
+ switch ( $course_result ) {
246
+ // Completed lessons per total
247
+ case 'evaluate_lesson':
248
+ $results = $this->_evaluate_course_by_lesson();
249
+ break;
250
+ // Results of final quiz
251
+ case 'evaluate_final_quiz':
252
+ $results = $this->_evaluate_course_by_final_quiz();
253
+ break;
254
+ // Points of quizzes per points of all quizzes
255
+ case 'evaluate_quizzes':
256
+ $results = $this->_evaluate_course_by_quizzes();
257
+ break;
258
+ // Points of passed quizzes per points of all quizzes
259
+ case 'evaluate_passed_quizzes':
260
+ $results = $this->_evaluate_course_by_passed_quizzes();
261
+ break;
262
+ // Points of completed (may not passed) quizzes per points of all quizzes
263
+ case 'evaluate_quiz':
264
+ $results = $this->_evaluate_course_by_completed_quizzes();
265
+ break;
266
+ default:
267
+ $results = apply_filters( 'learn-press/evaluate_passed_conditions', $course_result, $this );
268
+ break;
269
+ }
270
+
271
+ if ( is_array( $results ) ) {
272
+ $count_items = $course->count_items( '', true );
273
+ $completed_items = $this->get_completed_items();
274
+ $results = array_merge(
275
+ $results,
276
+ array(
277
+ 'count_items' => $count_items,
278
+ 'completed_items' => $completed_items,
279
+ 'skipped_items' => $count_items - $completed_items,
280
+ 'status' => $this->get_status(),
281
+ 'grade' => ''
282
+ )
283
+ );
284
+
285
+ if ( ! in_array( $this->get_status(), array( 'purchased', 'viewed' ) ) ) {
286
+ $results['grade'] = $this->is_finished() ? $this->_is_passed( $results['result'] ) : 'in-progress';
287
+ } else {
288
+ }
289
+ }
290
+
291
+ if ( $prop === 'status' ) {
292
+ if ( isset( $results['grade'] ) ) {
293
+ $prop = 'grade';
294
+ }
295
+ }
296
+
297
+ ///$result = wp_cache_get( 'user-course-' . $this->get_user_id() . '-' . $this->get_id(), 'learn-press/user-course-results' );
298
+
299
+ return $prop && $results && array_key_exists( $prop, $results ) ? $results[ $prop ] : $results;
300
+ }
301
+
302
+ /**
303
+ * @param string $context
304
+ *
305
+ * @return string
306
+ */
307
+ public function get_grade( $context = '' ) {
308
+ $grade = $this->get_results( 'grade' );
309
+
310
+ return $context == 'display' ? learn_press_course_grade_html( $grade, false ) : $grade;
311
+ }
312
+
313
+ /**
314
+ * @return bool
315
+ */
316
+ public function is_passed() {
317
+ return $this->get_grade() == 'passed';
318
+ }
319
+
320
+ /**
321
+ * @param int $decimal
322
+ *
323
+ * @return int|string
324
+ */
325
+ public function get_percent_result( $decimal = 1 ) {
326
+ return apply_filters( 'learn-press/user/course-percent-result', sprintf( '%s%%', round( $this->get_results( 'result' ), $decimal ), $this->get_user_id(), $this->get_item_id() ) );
327
+ }
328
+
329
+ /**
330
+ * Evaluate course result by lessons.
331
+ *
332
+ * @return array
333
+ */
334
+ protected function _evaluate_course_by_lesson() {
335
+
336
+ $cache_key = 'user-course-' . $this->get_user_id() . '-' . $this->get_id();
337
+
338
+ if ( false === ( $cached_data = wp_cache_get( $cache_key, 'learn-press/course-results' ) ) || ! array_key_exists( 'lessons', $cached_data ) ) {
339
+ $completing = $this->get_completed_items( LP_LESSON_CPT, true );
340
+ if ( $completing[1] ) {
341
+ $result = $completing[0] / $completing[1];
342
+ } else {
343
+ $result = 0;
344
+ }
345
+ $result *= 100;
346
+ $data = array(
347
+ 'result' => $result,
348
+ 'grade' => $this->is_finished() ? $this->_is_passed( $result ) : '',
349
+ 'status' => $this->get_status()
350
+ );
351
+
352
+ settype( $cached_data, 'array' );
353
+ $cached_data['lessons'] = $data;
354
+
355
+ wp_cache_set( $cache_key, $cached_data, 'learn-press/course-results' );
356
+ }
357
+
358
+ return isset( $cached_data['lessons'] ) ? $cached_data['lessons'] : array();
359
+ }
360
+
361
+ /**
362
+ * Finish course for user
363
+ *
364
+ * @return int
365
+ */
366
+ public function finish() {
367
+
368
+ $return = parent::complete( 'finished' );
369
+
370
+ return $return;
371
+ }
372
+
373
+ /**
374
+ * Evaluate course result by final quiz.
375
+ *
376
+ * @return array
377
+ */
378
+ protected function _evaluate_course_by_final_quiz() {
379
+
380
+ $cache_key = 'user-course-' . $this->get_user_id() . '-' . $this->get_id();
381
+
382
+ if ( false === ( $cached_data = wp_cache_get( $cache_key, 'learn-press/course-results' ) ) || ! array_key_exists( 'final-quiz', $cached_data ) ) {
383
+ $course = $this->get_course();
384
+ $final_quiz = $course->get_final_quiz();
385
+ $result = false;
386
+ if ( $user_quiz = $this->get_item( $final_quiz ) ) {
387
+ $result = $user_quiz->get_results( false );
388
+ }
389
+
390
+ $percent = $result ? $result['result'] : 0;
391
+ $data = array(
392
+ 'result' => $percent,
393
+ 'grade' => $this->is_finished() ? $this->_is_passed( $percent ) : '',
394
+ 'status' => $this->get_status()
395
+ );
396
+ settype( $cached_data, 'array' );
397
+ $cached_data['final-quiz'] = $data;
398
+
399
+ wp_cache_set( $cache_key, $cached_data, 'learn-press/course-results' );
400
+ }
401
+
402
+ return isset( $cached_data['final-quiz'] ) ? $cached_data['final-quiz'] : array();
403
+ }
404
+
405
+ /**
406
+ * Evaluate course result by point of quizzes doing/done per total quizzes.
407
+ *
408
+ * @return array
409
+ */
410
+ protected function _evaluate_course_by_quizzes() {
411
+
412
+ $cache_key = 'user-course-' . $this->get_user_id() . '-' . $this->get_id();
413
+
414
+ if ( ( false === ( $cached_data = wp_cache_get( $cache_key, 'learn-press/course-results' ) ) ) || ! array_key_exists( 'quizzes', $cached_data ) ) {
415
+
416
+ $data = array( 'result' => 0, 'grade' => '', 'status' => $this->get_status() );
417
+ $result = 0;
418
+ $result_of_items = 0;
419
+
420
+ if ( $items = $this->get_items() ) {
421
+ foreach ( $items as $item ) {
422
+ if ( $item->get_type() !== LP_QUIZ_CPT ) {
423
+ continue;
424
+ }
425
+ if ( $item->get_quiz()->get_data( 'passing_grade' ) ) {
426
+ $result += $item->get_results( 'result' );
427
+ $result_of_items ++;
428
+ }
429
+ }
430
+ $result = $result_of_items ? $result / $result_of_items : 0;
431
+ $data['result'] = $result;
432
+ if ( $this->is_finished() ) {
433
+ $data['grade'] = $this->_is_passed( $result );
434
+ }
435
+ }
436
+
437
+ settype( $cached_data, 'array' );
438
+ $cached_data['quizzes'] = $data;
439
+
440
+ wp_cache_set( $cache_key, $cached_data, 'learn-press/course-results' );
441
+ }
442
+
443
+ return isset( $cached_data['quizzes'] ) ? $cached_data['quizzes'] : array();
444
+ }
445
+
446
+ /**
447
+ * Evaluate course result by point of quizzes doing/done per total quizzes.
448
+ *
449
+ * @return array
450
+ */
451
+ protected function _evaluate_course_by_passed_quizzes() {
452
+
453
+ $cache_key = 'user-course-' . $this->get_user_id() . '-' . $this->get_id();
454
+
455
+ if ( false === ( $cached_data = wp_cache_get( $cache_key, 'learn-press/course-results' ) ) || ! array_key_exists( 'passed-quizzes', $cached_data ) ) {
456
+
457
+ $data = array( 'result' => 0, 'grade' => '', 'status' => $this->get_status() );
458
+ $result = 0;
459
+ $result_of_items = 0;
460
+ if ( $items = $this->get_items() ) {
461
+ foreach ( $items as $item ) {
462
+ if ( $item->get_type() !== LP_QUIZ_CPT ) {
463
+ continue;
464
+ }
465
+ if ( $item->get_quiz()->get_data( 'passing_grade' ) ) {
466
+ $result += $item->is_passed() ? $item->get_results( 'result' ) : 0;
467
+ $result_of_items ++;
468
+ }
469
+ }
470
+ $result = $result_of_items ? $result / $result_of_items : 0;
471
+ $data['result'] = $result;
472
+
473
+ if ( $this->is_finished() ) {
474
+ $data['grade'] = $this->_is_passed( $result );
475
+ }
476
+ }
477
+
478
+ settype( $cached_data, 'array' );
479
+ $cached_data['passed-quizzes'] = $data;
480
+
481
+ wp_cache_set( $cache_key, $cached_data, 'learn-press/course-results' );
482
+ }
483
+
484
+ return isset( $cached_data['passed-quizzes'] ) ? $cached_data['passed-quizzes'] : array();
485
+ }
486
+
487
+ /**
488
+ * Evaluate course result by number of passed quizzes per total quizzes.
489
+ *
490
+ * @return array
491
+ */
492
+ protected function _evaluate_course_by_completed_quizzes() {
493
+ $cache_key = 'user-course-' . $this->get_user_id() . '-' . $this->get_id();
494
+
495
+ if ( false === ( $cached_data = wp_cache_get( $cache_key, 'learn-press/course-results' ) ) || ! array_key_exists( 'completed-quizzes', $cached_data ) ) {
496
+ $course = $this->get_course();
497
+
498
+ $data = array( 'result' => 0, 'grade' => '', 'status' => $this->get_status() );
499
+ $result = 0;
500
+
501
+ if ( $items = $this->get_items() ) {
502
+ $result_of_items = 0;
503
+ foreach ( $items as $item ) {
504
+ if ( $item->get_type() !== LP_QUIZ_CPT ) {
505
+ continue;
506
+ }
507
+ if ( $item->get_quiz()->get_data( 'passing_grade' ) ) {
508
+ $result += $item->is_passed() ? 1 : 0;
509
+ $result_of_items ++;
510
+ }
511
+ }
512
+ $result = $result_of_items ? $result * 100 / $result_of_items : 0;
513
+ $data['result'] = $result;
514
+ if ( $this->is_finished() ) {
515
+ $data['grade'] = $this->_is_passed( $result );
516
+ }
517
+ }
518
+
519
+ settype( $cached_data, 'array' );
520
+ $cached_data['completed-quizzes'] = $data;
521
+
522
+ wp_cache_set( $cache_key, $cached_data, 'learn-press/course-results' );
523
+ }
524
+
525
+ return isset( $cached_data['completed-quizzes'] ) ? $cached_data['completed-quizzes'] : array();
526
+ }
527
+
528
+ protected function _is_passed( $result ) {
529
+ $result = round( $result, 2 );
530
+
531
+ return $result >= $this->get_passing_condition() ? 'passed' : 'failed';
532
+ }
533
+
534
+ /**
535
+ * Get completed items.
536
+ *
537
+ * @param string $type - Optional. Filter by type (such lp_quiz, lp_lesson) if passed
538
+ * @param bool $with_total - Optional. Include total if TRUE
539
+ * @param int $section_id - Optional. Get in specific section
540
+ *
541
+ * @return array|bool|mixed
542
+ */
543
+ public function get_completed_items( $type = '', $with_total = false, $section_id = 0 ) {
544
+ $this->load();
545
+
546
+ $key = sprintf( '%d-%d-%s', $this->get_user_id(), $this->_course->get_id(), md5( build_query( func_get_args() ) ) );
547
+
548
+ if ( false === ( $completed_items = wp_cache_get( $key, 'learn-press/user-completed-items' ) ) ) {
549
+ $completed = 0;
550
+ $total = 0;
551
+ $section_items = array();
552
+
553
+ if ( $section_id && $section = $this->_course->get_sections( 'object', $section_id ) ) {
554
+ $section_items = $section->get_items();
555
+
556
+ if ( $section_items ) {
557
+ $section_items = array_keys( $section_items );
558
+ }
559
+ }
560
+
561
+ if ( $items = $this->_items ) {
562
+ foreach ( $items as $item ) {
563
+
564
+ if ( $section_id && ! in_array( $item->get_id(), $section_items ) ) {
565
+ continue;
566
+ }
567
+
568
+ if ( $type ) {
569
+ $item_type = $item->get_data( 'item_type' );
570
+ } else {
571
+ $item_type = '';
572
+ }
573
+
574
+ if ( $type === $item_type ) {
575
+ if ( $item->get_status() == 'completed' ) {
576
+ $completed ++;
577
+ }
578
+ $completed = apply_filters( 'learn-press/course-item/completed', $completed, $item, $item->get_status() );
579
+ //if ( ! $item->is_preview() ) {
580
+ $total ++;
581
+ //}
582
+ }
583
+ }
584
+ }
585
+ $completed_items = array( $completed, $total );
586
+ wp_cache_set( $key, $completed_items, 'learn-press/user-completed-items' );
587
+ }
588
+
589
+ return $with_total ? $completed_items : $completed_items[0];
590
+ }
591
+
592
+ /**
593
+ * Get items completed by percentage.
594
+ *
595
+ * @param string $type - Optional. Filter by type or not
596
+ * @param int $section_id - Optional. Get in specific section
597
+ *
598
+ * @return float|int
599
+ */
600
+ public function get_percent_completed_items( $type = '', $section_id = 0 ) {
601
+ $values = $this->get_completed_items( $type, true, $section_id );
602
+ if ( $values[1] ) {
603
+ return $values[0] / $values[1] * 100;
604
+ }
605
+
606
+ return 0;
607
+ }
608
+
609
+ /**
610
+ * Get passing condition criteria.
611
+ *
612
+ * @return string
613
+ */
614
+ public function get_passing_condition() {
615
+ return $this->_course->get_passing_condition();
616
+ }
617
+
618
+ /**
619
+ * Get all items in course.
620
+ *
621
+ * @return LP_User_Item[]
622
+ */
623
+ public function get_items() {
624
+ $this->load();
625
+
626
+ return $this->_items;
627
+ }
628
+
629
+ /**
630
+ * Check course is completed or not.
631
+ *
632
+ * @return bool
633
+ */
634
+ public function is_finished() {
635
+ return $this->get_status() === 'finished';
636
+ }
637
+
638
+ /**
639
+ * Check course graduation is passed or not.
640
+ *
641
+ * @return bool
642
+ */
643
+ public function is_graduated() {
644
+ return $this->get_results( 'grade' ) == 'passed';
645
+ }
646
+
647
+ /**
648
+ * @return bool
649
+ */
650
+ public function can_graduated() {
651
+ return $this->get_results( 'result' ) >= $this->get_passing_condition();
652
+ }
653
+
654
+ function __destruct() {
655
+ // TODO: Implement __unset() method.
656
+ }
657
+
658
+ /**
659
+ * @param int $item_id
660
+ *
661
+ * @return LP_User_Item|LP_User_Item_Quiz|bool
662
+ */
663
+ public function get_item( $item_id ) {
664
+ $this->load();
665
+
666
+ return ! empty( $this->_items[ $item_id ] ) ? $this->_items[ $item_id ] : false;
667
+ }
668
+
669
+ /**
670
+ * @param int $user_item_id
671
+ *
672
+ * @return LP_User_Item|LP_User_Item_Quiz|bool
673
+ */
674
+ public function get_item_by_user_item_id( $user_item_id ) {
675
+ $this->load();
676
+
677
+ if ( ! empty( $this->_items_by_item_ids[ $user_item_id ] ) ) {
678
+ $item_id = $this->_items_by_item_ids[ $user_item_id ];
679
+
680
+ return $this->get_item( $item_id );
681
+ }
682
+
683
+ return false;
684
+ }
685
+
686
+ public function set_item( $item ) {
687
+
688
+
689
+ $this->load();
690
+
691
+ if ( $item = LP_User_Item::get_item_object( $item ) ) {
692
+ $this->_items[ $item->get_item_id() ] = $item;
693
+ }
694
+ }
695
+
696
+ /**
697
+ * @param $item_id
698
+ * @param string $prop
699
+ *
700
+ * @return bool|float|int
701
+ */
702
+ public function get_item_result( $item_id, $prop = 'result' ) {
703
+ if ( $item = $this->get_item( $item_id ) ) {
704
+ return $item->get_result( $prop );
705
+ }
706
+
707
+ return false;
708
+ }
709
+
710
+ public function get_result( $prop = '' ) {
711
+ return $this->get_results( $prop );
712
+ }
713
+
714
+ /**
715
+ * @param int $at
716
+ *
717
+ * @return LP_User_Item_Course
718
+ */
719
+ public function get_item_at( $at = 0 ) {
720
+ $this->load();
721
+ $values = array_values( $this->_items );
722
+ $item = ! empty( $values[ $at ] ) ? $values[ $at ] : false;
723
+
724
+ return $item;
725
+ }
726
+
727
+ /**
728
+ * @param $id
729
+ *
730
+ * @return LP_User_Item_Quiz|bool
731
+ */
732
+ public function get_item_quiz( $id ) {
733
+
734
+ $this->load();
735
+ $item = ! empty( $this->_items[ $id ] ) ? $this->_items[ $id ] : new LP_User_Item_Quiz( array() );
736
+
737
+ return $item;
738
+ }
739
+
740
+ /**
741
+ * Get js settings of course.
742
+ *
743
+ * @return array
744
+ */
745
+ public function get_js_args() {
746
+ $js_args = false;
747
+ if ( $course = $this->get_course() ) {
748
+ $item = false;
749
+ $js_args = array(
750
+ 'root_url' => trailingslashit( get_home_url() ),
751
+ 'id' => $course->get_id(),
752
+ 'url' => $course->get_permalink(),
753
+ 'result' => $this->get_results(),
754
+ 'current_item' => $item ? $item->get_id() : false,
755
+ 'items' => $this->get_items_for_js()
756
+ );
757
+ }
758
+
759
+ return apply_filters( 'learn-press/course/single-params', $js_args, $this->get_id() );
760
+ }
761
+
762
+ public function update_item_retaken_count( $item_id, $count = 0 ) {
763
+ $items = $this->get_meta( '_retaken_items' );
764
+ if ( is_string( $count ) && preg_match( '#^(\+|\-)([0-9]+)#', $count, $m ) ) {
765
+ $last_count = ! empty( $items[ $item_id ] ) ? $items[ $item_id ] : 0;
766
+ $count = $m[1] == '+' ? ( $last_count + $m[2] ) : ( $last_count - $m[2] );
767
+ }
768
+
769
+ $items[ $item_id ] = $count;
770
+
771
+ learn_press_update_user_item_meta( $this->get_user_item_id(), '_retaken_items', $items );
772
+
773
+ return $count;
774
+ }
775
+
776
+ public function get_item_retaken_count( $item_id ) {
777
+ $items = $this->get_meta( '_retaken_items' );
778
+ $count = false;
779
+
780
+ if ( is_array( $items ) && array_key_exists( $item_id, $items ) ) {
781
+ $count = absint( $items[ $item_id ] );
782
+ }
783
+
784
+ return $count;
785
+ }
786
+
787
+ /**
788
+ * Get number of retaken times for user course.
789
+ *
790
+ * @return int
791
+ */
792
+ public function get_retaken_count() {
793
+ return absint( learn_press_get_user_item_meta( $this->get_user_item_id(), '_lp_retaken_count', true ) );
794
+ }
795
+
796
+ /**
797
+ * Increase retaken count.
798
+ *
799
+ * @return bool|int
800
+ */
801
+ public function increase_retake_count() {
802
+ $count = $this->get_retaken_count();
803
+ $count ++;
804
+
805
+ return learn_press_update_user_item_meta( $this->get_user_item_id(), '_lp_retaken_count', $count );
806
+ }
807
+
808
+ /**
809
+ * Get js settings of course items.
810
+ *
811
+ * @return array
812
+ */
813
+ public function get_items_for_js() {
814
+
815
+ /*** TEST CACHE ***/
816
+ return false;
817
+ $args = array();
818
+ if ( $items = $this->get_items() ) {
819
+ $user = $this->get_user();
820
+ $course = $this->get_course();
821
+ foreach ( $items as $item ) {
822
+
823
+ $args[ $item->get_id() ] = $item->get_js_args();// $item_js;
824
+ }
825
+ }
826
+
827
+ return apply_filters( 'learn-press/course/items-for-js', $args, $this->get_id(), $this->get_user_id() );
828
+ }
829
+
830
+ /**
831
+ * Add new item
832
+ *
833
+ * @param int|array $item_id
834
+ * @param int $user_id
835
+ *
836
+ * @return bool
837
+ */
838
+ public function add_item( $item_id, $user_id = 0 ) {
839
+ $this->load();
840
+
841
+ if ( empty( $this->_items[ $item_id ] ) ) {
842
+ return false;
843
+ }
844
+
845
+ $item_data = is_numeric( $item_id ) ? array( 'item_id' => $item_id ) : (array) $item_id;
846
+
847
+ if ( func_num_args() == 2 ) {
848
+ $item_data['user_id'] = $user_id ? $user_id : get_current_user_id();
849
+ }
850
+
851
+ $current_time = new LP_Datetime();
852
+ $defaults = array(
853
+ 'start_time' => $current_time,
854
+ 'start_time_gtm' => $current_time->toSql( false ),
855
+ 'end_time' => $current_time,
856
+ 'end_time_gmt' => $current_time->toSql( false ),
857
+ 'item_type' => learn_press_get_post_type( $item_id ),
858
+ 'status' => '',
859
+ 'ref_id' => $this->get_id(),
860
+ 'ref_type' => learn_press_get_post_type( $this->get_id() ),
861
+ 'parent_id' => $this->get_user_item_id()
862
+ );
863
+ $item_data = wp_parse_args(
864
+ $item_data,
865
+ $defaults
866
+ );
867
+
868
+ $this->_items[ $item_id ] = LP_User_Item::get_item_object( $item_data );
869
+
870
+ return $this->_items[ $item_id ];
871
+ }
872
+
873
+ /**
874
+ * Update user item
875
+ */
876
+ public function save() {
877
+ $this->update();
878
+
879
+ if ( ! $items = $this->get_items() ) {
880
+ return false;
881
+ }
882
+
883
+ foreach ( $items as $item_id => $item ) {
884
+
885
+ if ( ! $item->get_status() ) {
886
+ continue;
887
+ }
888
+
889
+ $item->update();
890
+ }
891
+
892
+ //global $wp_object_cache;
893
+ //
894
+ // learn_press_debug($wp_object_cache);
895
+
896
+ return true;
897
+ }
898
+ }
inc/user/class-lp-user-factory.php CHANGED
@@ -147,7 +147,7 @@ class LP_User_Factory {
147
  protected static function _update_user_item_purchased( $order, $old_status, $new_status ) {
148
  global $wpdb;
149
  $curd = new LP_User_CURD();
150
- $parent_order = ! $order->is_child() ? $order->get_parent() : $order;
151
  $items = ! $order->is_child() ? $order->get_items() : $parent_order->get_items();
152
 
153
  if ( ! $items ) {
147
  protected static function _update_user_item_purchased( $order, $old_status, $new_status ) {
148
  global $wpdb;
149
  $curd = new LP_User_CURD();
150
+ $parent_order = $order->is_child() ? $order->get_parent() : $order;
151
  $items = ! $order->is_child() ? $order->get_items() : $parent_order->get_items();
152
 
153
  if ( ! $items ) {
inc/user/lp-user-functions.php CHANGED
@@ -173,6 +173,7 @@ function learn_press_add_user_roles() {
173
  array()
174
  );
175
 
 
176
  $course_cap = LP_COURSE_CPT . 's';
177
  $lesson_cap = LP_LESSON_CPT . 's';
178
  $order_cap = LP_ORDER_CPT . 's';
173
  array()
174
  );
175
 
176
+
177
  $course_cap = LP_COURSE_CPT . 's';
178
  $lesson_cap = LP_LESSON_CPT . 's';
179
  $order_cap = LP_ORDER_CPT . 's';
learnpress.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: LearnPress
4
  Plugin URI: http://thimpress.com/learnpress
5
  Description: LearnPress is a WordPress complete solution for creating a Learning Management System (LMS). It can help you to create courses, lessons and quizzes.
6
  Author: ThimPress
7
- Version: 3.2.0
8
  Author URI: http://thimpress.com
9
  Requires at least: 3.8
10
  Tested up to: 4.9.6
@@ -138,7 +138,7 @@ if ( ! class_exists( 'LearnPress' ) ) {
138
  }
139
 
140
  if ( file_exists( $file ) ) {
141
- $this->backgrounds[ $name ] = include $file;
142
  }
143
  }
144
  }
@@ -759,5 +759,4 @@ function load_learn_press() {
759
  * Done! entry point of the plugin
760
  * Create new instance of LearnPress and put it to global
761
  */
762
- $GLOBALS['LearnPress'] = LP();
763
-
4
  Plugin URI: http://thimpress.com/learnpress
5
  Description: LearnPress is a WordPress complete solution for creating a Learning Management System (LMS). It can help you to create courses, lessons and quizzes.
6
  Author: ThimPress
7
+ Version: 3.2.1
8
  Author URI: http://thimpress.com
9
  Requires at least: 3.8
10
  Tested up to: 4.9.6
138
  }
139
 
140
  if ( file_exists( $file ) ) {
141
+ $this->backgrounds[ $name ] = include_once $file;
142
  }
143
  }
144
  }
759
  * Done! entry point of the plugin
760
  * Create new instance of LearnPress and put it to global
761
  */
762
+ $GLOBALS['LearnPress'] = LP();
 
readme.txt CHANGED
@@ -1,16 +1,16 @@
1
- === LearnPress - WordPress LMS Plugin ===
2
  Contributors: thimpress, tunnhn, phonglq.foobla, thongta, kendy73, leehld
3
  Donate link:
4
  Tags: WordPress LMS, LMS, eLearning, e-Learning, Learning Management System, LMS WordPress, Course, Courses, Quiz, Quizzes, Training, Guru, Sell Courses
5
  Requires at least: 3.8
6
  Tested up to: 4.9.5
7
- Stable tag: 3.2.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  A WordPress LMS Plugin to create WordPress Learning Management System. Turn your WP to LMS WordPress with Courses, Lessons, Quizzes & more.
12
 
13
- == Description ==
14
 
15
  **<a href="http://thimpress.com/learnpress" target="_blank">WordPress LMS Plugin</a>** - LearnPress is a comprehensive *WordPress LMS Plugin* for WordPress, just like WordPress Moodle or Moodle for WordPress if you know what Moodle is. This is one of the best WordPress LMS Plugins can be used to easily create & sell courses online. Each course curriculum can be made with lessons & quizzes which can be managed with easy-to-use user interface. With this WordPress LMS plugin, you can quickly and easily create education, online school, online-course websites with no coding-knowledge required.
16
 
@@ -18,11 +18,11 @@ A WordPress LMS Plugin to create WordPress Learning Management System. Turn your
18
 
19
  LearnPress is free and always be free, but it has premium high quality WordPress Plugin which will probably help you make money from your **WordPress based LMS**, try and see how it is. LearnPress WordPress Online Course plugin is lightweight but super powerful with lots of add-ons to empower its core system.
20
 
21
- > **Christmas & New Year Week Sale - 10 Days Left**
22
 
23
- > [Click here](http://eepurl.com/cbKSQX) to get a coupon for 25% Off all LearnPress Add-ons
24
 
25
- > Or you can [buy Education WP theme](http://themeforest.net/item/education-wordpress-theme-education-wp/14058034?utm_source=wporg&utm_medium=learnpressDC&ref=thimpress&utm_campaign=learnpress) for only 64$ and get all of them.
26
 
27
  > **HOT!!** [WordPress theme for Coaches, Trainers, Teachers - Coaching WP](https://themeforest.net/item/speaker-and-life-coach-wordpress-theme-coaching-wp/17097658?utm_source=wporg&utm_medium=learnpressDC&ref=thimpress&utm_campaign=learnpress) is also FOR SALE at only $59, LearnPress included.
28
 
@@ -36,45 +36,45 @@ Take a look at Premium **[Education WordPress Theme](http://themeforest.net/item
36
 
37
  - **[How to create a Udemy or Coursera clone easily with LearnPress](https://thimpress.com/create-udemy-coursera-clone-easily-learnpress/?utm_source=wporg&utm_medium=learnpress&ref=thimpress&utm_campaign=learnpress)**
38
 
39
- - Step-by-step Youtube guide on setting up your own Online Course site. **[Click here >>](https://www.youtube.com/watch?v=Z9QT_CGevhg)**
40
- [youtube https://www.youtube.com/watch?v=Z9QT_CGevhg&hd=1&&cc_load_policy=1]
41
 
42
  Are you looking for *best LMS WordPress plugin*?
43
 
44
 
45
  ###LearnPress features###
46
 
47
- **LearnPress - WordPress LMS Plugin works with your theme**
48
- We create LearnPress LMS Plugin to work with any WordPress themes.
49
 
50
- **LearnPress supports WordPress Multisite**
51
  Create WordPress based LMS as multiple sites.
52
 
53
- **Create course**
54
  LearnPress LMS Plugin provide an excellent user interface to create a course with options you need. You can find it easy to make a full curriculum layout as well as edit and maintain it.
55
- You can also export course and import to other website which also using LearnPress. We will provide the feature allow you to import course from other WordPress LMS plugins soon.
56
 
57
- **Manage course**
58
- With the course you've created, you can share it, manage it, watch statistic about number of student, its trend, etc.
59
 
60
- **Sell course**
61
  LearnPress is free but it still allow you to sell courses you create with support many billing method such as Paypal, WooCommerce, Stripe, etc.
62
 
63
- **Communicate with your students**
64
- With BuddyPress support, LearnPress will help you to communicate with your student or instructor via WordPress forum. Learning is not only on your own. Study, make friends and have fun.
65
 
66
- **LearnPress provide a bunch of add-on**
67
- Add-on is used to providing extra features for LearnPress and you can also write it.
68
 
69
- **LearnPress is free and always will be**
70
- Education should be free and we want you to bring it to as many people as you can. Therefore, we create LearnPress as a tool for you to create course and share it. We'll continue developing it as long as we can and make it better and better.
71
 
72
- **LearnPress is actively developed**
73
- We are developing and improving LearnPress day by day and bringing new features to you cos we want LearnPress to become the **best WordPress LMS plugin**.
74
 
75
- <a href="http://docs.thimpress.com/learnpress" target="_blank">LearnPress WordPress LMS Plugin Documentation</a>
76
 
77
- ###Free add-ons for LearnPress WordPress LMS Plugin###
78
 
79
  - [LearnPress Wishlist](https://wordpress.org/plugins/learnpress-wishlist) - add courses to a wishlist for students.
80
  - [LearnPress Course Review](https://wordpress.org/plugins/learnpress-course-review) - review course for enrolled students.
@@ -85,7 +85,7 @@ We are developing and improving LearnPress day by day and bringing new features
85
  - [LearnPress Offline Payment](https://wordpress.org/plugins/learnpress-offline-payment) - help you to manually create order for offline payment instead of paying via any payment gateways to sell course.
86
  - [LearnPress Fill In Blank](https://wordpress.org/plugins/learnpress-fill-in-blank) - Fill in Blank question type for LearnPress WordPress LMS Plugin.
87
 
88
- ###Premium add-ons for LearnPress WordPress LMS Plugin###
89
 
90
  - [Assignments add-on for LearnPress](https://thimpress.com/product/assignments-add-on-for-learnpress/) - Newly released - Allowing instructors to give assignments, homework for students and they can grade the students' work later on. The Assignments add-on is a great supplement to LearnPress and will make your course more interactive.
91
  - [myCRED add-on for LearnPress](http://thimpress.com/product/mycred-add-on-for-learnpress/) - adding myCRED support for LearnPress WordPress LMS plugin, you can add point system to your eLearning WordPress site using LearnPress + myCRED add-on.
@@ -149,45 +149,45 @@ Any suggestions for this WordPress LMS Plugin? Send us <a href="http://thimpress
149
 
150
  == Installation ==
151
 
152
- **From your WordPress dashboard**
153
- 1. Visit 'Plugin > Add new'.
154
- 2. Search for 'LearnPress'.
155
- 3. Activate LearnPress from your Plugins page.
156
 
157
- **From WordPress.org**
158
- 1. Search, select and download LearnPress.
159
- 2. Activate the plugin through the 'Plugins' menu in WordPress Dashboard.
160
 
161
- == Frequently Asked Questions ==
162
 
163
- = What is LearnPress? =
164
- LearnPress is a plugin to create a LMS website, to spread out course, or sell course.
165
 
166
- = Where can I find LearnPress documentation and user guides? =
167
- If you want to use LearnPress to build a Learning Management Website, please refer to our user guides in <a href="http://docs.thimpress.com/learnpress/" target="_blank">LearnPress official site.</a>
168
- And if you want to extending or theming LearnPress, see our <a href="https://github.com/LearnPress/LearnPress/wiki" target="_blank">Wiki.</a>
169
 
170
- = Where can I get support or talk to other users? =
171
  If you get troubles when using LearnPress you can ask for help on the <a href="https://wordpress.org/support/plugin/learnpress">LearnPress Support Forum</a> or <a href="https://www.facebook.com/groups/learnpress/" target="_blank">join the private Facebook group</a>. You could share your feedback about LearnPress. And let us know which feature you would like us to build next.
172
 
173
- For help with premium add-ons, use our <a href="https://thimpress.com/forums/forum/learnpress">helpdesk</a>.
174
 
175
- = Where can I ask for new features or suggest ideas or themes for LearnPress? =
176
- You can send us your ideas through form <a href="http://thimpress.com/learnpress-suggestion/" target="_blank">here.</a>
177
 
178
- = Where can I report bugs or contribute to the project? =
179
- You can also report bugs on LearnPress Support Forum or LearnPress <a href="https://github.com/LearnPress/LearnPress" target="_blank">Github Repository</a>.
180
 
181
- = Where can I find the REST API documentation? =
182
- We will provide documentation about LearnPress REST API really soon.
183
 
184
- = LearnPress is great, can I contribute to it? =
185
- Yes, you can and we appreciate it. Join in our <a href="https://github.com/LearnPress/LearnPress" target="_blank">Github Repository</a>.
186
 
187
- **LearnPress Translation project**
188
- https://www.transifex.com/projects/p/learnpress/
189
 
190
- == Screenshots ==
191
 
192
  1. Curriculum - Drag and Drop lesson or quiz.
193
  2. Lesson content.
@@ -196,9 +196,15 @@ https://www.transifex.com/projects/p/learnpress/
196
  5. Quiz settings.
197
  6. Email settings.
198
  7. Demo course page.
199
- 8. Add-ons of LearnPress.
200
 
201
  == Changelog ==
 
 
 
 
 
 
202
 
203
  = 3.2.0 =
204
  ~ Fixed issue info of order added manual not correct.
@@ -257,6 +263,6 @@ https://www.transifex.com/projects/p/learnpress/
257
  = 0.9.19 =
258
  In this version, we have changed a little bit about LearnPress Plugin directory structure and moved all add-ons to become independence plugins. If you face any problems relate to add-ons, please completely remove old version and re-install LearnPress. It does not affect your current data. Thank you.
259
 
260
- == Other note ==
261
- <a href="http://docs.thimpress.com/learnpress" target="_blank">Documentation</a> is available in ThimPress site.
262
  <a href="https://github.com/LearnPress/LearnPress/" target="_blank">LearnPress github repo.</a>
1
+ === LearnPress - WordPress LMS Plugin ===
2
  Contributors: thimpress, tunnhn, phonglq.foobla, thongta, kendy73, leehld
3
  Donate link:
4
  Tags: WordPress LMS, LMS, eLearning, e-Learning, Learning Management System, LMS WordPress, Course, Courses, Quiz, Quizzes, Training, Guru, Sell Courses
5
  Requires at least: 3.8
6
  Tested up to: 4.9.5
7
+ Stable tag: 3.2.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  A WordPress LMS Plugin to create WordPress Learning Management System. Turn your WP to LMS WordPress with Courses, Lessons, Quizzes & more.
12
 
13
+ == Description ==
14
 
15
  **<a href="http://thimpress.com/learnpress" target="_blank">WordPress LMS Plugin</a>** - LearnPress is a comprehensive *WordPress LMS Plugin* for WordPress, just like WordPress Moodle or Moodle for WordPress if you know what Moodle is. This is one of the best WordPress LMS Plugins can be used to easily create & sell courses online. Each course curriculum can be made with lessons & quizzes which can be managed with easy-to-use user interface. With this WordPress LMS plugin, you can quickly and easily create education, online school, online-course websites with no coding-knowledge required.
16
 
18
 
19
  LearnPress is free and always be free, but it has premium high quality WordPress Plugin which will probably help you make money from your **WordPress based LMS**, try and see how it is. LearnPress WordPress Online Course plugin is lightweight but super powerful with lots of add-ons to empower its core system.
20
 
21
+ > **One-Off Sale - 10 Days Left - Limited Time Offer**
22
 
23
+ > [Click here](https://goo.gl/JzwYkj) to get a coupon for 20% Off all Learnpress Add-ons
24
 
25
+ > Or you can buy [Education WP Theme](http://themeforest.net/item/education-wordpress-theme-education-wp/14058034?utm_source=wporg&utm_medium=learnpressDC&ref=thimpress&utm_campaign=learnpress) for only $69 and get all of them.
26
 
27
  > **HOT!!** [WordPress theme for Coaches, Trainers, Teachers - Coaching WP](https://themeforest.net/item/speaker-and-life-coach-wordpress-theme-coaching-wp/17097658?utm_source=wporg&utm_medium=learnpressDC&ref=thimpress&utm_campaign=learnpress) is also FOR SALE at only $59, LearnPress included.
28
 
36
 
37
  - **[How to create a Udemy or Coursera clone easily with LearnPress](https://thimpress.com/create-udemy-coursera-clone-easily-learnpress/?utm_source=wporg&utm_medium=learnpress&ref=thimpress&utm_campaign=learnpress)**
38
 
39
+ - Step-by-step Youtube guide on setting up your own Online Course site. **[Click here >>](https://www.youtube.com/watch?v=3LDa8vtDIAk)**
40
+ [youtube https://www.youtube.com/watch?v=3LDa8vtDIAk&hd=1&&cc_load_policy=1]
41
 
42
  Are you looking for *best LMS WordPress plugin*?
43
 
44
 
45
  ###LearnPress features###
46
 
47
+ **LearnPress - WordPress LMS Plugin works with your theme**
48
+ We create LearnPress LMS Plugin to work with any WordPress themes.
49
 
50
+ **LearnPress supports WordPress Multisite**
51
  Create WordPress based LMS as multiple sites.
52
 
53
+ **Create course**
54
  LearnPress LMS Plugin provide an excellent user interface to create a course with options you need. You can find it easy to make a full curriculum layout as well as edit and maintain it.
55
+ You can also export course and import to other website which also using LearnPress. We will provide the feature allow you to import course from other WordPress LMS plugins soon.
56
 
57
+ **Manage course**
58
+ With the course you've created, you can share it, manage it, watch statistic about number of student, its trend, etc.
59
 
60
+ **Sell course**
61
  LearnPress is free but it still allow you to sell courses you create with support many billing method such as Paypal, WooCommerce, Stripe, etc.
62
 
63
+ **Communicate with your students**
64
+ With BuddyPress support, LearnPress will help you to communicate with your student or instructor via WordPress forum. Learning is not only on your own. Study, make friends and have fun.
65
 
66
+ **LearnPress provide a bunch of add-on**
67
+ Add-on is used to providing extra features for LearnPress and you can also write it.
68
 
69
+ **LearnPress is free and always will be**
70
+ Education should be free and we want you to bring it to as many people as you can. Therefore, we create LearnPress as a tool for you to create course and share it. We'll continue developing it as long as we can and make it better and better.
71
 
72
+ **LearnPress is actively developed**
73
+ We are developing and improving LearnPress day by day and bringing new features to you cos we want LearnPress to become the **best WordPress LMS plugin**.
74
 
75
+ <a href="http://docs.thimpress.com/learnpress" target="_blank">LearnPress WordPress LMS Plugin Documentation</a>
76
 
77
+ ###Free add-ons for LearnPress WordPress LMS Plugin###
78
 
79
  - [LearnPress Wishlist](https://wordpress.org/plugins/learnpress-wishlist) - add courses to a wishlist for students.
80
  - [LearnPress Course Review](https://wordpress.org/plugins/learnpress-course-review) - review course for enrolled students.
85
  - [LearnPress Offline Payment](https://wordpress.org/plugins/learnpress-offline-payment) - help you to manually create order for offline payment instead of paying via any payment gateways to sell course.
86
  - [LearnPress Fill In Blank](https://wordpress.org/plugins/learnpress-fill-in-blank) - Fill in Blank question type for LearnPress WordPress LMS Plugin.
87
 
88
+ ###Premium add-ons for LearnPress WordPress LMS Plugin###
89
 
90
  - [Assignments add-on for LearnPress](https://thimpress.com/product/assignments-add-on-for-learnpress/) - Newly released - Allowing instructors to give assignments, homework for students and they can grade the students' work later on. The Assignments add-on is a great supplement to LearnPress and will make your course more interactive.
91
  - [myCRED add-on for LearnPress](http://thimpress.com/product/mycred-add-on-for-learnpress/) - adding myCRED support for LearnPress WordPress LMS plugin, you can add point system to your eLearning WordPress site using LearnPress + myCRED add-on.
149
 
150
  == Installation ==
151
 
152
+ **From your WordPress dashboard**
153
+ 1. Visit 'Plugin > Add new'.
154
+ 2. Search for 'LearnPress'.
155
+ 3. Activate LearnPress from your Plugins page.
156
 
157
+ **From WordPress.org**
158
+ 1. Search, select and download LearnPress.
159
+ 2. Activate the plugin through the 'Plugins' menu in WordPress Dashboard.
160
 
161
+ == Frequently Asked Questions ==
162
 
163
+ = What is LearnPress? =
164
+ LearnPress is a plugin to create a LMS website, to spread out course, or sell course.
165
 
166
+ = Where can I find LearnPress documentation and user guides? =
167
+ If you want to use LearnPress to build a Learning Management Website, please refer to our user guides in <a href="http://docs.thimpress.com/learnpress/" target="_blank">LearnPress official site.</a>
168
+ And if you want to extending or theming LearnPress, see our <a href="https://github.com/LearnPress/LearnPress/wiki" target="_blank">Wiki.</a>
169
 
170
+ = Where can I get support or talk to other users? =
171
  If you get troubles when using LearnPress you can ask for help on the <a href="https://wordpress.org/support/plugin/learnpress">LearnPress Support Forum</a> or <a href="https://www.facebook.com/groups/learnpress/" target="_blank">join the private Facebook group</a>. You could share your feedback about LearnPress. And let us know which feature you would like us to build next.
172
 
173
+ For help with premium add-ons, use our <a href="https://thimpress.com/forums/forum/learnpress">helpdesk</a>.
174
 
175
+ = Where can I ask for new features or suggest ideas or themes for LearnPress? =
176
+ You can send us your ideas through form <a href="http://thimpress.com/learnpress-suggestion/" target="_blank">here.</a>
177
 
178
+ = Where can I report bugs or contribute to the project? =
179
+ You can also report bugs on LearnPress Support Forum or LearnPress <a href="https://github.com/LearnPress/LearnPress" target="_blank">Github Repository</a>.
180
 
181
+ = Where can I find the REST API documentation? =
182
+ We will provide documentation about LearnPress REST API really soon.
183
 
184
+ = LearnPress is great, can I contribute to it? =
185
+ Yes, you can and we appreciate it. Join in our <a href="https://github.com/LearnPress/LearnPress" target="_blank">Github Repository</a>.
186
 
187
+ **LearnPress Translation project**
188
+ https://www.transifex.com/projects/p/learnpress/
189
 
190
+ == Screenshots ==
191
 
192
  1. Curriculum - Drag and Drop lesson or quiz.
193
  2. Lesson content.
196
  5. Quiz settings.
197
  6. Email settings.
198
  7. Demo course page.
199
+ 8. Add-ons of LearnPress.
200
 
201
  == Changelog ==
202
+ = 3.2.1 =
203
+ ~ Fixed can't enroll course.
204
+ ~ Fixed upload issue and drag user avatar on mobile.
205
+ ~ Fixed course duration does not work properly.
206
+ ~ Fixed question with multi language.
207
+ ~ Fixed mail to user 2 times when completed course.
208
 
209
  = 3.2.0 =
210
  ~ Fixed issue info of order added manual not correct.
263
  = 0.9.19 =
264
  In this version, we have changed a little bit about LearnPress Plugin directory structure and moved all add-ons to become independence plugins. If you face any problems relate to add-ons, please completely remove old version and re-install LearnPress. It does not affect your current data. Thank you.
265
 
266
+ == Other note ==
267
+ <a href="http://docs.thimpress.com/learnpress" target="_blank">Documentation</a> is available in ThimPress site.
268
  <a href="https://github.com/LearnPress/LearnPress/" target="_blank">LearnPress github repo.</a>
templates/single-course/loop-section.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * This template can be overridden by copying it to yourtheme/learnpress/single-course/loop-section.php.
6
  *
7
- * @author ThimPress
8
  * @package Learnpress/Templates
9
  * @version 3.0.0
10
  */
@@ -13,13 +13,18 @@
13
  * Prevent loading this file directly
14
  */
15
  defined( 'ABSPATH' ) || exit();
16
-
 
 
17
  if ( ! isset( $section ) ) {
18
  return;
19
  }
 
20
  ?>
21
 
22
- <li<?php $section->main_class();?> id="section-<?php echo $section->get_slug(); ?>" data-id="<?php echo $section->get_slug(); ?>" data-section-id="<?php echo $section->get_id();?>">
 
 
23
 
24
  <?php
25
  /**
@@ -30,8 +35,8 @@ if ( ! isset( $section ) ) {
30
  /**
31
  * @since 3.0.0
32
  *
33
- * @see learn_press_curriculum_section_title - 5
34
- * @see learn_press_curriculum_section_content - 10
35
  */
36
  do_action( 'learn-press/section-summary', $section );
37
  ?>
4
  *
5
  * This template can be overridden by copying it to yourtheme/learnpress/single-course/loop-section.php.
6
  *
7
+ * @author ThimPress
8
  * @package Learnpress/Templates
9
  * @version 3.0.0
10
  */
13
  * Prevent loading this file directly
14
  */
15
  defined( 'ABSPATH' ) || exit();
16
+ /**
17
+ * @var LP_Course_Section $section
18
+ */
19
  if ( ! isset( $section ) ) {
20
  return;
21
  }
22
+
23
  ?>
24
 
25
+ <li<?php $section->main_class(); ?> id="section-<?php echo $section->get_slug(); ?>"
26
+ data-id="<?php echo $section->get_slug(); ?>"
27
+ data-section-id="<?php echo $section->get_id(); ?>">
28
 
29
  <?php
30
  /**
35
  /**
36
  * @since 3.0.0
37
  *
38
+ * @see learn_press_curriculum_section_title - 5
39
+ * @see learn_press_curriculum_section_content - 10
40
  */
41
  do_action( 'learn-press/section-summary', $section );
42
  ?>