/**
  * Register meta box.
  *
  * By default, the navigation is present for all post types. Filter
  * 'c2c_admin_post_navigation_post_types' to limit its use.
  *
  * @param string  $post_type The post type.
  * @param string  $type      The mode for the meta box (normal, advanced, or side).
  * @param WP_Post $post      The post.
  */
 public static function do_meta_box($post_type, $type, $post)
 {
     $post_types = apply_filters('c2c_admin_post_navigation_post_types', get_post_types());
     if (!in_array($post_type, $post_types)) {
         return;
     }
     $post_statuses = (array) apply_filters('c2c_admin_post_navigation_post_statuses', self::$post_statuses, $post_type, $post);
     if ($post_statuses) {
         foreach ($post_statuses as $i => $v) {
             $GLOBALS['wpdb']->escape_by_ref($v);
             $post_statuses[$i] = $v;
         }
         self::$post_statuses_sql = "'" . implode("', '", $post_statuses) . "'";
     }
     if (in_array($post->post_status, $post_statuses)) {
         add_meta_box('adminpostnav', sprintf(__('%s Navigation', 'admin-post-navigation'), ucfirst($post_type)), array(__CLASS__, 'add_meta_box'), $post_type, 'side', 'core');
     }
 }
 /**
  * Register meta box
  *
  * By default, the navigation is present for all post types.  Filter
  * 'c2c_admin_post_navigation_post_types' to limit its use.
  *
  * @param string $post_type The post type
  * @param string $type The mode for the meta box (normal, advanced, or side)
  * @param WP_Post $post The post
  * @return void
  */
 public static function do_meta_box($post_type, $type, $post)
 {
     $post_types = apply_filters('c2c_admin_post_navigation_post_types', get_post_types());
     if (!in_array($post_type, $post_types)) {
         return;
     }
     $post_statuses = apply_filters('c2c_admin_post_navigation_post_statuses', self::$post_statuses, $post_type, $post);
     self::$post_statuses_sql = "'" . implode("', '", array_map('esc_sql', $post_statuses)) . "'";
     $label = self::_get_post_type_label($post_type);
     if (in_array($post->post_status, $post_statuses)) {
         add_meta_box('adminpostnav', sprintf(__('%s Navigation', 'admin-post-navigation'), ucfirst($post_type)), array(__CLASS__, 'add_meta_box'), $post_type, 'side', 'core');
     }
 }