Add filter to allow non administrator users to manage form
-
Dear team,
Other plugins, like Gravity Forms, Yoast SEO and Custom Twitter Feeds, have filters that allow non administrator users to view/manage pages from the WordPress back end.
The MailerLite Sign-Up Forms plugin does not seem to support this currently. Several of my clients (who have Editor users) would like to be able to edit the MailerLite forms and settings.
Would it be possible to add a filter to the plugin (and documentation) to support this?
Example of how this can be used in a theme’s
functions.php
for the plugins mentioned above:function exampletheme_extra_editor_capabilities() { $role = get_role( 'editor' ); // Gravity Forms $role->add_cap( 'gform_full_access' ); // Yoast SEO $role->add_cap( 'wpseo_manage_options' ); } add_action( 'admin_init', 'exampletheme_extra_editor_capabilities');
The plugins then user the WordPress function
current_user_can()
to check if the code should be applied to the current user. For example:$has_full_access = current_user_can( 'gform_full_access' );
- The topic ‘Add filter to allow non administrator users to manage form’ is closed to new replies.