Making WordPress.org


Ignore:
Timestamp:
07/15/2022 12:25:33 AM (3 years ago)
Author:
dufresnesteven
Message:

Learn: Sync with git WordPress/learn@cb551b095dd6941eda68c26750e249d907044142

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-learn/inc/post-type.php

    r11269 r11966  
    8484
    8585/**
    86  * Register a Workshop post type.
     86 * Register a Tutorial post type.
    8787 */
    8888function register_workshop() {
    8989    $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'              => __( 'Workshop Archives', 'wporg_learn' ),
    95         'attributes'            => __( 'Workshop Attributes', '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' ),
    9999        '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' ),
    108108        'featured_image'        => __( 'Featured image', 'wporg_learn' ),
    109109        'set_featured_image'    => __( 'Set featured image', 'wporg_learn' ),
    110110        'remove_featured_image' => __( 'Remove featured image', 'wporg_learn' ),
    111111        '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' ),
    117117    );
    118118
     
    129129
    130130    $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' ),
    133133        'labels'              => $labels,
    134134        'supports'            => $supports,
     
    138138        'show_ui'             => true,
    139139        'show_in_menu'        => true,
    140         'has_archive'         => 'workshops',
     140        'has_archive'         => 'tutorials',
    141141        'menu_position'       => 6,
    142142        'menu_icon'           => 'dashicons-desktop',
     
    146146        'exclude_from_search' => false,
    147147        'publicly_queryable'  => true,
    148         'capability_type'     => array( 'workshop', 'workshops' ),
     148        'capability_type'     => array( 'tutorial', 'tutorials' ),
    149149        'map_meta_cap'        => true,
    150150        'show_in_rest'        => true,
    151         'rewrite'             => array( 'slug' => 'workshop' ),
     151        'rewrite'             => array( 'slug' => 'tutorial' ),
    152152        'template'            => generate_workshop_template_structure(),
    153153    );
     
    170170            'core/paragraph',
    171171            array(
    172                 'placeholder' => __( 'Describe what the workshop is about.', 'wporg-learn' ),
     172                'placeholder' => __( 'Describe what the tutorial is about.', 'wporg-learn' ),
    173173            ),
    174174        ),
Note: See TracChangeset for help on using the changeset viewer.