This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* MU Loader | |
* | |
* @author Andy Fragen, Colin Stewart | |
* @license MIT | |
* @package mu-plugins | |
*/ | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Auto-Update Enabler | |
* | |
* Decisions, not options. Inspired by Trac ticket #58389 by | |
* Jos Velasco and an offhanded comment on the fedi by Andy | |
* Fragen. | |
* | |
* @package Auto-Update Enabler | |
* @author Jason Cosper <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Allow editors and above to upload whatever they want | |
*/ | |
add_filter( 'map_meta_cap', function( $caps, $cap, $user_id ) { | |
if ( 'unfiltered_upload' !== $cap ) { | |
return $caps; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Function to delete capabilities | |
// http://chrisburbridge.com/delete-unwanted-wordpress-custom-capabilities/ | |
add_action( 'admin_init', 'clean_unwanted_caps' ); | |
function clean_unwanted_caps() { | |
global $wp_roles; | |
$delete_caps = array( | |
'capability1' |