File tree 2 files changed +30
-1
lines changed 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -410,6 +410,31 @@ public function settings_general_enable_sorting()
410
410
411
411
// fetch all taxonomies with standard WordPress UI that plugin supports
412
412
$ taxonomies = get_taxonomies ( array ( 'show_ui ' => true ), 'objects ' );
413
+
414
+
415
+ // Show check/uncheck all
416
+ if ( count ( $ taxonomies ) > 1 ) {
417
+ ?>
418
+
419
+ <label for="iorderterms-ctrl-all">
420
+ <input id="iorderterms-ctrl-all" type="checkbox" onclick="iOrderTermsToggle(this)" />
421
+ <span><?php echo esc_html_e ( 'Check/uncheck all ' , 'i-order-terms ' ); ?> </span>
422
+ <hr />
423
+ </label>
424
+ <br />
425
+ <script>
426
+ function iOrderTermsToggle(source) {
427
+ var checkboxes = document.getElementsByName('iorderterms_general[taxonomies-sort][]');
428
+ for ( var i = 0; i < checkboxes.length; i++) {
429
+ checkboxes[i].checked = source.checked;
430
+ }
431
+ }
432
+ </script>
433
+
434
+ <?php
435
+ }
436
+
437
+ // List taxonomies
413
438
foreach ( $ taxonomies as $ taxonomy ) {
414
439
if ( $ taxonomy ->_builtin && in_array ( $ taxonomy ->name , array ( 'nav_menu ' ) ) ) {
415
440
continue ;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Contributors: x64igor
3
3
Tags: sort, order, terms, taxonomy
4
4
Requires at least: 3.5
5
5
Tested up to: 4.7
6
- Stable tag: 1.4 .0
6
+ Stable tag: 1.5 .0
7
7
License: GPLv2 or later
8
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
9
@@ -78,6 +78,8 @@ Please make sure to include plugin version when reporting bugs.
78
78
2. Settings section where you can select which taxonomy should be sortable.
79
79
80
80
== Changelog ==
81
+ = 1.5.0 =
82
+ * Added check/uncheck all checkbox in options
81
83
= 1.4.0 =
82
84
* Minified css and js assets
83
85
* Fixed text domain usage
@@ -98,6 +100,8 @@ Please make sure to include plugin version when reporting bugs.
98
100
* Initial release
99
101
100
102
== Upgrade Notice ==
103
+ = 1.5.0 =
104
+ * Added check/uncheck all checkbox in options
101
105
= 1.4.0 =
102
106
* Minified assets and fixed text domain usage
103
107
= 1.3.1 =
You can’t perform that action at this time.
0 commit comments