Localization
// Register Custom Post Type
function register_localization_post_type() {
$labels = array(
'name' => _x( 'Localizations', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Localization', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Localization', 'text_domain' ),
'parent_item_colon' => __( 'Parent Localization:', 'text_domain' ),
'all_items' => __( 'All Localizations', 'text_domain' ),
'view_item' => __( 'View Localization', 'text_domain' ),
'add_new_item' => __( 'Add New Localization', 'text_domain' ),
'add_new' => __( 'Add New', 'text_domain' ),
'edit_item' => __( 'Edit Localization', 'text_domain' ),
'update_item' => __( 'Update Localization', 'text_domain' ),
'search_items' => __( 'Search Localization', 'text_domain' ),
'not_found' => __( 'Not found', 'text_domain' ),
'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),
);
$args = array(
'labels' => $labels,
'supports' => array( 'title', 'revisions', ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 20,
'menu_icon' => 'dashicons-translation',
'can_export' => true,
'has_archive' => false,
'exclude_from_search' => true,
'publicly_queryable' => true,
'rewrite' => false,
'capability_type' => 'page',
);
register_post_type( 'localization', $args );
}
// Hook into the 'init' action
add_action( 'init', 'register_localization_post_type', 0 );