Q:

Wordpress custom post type return 'post'

I'm developing a plugin for wordpress website using new custom post type. But when i'm using built-in function from wordpress to get post type name (get_post_type()) it's return "post" instead "destinations". Can anybody help me with this?
Here the code for register the post type:
// Register Custom Post Type
function paradises_destinations_install() 
{

    $labels = array(
        'name'                => _x( 'Destinations', 'Destinations', 'paradises' ),
        'singular_name'       => _x( 'Destination', 'Destination', 'paradises' ),
        'menu_name'           => __( 'Destination', 'paradises' ),
        'parent_item_colon'   => __( 'Parent Destionation', 'paradises' ),
        'all_items'           => __( 'All Destinations', 'paradises' ),
        'view_item'           => __( 'View Destination', 'paradises' ),
        'add_new_item'        => __( 'Add New Destination', 'paradises' ),
        'add_new'             => __( 'New Destination', 'paradises' ),
        'edit_item'           => __( 'Edit Destination', 'paradises' ),
        'update_item'         => __( 'Update Destination', 'paradises' ),
        'search_items'        => __( 'Search destinations', 'paradises' ),
        'not_found'           => __( 'No destinations found', 'paradises' ),
        'not_found_in_trash'  => __( 'No destinations found in Trash', 'paradises' ),
    );

    $args = array(
        'label'               => __( 'destinations', 'paradises' ),
        'description'         => __( 'Destination', 'paradises' ),
        'labels'              => $labels,
        'supports'            => array('title','editor','thumbnail'),
        'taxonomies'          => array('region'),
        'hierarchical'        => false,
        'public'              => true,
        'show_ui'             => true,
        'show_in_menu'        => true,
        'show_in_nav_menus'   => true,
        'show_in_admin_bar'   => true,
        'menu_position'       => 100,
        'menu_icon'           => '',
        'can_export'          => true,
        'has_archive'         => true,
        'exclude_from_search' => false,
        'publicly_queryable'  => true,
        'capability_type'     => 'post',
    );
    register_post_type('destinations', $args );

}

// Hook into the 'init' action
add_action( 'init', 'paradises_destinations_install', 0 );

A:

get_post_type() function is to get post type of specific post. So, you need to pass argument as post id or a post object to get type of specific post. If you use it without argument it will print default post type which is 'post'.

