Changeset 11966 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/inc/post-type.php
- Timestamp:
- 07/15/2022 12:25:33 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/inc/post-type.php
r11269 r11966 84 84 85 85 /** 86 * Register a Workshoppost type.86 * Register a Tutorial post type. 87 87 */ 88 88 function register_workshop() { 89 89 $labels = array( 90 'name' => _x( ' Workshops', 'Post Type General Name', 'wporg_learn' ),91 'singular_name' => _x( ' Workshop', 'Post Type Singular Name', 'wporg_learn' ),92 'menu_name' => __( ' Workshops', 'wporg_learn' ),93 'name_admin_bar' => __( ' Workshop', 'wporg_learn' ),94 'archives' => __( ' WorkshopArchives', 'wporg_learn' ),95 'attributes' => __( ' WorkshopAttributes', 'wporg_learn' ),96 'parent_item_colon' => __( 'Parent Workshop:', 'wporg_learn' ),97 'all_items' => __( 'All Workshops', 'wporg_learn' ),98 'add_new_item' => __( 'Add New Workshop', 'wporg_learn' ),90 'name' => _x( 'Tutorials', 'Post Type General Name', 'wporg_learn' ), 91 'singular_name' => _x( 'Tutorial', 'Post Type Singular Name', 'wporg_learn' ), 92 'menu_name' => __( 'Tutorials', 'wporg_learn' ), 93 'name_admin_bar' => __( 'Tutorial', 'wporg_learn' ), 94 'archives' => __( 'Tutorial Archives', 'wporg_learn' ), 95 'attributes' => __( 'Tutorial Attributes', 'wporg_learn' ), 96 'parent_item_colon' => __( 'Parent Tutorial:', 'wporg_learn' ), 97 'all_items' => __( 'All Tutorials', 'wporg_learn' ), 98 'add_new_item' => __( 'Add New Tutorial', 'wporg_learn' ), 99 99 'add_new' => __( 'Add New', 'wporg_learn' ), 100 'new_item' => __( 'New Workshop', 'wporg_learn' ),101 'edit_item' => __( 'Edit Workshop', 'wporg_learn' ),102 'update_item' => __( 'Update Workshop', 'wporg_learn' ),103 'view_item' => __( 'View Workshop', 'wporg_learn' ),104 'view_items' => __( 'View Workshops', 'wporg_learn' ),105 'search_items' => __( 'Search Workshops', 'wporg_learn' ),106 'not_found' => __( 'No workshops found.', 'wporg_learn' ),107 'not_found_in_trash' => __( 'No workshops found in Trash.', 'wporg_learn' ),100 'new_item' => __( 'New Tutorial', 'wporg_learn' ), 101 'edit_item' => __( 'Edit Tutorial', 'wporg_learn' ), 102 'update_item' => __( 'Update Tutorial', 'wporg_learn' ), 103 'view_item' => __( 'View Tutorial', 'wporg_learn' ), 104 'view_items' => __( 'View Tutorials', 'wporg_learn' ), 105 'search_items' => __( 'Search Tutorials', 'wporg_learn' ), 106 'not_found' => __( 'No tutorials found.', 'wporg_learn' ), 107 'not_found_in_trash' => __( 'No tutorials found in Trash.', 'wporg_learn' ), 108 108 'featured_image' => __( 'Featured image', 'wporg_learn' ), 109 109 'set_featured_image' => __( 'Set featured image', 'wporg_learn' ), 110 110 'remove_featured_image' => __( 'Remove featured image', 'wporg_learn' ), 111 111 'use_featured_image' => __( 'Use as featured image', 'wporg_learn' ), 112 'insert_into_item' => __( 'Insert into workshop', 'wporg_learn' ),113 'uploaded_to_this_item' => __( 'Uploaded to this workshop', 'wporg_learn' ),114 'items_list' => __( ' Workshops list', 'wporg_learn' ),115 'items_list_navigation' => __( ' Workshops list navigation', 'wporg_learn' ),116 'filter_items_list' => __( 'Filter workshops list', 'wporg_learn' ),112 'insert_into_item' => __( 'Insert into tutorial', 'wporg_learn' ), 113 'uploaded_to_this_item' => __( 'Uploaded to this tutorial', 'wporg_learn' ), 114 'items_list' => __( 'Tutorials list', 'wporg_learn' ), 115 'items_list_navigation' => __( 'Tutorials list navigation', 'wporg_learn' ), 116 'filter_items_list' => __( 'Filter tutorials list', 'wporg_learn' ), 117 117 ); 118 118 … … 129 129 130 130 $args = array( 131 'label' => __( ' Workshop', 'wporg_learn' ),132 'description' => __( 'WordPress.org Training Workshop', 'wporg_learn' ),131 'label' => __( 'Tutorial', 'wporg_learn' ), 132 'description' => __( 'WordPress.org Training Tutorial', 'wporg_learn' ), 133 133 'labels' => $labels, 134 134 'supports' => $supports, … … 138 138 'show_ui' => true, 139 139 'show_in_menu' => true, 140 'has_archive' => ' workshops',140 'has_archive' => 'tutorials', 141 141 'menu_position' => 6, 142 142 'menu_icon' => 'dashicons-desktop', … … 146 146 'exclude_from_search' => false, 147 147 'publicly_queryable' => true, 148 'capability_type' => array( ' workshop', 'workshops' ),148 'capability_type' => array( 'tutorial', 'tutorials' ), 149 149 'map_meta_cap' => true, 150 150 'show_in_rest' => true, 151 'rewrite' => array( 'slug' => ' workshop' ),151 'rewrite' => array( 'slug' => 'tutorial' ), 152 152 'template' => generate_workshop_template_structure(), 153 153 ); … … 170 170 'core/paragraph', 171 171 array( 172 'placeholder' => __( 'Describe what the workshopis about.', 'wporg-learn' ),172 'placeholder' => __( 'Describe what the tutorial is about.', 'wporg-learn' ), 173 173 ), 174 174 ),
Note: See TracChangeset
for help on using the changeset viewer.