Created
September 19, 2013 17:52
-
-
Save bhwebworks/6627208 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Filter Simple Page Ordering to exclude Pages but include custom post types that are hierarchical but don't have page attributes | |
* | |
* @link http://blackhillswebworks.com/?p=5017 | |
*/ | |
add_filter( 'simple_page_ordering_is_sortable', 'bhww_turn_off_simple_page_ordering_for_pages' ); | |
function bhww_turn_off_simple_page_ordering_for_pages( $sortable ) { | |
$screen = get_current_screen(); | |
$post_type = $screen->post_type; | |
$sortable = ( ! post_type_supports( $post_type, 'page-attributes' ) && is_post_type_hierarchical( $post_type ) ); | |
return $sortable; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment