Reorder Posts - Version 2.0.1

Version Description

  • Altered contributor documentation.
  • Adding filters for determining where the Reorder sub-menu will show up.
  • Sub-menu headings now reflect the post type that is being re-ordered.
  • Fixed bug in display when there are no post types to re-order.
  • Changed class names to be more unique.
Download this release

Release Info

Developer ronalfy
Plugin Icon 128x128 Reorder Posts
Version 2.0.1
Comparing to
See all releases

Code changes from version 2.0.0 to 2.0.1

class-reorder-admin.php CHANGED
@@ -17,7 +17,7 @@
17
  * @author Ronald Huereca
18
  * @since 2.0.0
19
  */
20
- class Reorder_Admin {
21
  /**
22
  * @var $instance
23
  * @desc Instance of the admin class
@@ -419,5 +419,5 @@ class Reorder_Admin {
419
 
420
  add_action( 'init', 'mn_reorder_admin_instantiate', 15 );
421
  function mn_reorder_admin_instantiate() {
422
- Reorder_Admin::get_instance();
423
  }
17
  * @author Ronald Huereca
18
  * @since 2.0.0
19
  */
20
+ class MN_Reorder_Admin {
21
  /**
22
  * @var $instance
23
  * @desc Instance of the admin class
419
 
420
  add_action( 'init', 'mn_reorder_admin_instantiate', 15 );
421
  function mn_reorder_admin_instantiate() {
422
+ MN_Reorder_Admin::get_instance();
423
  }
class-reorder.php CHANGED
@@ -14,14 +14,14 @@
14
  * Based on work by Scott Basgaard and Ronald Huereca
15
  *
16
  * To use this class, simply instantiate it using an argument to set the post type as follows:
17
- * new Reorder( array( 'post_type' => 'post', 'order'=> 'ASC' ) );
18
  *
19
  * @copyright Copyright (c), Metronet
20
  * @license http://www.gnu.org/licenses/gpl.html GPL
21
  * @author Ryan Hellyer <ryan@metronet.no>
22
  * @since 1.0
23
  */
24
- class Reorder {
25
 
26
  /**
27
  * @var $post_type
@@ -29,13 +29,6 @@ class Reorder {
29
  * @access private
30
  */
31
  private $post_type;
32
-
33
- /**
34
- * @var $page_hook
35
- * @desc Page hook to add reorder scripts/styles to
36
- * @access private
37
- */
38
- private $page_hook;
39
 
40
  /**
41
  * @var $direction
@@ -100,18 +93,18 @@ class Reorder {
100
  'initial' => '', // Initial text displayed before sorting code
101
  'final' => '', // Initial text displayed before sorting code
102
  'post_status' => 'publish', // Post status of posts to be reordered
 
103
  );
104
- extract( wp_parse_args( $args, $defaults ) );
105
 
106
  // Set variables
107
- $this->post_type = $post_type;
108
- $this->order = $order;
109
- $this->heading = $heading;
110
- $this->initial = $initial;
111
- $this->final = $final;
112
- $this->menu_label = $menu_label;
113
- $this->post_status = $post_status;
114
- $this->page_hook = $post_type . '_page_reorder-video';
115
 
116
  // Add actions
117
  add_action( 'wp_ajax_post_sort', array( $this, 'ajax_save_post_order' ) );
@@ -223,11 +216,11 @@ class Reorder {
223
  public function enable_post_sort() {
224
  $post_type = $this->post_type;
225
  if ( 'post' != $post_type ) {
226
-
227
  $hook = add_submenu_page(
228
- 'edit.php?post_type=' . $post_type, // Parent slug
229
  $this->heading, // Page title (unneeded since specified directly)
230
- $this->menu_label, // Menu title
231
  'edit_posts', // Capability
232
  'reorder-' . $post_type, // Menu slug
233
  array( $this, 'sort_posts' ) // Callback function
@@ -236,7 +229,7 @@ class Reorder {
236
  else {
237
  $hook = add_posts_page(
238
  $this->heading, // Page title (unneeded since specified directly)
239
- $this->menu_label, // Menu title
240
  'edit_posts', // Capability
241
  'reorder-posts', // Menu slug
242
  array( $this, 'sort_posts' ) // Callback function
@@ -323,43 +316,48 @@ class Reorder {
323
  * @global string $post_type
324
  */
325
  public function sort_posts() {
 
326
  ?>
327
  </style>
328
  <div class="wrap">
329
  <h2>
330
- <?php echo $this->heading; ?>
331
- <img src="<?php echo admin_url( 'images/loading.gif' ); ?>" id="loading-animation" />
332
  </h2>
333
  <div id="reorder-error"></div>
334
- <?php echo $this->initial; ?>
335
- <ul id="post-list">
336
  <?php
337
  if ( is_post_type_hierarchical( $this->post_type ) ) {
338
  $pages = get_pages( array(
339
  'sort_column' => 'menu_order',
340
  'post_type' => $this->post_type,
341
- ) );
342
- //Get hiearchy of children/parents
343
- $top_level_pages = array();
344
- $children_pages = array();
345
- foreach( $pages as $page ) {
346
- if ( $page->post_parent == 0 ) {
347
- //Parent page
348
- $top_level_pages[] = $page;
349
- } else {
350
- $children_pages[ $page->post_parent ][] = $page;
351
- }
352
- } //end foreach
353
-
354
- foreach( $top_level_pages as $page ) {
355
- $page_id = $page->ID;
356
- if ( isset( $children_pages[ $page_id ] ) && !empty( $children_pages[ $page_id ] ) ) {
357
- //If page has children, output page and its children
358
- $this->output_row_hierarchical( $page, $children_pages[ $page_id ], $children_pages );
359
- } else {
360
- $this->output_row( $page );
361
- }
362
- }
 
 
 
 
 
363
  } else {
364
  //Output non hierarchical posts
365
  $post_query = new WP_Query(
@@ -372,15 +370,19 @@ class Reorder {
372
  )
373
  );
374
  $posts = $post_query->get_posts();
375
- if ( !$posts ) return;
376
- foreach( $posts as $post ) {
377
- $this->output_row( $post );
378
- } //end foreach
 
 
 
 
379
  }
380
- ?>
381
- </ul>
382
- <?php
383
- echo $this->final;
384
  ?>
385
  </div><!-- .wrap -->
386
  <?php
14
  * Based on work by Scott Basgaard and Ronald Huereca
15
  *
16
  * To use this class, simply instantiate it using an argument to set the post type as follows:
17
+ * new MN_Reorder( array( 'post_type' => 'post', 'order'=> 'ASC' ) );
18
  *
19
  * @copyright Copyright (c), Metronet
20
  * @license http://www.gnu.org/licenses/gpl.html GPL
21
  * @author Ryan Hellyer <ryan@metronet.no>
22
  * @since 1.0
23
  */
24
+ class MN_Reorder {
25
 
26
  /**
27
  * @var $post_type
29
  * @access private
30
  */
31
  private $post_type;
 
 
 
 
 
 
 
32
 
33
  /**
34
  * @var $direction
93
  'initial' => '', // Initial text displayed before sorting code
94
  'final' => '', // Initial text displayed before sorting code
95
  'post_status' => 'publish', // Post status of posts to be reordered
96
+ 'menu_label' => __( 'Reorder', 'metronet-reorder-posts' ), //Menu label for the post type
97
  );
98
+ $args = wp_parse_args( $args, $defaults );
99
 
100
  // Set variables
101
+ $this->post_type = $args[ 'post_type' ];
102
+ $this->order = $args[ 'order' ];;
103
+ $this->heading = $args[ 'heading' ];
104
+ $this->initial = $args[ 'initial' ];
105
+ $this->final = $args[ 'final' ];
106
+ $this->menu_label = $args[ 'menu_label' ];
107
+ $this->post_status = $args[ 'post_status' ];
 
108
 
109
  // Add actions
110
  add_action( 'wp_ajax_post_sort', array( $this, 'ajax_save_post_order' ) );
216
  public function enable_post_sort() {
217
  $post_type = $this->post_type;
218
  if ( 'post' != $post_type ) {
219
+ $menu_location = apply_filters( 'metronet_reorder_menu_location_' . $post_type, 'edit.php?post_type=' . $post_type, $post_type );
220
  $hook = add_submenu_page(
221
+ $menu_location, // Parent slug
222
  $this->heading, // Page title (unneeded since specified directly)
223
+ apply_filters( 'metronet_reorder_menu_label_' . $post_type, $this->menu_label , $post_type ), // Menu title
224
  'edit_posts', // Capability
225
  'reorder-' . $post_type, // Menu slug
226
  array( $this, 'sort_posts' ) // Callback function
229
  else {
230
  $hook = add_posts_page(
231
  $this->heading, // Page title (unneeded since specified directly)
232
+ apply_filters( 'metronet_reorder_menu_label_' . $post_type, $this->menu_label ), // Menu title
233
  'edit_posts', // Capability
234
  'reorder-posts', // Menu slug
235
  array( $this, 'sort_posts' ) // Callback function
316
  * @global string $post_type
317
  */
318
  public function sort_posts() {
319
+ $has_posts = false;
320
  ?>
321
  </style>
322
  <div class="wrap">
323
  <h2>
324
+ <?php echo esc_html( $this->heading ); ?>
325
+ <img src="<?php echo esc_url( admin_url( 'images/loading.gif' ) ); ?>" id="loading-animation" />
326
  </h2>
327
  <div id="reorder-error"></div>
328
+ <?php echo esc_html( $this->initial ); ?>
 
329
  <?php
330
  if ( is_post_type_hierarchical( $this->post_type ) ) {
331
  $pages = get_pages( array(
332
  'sort_column' => 'menu_order',
333
  'post_type' => $this->post_type,
334
+ ) );
335
+ if( $pages ) {
336
+ $has_posts = true;
337
+ echo '<ul id="post-list">';
338
+ //Get hiearchy of children/parents
339
+ $top_level_pages = array();
340
+ $children_pages = array();
341
+ foreach( $pages as $page ) {
342
+ if ( $page->post_parent == 0 ) {
343
+ //Parent page
344
+ $top_level_pages[] = $page;
345
+ } else {
346
+ $children_pages[ $page->post_parent ][] = $page;
347
+ }
348
+ } //end foreach
349
+
350
+ foreach( $top_level_pages as $page ) {
351
+ $page_id = $page->ID;
352
+ if ( isset( $children_pages[ $page_id ] ) && !empty( $children_pages[ $page_id ] ) ) {
353
+ //If page has children, output page and its children
354
+ $this->output_row_hierarchical( $page, $children_pages[ $page_id ], $children_pages );
355
+ } else {
356
+ $this->output_row( $page );
357
+ }
358
+ }
359
+ echo '</ul>';
360
+ }
361
  } else {
362
  //Output non hierarchical posts
363
  $post_query = new WP_Query(
370
  )
371
  );
372
  $posts = $post_query->get_posts();
373
+ if( $posts && !empty( $posts ) ) {
374
+ $has_posts = true;
375
+ echo '<ul id="post-list">';
376
+ foreach( $posts as $post ) {
377
+ $this->output_row( $post );
378
+ } //end foreach
379
+ echo '</ul>';
380
+ }
381
  }
382
+ if ( false === $has_posts ) {
383
+ echo sprintf( '<h3>%s</h3> ', esc_html__( 'There is nothing to sort at this time', 'metronet-reorder-posts' ) );
384
+ }
385
+ echo esc_html( $this->final );
386
  ?>
387
  </div><!-- .wrap -->
388
  <?php
index.php CHANGED
@@ -3,9 +3,9 @@
3
  Plugin Name: Metronet Reorder Posts
4
  Plugin URI: https://wordpress.org/plugins/metronet-reorder-posts/
5
  Description: Reorder posts
6
- Version: 2.0.0
7
- Author: Ryan Hellyer, Ronald Huereca
8
- Author URI: http://geek.ryanhellyer.net/
9
  Text Domain: metronet-reorder-posts
10
  Domain Path: /languages
11
 
@@ -76,16 +76,20 @@ function mn_reorder_posts_init() {
76
  }
77
 
78
  // Add filter to allow users to control which post-types the plugin is used with via their theme
79
- $post_types = apply_filters( 'metronet_reorder_post_types', $post_types );
80
 
81
  foreach ( $post_types as $post_type ) {
 
 
 
 
82
 
83
  // Instantiate new reordering
84
- new Reorder(
85
  array(
86
  'post_type' => $post_type,
87
  'order' => 'ASC',
88
- 'heading' => __( 'Reorder Posts', 'metronet-reorder-posts' ),
89
  'final' => '',
90
  'initial' => '',
91
  'menu_label' => __( 'Reorder', 'metronet-reorder-posts' ),
3
  Plugin Name: Metronet Reorder Posts
4
  Plugin URI: https://wordpress.org/plugins/metronet-reorder-posts/
5
  Description: Reorder posts
6
+ Version: 2.0.1
7
+ Author: Ryan Hellyer, Ronald Huereca, Scott Basgaard
8
+ Author URI: https://github.com/ronalfy/reorder-posts
9
  Text Domain: metronet-reorder-posts
10
  Domain Path: /languages
11
 
76
  }
77
 
78
  // Add filter to allow users to control which post-types the plugin is used with via their theme
79
+ $post_types = array_unique( apply_filters( 'metronet_reorder_post_types', $post_types ) );
80
 
81
  foreach ( $post_types as $post_type ) {
82
+ //Generate heading
83
+ $post_type_object = get_post_type_object( $post_type );
84
+ $post_type_label = isset( $post_type_object->label ) ? $post_type_object->label : __( 'Posts', 'metronet-reorder-posts' );
85
+ $heading = sprintf( __( 'Reorder %s', 'metronet-reorder-posts' ), $post_type_label );
86
 
87
  // Instantiate new reordering
88
+ new MN_Reorder(
89
  array(
90
  'post_type' => $post_type,
91
  'order' => 'ASC',
92
+ 'heading' => $heading,
93
  'final' => '',
94
  'initial' => '',
95
  'menu_label' => __( 'Reorder', 'metronet-reorder-posts' ),
languages/metronet-reorder-posts.pot CHANGED
@@ -5,7 +5,7 @@ msgid ""
5
  msgstr ""
6
  "Project-Id-Version: Metronet Reorder Posts v1.0.0\n"
7
  "Report-Msgid-Bugs-To: Ronald Huereca <ronalfy@gmail.com>\n"
8
- "POT-Creation-Date: 2014-12-13 19:25-0600\n"
9
  "PO-Revision-Date: \n"
10
  "Last-Translator: Ronald Huereca <ron@ronalfy.com>\n"
11
  "Language-Team: Ronald Huereca <ronalfy@gmail.com>\n"
@@ -23,41 +23,41 @@ msgstr ""
23
  "X-Generator: Poedit 1.5.3\n"
24
  "X-Poedit-SearchPath-0: .\n"
25
 
26
- #: class-reorder-admin.php:81 class-reorder-admin.php:359
27
  msgctxt "Plugin Name - Settings Page Title"
28
  msgid "Reorder Posts"
29
  msgstr ""
30
 
31
- #: class-reorder-admin.php:81
32
  msgctxt "Plugin Name - Menu Item"
33
  msgid "Reorder Posts"
34
  msgstr ""
35
 
36
- #: class-reorder-admin.php:122
37
  msgid "Sort by:"
38
  msgstr ""
39
 
40
- #: class-reorder-admin.php:124
41
  msgid "None"
42
  msgstr ""
43
 
44
- #: class-reorder-admin.php:125
45
  msgid "Menu Order"
46
  msgstr ""
47
 
48
- #: class-reorder-admin.php:131
49
  msgid "Sort Order:"
50
  msgstr ""
51
 
52
- #: class-reorder-admin.php:133
53
  msgid "ASC"
54
  msgstr ""
55
 
56
- #: class-reorder-admin.php:134
57
  msgid "DESC"
58
  msgstr ""
59
 
60
- #: class-reorder-admin.php:184
61
  msgid ""
62
  "These are advanced options and you should only use these if you know what "
63
  "you are doing. These can overwrite the menu orders of custom queries (using "
@@ -65,49 +65,58 @@ msgid ""
65
  "blog posts display."
66
  msgstr ""
67
 
68
- #: class-reorder-admin.php:200
69
  msgctxt "Plugin settings link on the plugins page"
70
  msgid "Settings"
71
  msgstr ""
72
 
73
- #: class-reorder-admin.php:250
74
  msgctxt "plugin settings heading"
75
  msgid "Enable Post Types"
76
  msgstr ""
77
 
78
- #: class-reorder-admin.php:252
79
  msgctxt "plugin settings heading"
80
  msgid "Advanced"
81
  msgstr ""
82
 
83
- #: class-reorder-admin.php:254
84
  msgid "Post Types"
85
  msgstr ""
86
 
87
- #: class-reorder-admin.php:254
88
  msgid "Select the post types you would like this plugin enabled for."
89
  msgstr ""
90
 
91
- #: class-reorder-admin.php:256
92
  msgid "Select the menu order arguments."
93
  msgstr ""
94
 
95
- #: class-reorder-admin.php:256
96
  msgid "Select the menu order for the post types."
97
  msgstr ""
98
 
99
- #: class-reorder.php:99 index.php:91
100
  msgid "Reorder"
101
  msgstr ""
102
 
103
- #: class-reorder.php:208 class-reorder.php:283
104
  msgid "Expand"
105
  msgstr ""
106
 
107
- #: class-reorder.php:209
108
  msgid "Collapse"
109
  msgstr ""
110
 
111
- #: index.php:88
112
- msgid "Reorder Posts"
 
 
 
 
 
 
 
 
 
113
  msgstr ""
5
  msgstr ""
6
  "Project-Id-Version: Metronet Reorder Posts v1.0.0\n"
7
  "Report-Msgid-Bugs-To: Ronald Huereca <ronalfy@gmail.com>\n"
8
+ "POT-Creation-Date: 2014-12-23 17:00-0600\n"
9
  "PO-Revision-Date: \n"
10
  "Last-Translator: Ronald Huereca <ron@ronalfy.com>\n"
11
  "Language-Team: Ronald Huereca <ronalfy@gmail.com>\n"
23
  "X-Generator: Poedit 1.5.3\n"
24
  "X-Poedit-SearchPath-0: .\n"
25
 
26
+ #: class-reorder-admin.php:82 class-reorder-admin.php:360
27
  msgctxt "Plugin Name - Settings Page Title"
28
  msgid "Reorder Posts"
29
  msgstr ""
30
 
31
+ #: class-reorder-admin.php:82
32
  msgctxt "Plugin Name - Menu Item"
33
  msgid "Reorder Posts"
34
  msgstr ""
35
 
36
+ #: class-reorder-admin.php:123
37
  msgid "Sort by:"
38
  msgstr ""
39
 
40
+ #: class-reorder-admin.php:125
41
  msgid "None"
42
  msgstr ""
43
 
44
+ #: class-reorder-admin.php:126
45
  msgid "Menu Order"
46
  msgstr ""
47
 
48
+ #: class-reorder-admin.php:132
49
  msgid "Sort Order:"
50
  msgstr ""
51
 
52
+ #: class-reorder-admin.php:134
53
  msgid "ASC"
54
  msgstr ""
55
 
56
+ #: class-reorder-admin.php:135
57
  msgid "DESC"
58
  msgstr ""
59
 
60
+ #: class-reorder-admin.php:185
61
  msgid ""
62
  "These are advanced options and you should only use these if you know what "
63
  "you are doing. These can overwrite the menu orders of custom queries (using "
65
  "blog posts display."
66
  msgstr ""
67
 
68
+ #: class-reorder-admin.php:201
69
  msgctxt "Plugin settings link on the plugins page"
70
  msgid "Settings"
71
  msgstr ""
72
 
73
+ #: class-reorder-admin.php:251
74
  msgctxt "plugin settings heading"
75
  msgid "Enable Post Types"
76
  msgstr ""
77
 
78
+ #: class-reorder-admin.php:253
79
  msgctxt "plugin settings heading"
80
  msgid "Advanced"
81
  msgstr ""
82
 
83
+ #: class-reorder-admin.php:255
84
  msgid "Post Types"
85
  msgstr ""
86
 
87
+ #: class-reorder-admin.php:255
88
  msgid "Select the post types you would like this plugin enabled for."
89
  msgstr ""
90
 
91
+ #: class-reorder-admin.php:257
92
  msgid "Select the menu order arguments."
93
  msgstr ""
94
 
95
+ #: class-reorder-admin.php:257
96
  msgid "Select the menu order for the post types."
97
  msgstr ""
98
 
99
+ #: class-reorder.php:92 class-reorder.php:96 index.php:95
100
  msgid "Reorder"
101
  msgstr ""
102
 
103
+ #: class-reorder.php:201 class-reorder.php:276
104
  msgid "Expand"
105
  msgstr ""
106
 
107
+ #: class-reorder.php:202
108
  msgid "Collapse"
109
  msgstr ""
110
 
111
+ #: class-reorder.php:383
112
+ msgid "There is nothing to sort at this time"
113
+ msgstr ""
114
+
115
+ #: index.php:84
116
+ msgid "Posts"
117
+ msgstr ""
118
+
119
+ #: index.php:85
120
+ #, php-format
121
+ msgid "Reorder %s"
122
  msgstr ""
readme.txt CHANGED
@@ -1,11 +1,11 @@
1
  === Reorder Posts ===
2
- Contributors: ryanhellyer, metronet, ronalfy
3
- Author URI: https://hellyer.kiwi/
4
  Plugin URL: https://wordpress.org/plugins/metronet-reorder-posts/
5
  Requires at Least: 3.7
6
  Tested up to: 4.1
7
  Tags: reorder, re-order, posts, wordpress, post-type, ajax, admin, hierarchical, menu_order, ordering
8
- Stable tag: 2.0.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -46,7 +46,7 @@ Please feel free to leave a support request here or create an <a href="https://g
46
  <h3>Credits</h3>
47
  This plugin was originally developed for <a href="https://metronet.no/">Metronet AS in Norway</a>.
48
 
49
- The plugin is now independently developed by <a href="https://hellyer.kiwi/">Ryan Hellyer</a> and <a href="http://www.ronalfy.com">Ronald Huereca</a>.
50
 
51
  Banner image courtesy of <a href="https://www.flickr.com/photos/pagedooley">Kevin Dooley</a>.
52
 
@@ -106,6 +106,13 @@ This plugin requires WordPress 3.7 or above. We urge you, however, to always us
106
 
107
  == Changelog ==
108
 
 
 
 
 
 
 
 
109
  = 2.0.0 =
110
  * Released 2014-12-12
111
  * Added settings panel for enabling/disabling the Reorder plugin for post types.
@@ -148,5 +155,8 @@ This plugin requires WordPress 3.7 or above. We urge you, however, to always us
148
 
149
  == Upgrade Notice ==
150
 
 
 
 
151
  = 2.0.0 =
152
  New admin panel settings for setting Reorder for post types, and advanced options for modifying the menu order of post type queries.
1
  === Reorder Posts ===
2
+ Contributors: ryanhellyer, metronet, ronalfy, scottbasgaard
3
+ Author URI: https://github.com/ronalfy/reorder-posts
4
  Plugin URL: https://wordpress.org/plugins/metronet-reorder-posts/
5
  Requires at Least: 3.7
6
  Tested up to: 4.1
7
  Tags: reorder, re-order, posts, wordpress, post-type, ajax, admin, hierarchical, menu_order, ordering
8
+ Stable tag: 2.0.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
46
  <h3>Credits</h3>
47
  This plugin was originally developed for <a href="https://metronet.no/">Metronet AS in Norway</a>.
48
 
49
+ The plugin is now independently developed by <a href="https://geek.hellyer.kiwi/">Ryan Hellyer</a>, <a href="http://www.ronalfy.com">Ronald Huereca</a> and <a href="http://scottbasgaard.com/">Scott Basgaard</a>.
50
 
51
  Banner image courtesy of <a href="https://www.flickr.com/photos/pagedooley">Kevin Dooley</a>.
52
 
106
 
107
  == Changelog ==
108
 
109
+ = 2.0.1 =
110
+ * Altered contributor documentation.
111
+ * Adding filters for determining where the Reorder sub-menu will show up.
112
+ * Sub-menu headings now reflect the post type that is being re-ordered.
113
+ * Fixed bug in display when there are no post types to re-order.
114
+ * Changed class names to be more unique.
115
+
116
  = 2.0.0 =
117
  * Released 2014-12-12
118
  * Added settings panel for enabling/disabling the Reorder plugin for post types.
155
 
156
  == Upgrade Notice ==
157
 
158
+ = 2.0.1 =
159
+ Filter additions, and several bug fixes.
160
+
161
  = 2.0.0 =
162
  New admin panel settings for setting Reorder for post types, and advanced options for modifying the menu order of post type queries.