Changeset 10202 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/inc/post-type.php
- Timestamp:
- 08/25/2020 12:15:55 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/inc/post-type.php
r10169 r10202 1 1 <?php 2 2 3 namespace WPOrg_Learn\Post_Type s;3 namespace WPOrg_Learn\Post_Type; 4 4 5 5 defined( 'WPINC' ) || die(); … … 9 9 */ 10 10 function register() { 11 register_lesson_plan(); 11 12 register_workshop(); 13 } 14 15 /** 16 * Register a Lesson Plan post type. 17 */ 18 function register_lesson_plan() { 19 $labels = array( 20 'name' => _x( 'Lesson Plans', 'Post Type General Name', 'wporg_learn' ), 21 'singular_name' => _x( 'Lesson Plan', 'Post Type Singular Name', 'wporg_learn' ), 22 'menu_name' => __( 'Lesson Plans', 'wporg_learn' ), 23 'name_admin_bar' => __( 'Lesson Plan', 'wporg_learn' ), 24 'archives' => __( 'Lesson Archives', 'wporg_learn' ), 25 'attributes' => __( 'Lesson Attributes', 'wporg_learn' ), 26 'parent_item_colon' => __( 'Parent Lesson:', 'wporg_learn' ), 27 'all_items' => __( 'All Lessons', 'wporg_learn' ), 28 'add_new_item' => __( 'Add New Lesson', 'wporg_learn' ), 29 'add_new' => __( 'Add New', 'wporg_learn' ), 30 'new_item' => __( 'New Lesson Plan', 'wporg_learn' ), 31 'edit_item' => __( 'Edit Lesson Plan', 'wporg_learn' ), 32 'update_item' => __( 'Update Lesson Plan', 'wporg_learn' ), 33 'view_item' => __( 'View Lesson', 'wporg_learn' ), 34 'view_items' => __( 'View Lessons', 'wporg_learn' ), 35 'search_items' => __( 'Search Lesson', 'wporg_learn' ), 36 'not_found' => __( 'Not found', 'wporg_learn' ), 37 'not_found_in_trash' => __( 'Not found in Trash', 'wporg_learn' ), 38 'featured_image' => __( 'Featured Image', 'wporg_learn' ), 39 'set_featured_image' => __( 'Set featured image', 'wporg_learn' ), 40 'remove_featured_image' => __( 'Remove featured image', 'wporg_learn' ), 41 'use_featured_image' => __( 'Use as featured image', 'wporg_learn' ), 42 'insert_into_item' => __( 'Insert into lesson', 'wporg_learn' ), 43 'uploaded_to_this_item' => __( 'Uploaded to this lesson', 'wporg_learn' ), 44 'items_list' => __( 'Lessons list', 'wporg_learn' ), 45 'items_list_navigation' => __( 'Lessons list navigation', 'wporg_learn' ), 46 'filter_items_list' => __( 'Filter Lessons list', 'wporg_learn' ), 47 ); 48 49 $args = array( 50 'label' => __( 'Lesson Plan', 'wporg_learn' ), 51 'description' => __( 'WordPress.org Training Lesson Plan', 'wporg_learn' ), 52 'labels' => $labels, 53 'supports' => array( 'title', 'editor', 'comments', 'revisions', 'custom-fields' ), 54 'taxonomies' => array( 'duration', 'level', 'audience', 'instruction_type' ), 55 'hierarchical' => true, 56 'public' => true, 57 'show_ui' => true, 58 'show_in_menu' => true, 59 'menu_position' => 5, 60 'menu_icon' => 'dashicons-welcome-learn-more', 61 'show_in_admin_bar' => true, 62 'show_in_nav_menus' => true, 63 'can_export' => true, 64 'has_archive' => 'lesson-plans', 65 'exclude_from_search' => false, 66 'publicly_queryable' => true, 67 'capability_type' => 'page', 68 'show_in_rest' => true, 69 ); 70 71 register_post_type( 'lesson-plan', $args ); 12 72 } 13 73
Note: See TracChangeset
for help on using the changeset viewer.