Version Description
- Bug fixed
Download this release
Release Info
Developer | hijiri |
Plugin | Intuitive Custom Post Order |
Version | 1.2.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.4 to 1.2.1
- admin/settings.php +0 -55
- intuitive-custom-post-order.php +61 -279
- lang/default.pot +0 -30
- readme.txt +7 -29
- screenshot-1.png +0 -0
admin/settings.php
DELETED
@@ -1,55 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$hicpo_options = get_option('hicpo_options');
|
4 |
-
$objects = $hicpo_options['objects'];
|
5 |
-
|
6 |
-
?>
|
7 |
-
|
8 |
-
<div class="wrap">
|
9 |
-
|
10 |
-
<?php screen_icon( 'plugins' ); ?>
|
11 |
-
|
12 |
-
<h2><?php _e('Intuitive Custom Post Order Settings', 'hicpo'); ?></h2>
|
13 |
-
|
14 |
-
<?php if ( isset($_GET['msg'] )) : ?>
|
15 |
-
<div id="message" class="updated below-h2">
|
16 |
-
<?php if ( $_GET['msg'] == 'update') : ?>
|
17 |
-
<p><?php _e('Settings saved.', 'hicpo'); ?></p>
|
18 |
-
<?php endif; ?>
|
19 |
-
</div>
|
20 |
-
<?php endif; ?>
|
21 |
-
|
22 |
-
<form method="post">
|
23 |
-
|
24 |
-
<?php if ( function_exists( 'wp_nonce_field' ) ) wp_nonce_field( 'nonce_hicpo' ); ?>
|
25 |
-
|
26 |
-
<table class="form-table">
|
27 |
-
<tbody>
|
28 |
-
<tr valign="top">
|
29 |
-
<th scope="row"><label for="blogname"><?php _e('Sortable Objects', 'hicpo') ?></label></th>
|
30 |
-
<td>
|
31 |
-
<?php
|
32 |
-
$post_types = get_post_types( array (
|
33 |
-
'public' => true
|
34 |
-
), 'objects' );
|
35 |
-
|
36 |
-
foreach ($post_types as $post_type ) {
|
37 |
-
if ( $post_type->name != 'attachment' ) {
|
38 |
-
?>
|
39 |
-
<label><input type="checkbox" name="objects[]" value="<?php echo $post_type->name; ?>" <?php if ( isset($objects) && is_array($objects) ) { if ( in_array($post_type->name, $objects )) { echo 'checked="checked"'; } } ?> /> <?php echo $post_type->label; ?></label><br />
|
40 |
-
<?php
|
41 |
-
}
|
42 |
-
}
|
43 |
-
?>
|
44 |
-
</td>
|
45 |
-
</tr>
|
46 |
-
</tbody>
|
47 |
-
</table>
|
48 |
-
|
49 |
-
<p class="submit">
|
50 |
-
<input type="submit" class="button-primary" name="hicpo_submit" value="<?php _e('Update', 'cptg'); ?>" />
|
51 |
-
</p>
|
52 |
-
|
53 |
-
</form>
|
54 |
-
|
55 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
intuitive-custom-post-order.php
CHANGED
@@ -2,13 +2,13 @@
|
|
2 |
/*
|
3 |
Plugin Name: Intuitive Custom Post Order
|
4 |
Plugin URI: http://hijiriworld.com/web/plugins/intuitive-custom-post-order/
|
5 |
-
Description: Intuitively, Order
|
6 |
-
Version: 2.0.4
|
7 |
Author: hijiri
|
8 |
Author URI: http://hijiriworld.com/web/
|
|
|
9 |
*/
|
10 |
|
11 |
-
/* Copyright
|
12 |
|
13 |
This program is free software; you can redistribute it and/or modify
|
14 |
it under the terms of the GNU General Public License, version 2, as
|
@@ -26,212 +26,75 @@ Author URI: http://hijiriworld.com/web/
|
|
26 |
|
27 |
/***************************************************************
|
28 |
|
29 |
-
|
30 |
|
31 |
***************************************************************/
|
32 |
|
33 |
-
define( '
|
34 |
|
35 |
-
define( 'HICPO_DIR', plugin_dir_path(__FILE__) );
|
36 |
-
|
37 |
-
load_plugin_textdomain( 'hicpo', false, basename(dirname(__FILE__)).'/lang' );
|
38 |
|
39 |
/***************************************************************
|
40 |
|
41 |
-
|
42 |
|
43 |
***************************************************************/
|
44 |
|
45 |
-
|
|
|
|
|
|
|
|
|
46 |
|
47 |
-
|
48 |
-
{
|
49 |
-
|
50 |
-
{
|
51 |
-
|
52 |
-
|
53 |
-
add_action( 'admin_menu', array( &$this, 'admin_menu') );
|
54 |
-
|
55 |
-
add_action( 'admin_init', array( &$this, 'refresh' ) );
|
56 |
-
add_action( 'admin_init', array( &$this, 'update_options') );
|
57 |
-
add_action( 'init', array( &$this, 'enable_objects' ) );
|
58 |
-
|
59 |
-
add_action( 'wp_ajax_update-menu-order', array( &$this, 'update_menu_order' ) );
|
60 |
-
}
|
61 |
-
|
62 |
-
function hicpo_install()
|
63 |
-
{
|
64 |
-
global $wpdb;
|
65 |
-
|
66 |
-
// Initialize : hicpo_options
|
67 |
-
|
68 |
-
$post_types = get_post_types( array (
|
69 |
-
'public' => true
|
70 |
-
), 'objects' );
|
71 |
-
|
72 |
-
foreach ($post_types as $post_type ) {
|
73 |
-
$init_objects[] = $post_type->name;
|
74 |
-
}
|
75 |
-
$input_options = array( 'objects' => $init_objects );
|
76 |
-
|
77 |
-
update_option( 'hicpo_options', $input_options );
|
78 |
-
|
79 |
-
|
80 |
-
// Initialize : menu_order from date_post
|
81 |
-
|
82 |
-
$hicpo_options = get_option( 'hicpo_options' );
|
83 |
-
$objects = $hicpo_options['objects'];
|
84 |
-
|
85 |
-
foreach( $objects as $object) {
|
86 |
-
$sql = "SELECT
|
87 |
-
ID
|
88 |
-
FROM
|
89 |
-
$wpdb->posts
|
90 |
-
WHERE
|
91 |
-
post_type = '".$object."'
|
92 |
-
AND post_status IN ('publish', 'pending', 'draft', 'private', 'future')
|
93 |
-
ORDER BY
|
94 |
-
post_date DESC
|
95 |
-
";
|
96 |
-
|
97 |
-
$results = $wpdb->get_results($sql);
|
98 |
-
|
99 |
-
foreach( $results as $key => $result ) {
|
100 |
-
$wpdb->update( $wpdb->posts, array( 'menu_order' => $key+1 ), array( 'ID' => $result->ID ) );
|
101 |
-
}
|
102 |
-
}
|
103 |
-
}
|
104 |
-
|
105 |
-
function admin_menu()
|
106 |
-
{
|
107 |
-
add_options_page( __('Intuitive CPO', 'hicpo'), __('Intuitive CPO', 'hicpo'), 'manage_options', 'hicpo-settings', array( &$this,'admin_page' ));
|
108 |
-
}
|
109 |
-
|
110 |
-
function admin_page()
|
111 |
-
{
|
112 |
-
require HICPO_DIR.'admin/settings.php';
|
113 |
-
}
|
114 |
-
|
115 |
-
function enable_objects()
|
116 |
-
{
|
117 |
-
$hicpo_options = get_option( 'hicpo_options' );
|
118 |
-
$objects = $hicpo_options['objects'];
|
119 |
-
|
120 |
-
if ( is_array( $objects ) ) {
|
121 |
-
$active = false;
|
122 |
-
|
123 |
-
// for Pages or Custom Post Types
|
124 |
-
if ( isset($_GET['post_type']) ) {
|
125 |
-
if ( in_array( $_GET['post_type'], $objects ) ) {
|
126 |
-
$active = true;
|
127 |
-
}
|
128 |
-
// for Posts
|
129 |
-
} else {
|
130 |
-
$post_list = strstr( $_SERVER["REQUEST_URI"], 'wp-admin/edit.php' );
|
131 |
-
if ( $post_list && in_array( 'post', $objects ) ) {
|
132 |
-
$active = true;
|
133 |
-
}
|
134 |
-
}
|
135 |
-
|
136 |
-
if ( $active ) {
|
137 |
-
$this->load_script_css();
|
138 |
-
}
|
139 |
-
}
|
140 |
-
}
|
141 |
-
|
142 |
-
function load_script_css() {
|
143 |
-
// load JavaScript
|
144 |
-
wp_enqueue_script( 'jQuery' );
|
145 |
-
wp_enqueue_script( 'jquery-ui-sortable' );
|
146 |
-
wp_enqueue_script( 'hicpojs', HICPO_URL.'/js/hicpo.js', array( 'jquery' ), null, true );
|
147 |
-
// load CSS
|
148 |
-
wp_enqueue_style( 'hicpo', HICPO_URL.'/css/hicpo.css', array(), null );
|
149 |
}
|
150 |
|
151 |
-
function
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
ID
|
163 |
-
FROM
|
164 |
-
$wpdb->posts
|
165 |
-
WHERE
|
166 |
-
post_type = '".$object."'
|
167 |
-
AND post_status IN ('publish', 'pending', 'draft', 'private', 'future')
|
168 |
-
ORDER BY
|
169 |
-
menu_order ASC
|
170 |
-
";
|
171 |
-
|
172 |
-
$results = $wpdb->get_results($sql);
|
173 |
-
|
174 |
-
foreach( $results as $key => $result ) {
|
175 |
-
// 新規追加した場合「menu_order=0」で登録されるため、常に1からはじまるように振っておく
|
176 |
-
$wpdb->update( $wpdb->posts, array( 'menu_order' => $key+1 ), array( 'ID' => $result->ID ) );
|
177 |
-
}
|
178 |
-
}
|
179 |
}
|
180 |
}
|
181 |
|
182 |
-
function
|
183 |
-
{
|
184 |
global $wpdb;
|
185 |
-
|
186 |
parse_str($_POST['order'], $data);
|
187 |
-
|
188 |
if ( is_array($data) ) {
|
189 |
-
|
190 |
-
// ページに含まれる記事のIDをすべて取得
|
191 |
-
$id_arr = array();
|
192 |
-
foreach( $data as $key => $values ) {
|
193 |
-
foreach( $values as $position => $id ) {
|
194 |
-
$id_arr[] = $id;
|
195 |
-
}
|
196 |
-
}
|
197 |
-
|
198 |
-
// ページに含まれる記事のmenu_orderをすべて取得
|
199 |
-
$menu_order_arr = array();
|
200 |
-
foreach( $id_arr as $key => $id ) {
|
201 |
-
$results = $wpdb->get_results("SELECT menu_order FROM $wpdb->posts WHERE ID = ".$id);
|
202 |
-
foreach( $results as $result ) {
|
203 |
-
$menu_order_arr[] = $result->menu_order;
|
204 |
-
}
|
205 |
-
}
|
206 |
-
// menu_order配列をソート(キーと値の相関関係は維持しない)
|
207 |
-
sort($menu_order_arr);
|
208 |
-
|
209 |
foreach( $data as $key => $values ) {
|
210 |
foreach( $values as $position => $id ) {
|
211 |
-
$wpdb->update( $wpdb->posts, array( 'menu_order' => $
|
212 |
}
|
213 |
}
|
214 |
}
|
215 |
}
|
216 |
-
|
|
|
|
|
|
|
|
|
217 |
|
|
|
|
|
|
|
|
|
218 |
|
219 |
-
|
220 |
-
{
|
221 |
-
|
222 |
-
|
223 |
-
check_admin_referer( 'nonce_hicpo' );
|
224 |
-
|
225 |
-
if ( isset( $_POST['objects'] ) ) {
|
226 |
-
$input_options = array( 'objects' => $_POST['objects'] );
|
227 |
-
} else {
|
228 |
-
$input_options = array( 'objects' => '' );
|
229 |
-
}
|
230 |
-
|
231 |
-
update_option( 'hicpo_options', $input_options );
|
232 |
-
wp_redirect( 'admin.php?page=hicpo-settings&msg=update' );
|
233 |
-
}
|
234 |
}
|
|
|
235 |
}
|
236 |
|
237 |
/***************************************************************
|
@@ -240,109 +103,28 @@ class Hicpo
|
|
240 |
|
241 |
***************************************************************/
|
242 |
|
243 |
-
add_filter( 'pre_get_posts', '
|
244 |
-
|
245 |
-
function hicpo_filter_active( $wp_query )
|
246 |
-
{
|
247 |
// get_postsの場合 suppress_filters=true となる為、フィルタリングを有効にする
|
248 |
-
if ( isset($
|
249 |
-
if ( isset($
|
250 |
-
return $
|
251 |
}
|
252 |
|
253 |
-
add_filter( '
|
254 |
-
|
255 |
-
|
256 |
-
{
|
257 |
-
$hicpo_options = get_option('hicpo_options');
|
258 |
-
$objects = $hicpo_options['objects'];
|
259 |
-
|
260 |
-
if ( is_array( $objects ) ) {
|
261 |
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
$wp_query->set( 'orderby', 'menu_order' );
|
271 |
-
$wp_query->set( 'order', 'ASC' );
|
272 |
-
}
|
273 |
-
}
|
274 |
-
|
275 |
-
// for Template ------------------------------------------------------------
|
276 |
-
|
277 |
-
} else {
|
278 |
-
|
279 |
-
$active = false;
|
280 |
-
|
281 |
-
// postsのWordpressループ ----------------
|
282 |
-
|
283 |
-
// $wp_query->queryが空配列の場合
|
284 |
-
// WordPressループでもposts以外はpost_typeが渡される
|
285 |
-
|
286 |
-
if ( empty( $wp_query->query ) ) {
|
287 |
-
if ( in_array( 'post', $objects ) ) {
|
288 |
-
$active = true;
|
289 |
-
}
|
290 |
-
} else {
|
291 |
-
|
292 |
-
// get_posts() ----------------------
|
293 |
-
|
294 |
-
// 完全な判別ではないが、suppress_filtersパラメータの有無で判別
|
295 |
-
// get_posts()の場合、post_type, orderby, orderパラメータは必ず渡される
|
296 |
-
|
297 |
-
if ( isset($wp_query->query['suppress_filters']) ) {
|
298 |
-
|
299 |
-
// post_type判定
|
300 |
-
if ( is_array( $wp_query->query['post_type'] ) ) {
|
301 |
-
$post_types = $wp_query->query['post_type'];
|
302 |
-
foreach( $post_types as $post_type ) {
|
303 |
-
if ( in_array( $post_type, $objects ) ) {
|
304 |
-
$active = true;
|
305 |
-
}
|
306 |
-
}
|
307 |
-
} else {
|
308 |
-
if ( in_array( $wp_query->query['post_type'], $objects ) ) {
|
309 |
-
$active = true;
|
310 |
-
}
|
311 |
-
}
|
312 |
-
|
313 |
-
// query_posts() or WP_Query()
|
314 |
-
} else {
|
315 |
-
|
316 |
-
// post_typeが指定されている場合
|
317 |
-
if ( isset( $wp_query->query['post_type'] ) ) {
|
318 |
-
|
319 |
-
// post_type判定
|
320 |
-
if ( is_array( $wp_query->query['post_type'] ) ) {
|
321 |
-
$post_types = $wp_query->query['post_type'];
|
322 |
-
foreach( $post_types as $post_type ) {
|
323 |
-
if ( in_array( $post_type, $objects ) ) {
|
324 |
-
$active = true;
|
325 |
-
}
|
326 |
-
}
|
327 |
-
} else {
|
328 |
-
if ( in_array( $wp_query->query['post_type'], $objects ) ) {
|
329 |
-
$active = true;
|
330 |
-
}
|
331 |
-
}
|
332 |
-
// post_typeが指定されてい場合はpost_type=post
|
333 |
-
} else {
|
334 |
-
if ( in_array( 'post', $objects ) ) {
|
335 |
-
$active = true;
|
336 |
-
}
|
337 |
-
}
|
338 |
-
}
|
339 |
-
}
|
340 |
-
|
341 |
-
if ( $active ) {
|
342 |
-
if ( !isset( $wp_query->query['orderby'] ) || $wp_query->query['orderby'] == 'post_date' ) $wp_query->set( 'orderby', 'menu_order' );
|
343 |
-
if ( !isset( $wp_query->query['order'] ) || $wp_query->query['order'] == 'DESC' ) $wp_query->set( 'order', 'ASC' );
|
344 |
-
}
|
345 |
}
|
346 |
}
|
|
|
347 |
}
|
348 |
?>
|
2 |
/*
|
3 |
Plugin Name: Intuitive Custom Post Order
|
4 |
Plugin URI: http://hijiriworld.com/web/plugins/intuitive-custom-post-order/
|
5 |
+
Description: Intuitively, Order posts(posts, any custom post types) using a Drag and Drop Sortable JavaScript.
|
|
|
6 |
Author: hijiri
|
7 |
Author URI: http://hijiriworld.com/web/
|
8 |
+
Version: 1.2.1
|
9 |
*/
|
10 |
|
11 |
+
/* Copyright 2012 hijiri
|
12 |
|
13 |
This program is free software; you can redistribute it and/or modify
|
14 |
it under the terms of the GNU General Public License, version 2, as
|
26 |
|
27 |
/***************************************************************
|
28 |
|
29 |
+
define
|
30 |
|
31 |
***************************************************************/
|
32 |
|
33 |
+
define( 'hicpo_URL', plugins_url('', __FILE__) );
|
34 |
|
|
|
|
|
|
|
35 |
|
36 |
/***************************************************************
|
37 |
|
38 |
+
init
|
39 |
|
40 |
***************************************************************/
|
41 |
|
42 |
+
add_action( 'wp_loaded', 'hicpo_init' );
|
43 |
+
function hicpo_init() {
|
44 |
+
global $custom_post_type_order, $userdata;
|
45 |
+
$custom_post_type_order = new hicpo();
|
46 |
+
}
|
47 |
|
48 |
+
|
49 |
+
class hicpo {
|
50 |
+
var $current_post_type = null;
|
51 |
+
function hicpo() {
|
52 |
+
add_action( 'admin_init', array( &$this, 'regist_files' ), 11 );
|
53 |
+
add_action( 'wp_ajax_update-menu-order', array( &$this, 'save_menu_order' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
}
|
55 |
|
56 |
+
function regist_files() {
|
57 |
+
// Apply to Post and Custom Post Type, Exclude Page
|
58 |
+
$post_list_url = substr($_SERVER["REQUEST_URI"], -18, 18);
|
59 |
+
if ( (isset($_GET['post_type']) && $_GET['post_type'] != 'page') || $post_list_url == '/wp-admin/edit.php' ) {
|
60 |
+
// load JavaScript
|
61 |
+
wp_enqueue_script( 'jQuery' );
|
62 |
+
wp_enqueue_script( 'jquery-ui-sortable' );
|
63 |
+
wp_enqueue_script( 'hicpojs', hicpo_URL.'/js/hicpo.js', array(), null, true );
|
64 |
+
|
65 |
+
// load CSS
|
66 |
+
wp_enqueue_style( 'hicpo', hicpo_URL.'/css/hicpo.css', array(), null );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
}
|
68 |
}
|
69 |
|
70 |
+
function save_menu_order() {
|
|
|
71 |
global $wpdb;
|
72 |
+
// update 'menu_order' with serialize strings
|
73 |
parse_str($_POST['order'], $data);
|
|
|
74 |
if ( is_array($data) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
foreach( $data as $key => $values ) {
|
76 |
foreach( $values as $position => $id ) {
|
77 |
+
$wpdb->update( $wpdb->posts, array( 'menu_order' => $position, 'post_parent' => 0 ), array( 'ID' => $id ) );
|
78 |
}
|
79 |
}
|
80 |
}
|
81 |
}
|
82 |
+
}
|
83 |
+
|
84 |
+
/***************************************************************
|
85 |
+
|
86 |
+
edit posts per page hook
|
87 |
|
88 |
+
***************************************************************/
|
89 |
+
|
90 |
+
add_filter( 'edit_posts_per_page', 'hicpo_edit_post_per_page' );
|
91 |
+
function hicpo_edit_post_per_page( $per_page, $post_type = null ) {
|
92 |
|
93 |
+
$post_list_url = substr($_SERVER["REQUEST_URI"], -18, 18);
|
94 |
+
if ( (isset($_GET['post_type']) && $_GET['post_type'] != 'page') || $post_list_url == '/wp-admin/edit.php' ) {
|
95 |
+
$per_page = 999;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
}
|
97 |
+
return $per_page;
|
98 |
}
|
99 |
|
100 |
/***************************************************************
|
103 |
|
104 |
***************************************************************/
|
105 |
|
106 |
+
add_filter( 'pre_get_posts', 'hicpo_pre_get_posts' );
|
107 |
+
function hicpo_pre_get_posts( $query ) {
|
|
|
|
|
108 |
// get_postsの場合 suppress_filters=true となる為、フィルタリングを有効にする
|
109 |
+
if ( isset($query->query['suppress_filters']) ) $query->query['suppress_filters'] = false;
|
110 |
+
if ( isset($query->query_vars['suppress_filters']) ) $query->query_vars['suppress_filters'] = false;
|
111 |
+
return $query;
|
112 |
}
|
113 |
|
114 |
+
add_filter( 'posts_orderby', 'hicpo_posts_orderby' );
|
115 |
+
function hicpo_posts_orderby( $orderby ) {
|
116 |
+
global $wpdb;
|
|
|
|
|
|
|
|
|
|
|
117 |
|
118 |
+
// for admin
|
119 |
+
if ( is_admin() ) {
|
120 |
+
$orderby = "{$wpdb->posts}.menu_order, {$wpdb->posts}.post_date DESC";
|
121 |
+
// for site
|
122 |
+
} else {
|
123 |
+
// orderおよびorderby引数をユーザが指定していない場合のみ適用する
|
124 |
+
if ( $orderby == "{$wpdb->posts}.post_date DESC" ) {
|
125 |
+
$orderby = "{$wpdb->posts}.menu_order, {$wpdb->posts}.post_date DESC";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
}
|
127 |
}
|
128 |
+
return $orderby;
|
129 |
}
|
130 |
?>
|
lang/default.pot
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: \n"
|
4 |
-
"POT-Creation-Date: 2013-03-05 01:46+0900\n"
|
5 |
-
"PO-Revision-Date: 2013-03-05 01:47+0900\n"
|
6 |
-
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
7 |
-
"Language-Team: LANGUAGE <LL@li.org>\n"
|
8 |
-
"MIME-Version: 1.0\n"
|
9 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
-
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
|
12 |
-
#: intuitive-custom-post-order/intuitive-custom-post-order.php:107
|
13 |
-
msgid "Intuitive CPO"
|
14 |
-
msgstr ""
|
15 |
-
|
16 |
-
#: intuitive-custom-post-order/admin/settings.php:12
|
17 |
-
msgid "Intuitive Custom Post Order Settings"
|
18 |
-
msgstr ""
|
19 |
-
|
20 |
-
#: intuitive-custom-post-order/admin/settings.php:17
|
21 |
-
msgid "Settings saved."
|
22 |
-
msgstr ""
|
23 |
-
|
24 |
-
#: intuitive-custom-post-order/admin/settings.php:29
|
25 |
-
msgid "Sortable Objects"
|
26 |
-
msgstr ""
|
27 |
-
|
28 |
-
#: intuitive-custom-post-order/admin/settings.php:50
|
29 |
-
msgid "Update"
|
30 |
-
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -1,55 +1,33 @@
|
|
1 |
=== Intuitive Custom Post Order ===
|
2 |
Contributors: hijiri
|
3 |
Tags: post order, posts order, order post, order posts, custom post type order
|
4 |
-
Requires at least: 3.
|
5 |
-
Tested up to: 3.
|
6 |
-
Stable tag: 2.0
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
-
Intuitively, Order
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
Intuitively, Order
|
15 |
Configuration is unnecessary.
|
16 |
You can do directly on default WordPress administration.
|
17 |
|
18 |
-
Excluding
|
19 |
|
20 |
== Installation ==
|
21 |
|
22 |
1. Upload 'intuitive-custom-post-order' folder to the `/wp-content/plugins/` directory
|
23 |
2. Activate the plugin through the 'Plugins' menu in WordPress
|
24 |
-
3. (Optional) Select Sortable Objects from Intuitive CPT Menu
|
25 |
|
26 |
== Screenshots ==
|
27 |
|
28 |
-
1. Order
|
29 |
|
30 |
== Changelog ==
|
31 |
|
32 |
-
= 2.0.4 =
|
33 |
-
|
34 |
-
* Bug fixed
|
35 |
-
|
36 |
-
= 2.0.3 =
|
37 |
-
|
38 |
-
* Intuitive CPO Settings Page was moved to Settings menu.
|
39 |
-
|
40 |
-
= 2.0.2 =
|
41 |
-
|
42 |
-
* Bug fixed
|
43 |
-
|
44 |
-
= 2.0.0 =
|
45 |
-
|
46 |
-
* Select Sortable Objects. (Posts, Pages, and Custom Post Types)
|
47 |
-
* Support Pages and hierarchical Custom Post Types.
|
48 |
-
* Sortable Item's status is not only 'publish' but also other all status('pending', 'draft', 'private', 'future').
|
49 |
-
* In Paging, it's all activated normaly. So, 'screen-per-page' is User like.
|
50 |
-
* In Lists which sorted any category(Category, Tag, Taxonomy), it's all activated normaly.
|
51 |
-
* Support Child posts and Child pages. When you sort any item, Relation of parent item between it's child items is maintained.
|
52 |
-
|
53 |
= 1.2.1 =
|
54 |
|
55 |
* Bug fixed
|
1 |
=== Intuitive Custom Post Order ===
|
2 |
Contributors: hijiri
|
3 |
Tags: post order, posts order, order post, order posts, custom post type order
|
4 |
+
Requires at least: 3.3
|
5 |
+
Tested up to: 3.4.2
|
6 |
+
Stable tag: 1.2.0
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
+
Intuitively, Order posts(posts, any custom post types) using a Drag and Drop Sortable JavaScript.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
Intuitively, Order posts(posts, any custom post types) using a Drag and Drop Sortable JavaScript.
|
15 |
Configuration is unnecessary.
|
16 |
You can do directly on default WordPress administration.
|
17 |
|
18 |
+
Excluding custom query which uses 'order' or 'orderby' parameters, in 'get_posts' or 'query_posts' and so on.
|
19 |
|
20 |
== Installation ==
|
21 |
|
22 |
1. Upload 'intuitive-custom-post-order' folder to the `/wp-content/plugins/` directory
|
23 |
2. Activate the plugin through the 'Plugins' menu in WordPress
|
|
|
24 |
|
25 |
== Screenshots ==
|
26 |
|
27 |
+
1. Order posts
|
28 |
|
29 |
== Changelog ==
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
= 1.2.1 =
|
32 |
|
33 |
* Bug fixed
|
screenshot-1.png
CHANGED
Binary file
|