Skip to content

Commit

Permalink
added 'menu_icon' boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
suomato committed Jul 11, 2018
1 parent 57b2d29 commit df3f2f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/templates/custom-post-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

function custom_post_type_movie()
{
// Set UI labels for Custom Post Type
// Set UI labels for Custom Post Type
$labels = [
'name' => _x('Movies', 'Post Type General Name', 'base-camp'),
'singular_name' => _x('Movie', 'Post Type Singular Name', 'base-camp'),
Expand All @@ -19,7 +19,7 @@ function custom_post_type_movie()
'not_found_in_trash' => __('Not found in Trash', 'base-camp'),
];

// Set other options for Custom Post Type
// Set other options for Custom Post Type
$args = [
'label' => __('movies', 'base-camp'),
'description' => __('Movie', 'base-camp'),
Expand Down Expand Up @@ -48,6 +48,7 @@ function custom_post_type_movie()
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'menu_position' => 5,
'menu_icon' => '', // https://developer.wordpress.org/resource/dashicons
'can_export' => true,
'has_archive' => true,
'exclude_from_search' => false,
Expand All @@ -57,7 +58,6 @@ function custom_post_type_movie()

// Registering your Custom Post Type
register_post_type('movies', $args);

}

add_action('init', 'custom_post_type_movie', 0);

0 comments on commit df3f2f5

Please sign in to comment.