WordPress.org

Ready to get started?Download WordPress

Forums

User Role Editor
[resolved] Allow role access to Horizontal scrolling announcement (3 posts)

  1. shawnwyatt
    Member
    Posted 1 year ago #

    Created new role for user, they only get access to create, publish, edit, delete posts. I've also turned off Manage Options (all plugins). I have this plugin installed:

    http://wordpress.org/extend/plugins/horizontal-scrolling-announcement/

    I would like to give this new role the ability to edit this single plugin. Is that possible and if so, how?

    http://wordpress.org/extend/plugins/user-role-editor/

  2. shawnwyatt
    Member
    Posted 1 year ago #

    Never mind, found it. Using the logic that you instructed in another posting of a similar question, I edited horizontal-scrolling-announcement.php file of the plugin (line 302 to 306), from:

    function HSA_add_to_menu()
    {
    	add_options_page('Horizontal scrolling announcement', 'Horizontal Scrolling', 'manage_options', __FILE__, 'HSA_admin_options' );
    	add_options_page('Horizontal scrolling announcement', '', 'manage_options', "horizontal-scrolling-announcement/horizontal-scrolling-setting.php",'' );
    }

    to:

    function HSA_add_to_menu()
    {
    	add_options_page('Horizontal scrolling announcement', 'Horizontal Scrolling', 'publish_posts', __FILE__, 'HSA_admin_options' );
    	add_options_page('Horizontal scrolling announcement', '', 'publish_posts', "horizontal-scrolling-announcement/horizontal-scrolling-setting.php",'' );
    }

    The user role had publish post rights, so it seemed the obvious one to change. Note, I am using the Horizontal scrolling announcment plugin v6.2

  3. gwc_wd
    Member
    Posted 1 year ago #

    If you edit a plugin file directly then if that plugin is updated you lose your changes and your user role fix will have to be reapplied.

    Question: Can this fix be applied in a custom php file in the theme so it sticks through upgrades? Or is there an alternate way of upgrade-proofing user role fixes?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.