[wp-trac] [WordPress Trac] #38672: Custom CSS should work with existing Jetpack custom CSS

WordPress Trac noreply at wordpress.org
Mon Nov 7 22:10:48 UTC 2016


#38672: Custom CSS should work with existing Jetpack custom CSS
-----------------------------+------------------
 Reporter:  helen            |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  highest omg bbq  |   Milestone:  4.7
Component:  Customize        |     Version:
 Severity:  blocker          |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------

Comment (by westonruter):

 Re: [attachment:38672.diff] should `edit_css` map to `unfiltered_html`
 according to the same rules as how `unfiltered_html` maps? In other words,
 should `DISALLOW_UNFILTERED_HTML` still be considered or whether it is
 multisite and the user is a superadmin? It seems the mapping could also be
 done as:

 {{{#!diff
 --- src/wp-includes/capabilities.php
 +++ src/wp-includes/capabilities.php
 @@ -320,7 +320,9 @@ function map_meta_cap( $cap, $user_id ) {
                 else
                         $caps[] = 'do_not_allow';
                 break;
 -       case 'unfiltered_css' :
 +       case 'edit_css' :
 +               $caps[] = 'unfiltered_html';
 +               break;
         case 'unfiltered_html' :
                 // Disallow unfiltered_html for all users, even admins and
 super admins.
                 if ( defined( 'DISALLOW_UNFILTERED_HTML' ) &&
 DISALLOW_UNFILTERED_HTML )
 }}}

 Or should it map to `unfiltered_css`, a brand new primitive capability? Or
 should we re-use the `unfiltered_html` primitive?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38672#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list