Changeset 2870026
- Timestamp:
- 02/23/2023 01:52:33 PM (17 months ago)
- Location:
- post-types-order
- Files:
-
- 28 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
post-types-order/trunk/css/cpt-archive-dd.css
r2717158 r2870026 1 #the-list.ui-sortable tr :hover { cursor: move;}1 #the-list.ui-sortable tr:hover { cursor: move;} 2 2 #the-list.ui-sortable tr.alternate { background-color: #F9F9F9; } 3 3 #the-list.ui-sortable tr.ui-sortable-helper { background-color: #ffffff; outline: 1px solid #dfdfdf;} 4 4 #the-list.ui-sortable .ui-sortable-placeholder td{border-color:#bbb;background-color:#FCFCFC; height:32px; background-image: none; -moz-border-radius: 6px 6px 6px 6px; border: 3px dashed #E6E6E6; -webkit-border-radius: 4px;-moz-border-radius: 4px;border-radius: 4px; box-sizing: border-box;} 5 6 7 8 9 10 11 12 13 14 -
post-types-order/trunk/include/class.cpto.php
r2717158 r2870026 34 34 include_once(CPTPATH . '/include/class.walkers.php'); 35 35 36 add_action( 'admin_init', array(&$this, 'registerFiles'), 11 );36 add_action( 'admin_init', array(&$this, 'registerFiles'), 11 ); 37 37 add_action( 'admin_init', array(&$this, 'admin_init'), 10 ); 38 38 add_action( 'admin_menu', array(&$this, 'addMenu') ); … … 161 161 return( $orderBy ); 162 162 163 if ( is_admin())163 if () 164 164 { 165 165 166 if ( $options['adminsort'] == "1" || ( defined('DOING_AJAX') && isset($_REQUEST['action']) && $_REQUEST['action'] == 'query-attachments') )166 if ( $options['adminsort'] == "1" || () && isset($_REQUEST['action']) && $_REQUEST['action'] == 'query-attachments') ) 167 167 { 168 168 … … 233 233 $options_interface->check_options_update(); 234 234 235 add_options_page('Post Types Order', '<img class="menu_pto" src="'. CPTURL .'/images/menu-icon.png" alt="" />Post Types Order', 'manage_options', 'cpto-options', array($options_interface, 'plugin_options_interface'));236 235 add_options_page('Post Types Order', '<img class="menu_pto" src="'. CPTURL .'/images/menu-icon.png" alt="" />Post Types Order', 'manage_options', 'cpto-options', array($options_interface, 'plugin_options_interface')); 236 237 237 } 238 238 239 240 241 242 243 239 244 240 245 … … 265 270 return; 266 271 272 273 274 275 276 277 267 278 //check if post type is sortable 268 279 if(isset($options['show_reorder_interfaces'][$screen->post_type]) && $options['show_reorder_interfaces'][ $screen->post_type ] != 'show') … … 310 321 } 311 322 312 function registerFiles() 313 { 314 if ( $this->current_post_type != null ) 315 { 316 wp_enqueue_script('jQuery'); 317 wp_enqueue_script('jquery-ui-sortable'); 318 } 319 320 wp_register_style('CPTStyleSheets', CPTURL . '/css/cpt.css'); 321 wp_enqueue_style( 'CPTStyleSheets'); 322 } 323 323 324 324 325 function admin_init() … … 530 531 531 532 if ( $post_type_name == 'post' ) 532 add_submenu_page('edit.php', __('Re-Order', 'post-types-order'), __('Re-Order', 'post-types-order'), $required_capability, 'order-post-types-'.$post_type_name, array(&$this, 'SortPage') );533 add_submenu_page('edit.php', __('Re-Order', 'post-types-order'), __('Re-Order', 'post-types-order'), $required_capability, 'order-post-types-'.$post_type_name, array(&$this, 'SortPage') ); 533 534 elseif ($post_type_name == 'attachment') 534 add_submenu_page('upload.php', __('Re-Order', 'post-types-order'), __('Re-Order', 'post-types-order'), $required_capability, 'order-post-types-'.$post_type_name, array(&$this, 'SortPage') );535 add_submenu_page('upload.php', __('Re-Order', 'post-types-order'), __('Re-Order', 'post-types-order'), $required_capability, 'order-post-types-'.$post_type_name, array(&$this, 'SortPage') ); 535 536 else 536 537 { 537 add_submenu_page('edit.php?post_type='.$post_type_name, __('Re-Order', 'post-types-order'), __('Re-Order', 'post-types-order'), $required_capability, 'order-post-types-'.$post_type_name, array(&$this, 'SortPage') );538 add_submenu_page('edit.php?post_type='.$post_type_name, __('Re-Order', 'post-types-order'), __('Re-Order', 'post-types-order'), $required_capability, 'order-post-types-'.$post_type_name, array(&$this, 'SortPage') ); 538 539 } 539 } 540 541 add_action('admin_print_styles-' . $hookID , array($this, 'admin_reorder_print_styles')); 542 } 543 } 544 545 546 function admin_reorder_print_styles() 547 { 548 549 if ( $this->current_post_type != null ) 550 { 551 wp_enqueue_script('jQuery'); 552 wp_enqueue_script('jquery-ui-sortable'); 553 } 554 555 wp_register_style('CPTStyleSheets', CPTURL . '/css/cpt.css'); 556 wp_enqueue_style( 'CPTStyleSheets'); 540 557 } 541 558 -
post-types-order/trunk/include/class.functions.php
r2648455 r2870026 42 42 43 43 $defaults = array ( 44 'show_reorder_interfaces' => array(), 45 'autosort' => 1, 46 'adminsort' => 1, 47 'use_query_ASC_DESC' => '', 48 'archive_drag_drop' => 1, 49 'capability' => 'manage_options', 50 'navigation_sort_apply' => 1, 44 'show_reorder_interfaces' => array(), 45 'allow_reorder_default_interfaces' => array(), 46 'autosort' => 1, 47 'adminsort' => 1, 48 'use_query_ASC_DESC' => '', 49 'archive_drag_drop' => 1, 50 'capability' => 'manage_options', 51 'navigation_sort_apply' => 1, 51 52 52 53 ); … … 70 71 <h4><?php esc_html_e('Did you know there is available an Advanced version of this plug-in?', 'post-types-order') ?> <a target="_blank" href="https://www.nsp-code.com/premium-plugins/wordpress-plugins/advanced-post-types-order/"><?php _e('Read more', 'post-types-order') ?></a></h4> 71 72 <p><?php esc_html_e('Check our', 'post-types-order') ?> <a target="_blank" href="https://wordpress.org/plugins/taxonomy-terms-order/">Category Order - Taxonomy Terms Order</a> <?php esc_html_e('plugin which allow to custom sort categories and custom taxonomies terms', 'post-types-order') ?> </p> 72 <p><span style="color:#CC0000" class="dashicons dashicons-megaphone" alt="f488"> </span> <?php esc_html_e('Check out', 'post-types-order') ?> <a href="https://wordpress.org/plugins/wp-hide-security-enhancer/" target="_blank"><b>WP Hide & Security Enhancer</b></a> <?php esc_html_e(' the easy way to completely hide your WordPress core files, themeand plugins', 'post-types-order') ?>.</p>73 <p><span style="color:#CC0000" class="dashicons dashicons-megaphone" alt="f488"> </span> <?php esc_html_e('Check out', 'post-types-order') ?> <a href="https://wordpress.org/plugins/wp-hide-security-enhancer/" target="_blank"><b>WP Hide & Security Enhancer</b></a> <?php esc_html_e(' and plugins', 'post-types-order') ?>.</p> 73 74 74 75 <div class="clear"></div> -
post-types-order/trunk/include/class.options.php
r2599896 r2870026 26 26 { 27 27 28 $options['show_reorder_interfaces'] = (array) $_POST['show_reorder_interfaces'];29 $options[' show_reorder_interfaces'] = array_map( 'sanitize_key', $options['show_reorder_interfaces'] );28 $options['show_reorder_interfaces'] ; 29 $options['_interfaces'] ); 30 30 31 31 $options['capability'] = sanitize_key($_POST['capability']); … … 105 105 <?php } ?> 106 106 </td> 107 107 108 </tr> 108 109 <tr valign="top"> … … 156 157 <input type="checkbox" <?php checked( '1', $options['archive_drag_drop'] ); ?> id="archive_drag_drop" value="1" name="archive_drag_drop"> 157 158 <?php esc_html_e("Allow sortable drag & drop functionality within default WordPress post type archive. Admin Sort need to be active.", 'post-types-order') ?>.</p> 158 </td> 159 <br /> 160 <?php 161 162 $post_types = get_post_types(); 163 foreach( $post_types as $post_type_name ) 164 { 165 //ignore list 166 $ignore_post_types = array( 167 'reply', 168 'topic', 169 'report', 170 'status' 171 ); 172 173 if( in_array($post_type_name, $ignore_post_types) ) 174 continue; 175 176 177 $post_type_data = get_post_type_object( $post_type_name ); 178 if($post_type_data->show_ui === FALSE) 179 continue; 180 ?> 181 <p><label> 182 <select name="allow_reorder_default_interfaces[<?php echo esc_attr($post_type_name) ?>]"> 183 <option value="yes" <?php if(isset($options['allow_reorder_default_interfaces'][$post_type_name]) && $options['allow_reorder_default_interfaces'][$post_type_name] == 'yes') {echo ' selected="selected"';} ?>><?php esc_html_e( "Yes", 'post-types-order' ) ?></option> 184 <option value="no" <?php if(isset($options['allow_reorder_default_interfaces'][$post_type_name]) && $options['allow_reorder_default_interfaces'][$post_type_name] == 'no') {echo ' selected="selected"';} ?>><?php esc_html_e( "No", 'post-types-order' ) ?></option> 185 </select> <?php echo esc_html ( $post_type_data->labels->singular_name ); ?> 186 </label><br /> </p> 187 <?php } ?> 188 189 </td> 190 159 191 </tr> 160 192 -
post-types-order/trunk/js/cpt.js
r2717158 r2870026 33 33 34 34 'items': 'tr', 35 35 36 'axis': 'y', 36 37 'update' : function(e, ui) { -
post-types-order/trunk/languages/post-types-order.po
r1697481 r2870026 3 3 "Project-Id-Version: Post Types Order\n" 4 4 "POT-Creation-Date: 2017-07-17 16:03+0200\n" 5 "PO-Revision-Date: 20 17-07-17 16:03+0200\n"5 "PO-Revision-Date: 203+0200\n" 6 6 "Last-Translator: NspCode <contact@nsp-code.com>\n" 7 7 "Language-Team: \n" 8 8 9 "MIME-Version: 1.0\n" 9 10 "Content-Type: text/plain; charset=UTF-8\n" 10 11 "Content-Transfer-Encoding: 8bit\n" 11 "X-Generator: Poedit 1.5.5\n" 12 "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n" 13 "X-Poedit-Basepath: ../\n" 12 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 "X-Generator: Poedit 3.2\n" 14 "X-Poedit-KeywordsList: __;_e\n" 15 "X-Poedit-Basepath: ..\n" 14 16 "X-Poedit-SearchPath-0: .\n" 15 17 -
post-types-order/trunk/post-types-order.php
r2823437 r2870026 6 6 Author: Nsp Code 7 7 Author URI: http://www.nsp-code.com 8 Version: 1.9.9.28 Version: 9 9 Text Domain: post-types-order 10 10 Domain Path: /languages/ -
post-types-order/trunk/readme.txt
r2823437 r2870026 5 5 Requires at least: 2.8 6 6 Tested up to: 6.1.1 7 Stable tag: 1.9.9.27 Stable tag: 8 8 9 9 Sort Posts and custom Post Type Objects (custom post types) using a Drag and Drop Sortable JavaScript AJAX interface or default WordPress dashboard. … … 94 94 95 95 == Change Log == 96 97 98 99 100 101 102 96 103 97 104 = 1.9.9.2 =
Note: See TracChangeset
for help on using the changeset viewer.