-
AuthorPosts
-
December 9, 2014 at 12:18 am #365065
I’ve been looking for some filter or option that would let me disable the Install Plugins option under Appearance. Or possible let me add/remove plugins from it. The best I can come up with to disable it is putting the following in functions.php.
// disable Appearance > Install Plugins class TGM_Plugin_Activation { public function init() { } }
Since the class uses class_exists() to check if another class exists, it won’t instantiate itself when it finds another class with the same name already exists. Is there a better way to do this?
And is there a way to add/remove plugins from this feature?
December 9, 2014 at 7:23 am #365198Hey Kevin!
Thank you for using Enfold.
Maybe, this plugin will help: https://wordpress.org/plugins/admin-menu-editor/
Best regards,
IsmaelDecember 9, 2014 at 7:32 am #365208Thanks Ismael. I get that I could just remove the menu item. I was hoping for a more elegant way to disable it entirely than the way I came up with. It sounds like you’re also saying there’s no way to delete the plugin from the list. Is that right?
Thanks!
December 10, 2014 at 2:42 am #365784Hey!
Please refer to this link: http://codex.wordpress.org/Function_Reference/remove_menu_page
Best regards,
IsmaelDecember 11, 2014 at 3:48 pm #366703Hey, Ismael. I feel like maybe I’m not asking my question well and that’s why I’m not getting a definitive “yes or no” answer to my questions. I understand how to edit the various admin menu but that doesn’t address my issue.
1) Can I disable (that is, cause the code not to run) the code that adds the Install Plugins option under the Appearances menu? I’m not looking to simply remove the item from the menu after the fact.
2) If I cannot disable it, can I remove BB Press from the list of plugins that the system is encouraging the user to load? Again, I don’t mean that I want to just remove it from the menu. I want to instruct the underlying plugin loader to not suggest this plugin.
Does that make sense?
P.S. For whatever reason, I do not receive email updates for my forum posts even though I have the “Notify me” box checked. I have checked my spam filter and there are no notices there. If it makes a difference, I host email on Google Apps.
December 12, 2014 at 12:09 am #367045Hey!
As far as I know your code should be fine. It might cause issues with other plugins maybe. Another way to do it would be this.
add_action( 'init', 'enfold_customization_remove_TGM' ); function enfold_customization_remove_TGM() { remove_action( 'tgmpa_register', 'avia_register_required_plugins' ); }
If you want to change the plugins then the code your looking for is in /enfold/includes/admin/register-plugins.php.
Regards,
Elliott- This reply was modified 10 years ago by Elliott.
March 10, 2015 at 1:39 am #408565Just had this issue and adding your code to functions.php in my child-theme did the trick.
Excellent support information, thanx! :) -
AuthorPosts
- The topic ‘Disable Appearance > Install Plugins’ is closed to new replies.