Category Order and Taxonomy Terms Order - Version 1.4.8

Version Description

  • textomain folder fix
    • Translation fix for user roles
    • the_title filter replced with terms_walker
    • Add Nonce for admin settings
Download this release

Release Info

Developer nsp-code
Plugin Icon 128x128 Category Order and Taxonomy Terms Order
Version 1.4.8
Comparing to
See all releases

Code changes from version 1.4.6 to 1.4.8

Files changed (35) hide show
  1. css/to.css +6 -13
  2. include/functions.php +38 -16
  3. include/interface.php +6 -6
  4. include/options.php +19 -18
  5. include/terms_walker.php +1 -1
  6. lang/tto-de_DE.mo → languages/taxonomy-terms-order-de_DE.mo +0 -0
  7. lang/tto-de_DE.po → languages/taxonomy-terms-order-de_DE.po +0 -0
  8. lang/tto-fa_IR.mo → languages/taxonomy-terms-order-fa_IR.mo +0 -0
  9. lang/tto-fa_IR.po → languages/taxonomy-terms-order-fa_IR.po +0 -0
  10. lang/tto-fr_FR.mo → languages/taxonomy-terms-order-fr_FR.mo +0 -0
  11. lang/tto-fr_FR.po → languages/taxonomy-terms-order-fr_FR.po +0 -0
  12. lang/tto-hu_HU.mo → languages/taxonomy-terms-order-hu_HU.mo +0 -0
  13. lang/tto-hu_HU.po → languages/taxonomy-terms-order-hu_HU.po +0 -0
  14. lang/tto-ja.mo → languages/taxonomy-terms-order-ja.mo +0 -0
  15. lang/tto-ja.po → languages/taxonomy-terms-order-ja.po +0 -0
  16. lang/tto-nl_NL.mo → languages/taxonomy-terms-order-nl_NL.mo +0 -0
  17. lang/tto-nl_NL.po → languages/taxonomy-terms-order-nl_NL.po +0 -0
  18. lang/tto-pl_PL.mo → languages/taxonomy-terms-order-pl_PL.mo +0 -0
  19. lang/tto-pl_PL.po → languages/taxonomy-terms-order-pl_PL.po +0 -0
  20. lang/tto-pt_BR.mo → languages/taxonomy-terms-order-pt_BR.mo +0 -0
  21. lang/tto-pt_BR.po → languages/taxonomy-terms-order-pt_BR.po +0 -0
  22. lang/tto-pt_PT.mo → languages/taxonomy-terms-order-pt_PT.mo +0 -0
  23. lang/tto-pt_PT.po → languages/taxonomy-terms-order-pt_PT.po +0 -0
  24. lang/tto-ro_RO.mo → languages/taxonomy-terms-order-ro_RO.mo +0 -0
  25. lang/tto-ro_RO.po → languages/taxonomy-terms-order-ro_RO.po +0 -0
  26. lang/tto-sk_SK.mo → languages/taxonomy-terms-order-sk_SK.mo +0 -0
  27. lang/tto-sk_SK.po → languages/taxonomy-terms-order-sk_SK.po +0 -0
  28. lang/tto-uk_UA.mo → languages/taxonomy-terms-order-uk_UA.mo +0 -0
  29. lang/tto-uk_UA.po → languages/taxonomy-terms-order-uk_UA.po +0 -0
  30. lang/tto-zh_TW.mo → languages/taxonomy-terms-order-zh_TW.mo +0 -0
  31. lang/tto-zh_TW.po → languages/taxonomy-terms-order-zh_TW.po +0 -0
  32. lang/tto.mo → languages/taxonomy-terms-order.mo +0 -0
  33. lang/tto.po → languages/taxonomy-terms-order.po +0 -0
  34. readme.txt +22 -3
  35. taxonomy-terms-order.php +8 -6
css/to.css CHANGED
@@ -1,22 +1,16 @@
1
 
2
- h2.subtitle {font-size: 15px; font-style: italic; font-weight: bold}
3
 
4
  #order-terms {}
5
  #order-terms img {vertical-align: middle}
6
  #order-terms #tto_sortable { list-style-type: none; margin: 20px 0 0; padding: 0; width: 100%; }
7
  #order-terms ul {list-style: none;}
8
  #order-terms ul.children {margin-left: 25px}
9
- .term_type_li .item {background-color: #f9f9f9;
10
- border: 1px solid #dddddd;
11
- cursor: move;
12
- margin: 4px 0;
13
- padding: 2px 0;}
14
- .term_type_li .item span { background: none repeat scroll 0 0 #F7F7F7; color: #555555; display: block; font-weight: bold; padding: 5px 15px; font-size: 13px;}
15
- .term_type_li .item span.edit {position: absolute; right: 10px; top: 6px; padding: 0px; margin: 0px}
16
- #order-terms .placeholder{border: dashed 2px #ccc;height:30px; background-color: #FFF;}
17
- .term_type_li ul {margin-top: 6px}
18
- #dragHelper li, #dragHelper ul {background: transparent !important;}
19
- #dragHelper ul {list-style: none;}
20
 
21
  .wp-list-taxonomy {width: 100%}
22
  .wp-list-taxonomy thead tr th{padding: 10px 0;}
@@ -33,7 +27,6 @@ h2.subtitle {font-size: 15px; font-style: italic; font-weight: bold}
33
  -webkit-box-shadow: 1px 1px 7px rgba(50, 50, 50, 0.17);
34
  -moz-box-shadow: 1px 1px 7px rgba(50, 50, 50, 0.17);
35
  box-shadow: 1px 1px 7px rgba(50, 50, 50, 0.17);}
36
- #cpt_info_box p {font-size: 12px}
37
  #cpt_info_box a {text-decoration: none}
38
  #cpt_info_box #donate_form {float: right; padding: 10px 0 17px; text-align: center; width: 100%;}
39
  #p_right {float: right; width: 210px; background-color:#f5f5f5; border-left: 1px dashed #dedede; border-right: 1px dashed #dedede}
1
 
2
+ h2.subtitle {font-size: 15px; font-weight: bold; padding: 20px 0 10px 0}
3
 
4
  #order-terms {}
5
  #order-terms img {vertical-align: middle}
6
  #order-terms #tto_sortable { list-style-type: none; margin: 20px 0 0; padding: 0; width: 100%; }
7
  #order-terms ul {list-style: none;}
8
  #order-terms ul.children {margin-left: 25px}
9
+
10
+ #order-terms #tto_sortable li > .item { padding: 2px 0px; margin: 4px 0px; border: 1px solid #DDDDDD; cursor: move; -moz-border-radius:6px; background-color: #f9f9f9;}
11
+ #order-terms #tto_sortable li:nth-child(2n+1) > .item { background-color: #fff !important;}
12
+ #order-terms #tto_sortable li span { display: block; padding: 5px 10px; color:#555; font-size:13px;}
13
+ #order-terms #tto_sortable li.placeholder{border: dashed 2px #ccc;height:30px; background-color: #FFF;}
 
 
 
 
 
 
14
 
15
  .wp-list-taxonomy {width: 100%}
16
  .wp-list-taxonomy thead tr th{padding: 10px 0;}
27
  -webkit-box-shadow: 1px 1px 7px rgba(50, 50, 50, 0.17);
28
  -moz-box-shadow: 1px 1px 7px rgba(50, 50, 50, 0.17);
29
  box-shadow: 1px 1px 7px rgba(50, 50, 50, 0.17);}
 
30
  #cpt_info_box a {text-decoration: none}
31
  #cpt_info_box #donate_form {float: right; padding: 10px 0 17px; text-align: center; width: 100%;}
32
  #p_right {float: right; width: 210px; background-color:#f5f5f5; border-left: 1px dashed #dedede; border-right: 1px dashed #dedede}
include/functions.php CHANGED
@@ -31,6 +31,25 @@
31
  <div id="p_right">
32
 
33
  <div id="p_socialize">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  <div class="p_s_item s_gp">
35
  <!-- Place this tag in your head or just before your close body tag -->
36
  <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
@@ -38,31 +57,34 @@
38
  <!-- Place this tag where you want the +1 button to render -->
39
  <div class="g-plusone" data-size="small" data-annotation="none" data-href="http://nsp-code.com/"></div>
40
  </div>
41
- <div class="p_s_item s_t">
42
- <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://www.nsp-code.com" data-text="Define custom order for your post types through an easy to use javascript AJAX drag and drop interface. No theme code updates are necessarily, this plugin will take care of query update." data-count="none">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
43
- </div>
44
-
45
- <div class="p_s_item s_f">
46
- <iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.nsp-code.com%2F&amp;send=false&amp;layout=button_count&amp;width=82&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font=arial&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:82px; height:21px;" allowTransparency="true"></iframe>
47
- </div>
48
 
49
  <div class="clear"></div>
50
  </div>
51
 
52
  <div id="donate_form">
53
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
54
- <input type="hidden" name="cmd" value="_s-xclick">
55
- <input type="hidden" name="hosted_button_id" value="CU22TFDKJMLAE">
56
- <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
57
- <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
 
 
 
 
 
 
 
 
 
58
  </form>
 
59
  </div>
60
  </div>
61
 
62
- <p><?php _e( "Did you find this plugin useful? Please support our work with a donation or write an article about this plugin in your blog with a link to our site", 'tto' ) ?> <br /><strong>http://www.nsp-code.com/</strong>.</p>
63
- <h4><?php _e( "Did you know there is available an advanced version of this plug-in?", 'tto' ) ?> <a target="_blank" href="http://www.nsp-code.com/premium-plugins/wordpress-plugins/advanced-taxonomy-terms-order/"><?php _e( "Read more", 'tto' ) ?></a></h4>
64
- <p><?php _e('Check our', 'tto') ?> <a target="_blank" href="https://wordpress.org/plugins/post-terms-order/">Post Terms Order</a> <?php _e('plugin which allow to custom sort categories and custom taxonomies terms per post basis', 'tto') ?> </p>
65
- <p><?php _e( "Check our", 'tto' ) ?> <a target="_blank" href="https://wordpress.org/plugins/post-types-order/">Post Types Order</a> <?php _e( "plugin which allow to custom sort all posts, pages, custom post types", 'tto' ) ?> </p>
66
 
67
  <div class="clear"></div>
68
  </div>
31
  <div id="p_right">
32
 
33
  <div id="p_socialize">
34
+
35
+ <div class="p_s_item s_f">
36
+ <div id="fb-root"></div>
37
+ <script>(function(d, s, id) {
38
+ var js, fjs = d.getElementsByTagName(s)[0];
39
+ if (d.getElementById(id)) return;
40
+ js = d.createElement(s); js.id = id;
41
+ js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5";
42
+ fjs.parentNode.insertBefore(js, fjs);
43
+ }(document, 'script', 'facebook-jssdk'));</script>
44
+
45
+ <div class="fb-like" data-href="https://www.facebook.com/Nsp-Code-190329887674484/" data-layout="button_count" data-action="like" data-show-faces="true" data-share="false"></div>
46
+
47
+ </div>
48
+
49
+ <div class="p_s_item s_t">
50
+ <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://www.nsp-code.com" data-text="Define custom order for your post types through an easy to use javascript AJAX drag and drop interface. No theme code updates are necessarily, this plugin will take care of query update." data-count="none">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
51
+ </div>
52
+
53
  <div class="p_s_item s_gp">
54
  <!-- Place this tag in your head or just before your close body tag -->
55
  <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
57
  <!-- Place this tag where you want the +1 button to render -->
58
  <div class="g-plusone" data-size="small" data-annotation="none" data-href="http://nsp-code.com/"></div>
59
  </div>
 
 
 
 
 
 
 
60
 
61
  <div class="clear"></div>
62
  </div>
63
 
64
  <div id="donate_form">
65
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
66
+ <input type="hidden" name="cmd" value="_donations">
67
+ <input type="hidden" name="business" value="electronice_delphi@yahoo.com">
68
+ <input type="hidden" name="lc" value="RO">
69
+ <input type="hidden" name="item_name" value="Nsp-Code">
70
+ <input type="hidden" name="item_number" value="taxonomy-terms-order">
71
+ <input type="hidden" name="no_note" value="0">
72
+ <input type="hidden" name="cn" value="Add special instructions to the seller:">
73
+ <input type="hidden" name="no_shipping" value="2">
74
+ <input type="hidden" name="cancel_return" value="http://nsp-code.com/donate.php">
75
+ <input type="hidden" name="currency_code" value="USD">
76
+ <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHosted">
77
+ <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
78
+ <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
79
  </form>
80
+
81
  </div>
82
  </div>
83
 
84
+ <p><?php _e( "Did you find this plugin useful? Please support our work with a donation or write an article about this plugin in your blog with a link to our site", 'taxonomy-terms-order' ) ?> <br /><strong>http://www.nsp-code.com/</strong>.</p>
85
+ <h4><?php _e( "Did you know there is available an advanced version of this plug-in?", 'taxonomy-terms-order' ) ?> <a target="_blank" href="http://www.nsp-code.com/premium-plugins/wordpress-plugins/advanced-taxonomy-terms-order/"><?php _e( "Read more", 'taxonomy-terms-order' ) ?></a></h4>
86
+ <p><?php _e('Check our', 'taxonomy-terms-order') ?> <a target="_blank" href="https://wordpress.org/plugins/post-terms-order/">Post Terms Order</a> <?php _e('plugin which allow to custom sort categories and custom taxonomies terms per post basis', 'taxonomy-terms-order') ?> </p>
87
+ <p><?php _e( "Check our", 'taxonomy-terms-order' ) ?> <a target="_blank" href="https://wordpress.org/plugins/post-types-order/">Post Types Order</a> <?php _e( "plugin which allow to custom sort all posts, pages, custom post types", 'taxonomy-terms-order' ) ?> </p>
88
 
89
  <div class="clear"></div>
90
  </div>
include/interface.php CHANGED
@@ -35,7 +35,7 @@
35
  ?>
36
  <div class="wrap">
37
  <div class="icon32" id="icon-edit"><br></div>
38
- <h2><?php _e( "Taxonomy Order", 'tto' ) ?></h2>
39
 
40
  <?php tto_info_box() ?>
41
 
@@ -43,7 +43,7 @@
43
 
44
  <noscript>
45
  <div class="error message">
46
- <p><?php _e( "This plugin can't work without javascript, because it's use drag and drop and AJAX.", 'tto' ) ?></p>
47
  </div>
48
  </noscript>
49
 
@@ -97,11 +97,11 @@
97
 
98
  ?>
99
 
100
- <h2 class="subtitle"><?php echo ucfirst($post_type_data->labels->name) ?> <?php _e( "Taxonomies", 'tto' ) ?></h2>
101
  <table cellspacing="0" class="wp-list-taxonomy">
102
  <thead>
103
  <tr>
104
- <th style="" class="column-cb check-column" id="cb" scope="col">&nbsp;</th><th style="" class="" id="author" scope="col"><?php _e( "Taxonomy Title", 'tto' ) ?></th><th style="" class="manage-column" id="categories" scope="col"><?php _e( "Total Posts", 'tto' ) ?></th> </tr>
105
  </thead>
106
 
107
 
@@ -151,7 +151,7 @@
151
 
152
  <div class="alignleft actions">
153
  <p class="submit">
154
- <a href="javascript:;" class="save-order button-primary"><?php _e( "Update", 'tto' ) ?></a>
155
  </p>
156
  </div>
157
 
@@ -200,7 +200,7 @@
200
  var serialize_data = serialize(mySortable);
201
 
202
  jQuery.post( ajaxurl, { action:'update-taxonomy-order', order: serialize_data, taxonomy : '<?php echo $taxonomy ?>' }, function() {
203
- jQuery("#ajax-response").html('<div class="message updated fade"><p><?php _e( "Items Order Updated", 'tto' ) ?></p></div>');
204
  jQuery("#ajax-response div").delay(3000).hide("slow");
205
  });
206
  });
35
  ?>
36
  <div class="wrap">
37
  <div class="icon32" id="icon-edit"><br></div>
38
+ <h2><?php _e( "Taxonomy Order", 'taxonomy-terms-order' ) ?></h2>
39
 
40
  <?php tto_info_box() ?>
41
 
43
 
44
  <noscript>
45
  <div class="error message">
46
+ <p><?php _e( "This plugin can't work without javascript, because it's use drag and drop and AJAX.", 'taxonomy-terms-order' ) ?></p>
47
  </div>
48
  </noscript>
49
 
97
 
98
  ?>
99
 
100
+ <h2 class="subtitle"><?php echo ucfirst($post_type_data->labels->name) ?> <?php _e( "Taxonomies", 'taxonomy-terms-order' ) ?></h2>
101
  <table cellspacing="0" class="wp-list-taxonomy">
102
  <thead>
103
  <tr>
104
+ <th style="" class="column-cb check-column" id="cb" scope="col">&nbsp;</th><th style="" class="" id="author" scope="col"><?php _e( "Taxonomy Title", 'taxonomy-terms-order' ) ?></th><th style="" class="manage-column" id="categories" scope="col"><?php _e( "Total Posts", 'taxonomy-terms-order' ) ?></th> </tr>
105
  </thead>
106
 
107
 
151
 
152
  <div class="alignleft actions">
153
  <p class="submit">
154
+ <a href="javascript:;" class="save-order button-primary"><?php _e( "Update", 'taxonomy-terms-order' ) ?></a>
155
  </p>
156
  </div>
157
 
200
  var serialize_data = serialize(mySortable);
201
 
202
  jQuery.post( ajaxurl, { action:'update-taxonomy-order', order: serialize_data, taxonomy : '<?php echo $taxonomy ?>' }, function() {
203
+ jQuery("#ajax-response").html('<div class="message updated fade"><p><?php _e( "Items Order Updated", 'taxonomy-terms-order' ) ?></p></div>');
204
  jQuery("#ajax-response div").delay(3000).hide("slow");
205
  });
206
  });
include/options.php CHANGED
@@ -5,7 +5,7 @@ function to_plugin_options()
5
  {
6
  $options = get_option('tto_options');
7
 
8
- if (isset($_POST['form_submit']))
9
  {
10
 
11
  $options['capability'] = sanitize_key($_POST['capability']);
@@ -13,7 +13,7 @@ function to_plugin_options()
13
  $options['autosort'] = isset($_POST['autosort']) ? intval($_POST['autosort']) : '';
14
  $options['adminsort'] = isset($_POST['adminsort']) ? intval($_POST['adminsort']) : '';
15
 
16
- ?><div class="updated fade"><p><?php _e('Settings Saved', 'tto') ?></p></div><?php
17
 
18
  update_option('tto_options', $options);
19
  }
@@ -21,45 +21,45 @@ function to_plugin_options()
21
  ?>
22
  <div class="wrap">
23
  <div id="icon-settings" class="icon32"></div>
24
- <h2><?php _e( "General Settings", 'tto' ) ?></h2>
25
 
26
  <?php tto_info_box() ?>
27
 
28
  <form id="form_data" name="form" method="post">
29
  <br />
30
- <h2 class="subtitle"><?php _e( "General", 'tto' ) ?></h2>
31
  <table class="form-table">
32
  <tbody>
33
 
34
  <tr valign="top">
35
- <th scope="row" style="text-align: right;"><label><?php _e( "Minimum Level to use this plugin", 'tto' ) ?></label></th>
36
  <td>
37
  <select id="role" name="capability">
38
- <option value="read" <?php if (isset($options['capability']) && $options['capability'] == "read") echo 'selected="selected"'?>><?php _e('Subscriber', 'cpt') ?></option>
39
- <option value="edit_posts" <?php if (isset($options['capability']) && $options['capability'] == "edit_posts") echo 'selected="selected"'?>><?php _e('Contributor', 'cpt') ?></option>
40
- <option value="publish_posts" <?php if (isset($options['capability']) && $options['capability'] == "publish_posts") echo 'selected="selected"'?>><?php _e('Author', 'cpt') ?></option>
41
- <option value="publish_pages" <?php if (isset($options['capability']) && $options['capability'] == "publish_pages") echo 'selected="selected"'?>><?php _e('Editor', 'cpt') ?></option>
42
- <option value="install_plugins" <?php if (!isset($options['capability']) || empty($options['capability']) || (isset($options['capability']) && $options['capability'] == "install_plugins")) echo 'selected="selected"'?>><?php _e('Administrator', 'cpt') ?></option>
43
  </select>
44
  </td>
45
  </tr>
46
 
47
 
48
  <tr valign="top">
49
- <th scope="row" style="text-align: right;"><label><?php _e( "Auto Sort", 'tto' ) ?></label></th>
50
  <td>
51
  <select id="role" name="autosort">
52
- <option value="0" <?php if ($options['autosort'] == "0") echo 'selected="selected"'?>><?php _e('OFF', 'tto') ?></option>
53
- <option value="1" <?php if ($options['autosort'] == "1") echo 'selected="selected"'?>><?php _e('ON', 'tto') ?></option>
54
- </select> *(<?php _e( "global setting", 'tto' ) ?>) <?php _e( "Additional description and details at ", 'tto' ) ?><a target="_blank" href="http://www.nsp-code.com/taxonomy-terms-order-and-auto-sort-admin-sort-description-an-usage/"><?php _e( "Auto Sort Description", 'tto' ) ?></a>
55
  </td>
56
  </tr>
57
 
58
  <tr valign="top">
59
- <th scope="row" style="text-align: right;"><label><?php _e( "Admin Sort", 'tto' ) ?></label></th>
60
  <td>
61
  <input id="adminsort" type="checkbox" <?php if ($options['adminsort'] == "1") {echo ' checked="checked"';} ?> value="1" name="adminsort">
62
- <label for="adminsort"><?php _e("This will change the order of terms within the admin interface", 'tto') ?>. <?php _e( "Additional description and details at ", 'tto' ) ?><a target="_blank" href="http://www.nsp-code.com/taxonomy-terms-order-and-auto-sort-admin-sort-description-an-usage/"><?php _e( "Auto Sort Description", 'tto' ) ?></a></label>
63
  </td>
64
  </tr>
65
 
@@ -70,10 +70,11 @@ function to_plugin_options()
70
 
71
 
72
  <p class="submit">
73
- <input type="submit" name="Submit" class="button-primary" value="<?php _e('Save Settings', 'tto') ?>">
74
  </p>
75
 
76
- <input type="hidden" name="form_submit" value="true" />
 
77
 
78
  </form>
79
 
5
  {
6
  $options = get_option('tto_options');
7
 
8
+ if (isset($_POST['to_form_submit']) && wp_verify_nonce($_POST['to_form_nonce'],'to_form_submit') )
9
  {
10
 
11
  $options['capability'] = sanitize_key($_POST['capability']);
13
  $options['autosort'] = isset($_POST['autosort']) ? intval($_POST['autosort']) : '';
14
  $options['adminsort'] = isset($_POST['adminsort']) ? intval($_POST['adminsort']) : '';
15
 
16
+ ?><div class="updated fade"><p><?php _e('Settings Saved', 'taxonomy-terms-order') ?></p></div><?php
17
 
18
  update_option('tto_options', $options);
19
  }
21
  ?>
22
  <div class="wrap">
23
  <div id="icon-settings" class="icon32"></div>
24
+ <h2><?php _e( "General Settings", 'taxonomy-terms-order' ) ?></h2>
25
 
26
  <?php tto_info_box() ?>
27
 
28
  <form id="form_data" name="form" method="post">
29
  <br />
30
+ <h2 class="subtitle"><?php _e( "General", 'taxonomy-terms-order' ) ?></h2>
31
  <table class="form-table">
32
  <tbody>
33
 
34
  <tr valign="top">
35
+ <th scope="row" style="text-align: right;"><label><?php _e( "Minimum Level to use this plugin", 'taxonomy-terms-order' ) ?></label></th>
36
  <td>
37
  <select id="role" name="capability">
38
+ <option value="read" <?php if (isset($options['capability']) && $options['capability'] == "read") echo 'selected="selected"'?>><?php _e('Subscriber', 'taxonomy-terms-order') ?></option>
39
+ <option value="edit_posts" <?php if (isset($options['capability']) && $options['capability'] == "edit_posts") echo 'selected="selected"'?>><?php _e('Contributor', 'taxonomy-terms-order') ?></option>
40
+ <option value="publish_posts" <?php if (isset($options['capability']) && $options['capability'] == "publish_posts") echo 'selected="selected"'?>><?php _e('Author', 'taxonomy-terms-order') ?></option>
41
+ <option value="publish_pages" <?php if (isset($options['capability']) && $options['capability'] == "publish_pages") echo 'selected="selected"'?>><?php _e('Editor', 'taxonomy-terms-order') ?></option>
42
+ <option value="install_plugins" <?php if (!isset($options['capability']) || empty($options['capability']) || (isset($options['capability']) && $options['capability'] == "install_plugins")) echo 'selected="selected"'?>><?php _e('Administrator', 'taxonomy-terms-order') ?></option>
43
  </select>
44
  </td>
45
  </tr>
46
 
47
 
48
  <tr valign="top">
49
+ <th scope="row" style="text-align: right;"><label><?php _e( "Auto Sort", 'taxonomy-terms-order' ) ?></label></th>
50
  <td>
51
  <select id="role" name="autosort">
52
+ <option value="0" <?php if ($options['autosort'] == "0") echo 'selected="selected"'?>><?php _e('OFF', 'taxonomy-terms-order') ?></option>
53
+ <option value="1" <?php if ($options['autosort'] == "1") echo 'selected="selected"'?>><?php _e('ON', 'taxonomy-terms-order') ?></option>
54
+ </select> *(<?php _e( "global setting", 'taxonomy-terms-order' ) ?>) <?php _e( "Additional description and details at ", 'taxonomy-terms-order' ) ?><a target="_blank" href="http://www.nsp-code.com/taxonomy-terms-order-and-auto-sort-admin-sort-description-an-usage/"><?php _e( "Auto Sort Description", 'taxonomy-terms-order' ) ?></a>
55
  </td>
56
  </tr>
57
 
58
  <tr valign="top">
59
+ <th scope="row" style="text-align: right;"><label><?php _e( "Admin Sort", 'taxonomy-terms-order' ) ?></label></th>
60
  <td>
61
  <input id="adminsort" type="checkbox" <?php if ($options['adminsort'] == "1") {echo ' checked="checked"';} ?> value="1" name="adminsort">
62
+ <label for="adminsort"><?php _e("This will change the order of terms within the admin interface", 'taxonomy-terms-order') ?>. <?php _e( "Additional description and details at ", 'taxonomy-terms-order' ) ?><a target="_blank" href="http://www.nsp-code.com/taxonomy-terms-order-and-auto-sort-admin-sort-description-an-usage/"><?php _e( "Auto Sort Description", 'taxonomy-terms-order' ) ?></a></label>
63
  </td>
64
  </tr>
65
 
70
 
71
 
72
  <p class="submit">
73
+ <input type="submit" name="Submit" class="button-primary" value="<?php _e('Save Settings', 'taxonomy-terms-order') ?>">
74
  </p>
75
 
76
+ <?php wp_nonce_field('to_form_submit','to_form_nonce'); ?>
77
+ <input type="hidden" name="to_form_submit" value="true" />
78
 
79
  </form>
80
 
include/terms_walker.php CHANGED
@@ -34,7 +34,7 @@
34
 
35
  //extract($args, EXTR_SKIP);
36
  $taxonomy = get_taxonomy($term->term_taxonomy_id);
37
- $output .= $indent . '<li class="term_type_li" id="item_'.$term->term_id.'"><div class="item"><span>'.apply_filters( 'the_title', $term->name, $term->term_id ).' </span></div>';
38
  }
39
 
40
 
34
 
35
  //extract($args, EXTR_SKIP);
36
  $taxonomy = get_taxonomy($term->term_taxonomy_id);
37
+ $output .= $indent . '<li class="term_type_li" id="item_'.$term->term_id.'"><div class="item"><span>'.apply_filters( 'to/term_title', $term->name, $term ).' </span></div>';
38
  }
39
 
40
 
lang/tto-de_DE.mo → languages/taxonomy-terms-order-de_DE.mo RENAMED
File without changes
lang/tto-de_DE.po → languages/taxonomy-terms-order-de_DE.po RENAMED
File without changes
lang/tto-fa_IR.mo → languages/taxonomy-terms-order-fa_IR.mo RENAMED
File without changes
lang/tto-fa_IR.po → languages/taxonomy-terms-order-fa_IR.po RENAMED
File without changes
lang/tto-fr_FR.mo → languages/taxonomy-terms-order-fr_FR.mo RENAMED
File without changes
lang/tto-fr_FR.po → languages/taxonomy-terms-order-fr_FR.po RENAMED
File without changes
lang/tto-hu_HU.mo → languages/taxonomy-terms-order-hu_HU.mo RENAMED
File without changes
lang/tto-hu_HU.po → languages/taxonomy-terms-order-hu_HU.po RENAMED
File without changes
lang/tto-ja.mo → languages/taxonomy-terms-order-ja.mo RENAMED
File without changes
lang/tto-ja.po → languages/taxonomy-terms-order-ja.po RENAMED
File without changes
lang/tto-nl_NL.mo → languages/taxonomy-terms-order-nl_NL.mo RENAMED
File without changes
lang/tto-nl_NL.po → languages/taxonomy-terms-order-nl_NL.po RENAMED
File without changes
lang/tto-pl_PL.mo → languages/taxonomy-terms-order-pl_PL.mo RENAMED
File without changes
lang/tto-pl_PL.po → languages/taxonomy-terms-order-pl_PL.po RENAMED
File without changes
lang/tto-pt_BR.mo → languages/taxonomy-terms-order-pt_BR.mo RENAMED
File without changes
lang/tto-pt_BR.po → languages/taxonomy-terms-order-pt_BR.po RENAMED
File without changes
lang/tto-pt_PT.mo → languages/taxonomy-terms-order-pt_PT.mo RENAMED
File without changes
lang/tto-pt_PT.po → languages/taxonomy-terms-order-pt_PT.po RENAMED
File without changes
lang/tto-ro_RO.mo → languages/taxonomy-terms-order-ro_RO.mo RENAMED
File without changes
lang/tto-ro_RO.po → languages/taxonomy-terms-order-ro_RO.po RENAMED
File without changes
lang/tto-sk_SK.mo → languages/taxonomy-terms-order-sk_SK.mo RENAMED
File without changes
lang/tto-sk_SK.po → languages/taxonomy-terms-order-sk_SK.po RENAMED
File without changes
lang/tto-uk_UA.mo → languages/taxonomy-terms-order-uk_UA.mo RENAMED
File without changes
lang/tto-uk_UA.po → languages/taxonomy-terms-order-uk_UA.po RENAMED
File without changes
lang/tto-zh_TW.mo → languages/taxonomy-terms-order-zh_TW.mo RENAMED
File without changes
lang/tto-zh_TW.po → languages/taxonomy-terms-order-zh_TW.po RENAMED
File without changes
lang/tto.mo → languages/taxonomy-terms-order.mo RENAMED
File without changes
lang/tto.po → languages/taxonomy-terms-order.po RENAMED
File without changes
readme.txt CHANGED
@@ -1,9 +1,10 @@
1
  === Category Order and Taxonomy Terms Order ===
2
- Contributors: Nsp Code
3
  Donate link: http://www.nsp-code.com/donate.php
4
  Tags: category order,terms order, taxonomy order, admin order
5
  Requires at least: 2.8
6
- Tested up to: 4.3
 
7
 
8
  Order Categories and all custom taxonomies terms (hierarchically) and child terms using a Drag and Drop Sortable javascript capability. No Theme update is required.
9
 
@@ -34,6 +35,10 @@ Feel free to contact me at electronice_delphi@yahoo.com
34
 
35
  Yes, this is the right tool for you. The plugin come with a unique feature to update the queries on the fly and return the terms in the required ored without changing any line of code. Or as alternative you can do that manually.
36
 
 
 
 
 
37
  = What taxonomies will allow me to sort? =
38
 
39
  You can sort ALL taxonomies, including the default Categories.
@@ -48,7 +53,21 @@ All ideas are welcome and i put them on my list to be implemented into the new v
48
 
49
  == Change Log ==
50
 
 
 
 
 
 
 
 
 
 
 
 
51
  = 1.4.6.1 =
 
 
 
52
  - Translation textdomain fix - thanks to Pedro Mendonça
53
  - Portuguese localization update - Pedro Mendonça
54
 
@@ -102,4 +121,4 @@ Make sure you get the latest version
102
  == Localization ==
103
 
104
  Available in English, Dutch, French, Deutch, Slovak, Japanese, Traditional Chineze, Brazilian Portuguese, Hungarian, Ukrainian, Czech and Romanian
105
- Whant to contribute with a translation to your language? Please use the attached to.pot file
1
  === Category Order and Taxonomy Terms Order ===
2
+ Contributors: nsp-code
3
  Donate link: http://www.nsp-code.com/donate.php
4
  Tags: category order,terms order, taxonomy order, admin order
5
  Requires at least: 2.8
6
+ Tested up to: 4.5.2
7
+ Stable tag: 1.4.8
8
 
9
  Order Categories and all custom taxonomies terms (hierarchically) and child terms using a Drag and Drop Sortable javascript capability. No Theme update is required.
10
 
35
 
36
  Yes, this is the right tool for you. The plugin come with a unique feature to update the queries on the fly and return the terms in the required ored without changing any line of code. Or as alternative you can do that manually.
37
 
38
+ = I prefer to apply the sort through code, how can be done? =
39
+
40
+ Include a 'orderby' => 'term_order' within your get_terms() arguments.
41
+
42
  = What taxonomies will allow me to sort? =
43
 
44
  You can sort ALL taxonomies, including the default Categories.
53
 
54
  == Change Log ==
55
 
56
+ = 1.4.8 =
57
+ - textomain folder fix
58
+ - Translation fix for user roles
59
+ - the_title filter replced with terms_walker
60
+ - Add Nonce for admin settings
61
+
62
+ = 1.4.7 =
63
+ - Texdomain change to taxonomy-terms-order to allow translations through translate.wordpress.org
64
+ - WordPress 4.4 compatibility update
65
+ - Css updates
66
+
67
  = 1.4.6.1 =
68
+ - Security bug fix
69
+
70
+ = 1.4.5 =
71
  - Translation textdomain fix - thanks to Pedro Mendonça
72
  - Portuguese localization update - Pedro Mendonça
73
 
121
  == Localization ==
122
 
123
  Available in English, Dutch, French, Deutch, Slovak, Japanese, Traditional Chineze, Brazilian Portuguese, Hungarian, Ukrainian, Czech and Romanian
124
+ Whant to contribute with a translation to your language? Please check at https://translate.wordpress.org/projects/wp-plugins/taxonomy-terms-order
taxonomy-terms-order.php CHANGED
@@ -3,10 +3,12 @@
3
  Plugin Name: Category Order and Taxonomy Terms Order
4
  Plugin URI: http://www.nsp-code.com
5
  Description: Category Order and Taxonomy Terms Order
6
- Version: 1.4.6.1
7
  Author: Nsp-Code
8
  Author URI: http://www.nsp-code.com
9
  Author Email: electronice_delphi@yahoo.com
 
 
10
  */
11
 
12
 
@@ -55,7 +57,7 @@ Author Email: electronice_delphi@yahoo.com
55
  add_action( 'plugins_loaded', 'to_load_textdomain');
56
  function to_load_textdomain()
57
  {
58
- load_plugin_textdomain('tto', FALSE, dirname( plugin_basename( __FILE__ ) ) . '/lang');
59
  }
60
 
61
  add_action('admin_print_scripts', 'TO_admin_scripts');
@@ -87,7 +89,7 @@ Author Email: electronice_delphi@yahoo.com
87
  include (TOPATH . '/include/terms_walker.php');
88
 
89
  include (TOPATH . '/include/options.php');
90
- add_options_page('Taxonomy Terms Order', '<img class="menu_tto" src="'. TOURL .'/images/menu-icon.png" alt="" />' . __('Taxonomy Terms Order', 'tto'), 'manage_options', 'to-options', 'to_plugin_options');
91
 
92
  $options = get_option('tto_options');
93
 
@@ -122,11 +124,11 @@ Author Email: electronice_delphi@yahoo.com
122
  continue;
123
 
124
  if ($post_type == 'post')
125
- add_submenu_page('edit.php', __('Taxonomy Order', 'tto'), __('Taxonomy Order', 'tto'), $capability, 'to-interface-'.$post_type, 'TOPluginInterface' );
126
  elseif ($post_type == 'attachment')
127
- $hookID = add_submenu_page('upload.php', __('Taxonomy Order', 'tto'), __('Taxonomy Order', 'tto'), $capability, 'to-interface-'.$post_type, 'TOPluginInterface' );
128
  else
129
- add_submenu_page('edit.php?post_type='.$post_type, __('Taxonomy Order', 'tto'), __('Taxonomy Order', 'tto'), $capability, 'to-interface-'.$post_type, 'TOPluginInterface' );
130
  }
131
  }
132
 
3
  Plugin Name: Category Order and Taxonomy Terms Order
4
  Plugin URI: http://www.nsp-code.com
5
  Description: Category Order and Taxonomy Terms Order
6
+ Version: 1.4.8
7
  Author: Nsp-Code
8
  Author URI: http://www.nsp-code.com
9
  Author Email: electronice_delphi@yahoo.com
10
+ Text Domain: taxonomy-terms-order
11
+ Domain Path: /languages/
12
  */
13
 
14
 
57
  add_action( 'plugins_loaded', 'to_load_textdomain');
58
  function to_load_textdomain()
59
  {
60
+ load_plugin_textdomain('taxonomy-terms-order', FALSE, dirname( plugin_basename( __FILE__ ) ) . '/languages');
61
  }
62
 
63
  add_action('admin_print_scripts', 'TO_admin_scripts');
89
  include (TOPATH . '/include/terms_walker.php');
90
 
91
  include (TOPATH . '/include/options.php');
92
+ add_options_page('Taxonomy Terms Order', '<img class="menu_tto" src="'. TOURL .'/images/menu-icon.png" alt="" />' . __('Taxonomy Terms Order', 'taxonomy-terms-order'), 'manage_options', 'to-options', 'to_plugin_options');
93
 
94
  $options = get_option('tto_options');
95
 
124
  continue;
125
 
126
  if ($post_type == 'post')
127
+ add_submenu_page('edit.php', __('Taxonomy Order', 'taxonomy-terms-order'), __('Taxonomy Order', 'taxonomy-terms-order'), $capability, 'to-interface-'.$post_type, 'TOPluginInterface' );
128
  elseif ($post_type == 'attachment')
129
+ $hookID = add_submenu_page('upload.php', __('Taxonomy Order', 'taxonomy-terms-order'), __('Taxonomy Order', 'taxonomy-terms-order'), $capability, 'to-interface-'.$post_type, 'TOPluginInterface' );
130
  else
131
+ add_submenu_page('edit.php?post_type='.$post_type, __('Taxonomy Order', 'taxonomy-terms-order'), __('Taxonomy Order', 'taxonomy-terms-order'), $capability, 'to-interface-'.$post_type, 'TOPluginInterface' );
132
  }
133
  }
134