Category Order and Taxonomy Terms Order - Version 1.5

Version Description

  • Included 'ignore_term_order' to force menu_order ignore when autosort active.
    • Translations issues update
Download this release

Release Info

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

Code changes from version 1.4.9 to 1.5

include/functions.php CHANGED
@@ -1,5 +1,27 @@
1
  <?php
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  /**
4
  * @desc
5
  *
1
  <?php
2
 
3
+
4
+ /**
5
+ * Return default plugin options
6
+ *
7
+ */
8
+ function tto_get_settings()
9
+ {
10
+
11
+ $settings = get_option('tto_options');
12
+
13
+ $defaults = array (
14
+ 'capability' => 'install_plugins',
15
+ 'autosort' => '1',
16
+ 'adminsort' => '1'
17
+ );
18
+ $settings = wp_parse_args( $settings, $defaults );
19
+
20
+ return $settings;
21
+
22
+ }
23
+
24
+
25
  /**
26
  * @desc
27
  *
include/options.php CHANGED
@@ -1,87 +1,91 @@
1
- <?php
2
-
3
-
4
- function to_plugin_options()
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']);
12
-
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
- }
20
-
21
- ?>
22
- <div class="wrap">
23
-
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
-
66
-
67
-
68
- </tbody>
69
- </table>
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
-
81
- <?php
82
- echo '</div>';
83
-
84
-
85
- }
86
-
 
 
 
 
87
  ?>
1
+ <?php
2
+
3
+
4
+ function to_plugin_options()
5
+ {
6
+ $options = tto_get_settings();
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']);
12
+
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
+ }
20
+
21
+ ?>
22
+ <div class="wrap">
23
+
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="autosort" 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>
55
+ <label for="autosort"> *(<?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></label>
56
+ </td>
57
+ </tr>
58
+
59
+ <tr valign="top">
60
+ <th scope="row" style="text-align: right;"><label><?php _e( "Admin Sort", 'taxonomy-terms-order' ) ?></label></th>
61
+ <td>
62
+ <select id="adminsort" name="adminsort">
63
+ <option value="0" <?php if ($options['adminsort'] == "0") echo 'selected="selected"'?>><?php _e('OFF', 'taxonomy-terms-order') ?></option>
64
+ <option value="1" <?php if ($options['adminsort'] == "1") echo 'selected="selected"'?>><?php _e('ON', 'taxonomy-terms-order') ?></option>
65
+ </select>
66
+ <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>
67
+ </td>
68
+ </tr>
69
+
70
+
71
+
72
+ </tbody>
73
+ </table>
74
+
75
+
76
+ <p class="submit">
77
+ <input type="submit" name="Submit" class="button-primary" value="<?php _e('Save Settings', 'taxonomy-terms-order') ?>">
78
+ </p>
79
+
80
+ <?php wp_nonce_field('to_form_submit','to_form_nonce'); ?>
81
+ <input type="hidden" name="to_form_submit" value="true" />
82
+
83
+ </form>
84
+
85
+ <?php
86
+ echo '</div>';
87
+
88
+
89
+ }
90
+
91
  ?>
readme.txt CHANGED
@@ -1,130 +1,136 @@
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.7
7
- Stable tag: 1.4.9
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
-
11
- == Description ==
12
-
13
- Order Categories and all custom taxonomies terms (hierarchically) using a Drag and Drop Sortable javascript capability. <strong>No Theme update is required</strong> the code will change the query on the fly.
14
- If multiple taxonomies are created for a custom post type, a menu will allow to chose the one need sorted. If child categories (terms) are defined, tose can be sorder too using the same interface
15
- <br />Also you can have the admin terms interface sorted per your new sort.
16
- <br />This plugin is developed by <a target="_blank" href="http://www.nsp-code.com">Nsp-Code</a>
17
-
18
- == Installation ==
19
-
20
- 1. Upload `taxonomy-terms-order` folder to your `/wp-content/plugins/` directory.
21
- 2. Activate the plugin from Admin > Plugins menu.
22
- 3. Once activated you should check with Settings > Taxonomy Terms Order
23
- 4. Use Taxonomy Order link which appear into each post type section to make your sort.
24
-
25
- == Screenshots ==
26
-
27
- 1. Category Order Interface.
28
- 2. Multiple Taxonomies Interface.
29
-
30
- == Frequently Asked Questions ==
31
-
32
- Feel free to contact me at electronice_delphi@yahoo.com
33
-
34
- = I have no PHP knowledge at all, i will still be able to use this plugin? =
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.
45
-
46
- = Is there any way i can get my admin interface to use the custom terms order? =
47
-
48
- Absolutelly, the plugin can do that. In fact you can configure so only the admin will update and the front side template will display the terms as before.
49
-
50
- = There is a feature that i want it implemented, can you do something about it? =
51
-
52
- All ideas are welcome and i put them on my list to be implemented into the new versions. Anyway this may take time, but if you are in a rush, please consider a small donation and we can arrange something.
53
-
54
- == Change Log ==
55
-
56
- = 1.4.9 =
57
- - Remove translations from the package
58
- - Removed donate banner
59
- - PHP 7 fix
60
- - Unused action remove
61
-
62
- = 1.4.8 =
63
- - textomain folder fix
64
- - Translation fix for user roles
65
- - the_title filter replced with terms_walker
66
- - Add Nonce for admin settings
67
-
68
- = 1.4.7 =
69
- - Texdomain change to taxonomy-terms-order to allow translations through translate.wordpress.org
70
- - WordPress 4.4 compatibility update
71
- - Css updates
72
-
73
- = 1.4.6.1 =
74
- - Security bug fix
75
-
76
- = 1.4.5 =
77
- - Translation textdomain fix - thanks to Pedro Mendonça
78
- - Portuguese localization update - Pedro Mendonça
79
-
80
- = 1.4.4 =
81
- - User role switch from deprecated user_level to capabilities
82
- - Taxonomy sort for media
83
- - Admin Options update
84
-
85
- = 1.4.2 =
86
- - Iranian Language (eydaaad@gmail.com)
87
- - Admin css updates.
88
-
89
- = 1.4.1 =
90
- - Polish Language(Pozdrawiam - www.difreo.pl/ ; Mateusz - www.czar-net.com )
91
-
92
- = 1.4.0 =
93
- - Hungarian Language(Adam Laki - http://codeguide.hu/)
94
- - Ukrainian translation (Michael Yunat - http://getvoip.com)
95
- - Czech translation
96
-
97
- = 1.3.7 =
98
- - Brazilian Portuguese Language (Rafael Forcadell - www.rafaelforcadell.com.br)
99
-
100
- = 1.3.6 =
101
- - Traditional Chineze Language (Danny - http://sofree.cc)
102
- - Minor admin styling
103
-
104
- = 1.3.4 =
105
- - Menu walker update
106
- - Translations load fix
107
- - Japanese language
108
-
109
- = 1.3.0 =
110
- - Headers already sent bug fix
111
- - Slovak Language (Branco Slovak http://webhostinggeeks.com/user-reviews/)
112
-
113
- = 1.2.9 =
114
- - Small updates
115
- - German and French languages.
116
-
117
- = 1.2.7 =
118
- - Localisation Implement, Dutch and Romanian.
119
- - Many thanks to Anja Fokker http://www.werkgroepen.net/
120
-
121
-
122
- == Upgrade Notice ==
123
-
124
- Make sure you get the latest version
125
-
126
-
127
- == Localization ==
128
-
129
- Available in English, Dutch, French, Deutch, Slovak, Japanese, Traditional Chineze, Brazilian Portuguese, Hungarian, Ukrainian, Czech and Romanian
130
- Whant to contribute with a translation to your language? Please check at https://translate.wordpress.org/projects/wp-plugins/taxonomy-terms-order
 
 
 
 
 
 
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.7.5
7
+ Stable tag: 1.5
8
+
9
+ Order Categories and all custom taxonomies terms (hierarchically) and child terms using a Drag and Drop Sortable javascript capability.
10
+
11
+ == Description ==
12
+
13
+ Order Categories and all custom taxonomies terms (hierarchically) using a Drag and Drop Sortable javascript capability. <strong>No Theme update is required</strong> the code will change the query on the fly.
14
+ If multiple taxonomies are created for a custom post type, a menu will allow to chose the one need to be sorted. If child categories (terms) are defined, those can be ordered too using the same interface.
15
+ <br />Also you can have the admin terms interface sorted per your new sort.
16
+ <br />This plugin is developed by <a target="_blank" href="http://www.nsp-code.com">Nsp-Code</a>
17
+
18
+ == Installation ==
19
+
20
+ 1. Upload `taxonomy-terms-order` folder to your `/wp-content/plugins/` directory.
21
+ 2. Activate the plugin from Admin > Plugins menu.
22
+ 3. Once activated you should check with Settings > Taxonomy Terms Order
23
+ 4. Use Taxonomy Order link which appears into each post type section to make your sort.
24
+
25
+ == Screenshots ==
26
+
27
+ 1. Category Order Interface.
28
+ 2. Multiple Taxonomies Interface.
29
+
30
+ == Frequently Asked Questions ==
31
+
32
+ Feel free to contact me at electronice_delphi@yahoo.com
33
+
34
+ = I have no PHP knowledge at all, i will still be able to use this plugin? =
35
+
36
+ Yes, this is the right tool for you. The plugin comes with a unique feature to update the queries on the fly and return the terms in the required order without changing any line of code. Or as an 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.
45
+
46
+ = Is there any way i can get my admin interface to use the custom terms order? =
47
+
48
+ Absolutely, the plugin can do that. In fact you can configure so only the admin will update and the front side template will display the terms as before.
49
+
50
+ = There is a feature that i want it implemented, can you do something about it? =
51
+
52
+ All ideas are welcome and i put them on my list to be implemented into the new versions. Anyway this may take time, but if you are in a rush, please consider a small donation and we can arrange something.
53
+
54
+ == Change Log ==
55
+
56
+ = 1.5 =
57
+ - Included 'ignore_term_order' to force menu_order ignore when autosort active.
58
+ - Translations issues update
59
+
60
+ = 1.4.9 =
61
+ - Remove translations from the package
62
+ - Removed donate banner
63
+ - PHP 7 fix
64
+ - Unused action remove
65
+
66
+ = 1.4.8 =
67
+ - textdomain folder fix
68
+ - Translation fix for user roles
69
+ - the_title filter replaced with terms_walker
70
+ - Add Nonce for admin settings
71
+
72
+ = 1.4.7 =
73
+ - Texdomain change to taxonomy-terms-order to allow translations through translate.wordpress.org
74
+ - WordPress 4.4 compatibility update
75
+ - Css updates
76
+
77
+ = 1.4.6.1 =
78
+ - Security bug fix
79
+
80
+ = 1.4.5 =
81
+ - Translation textdomain fix - thanks to Pedro Mendonça
82
+ - Portuguese localization update - Pedro Mendonça
83
+
84
+ = 1.4.4 =
85
+ - User role switch from deprecated user_level to capabilities
86
+ - Taxonomy sort for media
87
+ - Admin Options update
88
+
89
+ = 1.4.2 =
90
+ - Iranian Language (eydaaad@gmail.com)
91
+ - Admin css updates.
92
+
93
+ = 1.4.1 =
94
+ - Polish Language(Pozdrawiam - www.difreo.pl/ ; Mateusz - www.czar-net.com )
95
+
96
+ = 1.4.0 =
97
+ - Hungarian Language(Adam Laki - http://codeguide.hu/)
98
+ - Ukrainian translation (Michael Yunat - http://getvoip.com)
99
+ - Czech translation
100
+
101
+ = 1.3.7 =
102
+ - Brazilian Portuguese Language (Rafael Forcadell - www.rafaelforcadell.com.br)
103
+
104
+ = 1.3.6 =
105
+ - Traditional Chineze Language (Danny - http://sofree.cc)
106
+ - Minor admin styling
107
+
108
+ = 1.3.4 =
109
+ - Menu walker update
110
+ - Translations load fix
111
+ - Japanese language
112
+
113
+ = 1.3.0 =
114
+ - Headers already sent bug fix
115
+ - Slovak Language (Branco Slovak http://webhostinggeeks.com/user-reviews/)
116
+
117
+ = 1.2.9 =
118
+ - Small updates
119
+ - German and French languages.
120
+
121
+ = 1.2.7 =
122
+ - Localization implement, Dutch and Romanian.
123
+ - Many thanks to Anja Fokker http://www.werkgroepen.net/
124
+
125
+
126
+ == Upgrade Notice ==
127
+
128
+ Make sure you get the latest version
129
+
130
+
131
+ == Localization ==
132
+
133
+ Available in English, Dutch, French, Deutch, Slovak, Japanese, Traditional Chineze, Brazilian Portuguese, Hungarian, Ukrainian, Czech and Romanian
134
+ Whant to contribute with a translation to your language? Please check at https://translate.wordpress.org/projects/wp-plugins/taxonomy-terms-order
135
+
136
+ There isn't any Editors for your native language on plugin Contributors? You can help to moderate! https://translate.wordpress.org/projects/wp-plugins/taxonomy-terms-order/contributors
screenshot-1.gif DELETED
Binary file
screenshot-1.png ADDED
Binary file
screenshot-2.gif DELETED
Binary file
screenshot-2.png ADDED
Binary file
taxonomy-terms-order.php CHANGED
@@ -3,7 +3,7 @@
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.9
7
  Author: Nsp-Code
8
  Author URI: http://www.nsp-code.com
9
  Author Email: electronice_delphi@yahoo.com
@@ -32,19 +32,7 @@ Domain Path: /languages/
32
  $query = "ALTER TABLE $wpdb->terms ADD `term_order` INT( 4 ) NULL DEFAULT '0'";
33
  $result = $wpdb->query($query);
34
  }
35
-
36
- $options = get_option('tto_options');
37
-
38
- $defaults = array (
39
- 'autosort' => '1',
40
- 'adminsort' => '1',
41
- 'capability' => 'install_plugins'
42
- );
43
-
44
- // Parse incoming $args into an array and merge it with $defaults
45
- $options = wp_parse_args( $options, $defaults );
46
-
47
- update_option('tto_options', $options);
48
  }
49
 
50
  function TO_deactivated()
@@ -91,7 +79,7 @@ Domain Path: /languages/
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
 
96
  if(isset($options['capability']) && !empty($options['capability']))
97
  $capability = $options['capability'];
@@ -134,7 +122,7 @@ Domain Path: /languages/
134
 
135
  function TO_applyorderfilter($orderby, $args)
136
  {
137
- $options = get_option('tto_options');
138
 
139
  //if admin make sure use the admin setting
140
  if (is_admin())
@@ -146,7 +134,7 @@ Domain Path: /languages/
146
  }
147
 
148
  //if autosort, then force the menu_order
149
- if ($options['autosort'] == 1)
150
  {
151
  return 't.term_order';
152
  }
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.5
7
  Author: Nsp-Code
8
  Author URI: http://www.nsp-code.com
9
  Author Email: electronice_delphi@yahoo.com
32
  $query = "ALTER TABLE $wpdb->terms ADD `term_order` INT( 4 ) NULL DEFAULT '0'";
33
  $result = $wpdb->query($query);
34
  }
35
+
 
 
 
 
 
 
 
 
 
 
 
 
36
  }
37
 
38
  function TO_deactivated()
79
  include (TOPATH . '/include/options.php');
80
  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');
81
 
82
+ $options = tto_get_settings();
83
 
84
  if(isset($options['capability']) && !empty($options['capability']))
85
  $capability = $options['capability'];
122
 
123
  function TO_applyorderfilter($orderby, $args)
124
  {
125
+ $options = tto_get_settings();
126
 
127
  //if admin make sure use the admin setting
128
  if (is_admin())
134
  }
135
 
136
  //if autosort, then force the menu_order
137
+ if ($options['autosort'] == 1 && (!isset($args['ignore_term_order']) || (isset($args['ignore_term_order']) && $args['ignore_term_order'] !== TRUE) ))
138
  {
139
  return 't.term_order';
140
  }