Post Types Order - Version 1.7.9

Version Description

  • Next / Previous sorting apply option
    • Filter for Next / Previous sorting applpy
    • Help updates
    • Appearance /css updates
    • Admin columns sort fix
    • Media re-order
Download this release

Release Info

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

Code changes from version 1.7.7 to 1.7.9

css/cpt.css CHANGED
@@ -1,8 +1,8 @@
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;}
4
- #order-post-type #sortable li span { display: block; background: #f9f8f8; padding: 5px 10px; color:#555; font-size:13px; font-weight:bold;}
5
- #order-post-type #sortable li.placeholder{border: dashed 2px #ccc;height:25px;}
6
 
7
  #icon-settings {background-image:url("../images/admin-icon-settings.gif");background-repeat:no-repeat;}
8
  h2.subtitle {font-size: 15px; font-style: italic; font-weight: bold}
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
 
7
  #icon-settings {background-image:url("../images/admin-icon-settings.gif");background-repeat:no-repeat;}
8
  h2.subtitle {font-size: 15px; font-style: italic; font-weight: bold}
include/cpto-class.php CHANGED
@@ -78,7 +78,7 @@
78
  //put a menu for all custom_type
79
  $post_types = get_post_types();
80
 
81
- $options = get_option('cpto_options');
82
  //get the required user capability
83
  $capability = '';
84
  if(isset($options['capability']) && !empty($options['capability']))
@@ -105,6 +105,8 @@
105
 
106
  if ($post_type_name == 'post')
107
  add_submenu_page('edit.php', __('Re-Order', 'cpt'), __('Re-Order', 'cpt'), $capability, 'order-post-types-'.$post_type_name, array(&$this, 'SortPage') );
 
 
108
  else
109
  {
110
  if (!is_post_type_hierarchical($post_type_name))
@@ -173,12 +175,19 @@
173
  function listPages($args = '')
174
  {
175
  $defaults = array(
176
- 'depth' => 0, 'show_date' => '',
177
- 'date_format' => get_option('date_format'),
178
- 'child_of' => 0, 'exclude' => '',
179
- 'title_li' => __('Pages'), 'echo' => 1,
180
- 'authors' => '', 'sort_column' => 'menu_order',
181
- 'link_before' => '', 'link_after' => '', 'walker' => ''
 
 
 
 
 
 
 
182
  );
183
 
184
  $r = wp_parse_args( $args, $defaults );
@@ -193,10 +202,11 @@
193
  // Query pages.
194
  $r['hierarchical'] = 0;
195
  $args = array(
196
- 'sort_column' => 'menu_order',
197
- 'post_type' => $post_type,
198
- 'posts_per_page' => -1,
199
- 'orderby' => array(
 
200
  'menu_order' => 'ASC',
201
  'post_date' => 'DESC'
202
  )
78
  //put a menu for all custom_type
79
  $post_types = get_post_types();
80
 
81
+ $options = cpt_get_options();
82
  //get the required user capability
83
  $capability = '';
84
  if(isset($options['capability']) && !empty($options['capability']))
105
 
106
  if ($post_type_name == 'post')
107
  add_submenu_page('edit.php', __('Re-Order', 'cpt'), __('Re-Order', 'cpt'), $capability, 'order-post-types-'.$post_type_name, array(&$this, 'SortPage') );
108
+ elseif ($post_type_name == 'attachment')
109
+ add_submenu_page('upload.php', __('Re-Order', 'cpt'), __('Re-Order', 'cpt'), $capability, 'order-post-types-'.$post_type_name, array(&$this, 'SortPage') );
110
  else
111
  {
112
  if (!is_post_type_hierarchical($post_type_name))
175
  function listPages($args = '')
176
  {
177
  $defaults = array(
178
+ 'depth' => 0,
179
+ 'show_date' => '',
180
+ 'date_format' => get_option('date_format'),
181
+ 'child_of' => 0,
182
+ 'exclude' => '',
183
+ 'title_li' => __('Pages'),
184
+ 'echo' => 1,
185
+ 'authors' => '',
186
+ 'sort_column' => 'menu_order',
187
+ 'link_before' => '',
188
+ 'link_after' => '',
189
+ 'walker' => '',
190
+ 'post_status' => 'any'
191
  );
192
 
193
  $r = wp_parse_args( $args, $defaults );
202
  // Query pages.
203
  $r['hierarchical'] = 0;
204
  $args = array(
205
+ 'sort_column' => 'menu_order',
206
+ 'post_type' => $post_type,
207
+ 'posts_per_page' => -1,
208
+ 'post_status' => 'any',
209
+ 'orderby' => array(
210
  'menu_order' => 'ASC',
211
  'post_date' => 'DESC'
212
  )
include/functions.php CHANGED
@@ -26,6 +26,23 @@
26
  return ($user_level);
27
  }
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
  function cpt_info_box()
31
  {
26
  return ($user_level);
27
  }
28
 
29
+
30
+ function cpt_get_options()
31
+ {
32
+ //make sure the vars are set as default
33
+ $options = get_option('cpto_options');
34
+
35
+ $defaults = array (
36
+ 'autosort' => 1,
37
+ 'adminsort' => 1,
38
+ 'capability' => 'install_plugins',
39
+ 'navigation_sort_apply' => 1,
40
+
41
+ );
42
+ $options = wp_parse_args( $options, $defaults );
43
+
44
+ return $options;
45
+ }
46
 
47
  function cpt_info_box()
48
  {
include/options.php CHANGED
@@ -3,7 +3,7 @@
3
 
4
  function cpt_plugin_options()
5
  {
6
- $options = get_option('cpto_options');
7
 
8
  if (isset($_POST['form_submit']))
9
  {
@@ -12,7 +12,9 @@ function cpt_plugin_options()
12
 
13
  $options['autosort'] = isset($_POST['autosort']) ? $_POST['autosort'] : '';
14
  $options['adminsort'] = isset($_POST['adminsort']) ? $_POST['adminsort'] : '';
15
-
 
 
16
  echo '<div class="updated fade"><p>' . __('Settings Saved', 'cpt') . '</p></div>';
17
 
18
  update_option('cpto_options', $options);
@@ -49,57 +51,32 @@ function cpt_plugin_options()
49
  </tr>
50
 
51
  <tr valign="top">
52
- <th scope="row" style="text-align: right;"><label><?php _e('Auto Sort', 'cpt') ?></label></th>
53
  <td>
54
- <label for="users_can_register">
55
- <input type="checkbox" <?php if ($options['autosort'] == "1") {echo ' checked="checked"';} ?> value="1" name="autosort">
56
- <?php _e("If checked, the plug-in will automatically update the wp-queries to use the new order (<b>No code update is necessarily</b>).<br /> If you need more order customizations you will need to uncheck this and include 'menu_order' into your theme queries", 'cpt') ?>.</label>
 
57
 
58
- <p><a href="javascript:;" onclick="jQuery('#example1').slideToggle();;return false;"><?php _e('Show Examples', 'cpt') ?></a></p>
59
- <div id="example1" style="display: none">
60
-
61
- <p class="example"><br /><?php _e('The following PHP code will still return the post in the set-up Order', 'cpt') ?>:</p>
62
- <pre class="example">
63
- $args = array(
64
- 'post_type' => 'feature'
65
- );
66
-
67
- $my_query = new WP_Query($args);
68
- while ($my_query->have_posts())
69
- {
70
- $my_query->the_post();
71
- (..your code..)
72
- }
73
- </pre>
74
- <p class="example"><br /><?php _e('Or', 'cpt') ?>:</p>
75
- <pre class="example">
76
- $posts = get_posts($args);
77
- foreach ($posts as $post)
78
- {
79
- (..your code..)
80
- }
81
- </pre>
82
-
83
- <p class="example"><br /><?php _e('If the Auto Sort is uncheck you will need to use the "orderby" and "order" parameters', 'cpt') ?>:</p>
84
- <pre class="example">
85
- $args = array(
86
- 'post_type' => 'feature',
87
- 'orderby' => 'menu_order',
88
- 'order' => 'ASC'
89
- );
90
- </pre>
91
-
92
- </div>
93
  </td>
94
  </tr>
95
 
96
 
97
  <tr valign="top">
98
- <th scope="row" style="text-align: right;"><label><?php _e('Admin Sort', 'cpt') ?></label></th>
 
 
 
 
 
 
 
 
 
99
  <td>
100
- <label for="users_can_register">
101
- <input type="checkbox" <?php if ($options['adminsort'] == "1") {echo ' checked="checked"';} ?> value="1" name="adminsort">
102
- <?php _e("To affect the admin interface, to see the post types per your new sort, this need to be checked", 'cpt') ?>.</label>
103
  </td>
104
  </tr>
105
 
3
 
4
  function cpt_plugin_options()
5
  {
6
+ $options = cpt_get_options();
7
 
8
  if (isset($_POST['form_submit']))
9
  {
12
 
13
  $options['autosort'] = isset($_POST['autosort']) ? $_POST['autosort'] : '';
14
  $options['adminsort'] = isset($_POST['adminsort']) ? $_POST['adminsort'] : '';
15
+
16
+ $options['navigation_sort_apply'] = isset($_POST['navigation_sort_apply']) ? $_POST['navigation_sort_apply'] : '';
17
+
18
  echo '<div class="updated fade"><p>' . __('Settings Saved', 'cpt') . '</p></div>';
19
 
20
  update_option('cpto_options', $options);
51
  </tr>
52
 
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>
60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  </td>
62
  </tr>
63
 
64
 
65
  <tr valign="top">
66
+ <th scope="row" style="text-align: right;"><label for="adminsort"><?php _e('Admin Sort', 'cpt') ?></label></th>
67
+ <td>
68
+ <p>
69
+ <input type="checkbox" <?php if ($options['adminsort'] == "1") {echo ' checked="checked"';} ?> id="adminsort" value="1" name="adminsort">
70
+ <?php _e("To affect the admin interface, to see the post types per your new sort, this need to be checked", 'cpt') ?>.</p>
71
+ </td>
72
+ </tr>
73
+
74
+ <tr valign="top">
75
+ <th scope="row" style="text-align: right;"><label for="navigation_sort_apply"><?php _e('Next / Previous Apply', 'cpt') ?></label></th>
76
  <td>
77
+ <p>
78
+ <input type="checkbox" <?php if ($options['navigation_sort_apply'] == "1") {echo ' checked="checked"';} ?> id="navigation_sort_apply" value="1" name="navigation_sort_apply">
79
+ <?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>
80
  </td>
81
  </tr>
82
 
lang/cpt-pt_BR.mo CHANGED
Binary file
lang/cpt-pt_BR.po CHANGED
@@ -2,97 +2,180 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Post Types Order\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2010-11-29 09:26-0300\n"
6
- "PO-Revision-Date: 2012-12-07 14:22+0200\n"
7
- "Last-Translator: Gabriel Reguly <gabriel@ppgr.com.br>\n"
8
  "Language-Team: http://ppgr.com.br/\n"
 
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: __;_e\n"
13
- "X-Poedit-Basepath: .\n"
14
- "Language: pt_BR\n"
15
- "X-Generator: Poedit 1.5.3\n"
16
- "X-Poedit-SearchPath-0: post-types-order\n"
17
 
18
- #: post-types-order/post-types-order.php:41
19
- msgid "Post Types Order"
20
- msgstr "Ordenar Posts"
21
 
22
- #: post-types-order/post-types-order.php:176
23
- msgid "Invalid post type"
24
- msgstr "Type de post inválido"
 
25
 
26
- #: post-types-order/post-types-order.php:216
27
- #: post-types-order/post-types-order.php:218
28
- msgid "Re-Order"
29
- msgstr "Reordenar"
30
 
31
- #: post-types-order/post-types-order.php:229
32
  #, php-format
33
- msgid "%s - Re-order "
34
- msgstr "Reordenar %s"
 
 
 
 
 
35
 
36
- #: post-types-order/post-types-order.php:233
 
37
  msgid ""
38
- "This plugin can't work without javascript, because it use drag and drop and "
39
- "AJAX."
40
  msgstr "Este plugin precisa de JavaScript para funcionar."
41
 
42
- #: post-types-order/post-types-order.php:242
43
  msgid "Update"
44
  msgstr "Atualizar"
45
 
46
- #: post-types-order/post-types-order.php:257
47
- msgid "Item order updated"
 
48
  msgstr "Ordem alterada"
49
 
50
- #: post-types-order/post-types-order.php:263
 
 
 
 
 
51
  msgid ""
52
- "Did you found this plug-in useful? Please support our work with a donation."
 
53
  msgstr ""
54
  "Você considera útil este plugin? Por favor, faça uma doação para o autor."
55
 
56
- #: post-types-order/post-types-order.php:283
57
- msgid "Pages"
58
- msgstr "Páginas"
 
 
 
 
59
 
60
- #: post-types-order/include/options.php:6
 
 
 
 
 
 
 
 
 
61
  msgid "Settings Saved"
62
  msgstr "Configuração salva"
63
 
64
- #: post-types-order/include/options.php:13
65
- msgid "General Setings"
 
66
  msgstr "Configuração geral"
67
 
68
- #: post-types-order/include/options.php:16
69
  msgid "General"
70
  msgstr "Geral"
71
 
72
- #: post-types-order/include/options.php:21
73
  msgid "Minimum Level to use this plugin"
74
  msgstr "Nível minimo para utilizar este plugin"
75
 
76
- #: post-types-order/include/options.php:25
77
  msgid "Subscriber"
78
  msgstr "Assinante"
79
 
80
- #: post-types-order/include/options.php:26
81
  msgid "Contributor"
82
  msgstr "Contribuidor"
83
 
84
- #: post-types-order/include/options.php:27
85
  msgid "Author"
86
  msgstr "Author"
87
 
88
- #: post-types-order/include/options.php:28
89
  msgid "Editor"
90
  msgstr "Editor"
91
 
92
- #: post-types-order/include/options.php:29
93
  msgid "Administrator"
94
  msgstr "Administrador"
95
 
96
- #: post-types-order/include/options.php:36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  msgid "Save Settings"
98
  msgstr "Salvar configuração"
 
 
 
 
 
 
 
 
 
2
  msgstr ""
3
  "Project-Id-Version: Post Types Order\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2015-02-28 17:33+0200\n"
6
+ "PO-Revision-Date: 2015-02-28 17:33+0200\n"
7
+ "Last-Translator: nsp-code <contact@nsp-code.com>\n"
8
  "Language-Team: http://ppgr.com.br/\n"
9
+ "Language: pt_BR\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;gettext;gettext_noop\n"
14
+ "X-Poedit-Basepath: ../\n"
15
+ "X-Generator: Poedit 1.5.5\n"
16
+ "X-Poedit-SearchPath-0: .\n"
 
17
 
18
+ #: post-types-order.php:121
19
+ msgid "Post Types Order must be configured. Please go to"
20
+ msgstr ""
21
 
22
+ #: post-types-order.php:121
23
+ #, fuzzy
24
+ msgid "Settings Page"
25
+ msgstr "Configuração salva"
26
 
27
+ #: post-types-order.php:121
28
+ msgid "make the configuration and save"
29
+ msgstr ""
 
30
 
31
+ #: post-types-order.php:209 post-types-order.php:287
32
  #, php-format
33
+ msgid "Use commas instead of %s to separate excluded terms."
34
+ msgstr ""
35
+
36
+ #: include/cpto-class.php:107 include/cpto-class.php:111
37
+ #: include/cpto-class.php:122
38
+ msgid "Re-Order"
39
+ msgstr "Reordenar"
40
 
41
+ #: include/cpto-class.php:130
42
+ #, fuzzy
43
  msgid ""
44
+ "This plugin can't work without javascript, because it's use drag and drop "
45
+ "and AJAX."
46
  msgstr "Este plugin precisa de JavaScript para funcionar."
47
 
48
+ #: include/cpto-class.php:143
49
  msgid "Update"
50
  msgstr "Atualizar"
51
 
52
+ #: include/cpto-class.php:162
53
+ #, fuzzy
54
+ msgid "Items Order Updated"
55
  msgstr "Ordem alterada"
56
 
57
+ #: include/cpto-class.php:179
58
+ msgid "Pages"
59
+ msgstr "Páginas"
60
+
61
+ #: include/functions.php:82
62
+ #, fuzzy
63
  msgid ""
64
+ "Did you find this plugin useful? Please support our work with a donation or "
65
+ "write an article about this plugin in your blog with a link to our site"
66
  msgstr ""
67
  "Você considera útil este plugin? Por favor, faça uma doação para o autor."
68
 
69
+ #: include/functions.php:83
70
+ msgid "Did you know there is available an Advanced version of this plug-in?"
71
+ msgstr ""
72
+
73
+ #: include/functions.php:83
74
+ msgid "Read more"
75
+ msgstr ""
76
 
77
+ #: include/functions.php:84
78
+ msgid "Check our"
79
+ msgstr ""
80
+
81
+ #: include/functions.php:84
82
+ msgid ""
83
+ "plugin which allow to custom sort categories and custom taxonomies terms"
84
+ msgstr ""
85
+
86
+ #: include/options.php:18
87
  msgid "Settings Saved"
88
  msgstr "Configuração salva"
89
 
90
+ #: include/options.php:30
91
+ #, fuzzy
92
+ msgid "General Settings"
93
  msgstr "Configuração geral"
94
 
95
+ #: include/options.php:36
96
  msgid "General"
97
  msgstr "Geral"
98
 
99
+ #: include/options.php:41
100
  msgid "Minimum Level to use this plugin"
101
  msgstr "Nível minimo para utilizar este plugin"
102
 
103
+ #: include/options.php:44
104
  msgid "Subscriber"
105
  msgstr "Assinante"
106
 
107
+ #: include/options.php:45
108
  msgid "Contributor"
109
  msgstr "Contribuidor"
110
 
111
+ #: include/options.php:46
112
  msgid "Author"
113
  msgstr "Author"
114
 
115
+ #: include/options.php:47
116
  msgid "Editor"
117
  msgstr "Editor"
118
 
119
+ #: include/options.php:48
120
  msgid "Administrator"
121
  msgstr "Administrador"
122
 
123
+ #: include/options.php:54
124
+ msgid "Auto Sort"
125
+ msgstr ""
126
+
127
+ #: include/options.php:56
128
+ msgid ""
129
+ "If checked, the plug-in automatically update the WordPress queries to use "
130
+ "the new order (<b>No code update is necessarily</b>)"
131
+ msgstr ""
132
+
133
+ #: include/options.php:57
134
+ msgid ""
135
+ "If only certain queries need to use the custom sort, keep this unchecked and "
136
+ "include 'orderby' => 'menu_order' into query parameters"
137
+ msgstr ""
138
+
139
+ #: include/options.php:59
140
+ msgid "Additional Description and Examples"
141
+ msgstr ""
142
+
143
+ #: include/options.php:66
144
+ #, fuzzy
145
+ msgid "Admin Sort"
146
+ msgstr "Administrador"
147
+
148
+ #: include/options.php:70
149
+ msgid ""
150
+ "To affect the admin interface, to see the post types per your new sort, this "
151
+ "need to be checked"
152
+ msgstr ""
153
+
154
+ #: include/options.php:75
155
+ msgid "Next / Previous Apply"
156
+ msgstr ""
157
+
158
+ #: include/options.php:79
159
+ msgid "Apply the sort on Next / Previous site-wide navigation."
160
+ msgstr ""
161
+
162
+ #: include/options.php:79
163
+ msgid "This can also be controlled through"
164
+ msgstr ""
165
+
166
+ #: include/options.php:79
167
+ msgid "code"
168
+ msgstr ""
169
+
170
+ #: include/options.php:88
171
  msgid "Save Settings"
172
  msgstr "Salvar configuração"
173
+
174
+ #~ msgid "Post Types Order"
175
+ #~ msgstr "Ordenar Posts"
176
+
177
+ #~ msgid "Invalid post type"
178
+ #~ msgstr "Type de post inválido"
179
+
180
+ #~ msgid "%s - Re-order "
181
+ #~ msgstr "Reordenar %s"
lang/cpt-ro_RO.mo CHANGED
Binary file
lang/cpt-ro_RO.po CHANGED
@@ -2,9 +2,9 @@ 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:46+0200\n"
6
- "PO-Revision-Date: 2014-02-21 16:53+0200\n"
7
- "Last-Translator: Nsp-Code <electronice_delphi@yahoo.com>\n"
8
  "Language-Team: http://nsp-code.com <electronice_delphi@yahoo.com>\n"
9
  "Language: ro_RO\n"
10
  "MIME-Version: 1.0\n"
@@ -15,159 +15,181 @@ msgstr ""
15
  "X-Generator: Poedit 1.5.5\n"
16
  "X-Poedit-SearchPath-0: .\n"
17
 
18
- #: post-types-order.php:119
19
  msgid "Post Types Order must be configured. Please go to"
20
  msgstr "Post Types Order trebuie configurat. Mergeti la"
21
 
22
- #: post-types-order.php:119
23
- #, fuzzy
24
  msgid "Settings Page"
25
- msgstr "Setari Salvate"
26
 
27
- #: post-types-order.php:119
28
  msgid "make the configuration and save"
29
  msgstr "efectuati configurarea si salvati"
30
 
31
- #: post-types-order.php:457 post-types-order.php:461 post-types-order.php:472
 
 
 
 
 
 
32
  msgid "Re-Order"
33
  msgstr "Re-Order"
34
 
35
- #: post-types-order.php:480
36
- #, fuzzy
37
  msgid ""
38
  "This plugin can't work without javascript, because it's use drag and drop "
39
  "and AJAX."
40
  msgstr ""
41
  "Acest plugin nu poate functiona fara JavaScript pentru ca foloseste o "
42
- "capabilitate AJAX"
43
 
44
- #: post-types-order.php:493
45
  msgid "Update"
46
  msgstr "Actualizare"
47
 
48
- #: post-types-order.php:509
49
- #, fuzzy
50
  msgid "Items Order Updated"
51
- msgstr "Ordonare salvata"
52
 
53
- #: post-types-order.php:526
54
  msgid "Pages"
55
  msgstr "Pagini"
56
 
57
- #: include/functions.php:65
58
- #, fuzzy
59
  msgid ""
60
  "Did you find this plugin useful? Please support our work with a donation or "
61
  "write an article about this plugin in your blog with a link to our site"
62
  msgstr ""
63
- "Ai gasit acest plugin folositor? The rog ajuta exhipa sa dezvolte softul in "
64
- "continuare printr-o donatie"
 
65
 
66
- #: include/functions.php:66
67
  msgid "Did you know there is available an Advanced version of this plug-in?"
68
  msgstr "Stiati ca este disponibil o versiune mai avansata a acestui plug-in?"
69
 
70
- #: include/functions.php:66
71
  msgid "Read more"
72
  msgstr "Citeste mai multe"
73
 
74
- #: include/functions.php:67
75
  msgid "Check our"
76
  msgstr "Verificati"
77
 
78
- #: include/functions.php:67
79
  msgid ""
80
  "plugin which allow to custom sort categories and custom taxonomies terms"
81
  msgstr "plugin care ajuta la sortarea categoriilor si a termenilor"
82
 
83
- #: include/options.php:16
84
  msgid "Settings Saved"
85
  msgstr "Setari Salvate"
86
 
87
- #: include/options.php:28
88
- #, fuzzy
89
  msgid "General Settings"
90
  msgstr "Setari Generale"
91
 
92
- #: include/options.php:34
93
  msgid "General"
94
  msgstr "Geral"
95
 
96
- #: include/options.php:39
97
  msgid "Minimum Level to use this plugin"
98
  msgstr "Niveulul minim pentru a utiliza Re-order"
99
 
100
- #: include/options.php:42
101
  msgid "Subscriber"
102
  msgstr "Subscriber"
103
 
104
- #: include/options.php:43
105
  msgid "Contributor"
106
  msgstr "Contributor"
107
 
108
- #: include/options.php:44
109
  msgid "Author"
110
  msgstr "Author"
111
 
112
- #: include/options.php:45
113
  msgid "Editor"
114
  msgstr "Editor"
115
 
116
- #: include/options.php:46
117
  msgid "Administrator"
118
  msgstr "Administrator"
119
 
120
- #: include/options.php:52
121
  msgid "Auto Sort"
122
  msgstr "Auto Sort"
123
 
124
  #: include/options.php:56
125
  msgid ""
126
- "If checked, the plug-in will automatically update the wp-queries to use the "
127
- "new order (<b>No code update is necessarily</b>).<br /> If you need more "
128
- "order customizations you will need to uncheck this and include 'menu_order' "
129
- "into your theme queries"
130
  msgstr ""
131
- "Daca este marcat, plugin-ul o sa modifice automat wp-query-urile pentru a "
132
- "folosi noua ordine. (<b>Nu este necesare editarea codului</b>).<br /> Daca "
133
- "este nevoie de mai mult control asupra ordinei, aceasta setare trebue de-"
134
- "marcata si se va include 'menu_order' in query-uri."
135
-
136
- #: include/options.php:58
137
- msgid "Show Examples"
138
- msgstr "Arata exemple"
139
-
140
- #: include/options.php:61
141
- msgid "The following PHP code will still return the post in the set-up Order"
142
- msgstr "Urmatorul cod PHP to va returna post-urile in ordinea desemnata"
143
-
144
- #: include/options.php:74
145
- msgid "Or"
146
- msgstr "Sau "
147
 
148
- #: include/options.php:83
149
  msgid ""
150
- "If the Auto Sort is uncheck you will need to use the \"orderby\" and \"order"
151
- "\" parameters"
152
  msgstr ""
153
- "Daca Auto Sort este de-marcat, va trebui sa folositi parametrii \"orderby\" "
154
- "si \"order\" "
155
 
156
- #: include/options.php:98
157
- #, fuzzy
 
 
 
158
  msgid "Admin Sort"
159
- msgstr "Administrator"
160
 
161
- #: include/options.php:102
162
  msgid ""
163
  "To affect the admin interface, to see the post types per your new sort, this "
164
  "need to be checked"
165
  msgstr "Pentru a modifica ordinea in admin"
166
 
167
- #: include/options.php:111
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  msgid "Save Settings"
169
  msgstr "Salveaza"
170
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
171
  #~ msgid "Post Types Order"
172
  #~ msgstr "Post Types Order"
173
 
2
  msgstr ""
3
  "Project-Id-Version: Post Types Order\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2015-02-28 17:25+0200\n"
6
+ "PO-Revision-Date: 2015-02-28 17:25+0200\n"
7
+ "Last-Translator: nsp-code <contact@nsp-code.com>\n"
8
  "Language-Team: http://nsp-code.com <electronice_delphi@yahoo.com>\n"
9
  "Language: ro_RO\n"
10
  "MIME-Version: 1.0\n"
15
  "X-Generator: Poedit 1.5.5\n"
16
  "X-Poedit-SearchPath-0: .\n"
17
 
18
+ #: post-types-order.php:121
19
  msgid "Post Types Order must be configured. Please go to"
20
  msgstr "Post Types Order trebuie configurat. Mergeti la"
21
 
22
+ #: post-types-order.php:121
 
23
  msgid "Settings Page"
24
+ msgstr "Pagina Setari"
25
 
26
+ #: post-types-order.php:121
27
  msgid "make the configuration and save"
28
  msgstr "efectuati configurarea si salvati"
29
 
30
+ #: post-types-order.php:209 post-types-order.php:287
31
+ #, php-format
32
+ msgid "Use commas instead of %s to separate excluded terms."
33
+ msgstr "Folositi virgula in loc the %s pentru a delimita termenii exclusi."
34
+
35
+ #: include/cpto-class.php:107 include/cpto-class.php:111
36
+ #: include/cpto-class.php:122
37
  msgid "Re-Order"
38
  msgstr "Re-Order"
39
 
40
+ #: include/cpto-class.php:130
 
41
  msgid ""
42
  "This plugin can't work without javascript, because it's use drag and drop "
43
  "and AJAX."
44
  msgstr ""
45
  "Acest plugin nu poate functiona fara JavaScript pentru ca foloseste o "
46
+ "functionalitate drag & drop si AJAX."
47
 
48
+ #: include/cpto-class.php:143
49
  msgid "Update"
50
  msgstr "Actualizare"
51
 
52
+ #: include/cpto-class.php:162
 
53
  msgid "Items Order Updated"
54
+ msgstr "Sortare salvata"
55
 
56
+ #: include/cpto-class.php:179
57
  msgid "Pages"
58
  msgstr "Pagini"
59
 
60
+ #: include/functions.php:82
 
61
  msgid ""
62
  "Did you find this plugin useful? Please support our work with a donation or "
63
  "write an article about this plugin in your blog with a link to our site"
64
  msgstr ""
65
+ "Acest plugin iti este folositor? The rog ajuta exhipa sa dezvolte softul in "
66
+ "continuare printr-o donatie sau un articol despre acest plugin on blog-ul "
67
+ "tau impreuna cu un link catre site-ul nostru"
68
 
69
+ #: include/functions.php:83
70
  msgid "Did you know there is available an Advanced version of this plug-in?"
71
  msgstr "Stiati ca este disponibil o versiune mai avansata a acestui plug-in?"
72
 
73
+ #: include/functions.php:83
74
  msgid "Read more"
75
  msgstr "Citeste mai multe"
76
 
77
+ #: include/functions.php:84
78
  msgid "Check our"
79
  msgstr "Verificati"
80
 
81
+ #: include/functions.php:84
82
  msgid ""
83
  "plugin which allow to custom sort categories and custom taxonomies terms"
84
  msgstr "plugin care ajuta la sortarea categoriilor si a termenilor"
85
 
86
+ #: include/options.php:18
87
  msgid "Settings Saved"
88
  msgstr "Setari Salvate"
89
 
90
+ #: include/options.php:30
 
91
  msgid "General Settings"
92
  msgstr "Setari Generale"
93
 
94
+ #: include/options.php:36
95
  msgid "General"
96
  msgstr "Geral"
97
 
98
+ #: include/options.php:41
99
  msgid "Minimum Level to use this plugin"
100
  msgstr "Niveulul minim pentru a utiliza Re-order"
101
 
102
+ #: include/options.php:44
103
  msgid "Subscriber"
104
  msgstr "Subscriber"
105
 
106
+ #: include/options.php:45
107
  msgid "Contributor"
108
  msgstr "Contributor"
109
 
110
+ #: include/options.php:46
111
  msgid "Author"
112
  msgstr "Author"
113
 
114
+ #: include/options.php:47
115
  msgid "Editor"
116
  msgstr "Editor"
117
 
118
+ #: include/options.php:48
119
  msgid "Administrator"
120
  msgstr "Administrator"
121
 
122
+ #: include/options.php:54
123
  msgid "Auto Sort"
124
  msgstr "Auto Sort"
125
 
126
  #: include/options.php:56
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>)"
 
 
130
  msgstr ""
131
+ "Daca este marcat, plugin-ul modifice automat wp-query-urile pentru a folosi "
132
+ "noua ordine. (<b>Nu este necesare editarea codului</b>)"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
 
134
+ #: include/options.php:57
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"
138
  msgstr ""
139
+ "Daca se doreste sortarea numai pentru anumite queri-uri, aceasta setare "
140
+ "trebuie dezactivata si se va include 'menu_order' in parametrii query-uilui"
141
 
142
+ #: include/options.php:59
143
+ msgid "Additional Description and Examples"
144
+ msgstr "Descriere si exemple aditionale"
145
+
146
+ #: include/options.php:66
147
  msgid "Admin Sort"
148
+ msgstr "Sorteaza nterfata admin"
149
 
150
+ #: include/options.php:70
151
  msgid ""
152
  "To affect the admin interface, to see the post types per your new sort, this "
153
  "need to be checked"
154
  msgstr "Pentru a modifica ordinea in admin"
155
 
156
+ #: include/options.php:75
157
+ msgid "Next / Previous Apply"
158
+ msgstr "Aplica la Next / Previous"
159
+
160
+ #: include/options.php:79
161
+ msgid "Apply the sort on Next / Previous site-wide navigation."
162
+ msgstr "Aplica sortarea la navigatia Next / Previous."
163
+
164
+ #: include/options.php:79
165
+ msgid "This can also be controlled through"
166
+ msgstr "Aceasta setare poate fi controlata prin"
167
+
168
+ #: include/options.php:79
169
+ msgid "code"
170
+ msgstr "cod"
171
+
172
+ #: include/options.php:88
173
  msgid "Save Settings"
174
  msgstr "Salveaza"
175
 
176
+ #~ msgid "Show Examples"
177
+ #~ msgstr "Arata exemple"
178
+
179
+ #~ msgid ""
180
+ #~ "The following PHP code will still return the post in the set-up Order"
181
+ #~ msgstr "Urmatorul cod PHP to va returna post-urile in ordinea desemnata"
182
+
183
+ #~ msgid "Or"
184
+ #~ msgstr "Sau "
185
+
186
+ #~ msgid ""
187
+ #~ "If the Auto Sort is uncheck you will need to use the \"orderby\" and "
188
+ #~ "\"order\" parameters"
189
+ #~ msgstr ""
190
+ #~ "Daca Auto Sort este de-marcat, va trebui sa folositi parametrii \"orderby"
191
+ #~ "\" si \"order\" "
192
+
193
  #~ msgid "Post Types Order"
194
  #~ msgstr "Post Types Order"
195
 
lang/cpt.mo CHANGED
Binary file
lang/cpt.po CHANGED
@@ -1,9 +1,9 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Post Types Order\n"
4
- "POT-Creation-Date: 2014-05-30 15:18+0200\n"
5
- "PO-Revision-Date: 2014-05-30 15:18+0200\n"
6
- "Last-Translator: Nsp-Code <electronice_delphi@yahoo.com>\n"
7
  "Language-Team: \n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -13,139 +13,151 @@ msgstr ""
13
  "X-Poedit-Basepath: ../\n"
14
  "X-Poedit-SearchPath-0: .\n"
15
 
16
- #: post-types-order.php:124
17
  msgid "Post Types Order must be configured. Please go to"
18
  msgstr ""
19
 
20
- #: post-types-order.php:124
21
  msgid "Settings Page"
22
  msgstr ""
23
 
24
- #: post-types-order.php:124
25
  msgid "make the configuration and save"
26
  msgstr ""
27
 
28
- #: post-types-order.php:468 post-types-order.php:472 post-types-order.php:483
 
 
 
 
 
 
29
  msgid "Re-Order"
30
  msgstr ""
31
 
32
- #: post-types-order.php:491
33
  msgid ""
34
  "This plugin can't work without javascript, because it's use drag and drop "
35
  "and AJAX."
36
  msgstr ""
37
 
38
- #: post-types-order.php:504
39
  msgid "Update"
40
  msgstr ""
41
 
42
- #: post-types-order.php:520
43
  msgid "Items Order Updated"
44
  msgstr ""
45
 
46
- #: post-types-order.php:537
47
  msgid "Pages"
48
  msgstr ""
49
 
50
- #: include/functions.php:65
51
  msgid ""
52
  "Did you find this plugin useful? Please support our work with a donation or "
53
  "write an article about this plugin in your blog with a link to our site"
54
  msgstr ""
55
 
56
- #: include/functions.php:66
57
  msgid "Did you know there is available an Advanced version of this plug-in?"
58
  msgstr ""
59
 
60
- #: include/functions.php:66
61
  msgid "Read more"
62
  msgstr ""
63
 
64
- #: include/functions.php:67
65
  msgid "Check our"
66
  msgstr ""
67
 
68
- #: include/functions.php:67
69
  msgid ""
70
  "plugin which allow to custom sort categories and custom taxonomies terms"
71
  msgstr ""
72
 
73
- #: include/options.php:16
74
  msgid "Settings Saved"
75
  msgstr ""
76
 
77
- #: include/options.php:28
78
  msgid "General Settings"
79
  msgstr ""
80
 
81
- #: include/options.php:34
82
  msgid "General"
83
  msgstr ""
84
 
85
- #: include/options.php:39
86
  msgid "Minimum Level to use this plugin"
87
  msgstr ""
88
 
89
- #: include/options.php:42
90
  msgid "Subscriber"
91
  msgstr ""
92
 
93
- #: include/options.php:43
94
  msgid "Contributor"
95
  msgstr ""
96
 
97
- #: include/options.php:44
98
  msgid "Author"
99
  msgstr ""
100
 
101
- #: include/options.php:45
102
  msgid "Editor"
103
  msgstr ""
104
 
105
- #: include/options.php:46
106
  msgid "Administrator"
107
  msgstr ""
108
 
109
- #: include/options.php:52
110
  msgid "Auto Sort"
111
  msgstr ""
112
 
113
  #: include/options.php:56
114
  msgid ""
115
- "If checked, the plug-in will automatically update the wp-queries to use the "
116
- "new order (<b>No code update is necessarily</b>).<br /> If you need more "
117
- "order customizations you will need to uncheck this and include 'menu_order' "
118
- "into your theme queries"
119
  msgstr ""
120
 
121
- #: include/options.php:58
122
- msgid "Show Examples"
 
 
123
  msgstr ""
124
 
125
- #: include/options.php:61
126
- msgid "The following PHP code will still return the post in the set-up Order"
127
  msgstr ""
128
 
129
- #: include/options.php:74
130
- msgid "Or"
131
  msgstr ""
132
 
133
- #: include/options.php:83
134
  msgid ""
135
- "If the Auto Sort is uncheck you will need to use the \"orderby\" and \"order"
136
- "\" parameters"
137
  msgstr ""
138
 
139
- #: include/options.php:98
140
- msgid "Admin Sort"
141
  msgstr ""
142
 
143
- #: include/options.php:102
144
- msgid ""
145
- "To affect the admin interface, to see the post types per your new sort, this "
146
- "need to be checked"
 
 
 
 
 
 
147
  msgstr ""
148
 
149
- #: include/options.php:111
150
  msgid "Save Settings"
151
  msgstr ""
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Post Types Order\n"
4
+ "POT-Creation-Date: 2015-02-28 17:15+0200\n"
5
+ "PO-Revision-Date: 2015-02-28 17:15+0200\n"
6
+ "Last-Translator: nsp-code <contact@nsp-code.com>\n"
7
  "Language-Team: \n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
13
  "X-Poedit-Basepath: ../\n"
14
  "X-Poedit-SearchPath-0: .\n"
15
 
16
+ #: post-types-order.php:121
17
  msgid "Post Types Order must be configured. Please go to"
18
  msgstr ""
19
 
20
+ #: post-types-order.php:121
21
  msgid "Settings Page"
22
  msgstr ""
23
 
24
+ #: post-types-order.php:121
25
  msgid "make the configuration and save"
26
  msgstr ""
27
 
28
+ #: post-types-order.php:209 post-types-order.php:287
29
+ #, php-format
30
+ msgid "Use commas instead of %s to separate excluded terms."
31
+ msgstr ""
32
+
33
+ #: include/cpto-class.php:107 include/cpto-class.php:111
34
+ #: include/cpto-class.php:122
35
  msgid "Re-Order"
36
  msgstr ""
37
 
38
+ #: include/cpto-class.php:130
39
  msgid ""
40
  "This plugin can't work without javascript, because it's use drag and drop "
41
  "and AJAX."
42
  msgstr ""
43
 
44
+ #: include/cpto-class.php:143
45
  msgid "Update"
46
  msgstr ""
47
 
48
+ #: include/cpto-class.php:162
49
  msgid "Items Order Updated"
50
  msgstr ""
51
 
52
+ #: include/cpto-class.php:179
53
  msgid "Pages"
54
  msgstr ""
55
 
56
+ #: include/functions.php:82
57
  msgid ""
58
  "Did you find this plugin useful? Please support our work with a donation or "
59
  "write an article about this plugin in your blog with a link to our site"
60
  msgstr ""
61
 
62
+ #: include/functions.php:83
63
  msgid "Did you know there is available an Advanced version of this plug-in?"
64
  msgstr ""
65
 
66
+ #: include/functions.php:83
67
  msgid "Read more"
68
  msgstr ""
69
 
70
+ #: include/functions.php:84
71
  msgid "Check our"
72
  msgstr ""
73
 
74
+ #: include/functions.php:84
75
  msgid ""
76
  "plugin which allow to custom sort categories and custom taxonomies terms"
77
  msgstr ""
78
 
79
+ #: include/options.php:18
80
  msgid "Settings Saved"
81
  msgstr ""
82
 
83
+ #: include/options.php:30
84
  msgid "General Settings"
85
  msgstr ""
86
 
87
+ #: include/options.php:36
88
  msgid "General"
89
  msgstr ""
90
 
91
+ #: include/options.php:41
92
  msgid "Minimum Level to use this plugin"
93
  msgstr ""
94
 
95
+ #: include/options.php:44
96
  msgid "Subscriber"
97
  msgstr ""
98
 
99
+ #: include/options.php:45
100
  msgid "Contributor"
101
  msgstr ""
102
 
103
+ #: include/options.php:46
104
  msgid "Author"
105
  msgstr ""
106
 
107
+ #: include/options.php:47
108
  msgid "Editor"
109
  msgstr ""
110
 
111
+ #: include/options.php:48
112
  msgid "Administrator"
113
  msgstr ""
114
 
115
+ #: include/options.php:54
116
  msgid "Auto Sort"
117
  msgstr ""
118
 
119
  #: include/options.php:56
120
  msgid ""
121
+ "If checked, the plug-in automatically update the WordPress queries to use "
122
+ "the new order (<b>No code update is necessarily</b>)"
 
 
123
  msgstr ""
124
 
125
+ #: include/options.php:57
126
+ msgid ""
127
+ "If only certain queries need to use the custom sort, keep this unchecked and "
128
+ "include 'orderby' => 'menu_order' into query parameters"
129
  msgstr ""
130
 
131
+ #: include/options.php:59
132
+ msgid "Additional Description and Examples"
133
  msgstr ""
134
 
135
+ #: include/options.php:66
136
+ msgid "Admin Sort"
137
  msgstr ""
138
 
139
+ #: include/options.php:70
140
  msgid ""
141
+ "To affect the admin interface, to see the post types per your new sort, this "
142
+ "need to be checked"
143
  msgstr ""
144
 
145
+ #: include/options.php:75
146
+ msgid "Next / Previous Apply"
147
  msgstr ""
148
 
149
+ #: include/options.php:79
150
+ msgid "Apply the sort on Next / Previous site-wide navigation."
151
+ msgstr ""
152
+
153
+ #: include/options.php:79
154
+ msgid "This can also be controlled through"
155
+ msgstr ""
156
+
157
+ #: include/options.php:79
158
+ msgid "code"
159
  msgstr ""
160
 
161
+ #: include/options.php:88
162
  msgid "Save Settings"
163
  msgstr ""
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.7
9
  */
10
 
11
  define('CPTPATH', plugin_dir_path(__FILE__));
@@ -17,15 +17,7 @@ Version: 1.7.7
17
 
18
  function CPTO_activated()
19
  {
20
- //make sure the vars are set as default
21
- $options = get_option('cpto_options');
22
-
23
- $defaults = array (
24
- 'autosort' => 1,
25
- 'adminsort' => 1,
26
- 'capability' => 'install_plugins'
27
- );
28
- $options = wp_parse_args( $options, $defaults );
29
 
30
  update_option('cpto_options', $options);
31
  }
@@ -48,7 +40,7 @@ Version: 1.7.7
48
  { return $query; } // Stop running the function if this is a virtual page
49
  //--
50
 
51
- $options = get_option('cpto_options');
52
  if (is_admin())
53
  {
54
  //no need if it's admin interface
@@ -75,13 +67,17 @@ Version: 1.7.7
75
  {
76
  global $wpdb;
77
 
78
- $options = get_option('cpto_options');
79
 
80
  //ignore the bbpress
81
  if (isset($query->query_vars['post_type']) && ((is_array($query->query_vars['post_type']) && in_array("reply", $query->query_vars['post_type'])) || ($query->query_vars['post_type'] == "reply")))
82
  return $orderBy;
83
  if (isset($query->query_vars['post_type']) && ((is_array($query->query_vars['post_type']) && in_array("topic", $query->query_vars['post_type'])) || ($query->query_vars['post_type'] == "topic")))
84
  return $orderBy;
 
 
 
 
85
 
86
  if (is_admin())
87
  {
@@ -147,7 +143,7 @@ Version: 1.7.7
147
  {
148
  global $custom_post_type_order, $userdata;
149
 
150
- $options = get_option('cpto_options');
151
 
152
  if (is_admin())
153
  {
@@ -169,11 +165,26 @@ Version: 1.7.7
169
  }
170
 
171
 
172
-
173
- add_filter('get_previous_post_where', 'cpto_get_previous_post_where', 99, 3);
174
- add_filter('get_previous_post_sort', 'cpto_get_previous_post_sort');
175
- add_filter('get_next_post_where', 'cpto_get_next_post_where', 99, 3);
176
- add_filter('get_next_post_sort', 'cpto_get_next_post_sort');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
 
178
  function cpto_get_previous_post_where($where, $in_same_term, $excluded_terms)
179
  {
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__));
17
 
18
  function CPTO_activated()
19
  {
20
+ $options = cpt_get_options();
 
 
 
 
 
 
 
 
21
 
22
  update_option('cpto_options', $options);
23
  }
40
  { return $query; } // Stop running the function if this is a virtual page
41
  //--
42
 
43
+ $options = cpt_get_options();
44
  if (is_admin())
45
  {
46
  //no need if it's admin interface
67
  {
68
  global $wpdb;
69
 
70
+ $options = cpt_get_options();
71
 
72
  //ignore the bbpress
73
  if (isset($query->query_vars['post_type']) && ((is_array($query->query_vars['post_type']) && in_array("reply", $query->query_vars['post_type'])) || ($query->query_vars['post_type'] == "reply")))
74
  return $orderBy;
75
  if (isset($query->query_vars['post_type']) && ((is_array($query->query_vars['post_type']) && in_array("topic", $query->query_vars['post_type'])) || ($query->query_vars['post_type'] == "topic")))
76
  return $orderBy;
77
+
78
+ //check for orderby GET paramether in which case return default data
79
+ if (isset($_GET['orderby']) && $_GET['orderby'] != 'menu_order')
80
+ return $orderBy;
81
 
82
  if (is_admin())
83
  {
143
  {
144
  global $custom_post_type_order, $userdata;
145
 
146
+ $options = cpt_get_options();
147
 
148
  if (is_admin())
149
  {
165
  }
166
 
167
 
168
+ add_filter('init', 'cpto_setup_theme');
169
+ function cpto_setup_theme()
170
+ {
171
+ if(is_admin())
172
+ return;
173
+
174
+ //check the navigation_sort_apply option
175
+ $options = cpt_get_options();
176
+
177
+ $navigation_sort_apply = ($options['navigation_sort_apply'] == "1") ? TRUE : FALSE;
178
+ $navigation_sort_apply = apply_filters('cpto/navigation_sort_apply', $navigation_sort_apply);
179
+
180
+ if( ! $navigation_sort_apply)
181
+ return;
182
+
183
+ add_filter('get_previous_post_where', 'cpto_get_previous_post_where', 99, 3);
184
+ add_filter('get_previous_post_sort', 'cpto_get_previous_post_sort');
185
+ add_filter('get_next_post_where', 'cpto_get_next_post_where', 99, 3);
186
+ add_filter('get_next_post_sort', 'cpto_get_next_post_sort');
187
+ }
188
 
189
  function cpto_get_previous_post_where($where, $in_same_term, $excluded_terms)
190
  {
readme.txt CHANGED
@@ -3,14 +3,14 @@ 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.1
7
- Stable tag: 1.7.7
8
 
9
  Post Order and custom Post Type Objects (posts, any custom post types) using a Drag and Drop Sortable JavaScript AJAX interface.
10
 
11
  == Description ==
12
 
13
- <strong>Over 800.000 DOWNLOADS and near PERFECT ratting out of 250 REVIEWS</strong>. <br />
14
  A powerful plugin, Order Posts and Post Types Objects using a Drag and Drop Sortable JavaScript capability.
15
  It allow to reorder the posts for any custom post types you defined, including the default Posts. Also you can have the admin posts interface sorted per your new sort. Post Order has never been easier.
16
 
@@ -44,7 +44,7 @@ If for some reason the post order does not update on your front side, you either
44
 
45
  == Screenshots ==
46
 
47
- 1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif).
48
 
49
  == Frequently Asked Questions ==
50
 
@@ -56,7 +56,7 @@ Absolutely you can! Unlike many other plugins, you don't have to do any code cha
56
 
57
  = What kind of posts/pages this plugin allow me to sort? =
58
 
59
- You can sort ALL post types that you have defined into your wordpress as long they are not hierarhically defined: Posts (default WordPress custom post type), Movies, Reviews, Data etc..
60
 
61
  = Ok, i understand about the template post types order, how about the admin interface? =
62
 
@@ -68,6 +68,14 @@ 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.7 =
72
  - Next / Previous post link functionality update
73
  - Code improvements
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.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
 
11
  == Description ==
12
 
13
+ <strong>Over 1.000.000 DOWNLOADS and near PERFECT ratting out of 150 REVIEWS</strong>. <br />
14
  A powerful plugin, Order Posts and Post Types Objects using a Drag and Drop Sortable JavaScript capability.
15
  It allow to reorder the posts for any custom post types you defined, including the default Posts. Also you can have the admin posts interface sorted per your new sort. Post Order has never been easier.
16
 
44
 
45
  == Screenshots ==
46
 
47
+ 1. The ReOrder interface through which the sort can be created.
48
 
49
  == Frequently Asked Questions ==
50
 
56
 
57
  = What kind of posts/pages this plugin allow me to sort? =
58
 
59
+ You can sort ALL post types that you have defined into your wordpress as long they are not <strong>hierarhically</strong> defined: Posts (default WordPress custom post type), Movies, Reviews, Data etc..
60
 
61
  = Ok, i understand about the template post types order, how about the admin interface? =
62
 
68
 
69
  == Change Log ==
70
 
71
+ = 1.7.9 =
72
+ - Next / Previous sorting apply option
73
+ - Filter for Next / Previous sorting applpy
74
+ - Help updates
75
+ - Appearance /css updates
76
+ - Admin columns sort fix
77
+ - Media re-order
78
+
79
  = 1.7.7 =
80
  - Next / Previous post link functionality update
81
  - Code improvements
screenshot-1.png CHANGED
Binary file