mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Customize: Rename unfiltered_css
meta capability to edit_css
; add revisions
support to custom_css
post type.
Props lukecavanagh, georgestephanis, westonruter. See #38672, #35395. Built from https://develop.svn.wordpress.org/trunk@39175 git-svn-id: http://core.svn.wordpress.org/trunk@39115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cf786e592c
commit
08712b4baa
@ -320,7 +320,7 @@ function map_meta_cap( $cap, $user_id ) {
|
||||
else
|
||||
$caps[] = 'do_not_allow';
|
||||
break;
|
||||
case 'unfiltered_css' :
|
||||
case 'edit_css' :
|
||||
case 'unfiltered_html' :
|
||||
// Disallow unfiltered_html for all users, even admins and super admins.
|
||||
if ( defined( 'DISALLOW_UNFILTERED_HTML' ) && DISALLOW_UNFILTERED_HTML )
|
||||
|
@ -3598,7 +3598,7 @@ final class WP_Customize_Manager {
|
||||
) );
|
||||
|
||||
$custom_css_setting = new WP_Customize_Custom_CSS_Setting( $this, sprintf( 'custom_css[%s]', get_stylesheet() ), array(
|
||||
'capability' => 'unfiltered_css',
|
||||
'capability' => 'edit_css',
|
||||
'default' => sprintf( "/*\n%s\n*/", __( "You can add your own CSS here.\n\nClick the help icon above to learn more." ) ),
|
||||
) );
|
||||
$this->add_setting( $custom_css_setting );
|
||||
|
@ -46,7 +46,7 @@ final class WP_Customize_Custom_CSS_Setting extends WP_Customize_Setting {
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $capability = 'unfiltered_css';
|
||||
public $capability = 'edit_css';
|
||||
|
||||
/**
|
||||
* Stylesheet
|
||||
|
@ -133,17 +133,17 @@ function create_initial_post_types() {
|
||||
'delete_with_user' => false,
|
||||
'can_export' => true,
|
||||
'_builtin' => true, /* internal use only. don't use this when registering your own post type. */
|
||||
'supports' => array( 'title' ),
|
||||
'supports' => array( 'title', 'revisions' ),
|
||||
'capabilities' => array(
|
||||
'delete_posts' => 'edit_theme_options',
|
||||
'delete_post' => 'edit_theme_options',
|
||||
'delete_published_posts' => 'edit_theme_options',
|
||||
'delete_private_posts' => 'edit_theme_options',
|
||||
'delete_others_posts' => 'edit_theme_options',
|
||||
'edit_post' => 'unfiltered_css',
|
||||
'edit_posts' => 'unfiltered_css',
|
||||
'edit_others_posts' => 'unfiltered_css',
|
||||
'edit_published_posts' => 'unfiltered_css',
|
||||
'edit_post' => 'edit_css',
|
||||
'edit_posts' => 'edit_css',
|
||||
'edit_others_posts' => 'edit_css',
|
||||
'edit_published_posts' => 'edit_css',
|
||||
'read_post' => 'read',
|
||||
'read_private_posts' => 'read',
|
||||
'publish_posts' => 'edit_theme_options',
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-beta2-39174';
|
||||
$wp_version = '4.7-beta2-39175';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user