Changeset 1965327
- Timestamp:
- 10/29/2018 06:58:22 PM (7 years ago)
- Location:
- simple-custom-post-order
- Files:
-
- 23 added
- 2 edited
-
tags/2.3.3 (added)
-
tags/2.3.3/assets (added)
-
tags/2.3.3/assets/scporder.css (added)
-
tags/2.3.3/assets/scporder.js (added)
-
tags/2.3.3/assets/taxonomy_order.js (added)
-
tags/2.3.3/readme.txt (added)
-
tags/2.3.3/screenshot-1.png (added)
-
tags/2.3.3/screenshot-2.png (added)
-
tags/2.3.3/screenshot-3.png (added)
-
tags/2.3.3/settings.php (added)
-
tags/2.3.3/simple-custom-post-order.php (added)
-
tags/2.3.4 (added)
-
tags/2.3.4/assets (added)
-
tags/2.3.4/assets/scporder.css (added)
-
tags/2.3.4/assets/scporder.js (added)
-
tags/2.3.4/assets/taxonomy_order.js (added)
-
tags/2.3.4/readme.md (added)
-
tags/2.3.4/screenshot-1.png (added)
-
tags/2.3.4/screenshot-2.png (added)
-
tags/2.3.4/screenshot-3.png (added)
-
tags/2.3.4/settings.php (added)
-
tags/2.3.4/simple-custom-post-order.php (added)
-
trunk/readme.md (added)
-
trunk/settings.php (modified) (4 diffs)
-
trunk/simple-custom-post-order.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simple-custom-post-order/trunk/settings.php
r1616546 r1965327 6 6 7 7 <div class="wrap"> 8 <?php screen_icon('plugins'); ?>9 8 <h2><?php _e('Simple Custom Post Order Settings', 'scporder'); ?></h2> 10 9 <?php if (isset($_GET['msg'])) : ?> … … 25 24 <tbody> 26 25 <tr valign="top"> 27 <th scope="row"><?php _e('Check to Sort Post Types', 'scporder') ?></th> 26 <th scope="row"><?php _e('Check to Sort Post Types', 'scporder') ?></th> 28 27 <td> 29 28 <label><input type="checkbox" id="scporder_allcheck_objects"> <?php _e('Check All', 'scporder') ?></label><br> … … 60 59 <tbody> 61 60 <tr valign="top"> 62 <th scope="row"><?php _e('Check to Sort Taxonomies', 'scporder') ?></th> 61 <th scope="row"><?php _e('Check to Sort Taxonomies', 'scporder') ?></th> 63 62 <td> 64 63 <label><input type="checkbox" id="scporder_allcheck_tags"> <?php _e('Check All', 'scporder') ?></label><br> … … 87 86 </table> 88 87 89 </div> 88 </div> 90 89 <p class="submit"> 91 90 <input type="submit" class="button-primary" name="scporder_submit" value="<?php _e('Update', 'scporder'); ?>"> -
simple-custom-post-order/trunk/simple-custom-post-order.php
r1960607 r1965327 5 5 Plugin URI: https://wordpress.org/plugins-wp/simple-custom-post-order/ 6 6 Description: Order Items (Posts, Pages, and Custom Post Types) using a Drag and Drop Sortable JavaScript. 7 Version: 2.3. 37 Version: 2.3.4 8 8 Author: Colorlib 9 9 Author URI: https://colorlib.com/wp/ … … 13 13 define('SCPORDER_URL', plugins_url('', __FILE__)); 14 14 define('SCPORDER_DIR', plugin_dir_path(__FILE__)); 15 15 16 16 $scporder = new SCPO_Engine(); 17 17 … … 110 110 foreach ($objects as $object) { 111 111 $result = $wpdb->get_results(" 112 SELECT count(*) as cnt, max(menu_order) as max, min(menu_order) as min 113 FROM $wpdb->posts 112 SELECT count(*) as cnt, max(menu_order) as max, min(menu_order) as min 113 FROM $wpdb->posts 114 114 WHERE post_type = '" . $object . "' AND post_status IN ('publish', 'pending', 'draft', 'private', 'future') 115 115 "); … … 118 118 119 119 $results = $wpdb->get_results(" 120 SELECT ID 121 FROM $wpdb->posts 122 WHERE post_type = '" . $object . "' AND post_status IN ('publish', 'pending', 'draft', 'private', 'future') 120 SELECT ID 121 FROM $wpdb->posts 122 WHERE post_type = '" . $object . "' AND post_status IN ('publish', 'pending', 'draft', 'private', 'future') 123 123 ORDER BY menu_order ASC 124 124 "); … … 132 132 foreach ($tags as $taxonomy) { 133 133 $result = $wpdb->get_results(" 134 SELECT count(*) as cnt, max(term_order) as max, min(term_order) as min 135 FROM $wpdb->terms AS terms 136 INNER JOIN $wpdb->term_taxonomy AS term_taxonomy ON ( terms.term_id = term_taxonomy.term_id ) 134 SELECT count(*) as cnt, max(term_order) as max, min(term_order) as min 135 FROM $wpdb->terms AS terms 136 INNER JOIN $wpdb->term_taxonomy AS term_taxonomy ON ( terms.term_id = term_taxonomy.term_id ) 137 137 WHERE term_taxonomy.taxonomy = '" . $taxonomy . "' 138 138 "); … … 141 141 142 142 $results = $wpdb->get_results(" 143 SELECT terms.term_id 144 FROM $wpdb->terms AS terms 145 INNER JOIN $wpdb->term_taxonomy AS term_taxonomy ON ( terms.term_id = term_taxonomy.term_id ) 146 WHERE term_taxonomy.taxonomy = '" . $taxonomy . "' 143 SELECT terms.term_id 144 FROM $wpdb->terms AS terms 145 INNER JOIN $wpdb->term_taxonomy AS term_taxonomy ON ( terms.term_id = term_taxonomy.term_id ) 146 WHERE term_taxonomy.taxonomy = '" . $taxonomy . "' 147 147 ORDER BY term_order ASC 148 148 "); … … 237 237 foreach ($objects as $object) { 238 238 $result = $wpdb->get_results(" 239 SELECT count(*) as cnt, max(menu_order) as max, min(menu_order) as min 240 FROM $wpdb->posts 239 SELECT count(*) as cnt, max(menu_order) as max, min(menu_order) as min 240 FROM $wpdb->posts 241 241 WHERE post_type = '" . $object . "' AND post_status IN ('publish', 'pending', 'draft', 'private', 'future') 242 242 "); … … 246 246 if ($object == 'page') { 247 247 $results = $wpdb->get_results(" 248 SELECT ID 249 FROM $wpdb->posts 250 WHERE post_type = '" . $object . "' AND post_status IN ('publish', 'pending', 'draft', 'private', 'future') 248 SELECT ID 249 FROM $wpdb->posts 250 WHERE post_type = '" . $object . "' AND post_status IN ('publish', 'pending', 'draft', 'private', 'future') 251 251 ORDER BY post_title ASC 252 252 "); 253 253 } else { 254 254 $results = $wpdb->get_results(" 255 SELECT ID 256 FROM $wpdb->posts 257 WHERE post_type = '" . $object . "' AND post_status IN ('publish', 'pending', 'draft', 'private', 'future') 255 SELECT ID 256 FROM $wpdb->posts 257 WHERE post_type = '" . $object . "' AND post_status IN ('publish', 'pending', 'draft', 'private', 'future') 258 258 ORDER BY post_date DESC 259 259 "); … … 268 268 foreach ($tags as $taxonomy) { 269 269 $result = $wpdb->get_results(" 270 SELECT count(*) as cnt, max(term_order) as max, min(term_order) as min 271 FROM $wpdb->terms AS terms 272 INNER JOIN $wpdb->term_taxonomy AS term_taxonomy ON ( terms.term_id = term_taxonomy.term_id ) 270 SELECT count(*) as cnt, max(term_order) as max, min(term_order) as min 271 FROM $wpdb->terms AS terms 272 INNER JOIN $wpdb->term_taxonomy AS term_taxonomy ON ( terms.term_id = term_taxonomy.term_id ) 273 273 WHERE term_taxonomy.taxonomy = '" . $taxonomy . "' 274 274 "); … … 277 277 278 278 $results = $wpdb->get_results(" 279 SELECT terms.term_id 280 FROM $wpdb->terms AS terms 281 INNER JOIN $wpdb->term_taxonomy AS term_taxonomy ON ( terms.term_id = term_taxonomy.term_id ) 282 WHERE term_taxonomy.taxonomy = '" . $taxonomy . "' 279 SELECT terms.term_id 280 FROM $wpdb->terms AS terms 281 INNER JOIN $wpdb->term_taxonomy AS term_taxonomy ON ( terms.term_id = term_taxonomy.term_id ) 282 WHERE term_taxonomy.taxonomy = '" . $taxonomy . "' 283 283 ORDER BY name ASC 284 284 ");
Note: See TracChangeset
for help on using the changeset viewer.