Hi Sameer,
We had some problems using your useful plugin as it was freezing the admin area with many posts (hundreds). We definitely solved the slow down issue by moving the Array ‘refresh’ from the ‘admin_init’ to the ‘wp_ajax_update-menu-order’ action as follow:
function __construct() {
if ( !get_option( 'scporder_options' ) )
$this->scporder_install();
add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
//add_action( 'admin_init', array( &$this, 'refresh' ) );
add_action( 'admin_init', array( &$this, 'update_options' ) );
add_action( 'init', array( &$this, 'enable_objects' ) );
add_action( 'wp_ajax_update-menu-order', array( &$this, 'update_menu_order' ) );
add_action( 'wp_ajax_update-menu-order', array( &$this, 'refresh' ) );
add_filter( 'pre_get_posts', array( &$this, 'scporder_filter_active' ) );
add_filter( 'pre_get_posts', array( &$this, 'scporder_pre_get_posts' ) );
add_filter( 'get_previous_post_where', array( &$this, 'scporder_previous_post_where' ) );
add_filter( 'get_previous_post_sort', array( &$this, 'scporder_previous_post_sort' ) );
add_filter( 'get_next_post_where', array( &$this, 'scporder_next_post_where' ) );
add_filter( 'get_next_post_sort', array( &$this, 'scporder_next_post_sort' ) );
}
Can you let me know if there are some contraindications doing that?
If not can it be a fix for the next update?
Thank you,
Matteo