isadminloggedin() has been replaced by elgg_is_admin_logged_in()
There are two things to do:
1. Get rid of the button
2. Restrict the edit form to admins (your users could still access the edit form even though there is no button)
1. The button in the blog plugin is registered using:
elgg_register_title_button();
which in turn creates a "title:add" menu item.
You should be able to use elgg_unregister_menu_item('title', 'add') in a specific context = 'blog'. If that doesn't work, create a custom plugin hook handler for 'register', 'menu:title' and return an empty array if the logged in user is not an admin.
2. You an extend the view 'forms/blog/save' with another view with a low priority, e.g.
elgg_extend_view('forms/blog/save', 'my/view/before/the/blog/form', 1);
Prirority of 1 will put your view before the form view. In your custom view, you can put something like admin_gatekeeper(); or if (!elgg_is_admin_logged_in()) forward();
Thank you so much! That put me on the right track and looking the right areas to accomplish what I needed.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.