Post Types Order - Version 1.8.1

Version Description

  • Next / Previous sorting apply bug fix for custom taxonomies
    • Portuguese translation update - Pedro Mendon?a - http://www.pedromendonca.pt
    • Options - phrase translation fix
Download this release

Release Info

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

Code changes from version 1.7.9 to 1.8.1

include/options.php CHANGED
@@ -53,7 +53,7 @@ function cpt_plugin_options()
53
  <tr valign="top">
54
  <th scope="row" style="text-align: right;"><label for="autosort"><?php _e('Auto Sort', 'cpt') ?></label></th>
55
  <td>
56
- <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>)"); ?></p>
57
  <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') ?>.
58
  <br />
59
  <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>
53
  <tr valign="top">
54
  <th scope="row" style="text-align: right;"><label for="autosort"><?php _e('Auto Sort', 'cpt') ?></label></th>
55
  <td>
56
+ <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>
57
  <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') ?>.
58
  <br />
59
  <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>
lang/cpt-pt_PT.mo CHANGED
Binary file
lang/cpt-pt_PT.po CHANGED
@@ -2,57 +2,49 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Post Types Order\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2014-02-21 16:44+0200\n"
6
- "PO-Revision-Date: 2014-07-23 01:23-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-Poedit-KeywordsList: __;_e\n"
14
- "X-Poedit-Basepath: .\n"
15
- "X-Generator: Poedit 1.6.4\n"
16
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
  "X-Poedit-SourceCharset: UTF-8\n"
18
-
19
- #: post-types-order.php:119
20
- msgid "Post Types Order must be configured. Please go to"
21
- msgstr "O plugin Post Types Order tem que ser configurado em"
22
-
23
- #: post-types-order.php:119
24
- msgid "Settings Page"
25
- msgstr "Página de configurações"
26
-
27
- #: post-types-order.php:119
28
- msgid "make the configuration and save"
29
- msgstr "Configure e guarde as definições"
30
-
31
- #: post-types-order.php:457 post-types-order.php:461 post-types-order.php:472
32
  msgid "Re-Order"
33
  msgstr "Reordenar"
34
 
35
- #: post-types-order.php:480
36
  msgid ""
37
  "This plugin can't work without javascript, because it's use drag and drop "
38
  "and AJAX."
39
  msgstr ""
40
- "Este plugin necessita de JavaScript porque utiliza AJAX para arrastar e "
41
  "largar os itens."
42
 
43
- #: post-types-order.php:493
44
  msgid "Update"
45
  msgstr "Atualizar"
46
 
47
- #: post-types-order.php:509
48
  msgid "Items Order Updated"
49
  msgstr "Ordem dos itens alterada"
50
 
51
- #: post-types-order.php:526
52
  msgid "Pages"
53
  msgstr "Páginas"
54
 
55
- #: include/functions.php:65
56
  msgid ""
57
  "Did you find this plugin useful? Please support our work with a donation or "
58
  "write an article about this plugin in your blog with a link to our site"
@@ -60,112 +52,162 @@ msgstr ""
60
  "Considera este plugin útil? Por favor faça um donativo ao autor ou escreva "
61
  "um artigo sobre este plugin no seu blog com ligação para a nossa página"
62
 
63
- #: include/functions.php:66
64
  msgid "Did you know there is available an Advanced version of this plug-in?"
65
  msgstr "Sabe que há uma versão Avançada deste plugin?"
66
 
67
- #: include/functions.php:66
68
  msgid "Read more"
69
- msgstr "Leia mais"
70
 
71
- #: include/functions.php:67
72
  msgid "Check our"
73
- msgstr "Verifique o nosso plugin"
74
 
75
- #: include/functions.php:67
76
  msgid ""
77
  "plugin which allow to custom sort categories and custom taxonomies terms"
78
  msgstr ""
79
  "que permite personalizar a ordem das categorias e das taxonomias "
80
  "personalizadas"
81
 
82
- #: include/options.php:16
83
  msgid "Settings Saved"
84
- msgstr "Configurações guardadas"
85
 
86
- #: include/options.php:28
87
  msgid "General Settings"
88
- msgstr "Configurações gerais"
89
 
90
- #: include/options.php:34
91
  msgid "General"
92
  msgstr "Geral"
93
 
94
- #: include/options.php:39
95
  msgid "Minimum Level to use this plugin"
96
  msgstr "Nível mínimo para utilizar este plugin"
97
 
98
- #: include/options.php:42
99
  msgid "Subscriber"
100
  msgstr "Assinante"
101
 
102
- #: include/options.php:43
103
  msgid "Contributor"
104
  msgstr "Colaborador"
105
 
106
- #: include/options.php:44
107
  msgid "Author"
108
  msgstr "Autor"
109
 
110
- #: include/options.php:45
111
  msgid "Editor"
112
  msgstr "Editor"
113
 
114
- #: include/options.php:46
115
  msgid "Administrator"
116
  msgstr "Administrador"
117
 
118
- #: include/options.php:52
119
  msgid "Auto Sort"
120
- msgstr "Ordem Automática"
121
 
122
  #: include/options.php:56
123
  msgid ""
124
- "If checked, the plug-in will automatically update the wp-queries to use the "
125
- "new order (<b>No code update is necessarily</b>).<br /> If you need more "
126
- "order customizations you will need to uncheck this and include 'menu_order' "
127
- "into your theme queries"
128
  msgstr ""
129
- "Se seleccionado, o plugin irá ordenar automaticamente actualizar as <i>wp-"
130
- "queries</i> para usar a nova ordem <b>sem recorrer a qualquer programação</"
131
- "b>.<br />Se necessitar de ordenações mais personalizadas, deverá incluir "
132
- "'menu_order' nas <i>queries</i> do tema e desactivar esta opção."
133
-
134
- #: include/options.php:58
135
- msgid "Show Examples"
136
- msgstr "Mostrar exemplos"
137
 
138
- #: include/options.php:61
139
- msgid "The following PHP code will still return the post in the set-up Order"
140
- msgstr "O código PHP abaixo também permite obter o artigo na ordem definida"
141
-
142
- #: include/options.php:74
143
- msgid "Or"
144
- msgstr "Ou"
145
-
146
- #: include/options.php:83
147
  msgid ""
148
- "If the Auto Sort is uncheck you will need to use the \"orderby\" and \"order"
149
- "\" parameters"
150
  msgstr ""
151
- "Se a Ordem Automática não estiver seleccionada, deverá utilizar os "
152
- "parâmetros \"orderby\" e \"order\""
153
 
154
- #: include/options.php:98
 
 
 
 
155
  msgid "Admin Sort"
156
- msgstr "Ordem na Administração"
157
 
158
- #: include/options.php:102
159
  msgid ""
160
  "To affect the admin interface, to see the post types per your new sort, this "
161
  "need to be checked"
162
  msgstr ""
163
- "Active esta opção para afectar o painel de administração e ver os tipos de "
164
- "artigos pela sua nova ordem"
 
 
 
 
165
 
166
- #: include/options.php:111
 
 
 
 
 
 
 
 
 
 
 
 
167
  msgid "Save Settings"
168
- msgstr "Guardar configurações"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
 
170
  #~ msgid "Post Types Order"
171
  #~ msgstr "Ordenar Posts"
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;"
17
+ "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
18
+ "esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
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."
31
  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
  "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>)"
 
 
118
  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"
126
  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"
142
  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."
182
+
183
+ #~ msgid ""
184
+ #~ "If checked, the plug-in will automatically update the wp-queries to use "
185
+ #~ "the new order (<b>No code update is necessarily</b>).<br /> If you need "
186
+ #~ "more order customizations you will need to uncheck this and include "
187
+ #~ "'menu_order' into your theme queries"
188
+ #~ msgstr ""
189
+ #~ "Se seleccionado, o plugin irá ordenar automaticamente actualizar as <i>wp-"
190
+ #~ "queries</i> para usar a nova ordem <b>sem recorrer a qualquer "
191
+ #~ "programação</b>.<br />Se necessitar de ordenações mais personalizadas, "
192
+ #~ "deverá incluir 'menu_order' nas <i>queries</i> do tema e desactivar esta "
193
+ #~ "opção."
194
+
195
+ #~ msgid "Show Examples"
196
+ #~ msgstr "Mostrar exemplos"
197
+
198
+ #~ msgid ""
199
+ #~ "The following PHP code will still return the post in the set-up Order"
200
+ #~ msgstr "O código PHP abaixo também permite obter o artigo na ordem definida"
201
+
202
+ #~ msgid "Or"
203
+ #~ msgstr "Ou"
204
+
205
+ #~ msgid ""
206
+ #~ "If the Auto Sort is uncheck you will need to use the \"orderby\" and "
207
+ #~ "\"order\" parameters"
208
+ #~ msgstr ""
209
+ #~ "Se a Ordem Automática não estiver seleccionada, deverá utilizar os "
210
+ #~ "parâmetros \"orderby\" e \"order\""
211
 
212
  #~ msgid "Post Types Order"
213
  #~ msgstr "Ordenar Posts"
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.7.9
9
  */
10
 
11
  define('CPTPATH', plugin_dir_path(__FILE__));
@@ -193,11 +193,13 @@ Version: 1.7.9
193
  if ( empty( $post ) )
194
  return $where;
195
 
196
- $_join = '';
197
- $_where = '';
198
-
199
  //?? WordPress does not pass through this varialbe, so we presume it's category..
200
  $taxonomy = 'category';
 
 
 
 
 
201
 
202
  if ( $in_same_term || ! empty( $excluded_terms ) )
203
  {
@@ -271,12 +273,13 @@ Version: 1.7.9
271
  if ( empty( $post ) )
272
  return $where;
273
 
274
- $_join = '';
275
- $_where = '';
276
-
277
- //?? WordPress does not pass through this varialbe, so we presume it's category..
278
  $taxonomy = 'category';
 
 
279
 
 
 
 
280
  if ( $in_same_term || ! empty( $excluded_terms ) )
281
  {
282
  $_join = " INNER JOIN $wpdb->term_relationships AS tr ON p.ID = tr.object_id INNER JOIN $wpdb->term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id";
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.1
9
  */
10
 
11
  define('CPTPATH', plugin_dir_path(__FILE__));
193
  if ( empty( $post ) )
194
  return $where;
195
 
 
 
 
196
  //?? WordPress does not pass through this varialbe, so we presume it's category..
197
  $taxonomy = 'category';
198
+ if(preg_match('/ tt.taxonomy = \'([^\']+)\'/i',$where, $match))
199
+ $taxonomy = $match[1];
200
+
201
+ $_join = '';
202
+ $_where = '';
203
 
204
  if ( $in_same_term || ! empty( $excluded_terms ) )
205
  {
273
  if ( empty( $post ) )
274
  return $where;
275
 
 
 
 
 
276
  $taxonomy = 'category';
277
+ if(preg_match('/ tt.taxonomy = \'([^\']+)\'/i',$where, $match))
278
+ $taxonomy = $match[1];
279
 
280
+ $_join = '';
281
+ $_where = '';
282
+
283
  if ( $in_same_term || ! empty( $excluded_terms ) )
284
  {
285
  $_join = " INNER JOIN $wpdb->term_relationships AS tr ON p.ID = tr.object_id INNER JOIN $wpdb->term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id";
readme.txt CHANGED
@@ -4,7 +4,6 @@ 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.2
7
- Stable tag: 1.7.9
8
 
9
  Post Order and custom Post Type Objects (posts, any custom post types) using a Drag and Drop Sortable JavaScript AJAX interface.
10
 
@@ -68,6 +67,11 @@ All ideas are welcome and i put them on my list to be implemented into the new v
68
 
69
  == Change Log ==
70
 
 
 
 
 
 
71
  = 1.7.9 =
72
  - Next / Previous sorting apply option
73
  - Filter for Next / Previous sorting applpy
4
  Tags: post order, post type order, custom order, admin posts order
5
  Requires at least: 2.8
6
  Tested up to: 4.2.2
 
7
 
8
  Post Order and custom Post Type Objects (posts, any custom post types) using a Drag and Drop Sortable JavaScript AJAX interface.
9
 
67
 
68
  == Change Log ==
69
 
70
+ = 1.8.1 =
71
+ - Next / Previous sorting apply bug fix for custom taxonomies
72
+ - Portuguese translation update - Pedro Mendon?a - http://www.pedromendonca.pt
73
+ - Options - phrase translation fix
74
+
75
  = 1.7.9 =
76
  - Next / Previous sorting apply option
77
  - Filter for Next / Previous sorting applpy