@@ 312-317 (lines=6) @@ | ||
309 | $caps = map_meta_cap( 'edit_posts', $user_id ); |
|
310 | } |
|
311 | break; |
|
312 | case 'unfiltered_upload': |
|
313 | if ( defined('ALLOW_UNFILTERED_UPLOADS') && ALLOW_UNFILTERED_UPLOADS && ( !is_multisite() || is_super_admin( $user_id ) ) ) |
|
314 | $caps[] = $cap; |
|
315 | else |
|
316 | $caps[] = 'do_not_allow'; |
|
317 | break; |
|
318 | case 'unfiltered_html' : |
|
319 | // Disallow unfiltered_html for all users, even admins and super admins. |
|
320 | if ( defined( 'DISALLOW_UNFILTERED_HTML' ) && DISALLOW_UNFILTERED_HTML ) |
|
@@ 318-326 (lines=9) @@ | ||
315 | else |
|
316 | $caps[] = 'do_not_allow'; |
|
317 | break; |
|
318 | case 'unfiltered_html' : |
|
319 | // Disallow unfiltered_html for all users, even admins and super admins. |
|
320 | if ( defined( 'DISALLOW_UNFILTERED_HTML' ) && DISALLOW_UNFILTERED_HTML ) |
|
321 | $caps[] = 'do_not_allow'; |
|
322 | elseif ( is_multisite() && ! is_super_admin( $user_id ) ) |
|
323 | $caps[] = 'do_not_allow'; |
|
324 | else |
|
325 | $caps[] = $cap; |
|
326 | break; |
|
327 | case 'edit_files': |
|
328 | case 'edit_plugins': |
|
329 | case 'edit_themes': |