Post Types Order - Version 1.8.4

Version Description

Make sure you get the latest version.

Download this release

Release Info

Developer nsp-code
Plugin Icon 128x128 Post Types Order
Version 1.8.4
Comparing to
See all releases

Code changes from version 1.8.3 to 1.8.4

Files changed (43) hide show
  1. css/cpt.css +1 -0
  2. include/cpto-class.php +7 -7
  3. include/functions.php +3 -3
  4. include/options.php +27 -26
  5. include/walkers.php +2 -21
  6. lang/cpt-pt_PT.mo +0 -0
  7. lang/cpt-cs_CZ.mo → languages/post-types-order-cs_CZ.mo +0 -0
  8. lang/cpt-cs_CZ.po → languages/post-types-order-cs_CZ.po +0 -0
  9. lang/cpt-de_DE.mo → languages/post-types-order-de_DE.mo +0 -0
  10. lang/cpt-de_DE.po → languages/post-types-order-de_DE.po +0 -0
  11. lang/cpt-es_ES.mo → languages/post-types-order-es_ES.mo +0 -0
  12. lang/cpt-es_ES.po → languages/post-types-order-es_ES.po +0 -0
  13. lang/cpt-fr_FR.mo → languages/post-types-order-fr_FR.mo +0 -0
  14. lang/cpt-fr_FR.po → languages/post-types-order-fr_FR.po +0 -0
  15. lang/cpt-he_IL.mo → languages/post-types-order-he_IL.mo +0 -0
  16. lang/cpt-he_IL.po → languages/post-types-order-he_IL.po +0 -0
  17. lang/cpt-hu_HU.mo → languages/post-types-order-hu_HU.mo +0 -0
  18. lang/cpt-hu_HU.po → languages/post-types-order-hu_HU.po +0 -0
  19. lang/cpt-it_IT.mo → languages/post-types-order-it_IT.mo +0 -0
  20. lang/cpt-it_IT.po → languages/post-types-order-it_IT.po +0 -0
  21. lang/cpt-ja_JP.mo → languages/post-types-order-ja_JP.mo +0 -0
  22. lang/cpt-ja_JP.po → languages/post-types-order-ja_JP.po +0 -0
  23. lang/cpt-jp_JP.po → languages/post-types-order-jp_JP.po +0 -0
  24. lang/cpt-nb_NO.mo → languages/post-types-order-nb_NO.mo +0 -0
  25. lang/cpt-nb_NO.po → languages/post-types-order-nb_NO.po +0 -0
  26. lang/cpt-nl_NL.mo → languages/post-types-order-nl_NL.mo +0 -0
  27. lang/cpt-nl_NL.po → languages/post-types-order-nl_NL.po +0 -0
  28. lang/cpt-pt_BR.mo → languages/post-types-order-pt_BR.mo +0 -0
  29. lang/cpt-pt_BR.po → languages/post-types-order-pt_BR.po +0 -0
  30. languages/post-types-order-pt_PT.mo +0 -0
  31. lang/cpt-pt_PT.po → languages/post-types-order-pt_PT.po +49 -37
  32. lang/cpt-ro_RO.mo → languages/post-types-order-ro_RO.mo +0 -0
  33. lang/cpt-ro_RO.po → languages/post-types-order-ro_RO.po +0 -0
  34. lang/cpt-sv_SE.mo → languages/post-types-order-sv_SE.mo +0 -0
  35. lang/cpt-sv_SE.po → languages/post-types-order-sv_SE.po +0 -0
  36. lang/cpt-tr_TR.mo → languages/post-types-order-tr_TR.mo +0 -0
  37. lang/cpt-tr_TR.po → languages/post-types-order-tr_TR.po +0 -0
  38. lang/cpt-zh_CN.mo → languages/post-types-order-zh_CN.mo +0 -0
  39. lang/cpt-zh_CN.po → languages/post-types-order-zh_CN.po +0 -0
  40. lang/cpt.mo → languages/post-types-order.mo +0 -0
  41. lang/cpt.po → languages/post-types-order.po +0 -0
  42. post-types-order.php +3 -3
  43. readme.txt +11 -4
css/cpt.css CHANGED
@@ -1,6 +1,7 @@
1
  #order-post-type #sortable { list-style-type: none; margin: 10px 0 0; padding: 0; width: 100%; }
2
  #order-post-type #sortable ul { margin-left:20px; list-style: none; }
3
  #order-post-type #sortable li { padding: 2px 0px; margin: 4px 0px; border: 1px solid #DDDDDD; cursor: move; -moz-border-radius:6px; background-color: #f9f9f9;}
 
4
  #order-post-type #sortable li span { display: block; padding: 5px 10px; color:#555; font-size:13px;}
5
  #order-post-type #sortable li.placeholder{border: dashed 2px #ccc;height:25px; background-color: #FFF;}
6
 
1
  #order-post-type #sortable { list-style-type: none; margin: 10px 0 0; padding: 0; width: 100%; }
2
  #order-post-type #sortable ul { margin-left:20px; list-style: none; }
3
  #order-post-type #sortable li { padding: 2px 0px; margin: 4px 0px; border: 1px solid #DDDDDD; cursor: move; -moz-border-radius:6px; background-color: #f9f9f9;}
4
+ #order-post-type #sortable li:nth-child(2n+1) { background-color: #fff !important;}
5
  #order-post-type #sortable li span { display: block; padding: 5px 10px; color:#555; font-size:13px;}
6
  #order-post-type #sortable li.placeholder{border: dashed 2px #ccc;height:25px; background-color: #FFF;}
7
 
include/cpto-class.php CHANGED
@@ -114,12 +114,12 @@
114
  continue;
115
 
116
  if ($post_type_name == 'post')
117
- add_submenu_page('edit.php', __('Re-Order', 'cpt'), __('Re-Order', 'cpt'), $capability, 'order-post-types-'.$post_type_name, array(&$this, 'SortPage') );
118
  elseif ($post_type_name == 'attachment')
119
- add_submenu_page('upload.php', __('Re-Order', 'cpt'), __('Re-Order', 'cpt'), $capability, 'order-post-types-'.$post_type_name, array(&$this, 'SortPage') );
120
  else
121
  {
122
- add_submenu_page('edit.php?post_type='.$post_type_name, __('Re-Order', 'cpt'), __('Re-Order', 'cpt'), $capability, 'order-post-types-'.$post_type_name, array(&$this, 'SortPage') );
123
  }
124
  }
125
  }
@@ -130,7 +130,7 @@
130
  ?>
131
  <div class="wrap">
132
  <div class="icon32" id="icon-edit"><br></div>
133
- <h2><?php echo $this->current_post_type->labels->singular_name . ' - '. __('Re-Order', 'cpt') ?></h2>
134
 
135
  <?php cpt_info_box(); ?>
136
 
@@ -138,7 +138,7 @@
138
 
139
  <noscript>
140
  <div class="error message">
141
- <p><?php _e('This plugin can\'t work without javascript, because it\'s use drag and drop and AJAX.', 'cpt') ?></p>
142
  </div>
143
  </noscript>
144
 
@@ -151,7 +151,7 @@
151
  </div>
152
 
153
  <p class="submit">
154
- <a href="javascript: void(0)" id="save-order" class="button-primary"><?php _e('Update', 'cpt' ) ?></a>
155
  </p>
156
 
157
  <script type="text/javascript">
@@ -170,7 +170,7 @@
170
  jQuery("html, body").animate({ scrollTop: 0 }, "fast");
171
 
172
  jQuery.post( ajaxurl, { action:'update-custom-type-order', order:jQuery("#sortable").sortable("serialize") }, function() {
173
- jQuery("#ajax-response").html('<div class="message updated fade"><p><?php _e('Items Order Updated', 'cpt') ?></p></div>');
174
  jQuery("#ajax-response div").delay(3000).hide("slow");
175
  });
176
  });
114
  continue;
115
 
116
  if ($post_type_name == 'post')
117
+ add_submenu_page('edit.php', __('Re-Order', 'post-types-order'), __('Re-Order', 'post-types-order'), $capability, 'order-post-types-'.$post_type_name, array(&$this, 'SortPage') );
118
  elseif ($post_type_name == 'attachment')
119
+ add_submenu_page('upload.php', __('Re-Order', 'post-types-order'), __('Re-Order', 'post-types-order'), $capability, 'order-post-types-'.$post_type_name, array(&$this, 'SortPage') );
120
  else
121
  {
122
+ add_submenu_page('edit.php?post_type='.$post_type_name, __('Re-Order', 'post-types-order'), __('Re-Order', 'post-types-order'), $capability, 'order-post-types-'.$post_type_name, array(&$this, 'SortPage') );
123
  }
124
  }
125
  }
130
  ?>
131
  <div class="wrap">
132
  <div class="icon32" id="icon-edit"><br></div>
133
+ <h2><?php echo $this->current_post_type->labels->singular_name . ' - '. __('Re-Order', 'post-types-order') ?></h2>
134
 
135
  <?php cpt_info_box(); ?>
136
 
138
 
139
  <noscript>
140
  <div class="error message">
141
+ <p><?php _e('This plugin can\'t work without javascript, because it\'s use drag and drop and AJAX.', 'post-types-order') ?></p>
142
  </div>
143
  </noscript>
144
 
151
  </div>
152
 
153
  <p class="submit">
154
+ <a href="javascript: void(0)" id="save-order" class="button-primary"><?php _e('Update', 'post-types-order' ) ?></a>
155
  </p>
156
 
157
  <script type="text/javascript">
170
  jQuery("html, body").animate({ scrollTop: 0 }, "fast");
171
 
172
  jQuery.post( ajaxurl, { action:'update-custom-type-order', order:jQuery("#sortable").sortable("serialize") }, function() {
173
+ jQuery("#ajax-response").html('<div class="message updated fade"><p><?php _e('Items Order Updated', 'post-types-order') ?></p></div>');
174
  jQuery("#ajax-response div").delay(3000).hide("slow");
175
  });
176
  });
include/functions.php CHANGED
@@ -80,9 +80,9 @@
80
  </div>
81
  </div>
82
 
83
- <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', 'cpt') ?> <a href="http://www.nsp-code.com/" target="_blank"><strong>http://www.nsp-code.com/</strong></a>.</p>
84
- <h4><?php _e('Did you know there is available an Advanced version of this plug-in?', 'cpt') ?> <a target="_blank" href="http://www.nsp-code.com/premium-plugins/wordpress-plugins/advanced-post-types-order/"><?php _e('Read more', 'cpt') ?></a></h4>
85
- <p><?php _e('Check our', 'cpt') ?> <a target="_blank" href="http://wordpress.org/plugins/taxonomy-terms-order/">Category Order - Taxonomy Terms Order</a> <?php _e('plugin which allow to custom sort categories and custom taxonomies terms', 'cpt') ?> </p>
86
 
87
  <div class="clear"></div>
88
  </div>
80
  </div>
81
  </div>
82
 
83
+ <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', 'post-types-order') ?> <a href="http://www.nsp-code.com/" target="_blank"><strong>http://www.nsp-code.com/</strong></a>.</p>
84
+ <h4><?php _e('Did you know there is available an Advanced version of this plug-in?', 'post-types-order') ?> <a target="_blank" href="http://www.nsp-code.com/premium-plugins/wordpress-plugins/advanced-post-types-order/"><?php _e('Read more', 'post-types-order') ?></a></h4>
85
+ <p><?php _e('Check our', 'post-types-order') ?> <a target="_blank" href="http://wordpress.org/plugins/taxonomy-terms-order/">Category Order - Taxonomy Terms Order</a> <?php _e('plugin which allow to custom sort categories and custom taxonomies terms', 'post-types-order') ?> </p>
86
 
87
  <div class="clear"></div>
88
  </div>
include/options.php CHANGED
@@ -7,16 +7,17 @@ function cpt_plugin_options()
7
 
8
  if (isset($_POST['form_submit']))
9
  {
10
- $options['show_reorder_interfaces'] = $_POST['show_reorder_interfaces'];
 
11
 
12
- $options['capability'] = $_POST['capability'];
13
 
14
- $options['autosort'] = isset($_POST['autosort']) ? $_POST['autosort'] : '';
15
- $options['adminsort'] = isset($_POST['adminsort']) ? $_POST['adminsort'] : '';
16
 
17
- $options['navigation_sort_apply'] = isset($_POST['navigation_sort_apply']) ? $_POST['navigation_sort_apply'] : '';
18
 
19
- echo '<div class="updated fade"><p>' . __('Settings Saved', 'cpt') . '</p></div>';
20
 
21
  update_option('cpto_options', $options);
22
  update_option('CPT_configured', 'TRUE');
@@ -28,17 +29,17 @@ function cpt_plugin_options()
28
  ?>
29
  <div class="wrap">
30
  <div id="icon-settings" class="icon32"></div>
31
- <h2><?php _e('General Settings', 'cpt') ?></h2>
32
 
33
  <?php cpt_info_box(); ?>
34
 
35
  <form id="form_data" name="form" method="post">
36
  <br />
37
- <h2 class="subtitle"><?php _e('General', 'cpt') ?></h2>
38
  <table class="form-table">
39
  <tbody>
40
  <tr valign="top">
41
- <th scope="row" style="text-align: right;"><label><?php _e('Show / Hide re-order interface', 'cpt') ?></label></th>
42
  <td>
43
  <?php
44
 
@@ -65,53 +66,53 @@ function cpt_plugin_options()
65
  ?>
66
  <p><label>
67
  <select name="show_reorder_interfaces[<?php echo $post_type_name ?>]">
68
- <option value="show" <?php if(isset($options['show_reorder_interfaces'][$post_type_name]) && $options['show_reorder_interfaces'][$post_type_name] == 'show') {echo ' selected="selected"';} ?>><?php _e( "Show", 'apto' ) ?></option>
69
- <option value="hide" <?php if(isset($options['show_reorder_interfaces'][$post_type_name]) && $options['show_reorder_interfaces'][$post_type_name] == 'hide') {echo ' selected="selected"';} ?>><?php _e( "Hide", 'apto' ) ?></option>
70
  </select> &nbsp;&nbsp;<?php echo $post_type_data->labels->singular_name ?>
71
  </label><br />&nbsp;</p>
72
  <?php } ?>
73
  </td>
74
  </tr>
75
  <tr valign="top">
76
- <th scope="row" style="text-align: right;"><label><?php _e('Minimum Level to use this plugin', 'cpt') ?></label></th>
77
  <td>
78
  <select id="role" name="capability">
79
- <option value="read" <?php if (isset($options['capability']) && $options['capability'] == "read") echo 'selected="selected"'?>><?php _e('Subscriber', 'cpt') ?></option>
80
- <option value="edit_posts" <?php if (isset($options['capability']) && $options['capability'] == "edit_posts") echo 'selected="selected"'?>><?php _e('Contributor', 'cpt') ?></option>
81
- <option value="publish_posts" <?php if (isset($options['capability']) && $options['capability'] == "publish_posts") echo 'selected="selected"'?>><?php _e('Author', 'cpt') ?></option>
82
- <option value="publish_pages" <?php if (isset($options['capability']) && $options['capability'] == "publish_pages") echo 'selected="selected"'?>><?php _e('Editor', 'cpt') ?></option>
83
- <option value="switch_themes" <?php if (!isset($options['capability']) || empty($options['capability']) || (isset($options['capability']) && $options['capability'] == "switch_themes")) echo 'selected="selected"'?>><?php _e('Administrator', 'cpt') ?></option>
84
  </select>
85
  </td>
86
  </tr>
87
 
88
  <tr valign="top">
89
- <th scope="row" style="text-align: right;"><label for="autosort"><?php _e('Auto Sort', 'cpt') ?></label></th>
90
  <td>
91
- <p><input type="checkbox" <?php if ($options['autosort'] == "1") {echo ' checked="checked"';} ?> id="autosort" value="1" name="autosort"> <?php _e("If checked, the plug-in automatically update the WordPress queries to use the new order (<b>No code update is necessarily</b>)", 'cpt'); ?></p>
92
- <p class="description"><?php _e("If only certain queries need to use the custom sort, keep this unchecked and include 'orderby' => 'menu_order' into query parameters", 'cpt') ?>.
93
  <br />
94
- <a href="http://www.nsp-code.com/sample-code-on-how-to-apply-the-sort-for-post-types-order-plugin/" target="_blank"><?php _e('Additional Description and Examples', 'cpt') ?></a></p>
95
 
96
  </td>
97
  </tr>
98
 
99
 
100
  <tr valign="top">
101
- <th scope="row" style="text-align: right;"><label for="adminsort"><?php _e('Admin Sort', 'cpt') ?></label></th>
102
  <td>
103
  <p>
104
  <input type="checkbox" <?php if ($options['adminsort'] == "1") {echo ' checked="checked"';} ?> id="adminsort" value="1" name="adminsort">
105
- <?php _e("To affect the admin interface, to see the post types per your new sort, this need to be checked", 'cpt') ?>.</p>
106
  </td>
107
  </tr>
108
 
109
  <tr valign="top">
110
- <th scope="row" style="text-align: right;"><label for="navigation_sort_apply"><?php _e('Next / Previous Apply', 'cpt') ?></label></th>
111
  <td>
112
  <p>
113
  <input type="checkbox" <?php if ($options['navigation_sort_apply'] == "1") {echo ' checked="checked"';} ?> id="navigation_sort_apply" value="1" name="navigation_sort_apply">
114
- <?php _e("Apply the sort on Next / Previous site-wide navigation.", 'cpt') ?> <?php _e('This can also be controlled through', 'cpt') ?> <a href="http://www.nsp-code.com/apply-custom-sorting-for-next-previous-site-wide-navigation/" target="_blank"><?php _e('code', 'cpt') ?></a></p>
115
  </td>
116
  </tr>
117
 
@@ -120,7 +121,7 @@ function cpt_plugin_options()
120
 
121
  <p class="submit">
122
  <input type="submit" name="Submit" class="button-primary" value="<?php
123
- _e('Save Settings', 'cpt') ?>">
124
  </p>
125
 
126
  <input type="hidden" name="form_submit" value="true" />
7
 
8
  if (isset($_POST['form_submit']))
9
  {
10
+ $options['show_reorder_interfaces'] = (array) $_POST['show_reorder_interfaces'];
11
+ $options['show_reorder_interfaces'] = array_map( 'sanitize_key', $options['show_reorder_interfaces'] );
12
 
13
+ $options['capability'] = sanitize_key($_POST['capability']);
14
 
15
+ $options['autosort'] = isset($_POST['autosort']) ? intval($_POST['autosort']) : '';
16
+ $options['adminsort'] = isset($_POST['adminsort']) ? intval($_POST['adminsort']) : '';
17
 
18
+ $options['navigation_sort_apply'] = isset($_POST['navigation_sort_apply']) ? intval($_POST['navigation_sort_apply']) : '';
19
 
20
+ echo '<div class="updated fade"><p>' . __('Settings Saved', 'post-types-order') . '</p></div>';
21
 
22
  update_option('cpto_options', $options);
23
  update_option('CPT_configured', 'TRUE');
29
  ?>
30
  <div class="wrap">
31
  <div id="icon-settings" class="icon32"></div>
32
+ <h2><?php _e('General Settings', 'post-types-order') ?></h2>
33
 
34
  <?php cpt_info_box(); ?>
35
 
36
  <form id="form_data" name="form" method="post">
37
  <br />
38
+ <h2 class="subtitle"><?php _e('General', 'post-types-order') ?></h2>
39
  <table class="form-table">
40
  <tbody>
41
  <tr valign="top">
42
+ <th scope="row" style="text-align: right;"><label><?php _e('Show / Hide re-order interface', 'post-types-order') ?></label></th>
43
  <td>
44
  <?php
45
 
66
  ?>
67
  <p><label>
68
  <select name="show_reorder_interfaces[<?php echo $post_type_name ?>]">
69
+ <option value="show" <?php if(isset($options['show_reorder_interfaces'][$post_type_name]) && $options['show_reorder_interfaces'][$post_type_name] == 'show') {echo ' selected="selected"';} ?>><?php _e( "Show", 'post-types-order' ) ?></option>
70
+ <option value="hide" <?php if(isset($options['show_reorder_interfaces'][$post_type_name]) && $options['show_reorder_interfaces'][$post_type_name] == 'hide') {echo ' selected="selected"';} ?>><?php _e( "Hide", 'post-types-order' ) ?></option>
71
  </select> &nbsp;&nbsp;<?php echo $post_type_data->labels->singular_name ?>
72
  </label><br />&nbsp;</p>
73
  <?php } ?>
74
  </td>
75
  </tr>
76
  <tr valign="top">
77
+ <th scope="row" style="text-align: right;"><label><?php _e('Minimum Level to use this plugin', 'post-types-order') ?></label></th>
78
  <td>
79
  <select id="role" name="capability">
80
+ <option value="read" <?php if (isset($options['capability']) && $options['capability'] == "read") echo 'selected="selected"'?>><?php _e('Subscriber', 'post-types-order') ?></option>
81
+ <option value="edit_posts" <?php if (isset($options['capability']) && $options['capability'] == "edit_posts") echo 'selected="selected"'?>><?php _e('Contributor', 'post-types-order') ?></option>
82
+ <option value="publish_posts" <?php if (isset($options['capability']) && $options['capability'] == "publish_posts") echo 'selected="selected"'?>><?php _e('Author', 'post-types-order') ?></option>
83
+ <option value="publish_pages" <?php if (isset($options['capability']) && $options['capability'] == "publish_pages") echo 'selected="selected"'?>><?php _e('Editor', 'post-types-order') ?></option>
84
+ <option value="switch_themes" <?php if (!isset($options['capability']) || empty($options['capability']) || (isset($options['capability']) && $options['capability'] == "switch_themes")) echo 'selected="selected"'?>><?php _e('Administrator', 'post-types-order') ?></option>
85
  </select>
86
  </td>
87
  </tr>
88
 
89
  <tr valign="top">
90
+ <th scope="row" style="text-align: right;"><label for="autosort"><?php _e('Auto Sort', 'post-types-order') ?></label></th>
91
  <td>
92
+ <p><input type="checkbox" <?php if ($options['autosort'] == "1") {echo ' checked="checked"';} ?> id="autosort" value="1" name="autosort"> <?php _e("If checked, the plug-in automatically update the WordPress queries to use the new order (<b>No code update is necessarily</b>)", 'post-types-order'); ?></p>
93
+ <p class="description"><?php _e("If only certain queries need to use the custom sort, keep this unchecked and include 'orderby' => 'menu_order' into query parameters", 'post-types-order') ?>.
94
  <br />
95
+ <a href="http://www.nsp-code.com/sample-code-on-how-to-apply-the-sort-for-post-types-order-plugin/" target="_blank"><?php _e('Additional Description and Examples', 'post-types-order') ?></a></p>
96
 
97
  </td>
98
  </tr>
99
 
100
 
101
  <tr valign="top">
102
+ <th scope="row" style="text-align: right;"><label for="adminsort"><?php _e('Admin Sort', 'post-types-order') ?></label></th>
103
  <td>
104
  <p>
105
  <input type="checkbox" <?php if ($options['adminsort'] == "1") {echo ' checked="checked"';} ?> id="adminsort" value="1" name="adminsort">
106
+ <?php _e("To affect the admin interface, to see the post types per your new sort, this need to be checked", 'post-types-order') ?>.</p>
107
  </td>
108
  </tr>
109
 
110
  <tr valign="top">
111
+ <th scope="row" style="text-align: right;"><label for="navigation_sort_apply"><?php _e('Next / Previous Apply', 'post-types-order') ?></label></th>
112
  <td>
113
  <p>
114
  <input type="checkbox" <?php if ($options['navigation_sort_apply'] == "1") {echo ' checked="checked"';} ?> id="navigation_sort_apply" value="1" name="navigation_sort_apply">
115
+ <?php _e("Apply the sort on Next / Previous site-wide navigation.", 'post-types-order') ?> <?php _e('This can also be controlled through', 'post-types-order') ?> <a href="http://www.nsp-code.com/apply-custom-sorting-for-next-previous-site-wide-navigation/" target="_blank"><?php _e('code', 'post-types-order') ?></a></p>
116
  </td>
117
  </tr>
118
 
121
 
122
  <p class="submit">
123
  <input type="submit" name="Submit" class="button-primary" value="<?php
124
+ _e('Save Settings', 'post-types-order') ?>">
125
  </p>
126
 
127
  <input type="hidden" name="form_submit" value="true" />
include/walkers.php CHANGED
@@ -26,27 +26,8 @@
26
 
27
  extract($args, EXTR_SKIP);
28
 
29
- //----
30
- if($page->post_type == 'attachment')
31
- $image_id = $page->ID;
32
- else
33
- $image_id = get_post_thumbnail_id( $page->ID , 'post-thumbnail' );
34
- if ($image_id > 0)
35
- {
36
- $image = wp_get_attachment_image_src( $image_id , array(195,195));
37
- if($image !== FALSE)
38
- $image_html = '<img style="width:50px" src="'. $image[0] .'" alt="" />';
39
- else
40
- $image_html = '<img src="'. CPTURL .'/images/nt.png" alt="" />';
41
- }
42
- else
43
- {
44
- $image_html = '<img src="'. CPTURL .'/images/nt.png" alt="" />';
45
- }
46
- $output .= $indent . '<li id="item_'.$page->ID.'"><span>'. $page->ID . ' ' .apply_filters( 'the_title', $page->post_title, $page->ID ).'</span> ' . $image_html;
47
-
48
-
49
- //$output .= $indent . '<li id="item_'.$page->ID.'"><span>'.apply_filters( 'the_title', $page->post_title, $page->ID ).'</span>';
50
  }
51
 
52
 
26
 
27
  extract($args, EXTR_SKIP);
28
 
29
+
30
+ $output .= $indent . '<li id="item_'.$page->ID.'"><span>'.apply_filters( 'the_title', $page->post_title, $page->ID ).'</span>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  }
32
 
33
 
lang/cpt-pt_PT.mo DELETED
Binary file
lang/cpt-cs_CZ.mo → languages/post-types-order-cs_CZ.mo RENAMED
File without changes
lang/cpt-cs_CZ.po → languages/post-types-order-cs_CZ.po RENAMED
File without changes
lang/cpt-de_DE.mo → languages/post-types-order-de_DE.mo RENAMED
File without changes
lang/cpt-de_DE.po → languages/post-types-order-de_DE.po RENAMED
File without changes
lang/cpt-es_ES.mo → languages/post-types-order-es_ES.mo RENAMED
File without changes
lang/cpt-es_ES.po → languages/post-types-order-es_ES.po RENAMED
File without changes
lang/cpt-fr_FR.mo → languages/post-types-order-fr_FR.mo RENAMED
File without changes
lang/cpt-fr_FR.po → languages/post-types-order-fr_FR.po RENAMED
File without changes
lang/cpt-he_IL.mo → languages/post-types-order-he_IL.mo RENAMED
File without changes
lang/cpt-he_IL.po → languages/post-types-order-he_IL.po RENAMED
File without changes
lang/cpt-hu_HU.mo → languages/post-types-order-hu_HU.mo RENAMED
File without changes
lang/cpt-hu_HU.po → languages/post-types-order-hu_HU.po RENAMED
File without changes
lang/cpt-it_IT.mo → languages/post-types-order-it_IT.mo RENAMED
File without changes
lang/cpt-it_IT.po → languages/post-types-order-it_IT.po RENAMED
File without changes
lang/cpt-ja_JP.mo → languages/post-types-order-ja_JP.mo RENAMED
File without changes
lang/cpt-ja_JP.po → languages/post-types-order-ja_JP.po RENAMED
File without changes
lang/cpt-jp_JP.po → languages/post-types-order-jp_JP.po RENAMED
File without changes
lang/cpt-nb_NO.mo → languages/post-types-order-nb_NO.mo RENAMED
File without changes
lang/cpt-nb_NO.po → languages/post-types-order-nb_NO.po RENAMED
File without changes
lang/cpt-nl_NL.mo → languages/post-types-order-nl_NL.mo RENAMED
File without changes
lang/cpt-nl_NL.po → languages/post-types-order-nl_NL.po RENAMED
File without changes
lang/cpt-pt_BR.mo → languages/post-types-order-pt_BR.mo RENAMED
File without changes
lang/cpt-pt_BR.po → languages/post-types-order-pt_BR.po RENAMED
File without changes
languages/post-types-order-pt_PT.mo ADDED
Binary file
lang/cpt-pt_PT.po → languages/post-types-order-pt_PT.po RENAMED
@@ -2,15 +2,15 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Post Types Order\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2015-05-29 16:39-0000\n"
6
- "PO-Revision-Date: 2015-05-29 16:39-0000\n"
7
  "Last-Translator: Pedro Mendonça <ped.gaspar@gmail.com>\n"
8
  "Language-Team: Pedro Mendonça <ped.gaspar@gmail.com>\n"
9
  "Language: pt_PT\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
- "X-Generator: Poedit 1.8.1\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
@@ -19,12 +19,12 @@ msgstr ""
19
  "X-Poedit-Basepath: ..\n"
20
  "X-Poedit-SearchPath-0: .\n"
21
 
22
- #: include/cpto-class.php:107 include/cpto-class.php:109
23
- #: include/cpto-class.php:113 include/cpto-class.php:124
24
  msgid "Re-Order"
25
  msgstr "Reordenar"
26
 
27
- #: include/cpto-class.php:132
28
  msgid ""
29
  "This plugin can't work without javascript, because it's use drag and drop "
30
  "and AJAX."
@@ -32,19 +32,19 @@ msgstr ""
32
  "Este plugin não funciona sem JavaScript, porque utiliza AJAX para arrastar e "
33
  "largar os itens."
34
 
35
- #: include/cpto-class.php:145
36
  msgid "Update"
37
  msgstr "Atualizar"
38
 
39
- #: include/cpto-class.php:164
40
  msgid "Items Order Updated"
41
  msgstr "Ordem dos itens alterada"
42
 
43
- #: include/cpto-class.php:183
44
  msgid "Pages"
45
  msgstr "Páginas"
46
 
47
- #: include/functions.php:82
48
  msgid ""
49
  "Did you find this plugin useful? Please support our work with a donation or "
50
  "write an article about this plugin in your blog with a link to our site"
@@ -52,66 +52,78 @@ msgstr ""
52
  "Considera este plugin útil? Por favor faça um donativo ao autor ou escreva "
53
  "um artigo sobre este plugin no seu blog com ligação para a nossa página"
54
 
55
- #: include/functions.php:83
56
  msgid "Did you know there is available an Advanced version of this plug-in?"
57
  msgstr "Sabe que há uma versão Avançada deste plugin?"
58
 
59
- #: include/functions.php:83
60
  msgid "Read more"
61
  msgstr "Ler mais"
62
 
63
- #: include/functions.php:84
64
  msgid "Check our"
65
  msgstr "Veja o nosso plugin"
66
 
67
- #: include/functions.php:84
68
  msgid ""
69
  "plugin which allow to custom sort categories and custom taxonomies terms"
70
  msgstr ""
71
  "que permite personalizar a ordem das categorias e das taxonomias "
72
  "personalizadas"
73
 
74
- #: include/options.php:18
75
  msgid "Settings Saved"
76
  msgstr "Definições guardadas"
77
 
78
- #: include/options.php:30
79
  msgid "General Settings"
80
  msgstr "Definições gerais"
81
 
82
- #: include/options.php:36
83
  msgid "General"
84
  msgstr "Geral"
85
 
86
  #: include/options.php:41
 
 
 
 
 
 
 
 
 
 
 
 
87
  msgid "Minimum Level to use this plugin"
88
  msgstr "Nível mínimo para utilizar este plugin"
89
 
90
- #: include/options.php:44
91
  msgid "Subscriber"
92
  msgstr "Assinante"
93
 
94
- #: include/options.php:45
95
  msgid "Contributor"
96
  msgstr "Colaborador"
97
 
98
- #: include/options.php:46
99
  msgid "Author"
100
  msgstr "Autor"
101
 
102
- #: include/options.php:47
103
  msgid "Editor"
104
  msgstr "Editor"
105
 
106
- #: include/options.php:48
107
  msgid "Administrator"
108
  msgstr "Administrador"
109
 
110
- #: include/options.php:54
111
  msgid "Auto Sort"
112
  msgstr "Ordem automática"
113
 
114
- #: include/options.php:56
115
  msgid ""
116
  "If checked, the plug-in automatically update the WordPress queries to use "
117
  "the new order (<b>No code update is necessarily</b>)"
@@ -119,7 +131,7 @@ msgstr ""
119
  "Se seleccionado, o plugin ordena automaticamente as wp-queries para utilizar "
120
  "a nova ordem (<b>sem recorrer a qualquer programação</b>)"
121
 
122
- #: include/options.php:57
123
  msgid ""
124
  "If only certain queries need to use the custom sort, keep this unchecked and "
125
  "include 'orderby' => 'menu_order' into query parameters"
@@ -127,15 +139,15 @@ msgstr ""
127
  "Se necessitar de ordenações mais personalizadas, desactive esta opção e "
128
  "inclua 'orderby' => 'menu_order' nos parâmetros da query"
129
 
130
- #: include/options.php:59
131
  msgid "Additional Description and Examples"
132
  msgstr "Descrições e exemplos adicionais"
133
 
134
- #: include/options.php:66
135
  msgid "Admin Sort"
136
  msgstr "Ordem na administração"
137
 
138
- #: include/options.php:70
139
  msgid ""
140
  "To affect the admin interface, to see the post types per your new sort, this "
141
  "need to be checked"
@@ -143,39 +155,39 @@ msgstr ""
143
  "Para afectar o painel de administração e ver os tipos de artigos pela sua "
144
  "nova ordem, esta opção tem que estar seleccionada"
145
 
146
- #: include/options.php:75
147
  msgid "Next / Previous Apply"
148
  msgstr "Aplicar a Seguinte / Anterior"
149
 
150
- #: include/options.php:79
151
  msgid "Apply the sort on Next / Previous site-wide navigation."
152
  msgstr "Aplicar a ordenação a toda a navegação Seguinte / Anterior."
153
 
154
- #: include/options.php:79
155
  msgid "This can also be controlled through"
156
  msgstr "Isto também pode ser controlado por"
157
 
158
- #: include/options.php:79
159
  msgid "code"
160
  msgstr "código"
161
 
162
- #: include/options.php:88
163
  msgid "Save Settings"
164
  msgstr "Guardar definições"
165
 
166
- #: post-types-order.php:121
167
  msgid "Post Types Order must be configured. Please go to"
168
  msgstr "O plugin Post Types Order tem que ser configurado em"
169
 
170
- #: post-types-order.php:121
171
  msgid "Settings Page"
172
  msgstr "Página das definições"
173
 
174
- #: post-types-order.php:121
175
  msgid "make the configuration and save"
176
  msgstr "Configure e guarde as definições"
177
 
178
- #: post-types-order.php:212 post-types-order.php:290
179
  #, php-format
180
  msgid "Use commas instead of %s to separate excluded terms."
181
  msgstr "Utilize vírgulas em vez de %s para separar termos exluídos."
2
  msgstr ""
3
  "Project-Id-Version: Post Types Order\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2015-08-10 08:48+0100\n"
6
+ "PO-Revision-Date: 2015-08-10 08:50+0100\n"
7
  "Last-Translator: Pedro Mendonça <ped.gaspar@gmail.com>\n"
8
  "Language-Team: Pedro Mendonça <ped.gaspar@gmail.com>\n"
9
  "Language: pt_PT\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 1.8.4\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
19
  "X-Poedit-Basepath: ..\n"
20
  "X-Poedit-SearchPath-0: .\n"
21
 
22
+ #: include/cpto-class.php:117 include/cpto-class.php:119
23
+ #: include/cpto-class.php:122 include/cpto-class.php:133
24
  msgid "Re-Order"
25
  msgstr "Reordenar"
26
 
27
+ #: include/cpto-class.php:141
28
  msgid ""
29
  "This plugin can't work without javascript, because it's use drag and drop "
30
  "and AJAX."
32
  "Este plugin não funciona sem JavaScript, porque utiliza AJAX para arrastar e "
33
  "largar os itens."
34
 
35
+ #: include/cpto-class.php:154
36
  msgid "Update"
37
  msgstr "Atualizar"
38
 
39
+ #: include/cpto-class.php:173
40
  msgid "Items Order Updated"
41
  msgstr "Ordem dos itens alterada"
42
 
43
+ #: include/cpto-class.php:192
44
  msgid "Pages"
45
  msgstr "Páginas"
46
 
47
+ #: include/functions.php:83
48
  msgid ""
49
  "Did you find this plugin useful? Please support our work with a donation or "
50
  "write an article about this plugin in your blog with a link to our site"
52
  "Considera este plugin útil? Por favor faça um donativo ao autor ou escreva "
53
  "um artigo sobre este plugin no seu blog com ligação para a nossa página"
54
 
55
+ #: include/functions.php:84
56
  msgid "Did you know there is available an Advanced version of this plug-in?"
57
  msgstr "Sabe que há uma versão Avançada deste plugin?"
58
 
59
+ #: include/functions.php:84
60
  msgid "Read more"
61
  msgstr "Ler mais"
62
 
63
+ #: include/functions.php:85
64
  msgid "Check our"
65
  msgstr "Veja o nosso plugin"
66
 
67
+ #: include/functions.php:85
68
  msgid ""
69
  "plugin which allow to custom sort categories and custom taxonomies terms"
70
  msgstr ""
71
  "que permite personalizar a ordem das categorias e das taxonomias "
72
  "personalizadas"
73
 
74
+ #: include/options.php:19
75
  msgid "Settings Saved"
76
  msgstr "Definições guardadas"
77
 
78
+ #: include/options.php:31
79
  msgid "General Settings"
80
  msgstr "Definições gerais"
81
 
82
+ #: include/options.php:37
83
  msgid "General"
84
  msgstr "Geral"
85
 
86
  #: include/options.php:41
87
+ msgid "Show / Hide re-order interface"
88
+ msgstr "Mostrar / esconder o interface de reordenação"
89
+
90
+ #: include/options.php:68
91
+ msgid "Show"
92
+ msgstr "Mostrar"
93
+
94
+ #: include/options.php:69
95
+ msgid "Hide"
96
+ msgstr "Esconder"
97
+
98
+ #: include/options.php:76
99
  msgid "Minimum Level to use this plugin"
100
  msgstr "Nível mínimo para utilizar este plugin"
101
 
102
+ #: include/options.php:79
103
  msgid "Subscriber"
104
  msgstr "Assinante"
105
 
106
+ #: include/options.php:80
107
  msgid "Contributor"
108
  msgstr "Colaborador"
109
 
110
+ #: include/options.php:81
111
  msgid "Author"
112
  msgstr "Autor"
113
 
114
+ #: include/options.php:82
115
  msgid "Editor"
116
  msgstr "Editor"
117
 
118
+ #: include/options.php:83
119
  msgid "Administrator"
120
  msgstr "Administrador"
121
 
122
+ #: include/options.php:89
123
  msgid "Auto Sort"
124
  msgstr "Ordem automática"
125
 
126
+ #: include/options.php:91
127
  msgid ""
128
  "If checked, the plug-in automatically update the WordPress queries to use "
129
  "the new order (<b>No code update is necessarily</b>)"
131
  "Se seleccionado, o plugin ordena automaticamente as wp-queries para utilizar "
132
  "a nova ordem (<b>sem recorrer a qualquer programação</b>)"
133
 
134
+ #: include/options.php:92
135
  msgid ""
136
  "If only certain queries need to use the custom sort, keep this unchecked and "
137
  "include 'orderby' => 'menu_order' into query parameters"
139
  "Se necessitar de ordenações mais personalizadas, desactive esta opção e "
140
  "inclua 'orderby' => 'menu_order' nos parâmetros da query"
141
 
142
+ #: include/options.php:94
143
  msgid "Additional Description and Examples"
144
  msgstr "Descrições e exemplos adicionais"
145
 
146
+ #: include/options.php:101
147
  msgid "Admin Sort"
148
  msgstr "Ordem na administração"
149
 
150
+ #: include/options.php:105
151
  msgid ""
152
  "To affect the admin interface, to see the post types per your new sort, this "
153
  "need to be checked"
155
  "Para afectar o painel de administração e ver os tipos de artigos pela sua "
156
  "nova ordem, esta opção tem que estar seleccionada"
157
 
158
+ #: include/options.php:110
159
  msgid "Next / Previous Apply"
160
  msgstr "Aplicar a Seguinte / Anterior"
161
 
162
+ #: include/options.php:114
163
  msgid "Apply the sort on Next / Previous site-wide navigation."
164
  msgstr "Aplicar a ordenação a toda a navegação Seguinte / Anterior."
165
 
166
+ #: include/options.php:114
167
  msgid "This can also be controlled through"
168
  msgstr "Isto também pode ser controlado por"
169
 
170
+ #: include/options.php:114
171
  msgid "code"
172
  msgstr "código"
173
 
174
+ #: include/options.php:123
175
  msgid "Save Settings"
176
  msgstr "Guardar definições"
177
 
178
+ #: post-types-order.php:129
179
  msgid "Post Types Order must be configured. Please go to"
180
  msgstr "O plugin Post Types Order tem que ser configurado em"
181
 
182
+ #: post-types-order.php:129
183
  msgid "Settings Page"
184
  msgstr "Página das definições"
185
 
186
+ #: post-types-order.php:129
187
  msgid "make the configuration and save"
188
  msgstr "Configure e guarde as definições"
189
 
190
+ #: post-types-order.php:222 post-types-order.php:301
191
  #, php-format
192
  msgid "Use commas instead of %s to separate excluded terms."
193
  msgstr "Utilize vírgulas em vez de %s para separar termos exluídos."
lang/cpt-ro_RO.mo → languages/post-types-order-ro_RO.mo RENAMED
File without changes
lang/cpt-ro_RO.po → languages/post-types-order-ro_RO.po RENAMED
File without changes
lang/cpt-sv_SE.mo → languages/post-types-order-sv_SE.mo RENAMED
File without changes
lang/cpt-sv_SE.po → languages/post-types-order-sv_SE.po RENAMED
File without changes
lang/cpt-tr_TR.mo → languages/post-types-order-tr_TR.mo RENAMED
File without changes
lang/cpt-tr_TR.po → languages/post-types-order-tr_TR.po RENAMED
File without changes
lang/cpt-zh_CN.mo → languages/post-types-order-zh_CN.mo RENAMED
File without changes
lang/cpt-zh_CN.po → languages/post-types-order-zh_CN.po RENAMED
File without changes
lang/cpt.mo → languages/post-types-order.mo RENAMED
File without changes
lang/cpt.po → languages/post-types-order.po RENAMED
File without changes
post-types-order.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.nsp-code.com
5
  Description: Posts Order and Post Types Objects Order using a Drag and Drop Sortable javascript capability
6
  Author: Nsp Code
7
  Author URI: http://www.nsp-code.com
8
- Version: 1.8.3
9
  */
10
 
11
  define('CPTPATH', plugin_dir_path(__FILE__));
@@ -126,7 +126,7 @@ Version: 1.8.3
126
  return;
127
  ?>
128
  <div class="error fade">
129
- <p><strong><?php _e('Post Types Order must be configured. Please go to', 'cpt') ?> <a href="<?php echo get_admin_url() ?>options-general.php?page=cpto-options"><?php _e('Settings Page', 'cpt') ?></a> <?php _e('make the configuration and save', 'cpt') ?></strong></p>
130
  </div>
131
  <?php
132
  }
@@ -135,7 +135,7 @@ Version: 1.8.3
135
  add_action( 'plugins_loaded', 'cpto_load_textdomain');
136
  function cpto_load_textdomain()
137
  {
138
- load_plugin_textdomain('cpt', FALSE, dirname( plugin_basename( __FILE__ ) ) . '/lang');
139
  }
140
 
141
  add_action('admin_menu', 'cpto_plugin_menu');
5
  Description: Posts Order and Post Types Objects Order using a Drag and Drop Sortable javascript capability
6
  Author: Nsp Code
7
  Author URI: http://www.nsp-code.com
8
+ Version: 1.8.4.1
9
  */
10
 
11
  define('CPTPATH', plugin_dir_path(__FILE__));
126
  return;
127
  ?>
128
  <div class="error fade">
129
+ <p><strong><?php _e('Post Types Order must be configured. Please go to', 'post-types-order') ?> <a href="<?php echo get_admin_url() ?>options-general.php?page=cpto-options"><?php _e('Settings Page', 'post-types-order') ?></a> <?php _e('make the configuration and save', 'post-types-order') ?></strong></p>
130
  </div>
131
  <?php
132
  }
135
  add_action( 'plugins_loaded', 'cpto_load_textdomain');
136
  function cpto_load_textdomain()
137
  {
138
+ load_plugin_textdomain('post-types-order', FALSE, dirname( plugin_basename( __FILE__ ) ) . '/languages');
139
  }
140
 
141
  add_action('admin_menu', 'cpto_plugin_menu');
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Post Types Order ===
2
  Contributors: Nsp Code
3
  Donate link: http://www.nsp-code.com/donate.php
4
- Tags: post order, post type order, custom order, admin posts order
5
  Requires at least: 2.8
6
- Tested up to: 4.2.4
7
 
8
  Post Order and custom Post Type Objects (posts, any custom post types) using a Drag and Drop Sortable JavaScript AJAX interface.
9
 
@@ -69,17 +69,24 @@ All ideas are welcome and i put them on my list to be implemented into the new v
69
 
70
  == Change Log ==
71
 
72
- = 1.8.3 =
 
 
 
 
 
 
73
  - Advanced Custom Fields Page Rule fix
74
  - Show / Hide Re_order inderface for certain menus. Option available within Settings area.
75
  - Media Sort interface objects order fix, when query-attachments REQUEST
 
76
 
77
  = 1.8.2 =
78
  - Media Uploaded To after sort fix
79
 
80
  = 1.8.1 =
81
  - Next / Previous sorting apply bug fix for custom taxonomies
82
- - Portuguese translation update - Pedro Mendon?a - http://www.pedromendonca.pt
83
  - Options - phrase translation fix
84
 
85
  = 1.7.9 =
1
  === Post Types Order ===
2
  Contributors: Nsp Code
3
  Donate link: http://www.nsp-code.com/donate.php
4
+ Tags: post order, posts order, sort, post sort, posts sort, post type order, custom order, admin posts order
5
  Requires at least: 2.8
6
+ Tested up to: 4.3
7
 
8
  Post Order and custom Post Type Objects (posts, any custom post types) using a Drag and Drop Sortable JavaScript AJAX interface.
9
 
69
 
70
  == Change Log ==
71
 
72
+ = 1.8.4.1 =
73
+ - Sortable interface styling improvments
74
+ - Portuguese translation update - Pedro Mendonca - http://www.pedromendonca.pt
75
+ - Text doamin fix for few texts
76
+ - Text domain change to post-types-order
77
+
78
+ = 1.8.3.1 =
79
  - Advanced Custom Fields Page Rule fix
80
  - Show / Hide Re_order inderface for certain menus. Option available within Settings area.
81
  - Media Sort interface objects order fix, when query-attachments REQUEST
82
+ - Bug - Thumbnails test code remove
83
 
84
  = 1.8.2 =
85
  - Media Uploaded To after sort fix
86
 
87
  = 1.8.1 =
88
  - Next / Previous sorting apply bug fix for custom taxonomies
89
+ - Portuguese translation update - Pedro Mendona - http://www.pedromendonca.pt
90
  - Options - phrase translation fix
91
 
92
  = 1.7.9 =