Hi Dave,
You can do that by defining THE_SEO_FRAMEWORK_SETTINGS_CAP before TSF launches. You can do this at wp-config.php, or via a mu-plugin.
For example, for Editor (if that role’s capability is not altered):
define( 'THE_SEO_FRAMEWORK_SETTINGS_CAP', 'edit_pages' );
For roles and capabilities, see this article about… well, roles and capabilities.
We’re not going to add this as a UI-editable option for a multitude of reasons, among security, support and maintenance burden, unwelcome for some webmasters, etc.
-
This reply was modified 4 years, 11 months ago by
Sybre Waaijer. Reason: misprint
Thread Starter
Dave
(@deeve007)
So for the mu-plugin (first I’ve heard of these!) do I just need to create a PHP file with that code in it, and place it in the “wp-content/mu-plugins” directory?
Hi Dave,
Yes, mu-plugins are essentially plugins, but they load before regular plugins and cannot be disabled. Most of WordPress is loaded before mu-plugins are, and so they can read blog IDs, prepare filters and actions, etc.
The main mu-plugin file looks much like a plugin file, such as https://plugins.trac.ww.wp.xz.cn/browser/hello-dolly/trunk/hello.php.
In the case of hello.php, that’d then be located at ../wp-content/mu-plugins/hello.php. You’ll have to create the /mu-plugins/ folder if it doesn’t exist yet.
The key here is that the settings-capability constant must be defined before The SEO Framework loads; it is why I recommended using a mu-plugin or wp-config.php.
-
This reply was modified 4 years, 11 months ago by
Sybre Waaijer. Reason: Clarity