Add Custom Post type menu to another menu in specific location

Fixed and here’s how, please excuse the unedited cut and paste, thanks to @mmm for the pointers on how:

  1. Add Custom Post Type via Action

    add_action(‘init’, array($this, ‘mactrak_custom_post_type_add’));

  2. Above function as called (mactrak_custom_post_type_add) includes argument to set up meta box and menu position

  3. Following construct:

    add_action(‘admin_menu’, array(&$this,’mactrak_admin_menu’));

  4. runs following script:

    add_menu_page( ‘MacTrak – the WP FindMeSpot Interface’, ‘MacTrak’, ‘edit_posts’, ‘wp_mactrak_admin_menu’, array($this,’mactrak_admin_main’),’dashicons-location-alt’, 30);

    $customMarkerTemp = array_pop($GLOBALS[‘submenu’][‘wp_mactrak_admin_menu’]); // Remove Custom Marker Item from Sub menu

    add_submenu_page( ‘wp_mactrak_admin_menu’, ‘MacTrak – the WP FindMeSpot Interface’, ‘My Tracker Map’, ‘edit_posts’, ‘wp_mactrak_admin_menu’, array($this,’mactrak_admin_main’));
    add_submenu_page( ‘wp_mactrak_admin_menu’, ‘MacTrak – FindMeSpot Data’, ‘FindMeSpot Data’, ‘edit_posts’, ‘wp_mactrak_admin_fmsdata’, array($this,’mactrak_admin_fmsdata’));
    add_submenu_page( ‘wp_mactrak_admin_menu’, ‘MacTrak – Custom Flight Lines’, ‘Custom Flight Lines’, ‘edit_posts’, ‘wp_mactrak_admin_customlines’, array($this,’mactrak_admin_customlines’));
    $GLOBALS[‘submenu’][‘wp_mactrak_admin_menu’][] = $customMarkerTemp; // Reinsert Custom Markers item in order
    add_submenu_page( ‘wp_mactrak_admin_menu’, ‘MacTrak – Current Location’, ‘Current Location’, ‘edit_posts’, ‘wp_mactrak_admin_currentloc’, array($this,’mactrak_admin_currentloc’));
    add_submenu_page( ‘wp_mactrak_admin_menu’, ‘MacTrak – Settings’, ‘Settings’, ‘edit_pages’, ‘wp_mactrak_admin_settings’, array($this,’mactrak_admin_settings’));