Version Description
Download this release
Release Info
| Developer | giucu91 |
| Plugin | |
| Version | 2.4.7 |
| Comparing to | |
| See all releases | |
Code changes from version 2.4.6 to 2.4.7
- languages/simple-custom-post-order.po +69 -25
- readme.txt +10 -5
- settings.php +42 -3
- simple-custom-post-order.php +22 -3
languages/simple-custom-post-order.po
CHANGED
|
@@ -1,65 +1,109 @@
|
|
|
|
|
|
|
|
| 1 |
msgid ""
|
| 2 |
msgstr ""
|
| 3 |
-
"Project-Id-Version: \n"
|
| 4 |
-
"
|
| 5 |
-
"
|
| 6 |
-
"
|
| 7 |
-
"Language-Team: \n"
|
| 8 |
-
"Language: en\n"
|
| 9 |
"MIME-Version: 1.0\n"
|
| 10 |
-
"Content-Type: text/plain; charset=
|
| 11 |
"Content-Transfer-Encoding: 8bit\n"
|
| 12 |
-
"
|
| 13 |
-
"
|
|
|
|
|
|
|
| 14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
| 15 |
-
"X-Poedit-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
"X-Poedit-SearchPath-0: .\n"
|
| 17 |
-
"X-Poedit-
|
| 18 |
-
"X-
|
|
|
|
| 19 |
|
| 20 |
-
#: settings.php:
|
| 21 |
msgid "Simple Custom Post Order Settings"
|
| 22 |
msgstr ""
|
| 23 |
|
| 24 |
-
#: settings.php:
|
| 25 |
msgid "Settings Updated."
|
| 26 |
msgstr ""
|
| 27 |
|
| 28 |
-
#: settings.php:
|
| 29 |
msgid "Check to Sort Post Types"
|
| 30 |
msgstr ""
|
| 31 |
|
| 32 |
-
#: settings.php:
|
| 33 |
msgid "Check All"
|
| 34 |
msgstr ""
|
| 35 |
|
| 36 |
-
#: settings.php:
|
| 37 |
msgid "Check to Sort Taxonomies"
|
| 38 |
msgstr ""
|
| 39 |
|
| 40 |
-
#: settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
msgid "Update"
|
| 42 |
msgstr ""
|
| 43 |
|
| 44 |
-
|
| 45 |
msgid "Simple Custom Post Order"
|
| 46 |
msgstr ""
|
| 47 |
|
| 48 |
-
#: simple-custom-post-order.php:
|
| 49 |
msgid ""
|
| 50 |
"Thank you for installing our awesome plugin, in order to enable it you need "
|
| 51 |
-
"to go to the settings page and select which custom post or taxonomy you
|
| 52 |
-
"to order."
|
| 53 |
msgstr ""
|
| 54 |
|
| 55 |
-
#: simple-custom-post-order.php:
|
| 56 |
msgid "Get started !"
|
| 57 |
msgstr ""
|
| 58 |
|
| 59 |
-
#: simple-custom-post-order.php:
|
| 60 |
msgid "Dismiss this notice."
|
| 61 |
msgstr ""
|
| 62 |
|
| 63 |
-
#: simple-custom-post-order.php:
|
| 64 |
msgid "SCPOrder"
|
| 65 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (C) 2019 Colorlib
|
| 2 |
+
# This file is distributed under the GPLv3 or later.
|
| 3 |
msgid ""
|
| 4 |
msgstr ""
|
| 5 |
+
"Project-Id-Version: Simple Custom Post Order 2.4.7\n"
|
| 6 |
+
"Report-Msgid-Bugs-To: "
|
| 7 |
+
"https://wordpress.org/support/plugin/simple-custom-post-order\n"
|
| 8 |
+
"POT-Creation-Date: 2019-10-09 08:57:28+00:00\n"
|
|
|
|
|
|
|
| 9 |
"MIME-Version: 1.0\n"
|
| 10 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
| 11 |
"Content-Transfer-Encoding: 8bit\n"
|
| 12 |
+
"PO-Revision-Date: 2019-MO-DA HO:MI+ZONE\n"
|
| 13 |
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
| 14 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
| 15 |
+
"Language: en\n"
|
| 16 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
| 17 |
+
"X-Poedit-Country: United States\n"
|
| 18 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
| 19 |
+
"X-Poedit-KeywordsList: "
|
| 20 |
+
"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
|
| 21 |
+
"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
|
| 22 |
+
"X-Poedit-Basepath: ../\n"
|
| 23 |
"X-Poedit-SearchPath-0: .\n"
|
| 24 |
+
"X-Poedit-Bookmarks: \n"
|
| 25 |
+
"X-Textdomain-Support: yes\n"
|
| 26 |
+
"X-Generator: grunt-wp-i18n 1.0.3\n"
|
| 27 |
|
| 28 |
+
#: settings.php:101
|
| 29 |
msgid "Simple Custom Post Order Settings"
|
| 30 |
msgstr ""
|
| 31 |
|
| 32 |
+
#: settings.php:105
|
| 33 |
msgid "Settings Updated."
|
| 34 |
msgstr ""
|
| 35 |
|
| 36 |
+
#: settings.php:119
|
| 37 |
msgid "Check to Sort Post Types"
|
| 38 |
msgstr ""
|
| 39 |
|
| 40 |
+
#: settings.php:137 settings.php:207
|
| 41 |
msgid "Check All"
|
| 42 |
msgstr ""
|
| 43 |
|
| 44 |
+
#: settings.php:189
|
| 45 |
msgid "Check to Sort Taxonomies"
|
| 46 |
msgstr ""
|
| 47 |
|
| 48 |
+
#: settings.php:255
|
| 49 |
+
msgid "Check to see advanced view of Post Types "
|
| 50 |
+
msgstr ""
|
| 51 |
+
|
| 52 |
+
#: settings.php:274
|
| 53 |
+
msgid "Show advanced view of Post Types"
|
| 54 |
+
msgstr ""
|
| 55 |
+
|
| 56 |
+
#: settings.php:276
|
| 57 |
+
msgid "NOTICE: This is for advanced users only."
|
| 58 |
+
msgstr ""
|
| 59 |
+
|
| 60 |
+
#: settings.php:277
|
| 61 |
+
msgid ""
|
| 62 |
+
"Toggle on the above option and update settings to see hidden special "
|
| 63 |
+
"content post types."
|
| 64 |
+
msgstr ""
|
| 65 |
+
|
| 66 |
+
#: settings.php:285
|
| 67 |
msgid "Update"
|
| 68 |
msgstr ""
|
| 69 |
|
| 70 |
+
#. Plugin Name of the plugin/theme
|
| 71 |
msgid "Simple Custom Post Order"
|
| 72 |
msgstr ""
|
| 73 |
|
| 74 |
+
#: simple-custom-post-order.php:128
|
| 75 |
msgid ""
|
| 76 |
"Thank you for installing our awesome plugin, in order to enable it you need "
|
| 77 |
+
"to go to the settings page and select which custom post or taxonomy you "
|
| 78 |
+
"want to order."
|
| 79 |
msgstr ""
|
| 80 |
|
| 81 |
+
#: simple-custom-post-order.php:130
|
| 82 |
msgid "Get started !"
|
| 83 |
msgstr ""
|
| 84 |
|
| 85 |
+
#: simple-custom-post-order.php:131
|
| 86 |
msgid "Dismiss this notice."
|
| 87 |
msgstr ""
|
| 88 |
|
| 89 |
+
#: simple-custom-post-order.php:180
|
| 90 |
msgid "SCPOrder"
|
| 91 |
msgstr ""
|
| 92 |
+
|
| 93 |
+
#. Plugin URI of the plugin/theme
|
| 94 |
+
msgid "https://wordpress.org/plugins-wp/simple-custom-post-order/"
|
| 95 |
+
msgstr ""
|
| 96 |
+
|
| 97 |
+
#. Description of the plugin/theme
|
| 98 |
+
msgid ""
|
| 99 |
+
"Order Items (Posts, Pages, and Custom Post Types) using a Drag and Drop "
|
| 100 |
+
"Sortable JavaScript."
|
| 101 |
+
msgstr ""
|
| 102 |
+
|
| 103 |
+
#. Author of the plugin/theme
|
| 104 |
+
msgid "Colorlib"
|
| 105 |
+
msgstr ""
|
| 106 |
+
|
| 107 |
+
#. Author URI of the plugin/theme
|
| 108 |
+
msgid "https://colorlib.com/"
|
| 109 |
+
msgstr ""
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Tags: custom post order, post order, js post order, page order, posts order, cat
|
|
| 4 |
Requires at least: 4.6
|
| 5 |
Requires PHP: 5.6
|
| 6 |
Tested up to: 5.2
|
| 7 |
-
Stable tag: 2.4.
|
| 8 |
License: GPLv3 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
| 10 |
|
|
@@ -35,10 +35,15 @@ An answer to that question.
|
|
| 35 |
3. Settings
|
| 36 |
|
| 37 |
== Changelog ==
|
| 38 |
-
|
| 39 |
-
= Version 2.4.
|
| 40 |
-
*
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
= Version 2.4.5 =
|
| 44 |
* Added 2 action hooks that trigger at `update_menu_order_tags` and `update_menu_order` ( https://github
|
| 4 |
Requires at least: 4.6
|
| 5 |
Requires PHP: 5.6
|
| 6 |
Tested up to: 5.2
|
| 7 |
+
Stable tag: 2.4.7
|
| 8 |
License: GPLv3 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
| 10 |
|
| 35 |
3. Settings
|
| 36 |
|
| 37 |
== Changelog ==
|
| 38 |
+
|
| 39 |
+
= Version 2.4.7 =
|
| 40 |
+
* Fix undefined index when ordering terms
|
| 41 |
+
* Added filter for post types args shown in settings page
|
| 42 |
+
* Added extra option for advanced view of post types
|
| 43 |
+
|
| 44 |
+
= Version 2.4.6 =
|
| 45 |
+
* Removed dashboard news widget
|
| 46 |
+
|
| 47 |
|
| 48 |
= Version 2.4.5 =
|
| 49 |
* Added 2 action hooks that trigger at `update_menu_order_tags` and `update_menu_order` ( https://github
|
settings.php
CHANGED
|
@@ -2,6 +2,8 @@
|
|
| 2 |
$scporder_options = get_option('scporder_options');
|
| 3 |
$scporder_objects = isset($scporder_options['objects']) ? $scporder_options['objects'] : array();
|
| 4 |
$scporder_tags = isset($scporder_options['tags']) ? $scporder_options['tags'] : array();
|
|
|
|
|
|
|
| 5 |
?>
|
| 6 |
<style>
|
| 7 |
|
|
@@ -136,10 +138,12 @@ $scporder_tags = isset($scporder_options['tags']) ? $scporder_options['tags'] :
|
|
| 136 |
</div>
|
| 137 |
<?php _e('Check All', 'simple-custom-post-order') ?></label><br>
|
| 138 |
<?php
|
| 139 |
-
$
|
| 140 |
-
'show_ui'
|
| 141 |
'show_in_menu' => true,
|
| 142 |
-
|
|
|
|
|
|
|
| 143 |
|
| 144 |
foreach ($post_types as $post_type) {
|
| 145 |
if ($post_type->name == 'attachment')
|
|
@@ -245,6 +249,41 @@ $scporder_tags = isset($scporder_options['tags']) ? $scporder_options['tags'] :
|
|
| 245 |
</table>
|
| 246 |
|
| 247 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 248 |
<p class="submit">
|
| 249 |
<input type="submit" class="button-primary" name="scporder_submit" value="<?php _e('Update', 'simple-custom-post-order'); ?>">
|
| 250 |
</p>
|
| 2 |
$scporder_options = get_option('scporder_options');
|
| 3 |
$scporder_objects = isset($scporder_options['objects']) ? $scporder_options['objects'] : array();
|
| 4 |
$scporder_tags = isset($scporder_options['tags']) ? $scporder_options['tags'] : array();
|
| 5 |
+
|
| 6 |
+
$advanced_view = isset($scporder_options['show_advanced_view']) ? $scporder_options['show_advanced_view'] : '';
|
| 7 |
?>
|
| 8 |
<style>
|
| 9 |
|
| 138 |
</div>
|
| 139 |
<?php _e('Check All', 'simple-custom-post-order') ?></label><br>
|
| 140 |
<?php
|
| 141 |
+
$post_types_args = apply_filters('scpo_post_types_args', array(
|
| 142 |
+
'show_ui' => true,
|
| 143 |
'show_in_menu' => true,
|
| 144 |
+
),$scporder_options);
|
| 145 |
+
|
| 146 |
+
$post_types = get_post_types($post_types_args, 'objects');
|
| 147 |
|
| 148 |
foreach ($post_types as $post_type) {
|
| 149 |
if ($post_type->name == 'attachment')
|
| 249 |
</table>
|
| 250 |
|
| 251 |
</div>
|
| 252 |
+
|
| 253 |
+
<div id="scporder_advanved_view">
|
| 254 |
+
<table class="form-table">
|
| 255 |
+
<tbody>
|
| 256 |
+
<tr valign="top">
|
| 257 |
+
<th scope="row"><?php _e('Check to see advanced view of Post Types ', 'simple-custom-post-order') ?></th>
|
| 258 |
+
<td>
|
| 259 |
+
<label>
|
| 260 |
+
<div class="epsilon-toggle">
|
| 261 |
+
<input class="epsilon-toggle__input" type="checkbox"
|
| 262 |
+
name="show_advanced_view" value="1" <?php checked( '1', $advanced_view, 'checked="checked"' ); ?>>
|
| 263 |
+
<div class="epsilon-toggle__items">
|
| 264 |
+
<span class="epsilon-toggle__track"></span>
|
| 265 |
+
<span class="epsilon-toggle__thumb"></span>
|
| 266 |
+
<svg class="epsilon-toggle__off" width="6" height="6" aria-hidden="true"
|
| 267 |
+
role="img" focusable="false" viewBox="0 0 6 6">
|
| 268 |
+
<path d="M3 1.5c.8 0 1.5.7 1.5 1.5S3.8 4.5 3 4.5 1.5 3.8 1.5 3 2.2 1.5 3 1.5M3 0C1.3 0 0 1.3 0 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"></path>
|
| 269 |
+
</svg>
|
| 270 |
+
<svg class="epsilon-toggle__on" width="2" height="6" aria-hidden="true"
|
| 271 |
+
role="img" focusable="false" viewBox="0 0 2 6">
|
| 272 |
+
<path d="M0 0h2v6H0z"></path>
|
| 273 |
+
</svg>
|
| 274 |
+
</div>
|
| 275 |
+
</div>
|
| 276 |
+
<?php echo __('Show advanced view of Post Types','simple-custom-post-order'); ?>
|
| 277 |
+
</label><br>
|
| 278 |
+
<p class="description"><?php _e('NOTICE: This is for advanced users only.','simple-custom-post-order'); ?></p>
|
| 279 |
+
<!--@todo : @giucu please look into below description. -->
|
| 280 |
+
<p class="description"><?php _e('Check to include other custom post types. You will need to update your settings after enabling this option.','simple-custom-post-order'); ?></p>
|
| 281 |
+
|
| 282 |
+
</td>
|
| 283 |
+
</tr>
|
| 284 |
+
</tbody>
|
| 285 |
+
</table>
|
| 286 |
+
</div>
|
| 287 |
<p class="submit">
|
| 288 |
<input type="submit" class="button-primary" name="scporder_submit" value="<?php _e('Update', 'simple-custom-post-order'); ?>">
|
| 289 |
</p>
|
simple-custom-post-order.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
* Plugin Name: Simple Custom Post Order
|
| 4 |
* Plugin URI: https://wordpress.org/plugins-wp/simple-custom-post-order/
|
| 5 |
* Description: Order Items (Posts, Pages, and Custom Post Types) using a Drag and Drop Sortable JavaScript.
|
| 6 |
-
* Version: 2.4.
|
| 7 |
* Author: Colorlib
|
| 8 |
* Author URI: https://colorlib.com/
|
| 9 |
* Tested up to: 5.2
|
|
@@ -36,7 +36,7 @@
|
|
| 36 |
|
| 37 |
define('SCPORDER_URL', plugins_url('', __FILE__));
|
| 38 |
define('SCPORDER_DIR', plugin_dir_path(__FILE__));
|
| 39 |
-
define('SCPORDER_VERSION', '2.4.
|
| 40 |
|
| 41 |
$scporder = new SCPO_Engine();
|
| 42 |
|
|
@@ -71,6 +71,17 @@ class SCPO_Engine {
|
|
| 71 |
add_action( 'wp_ajax_scporder_dismiss_notices', array( $this, 'dismiss_notices' ) );
|
| 72 |
|
| 73 |
add_action( 'plugins_loaded', array( $this, 'load_scpo_textdomain' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
}
|
| 75 |
|
| 76 |
public function load_scpo_textdomain(){
|
|
@@ -346,6 +357,7 @@ class SCPO_Engine {
|
|
| 346 |
$input_options = array();
|
| 347 |
$input_options['objects'] = isset($_POST['objects']) ? $_POST['objects'] : '';
|
| 348 |
$input_options['tags'] = isset($_POST['tags']) ? $_POST['tags'] : '';
|
|
|
|
| 349 |
|
| 350 |
update_option('scporder_options', $input_options);
|
| 351 |
|
|
@@ -464,6 +476,7 @@ class SCPO_Engine {
|
|
| 464 |
|
| 465 |
public function scporder_pre_get_posts($wp_query) {
|
| 466 |
$objects = $this->get_scporder_options_objects();
|
|
|
|
| 467 |
if (empty($objects))
|
| 468 |
return false;
|
| 469 |
if (is_admin()) {
|
|
@@ -504,6 +517,7 @@ class SCPO_Engine {
|
|
| 504 |
if (!$wp_query->get('order'))
|
| 505 |
$wp_query->set('order', 'ASC');
|
| 506 |
}
|
|
|
|
| 507 |
}
|
| 508 |
}
|
| 509 |
|
|
@@ -517,7 +531,12 @@ class SCPO_Engine {
|
|
| 517 |
return $orderby;
|
| 518 |
|
| 519 |
if(is_array($args['taxonomy'])){
|
| 520 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 521 |
} else {
|
| 522 |
$taxonomy = $args['taxonomy'];
|
| 523 |
}
|
| 3 |
* Plugin Name: Simple Custom Post Order
|
| 4 |
* Plugin URI: https://wordpress.org/plugins-wp/simple-custom-post-order/
|
| 5 |
* Description: Order Items (Posts, Pages, and Custom Post Types) using a Drag and Drop Sortable JavaScript.
|
| 6 |
+
* Version: 2.4.7
|
| 7 |
* Author: Colorlib
|
| 8 |
* Author URI: https://colorlib.com/
|
| 9 |
* Tested up to: 5.2
|
| 36 |
|
| 37 |
define('SCPORDER_URL', plugins_url('', __FILE__));
|
| 38 |
define('SCPORDER_DIR', plugin_dir_path(__FILE__));
|
| 39 |
+
define('SCPORDER_VERSION', '2.4.7');
|
| 40 |
|
| 41 |
$scporder = new SCPO_Engine();
|
| 42 |
|
| 71 |
add_action( 'wp_ajax_scporder_dismiss_notices', array( $this, 'dismiss_notices' ) );
|
| 72 |
|
| 73 |
add_action( 'plugins_loaded', array( $this, 'load_scpo_textdomain' ) );
|
| 74 |
+
|
| 75 |
+
add_filter('scpo_post_types_args',array($this,'scpo_filter_post_types'),10,2);
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
public function scpo_filter_post_types($args,$options){
|
| 79 |
+
|
| 80 |
+
if(isset($options['show_advanced_view']) && '1' == $options['show_advanced_view'] ){
|
| 81 |
+
unset($args['show_in_menu']);
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
return $args;
|
| 85 |
}
|
| 86 |
|
| 87 |
public function load_scpo_textdomain(){
|
| 357 |
$input_options = array();
|
| 358 |
$input_options['objects'] = isset($_POST['objects']) ? $_POST['objects'] : '';
|
| 359 |
$input_options['tags'] = isset($_POST['tags']) ? $_POST['tags'] : '';
|
| 360 |
+
$input_options['show_advanced_view'] = isset($_POST['show_advanced_view']) ? $_POST['show_advanced_view'] : '';
|
| 361 |
|
| 362 |
update_option('scporder_options', $input_options);
|
| 363 |
|
| 476 |
|
| 477 |
public function scporder_pre_get_posts($wp_query) {
|
| 478 |
$objects = $this->get_scporder_options_objects();
|
| 479 |
+
|
| 480 |
if (empty($objects))
|
| 481 |
return false;
|
| 482 |
if (is_admin()) {
|
| 517 |
if (!$wp_query->get('order'))
|
| 518 |
$wp_query->set('order', 'ASC');
|
| 519 |
}
|
| 520 |
+
|
| 521 |
}
|
| 522 |
}
|
| 523 |
|
| 531 |
return $orderby;
|
| 532 |
|
| 533 |
if(is_array($args['taxonomy'])){
|
| 534 |
+
if(isset($args['taxonomy'][0])){
|
| 535 |
+
$taxonomy = $args['taxonomy'][0];
|
| 536 |
+
} else {
|
| 537 |
+
$taxonomy = false;
|
| 538 |
+
}
|
| 539 |
+
|
| 540 |
} else {
|
| 541 |
$taxonomy = $args['taxonomy'];
|
| 542 |
}
|
