Forum

 

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 3 characters - maximum search word length is 84 characters

Topic RSS
Remove Sermons button from Subscriber in wp-admin
26 September, 2009
11:27 am
bcarter
New Member
Forum Posts: 2
Member Since:
26 September, 2009
Offline

Right now when a subscriber logs into my site to view or update their profile, they can see the "Sermons" button on the left navigation menu along with the help submenu. Is it possible to change the permissions so that this button does NOT show to subscribers?

If you can give me the code to change, I can edit the php file. Thanks.

29 September, 2009
12:47 am
Mark Barnes
Admin
Forum Posts: 425
Member Since:
14 December, 2005
Offline

The code you need is in the sb_add_pages function in sermon.php (around line 291).

The fourth parameter of add_submenu_page describes the level of permissions required to show the menu. You'll see the help menu is set to 'read'. It would perhaps be more logical for it to be 'edit_posts', which is essentially 'Contributor'.

10 November, 2009
2:57 pm
markp
Member
Forum Posts: 6
Member Since:
13 August, 2009
Offline

Hi Mark
Is this really resolved? I see in the current version that it is set to edit_posts but a contributor and subscriber can still see the button and delete sermons.
Thanks
Mark

20 November, 2009
2:49 pm
markp
Member
Forum Posts: 6
Member Since:
13 August, 2009
Offline

Anyone else still see this problem?

10 February, 2011
11:12 pm
gracechurch
Member
Forum Posts: 3
Member Since:
29 January, 2011
Offline

Markp,

I'm sure that you have already figured it out, but I thought that I would post what I ended up doing for those who are still working on it.

This may not be a fix for everyone, but it worked for me.

/**
* Add Sermons menu and sub-menus in admin
*/
function sb_add_pages() {
global $sermon_domain;
add_menu_page(__('Sermons', $sermon_domain), __('Sermons', $sermon_domain), 'publish_posts', __FILE__, 'sb_manage_sermons', SB_PLUGIN_URL.'/sb-includes/sb-icon.png');

I changed the bolded section to publish_posts instead of edit_posts. This enabled an Author or above to work with the sermon plug-in but not the contributor or subscriber.

I hope this helps and doesn't mess up anything for others.

Nick

EDIT: This did not remove the Sermon menu from the side menu, but it did remove the permissions to edit/view/delete sermons.

Forum Timezone: Europe/London

Most Users Ever Online: 40

Currently Online: 0be1
14 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

malpan - 2453

jogen - 2440

VanWatterson - 652

GeraldSebring - 364

LucasWoltman - 362

RandellFeenstra - 362

Member Stats:

There have been 7 guest posters

There are 1936 members

There are 1 moderators

There are 1 admins

Forum Stats:

Groups: 1

Forums: 2

Topics: 971

Posts: 3747

Newest Members: twinton, ellison13579, Daigh, mchunful, jesua, LGRG Design

Moderators: Ben Miller (383 )

Administrators: Mark Barnes (425)

 

Comments are closed.