WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/18/2016 08:04:36 PM (5 years ago)
Author:
westonruter
Message:

Customize: Implement customized state persistence with changesets.

Includes infrastructure developed in the Customize Snapshots feature plugin.

See https://make.wordpress.org/core/2016/10/12/customize-changesets-technical-design-decisions/

Props westonruter, valendesigns, utkarshpatel, stubgo, lgedeon, ocean90, ryankienstra, mihai2u, dlh, aaroncampbell, jonathanbardo, jorbin.
See #28721.
See #31089.
Fixes #30937.
Fixes #31517.
Fixes #30028.
Fixes #23225.
Fixes #34142.
Fixes #36485.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r38798 r38810  
    110110        'delete_with_user' => false,
    111111        'query_var' => false,
     112    ) );
     113
     114    register_post_type( 'customize_changeset', array(
     115        'labels' => array(
     116            'name'               => _x( 'Changesets', 'post type general name' ),
     117            'singular_name'      => _x( 'Changeset', 'post type singular name' ),
     118            'menu_name'          => _x( 'Changesets', 'admin menu' ),
     119            'name_admin_bar'     => _x( 'Changeset', 'add new on admin bar' ),
     120            'add_new'            => _x( 'Add New', 'Customize Changeset' ),
     121            'add_new_item'       => __( 'Add New Changeset' ),
     122            'new_item'           => __( 'New Changeset' ),
     123            'edit_item'          => __( 'Edit Changeset' ),
     124            'view_item'          => __( 'View Changeset' ),
     125            'all_items'          => __( 'All Changesets' ),
     126            'search_items'       => __( 'Search Changesets' ),
     127            'not_found'          => __( 'No changesets found.' ),
     128            'not_found_in_trash' => __( 'No changesets found in Trash.' ),
     129        ),
     130        'public' => false,
     131        '_builtin' => true, /* internal use only. don't use this when registering your own post type. */
     132        'map_meta_cap' => true,
     133        'hierarchical' => false,
     134        'rewrite' => false,
     135        'query_var' => false,
     136        'can_export' => false,
     137        'delete_with_user' => false,
     138        'supports' => array( 'title', 'author' ),
     139        'capability_type' => 'customize_changeset',
     140        'capabilities' => array(
     141            'create_posts' => 'customize',
     142            'delete_others_posts' => 'customize',
     143            'delete_post' => 'customize',
     144            'delete_posts' => 'customize',
     145            'delete_private_posts' => 'customize',
     146            'delete_published_posts' => 'customize',
     147            'edit_others_posts' => 'customize',
     148            'edit_post' => 'customize',
     149            'edit_posts' => 'customize',
     150            'edit_private_posts' => 'customize',
     151            'edit_published_posts' => 'do_not_allow',
     152            'publish_posts' => 'customize',
     153            'read' => 'read',
     154            'read_post' => 'customize',
     155            'read_private_posts' => 'customize',
     156        ),
    112157    ) );
    113158
Note: See TracChangeset for help on using the changeset viewer.