I notice a lot of themes passing the ‘e…


I notice a lot of themes passing the ‘edit_themes’ capabilitycapability capability is permission to perform one or more types of task. Checking if a user has a capability is performed by the current_user_can function. Each user of a WordPress site might have some permissions but not others, depending on their role. For example, users who have the Author role usually have permission to edit their own posts (the “edit_posts” capability), but not permission to edit other users’ posts (the “edit_others_posts” capability). when registering their options pages with add_theme_page(). On multisitemultisite Used to describe a WordPress installation with a network of multiple blogs, grouped by sites. This installation type has shared users tables, and creates separate database tables for each blog (wp_posts becomes wp_0_posts). See also network, blog, site installs edit_themes is reserved for super admins (and if a site defines DISALLOW_FILE_MODS then not even super admins will have it). If you want regular admins to be able to see the options page, which you probably do, you need to use ‘switch_themes’ instead of ‘edit_themes’. Perhaps we need an ‘edit_theme_options’ type cap if we want to be discreet from switch_themes.