• Hello Alex,

    I’ve tried your snippet to change capabilities for the tools menu:

    add_filter(
    	'regenerate_thumbs_cap', function() {
    		// See https://codex.www.ads-software.com/Roles_and_Capabilities
    		return 'upload_files';
    	}
    );

    The snippets works perfectly, if I add it directly to the regenerate_thumbnails.php, but refuses to work when added to the functions.php of a theme. I also tried to wrap it in a function rt_capabilities() and add_action( 'after_setup_theme', 'rt_capabilities' );, but to no avail.

    What do I miss?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can’t change capabilities’ is closed to new replies.