Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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?

    #365198

    Hey Kevin!

    Thank you for using Enfold.

    Maybe, this plugin will help: https://wordpress.org/plugins/admin-menu-editor/

    Best regards,
    Ismael

    #365208

    Thanks 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!

    #365784

    Hey!

    Please refer to this link: http://codex.wordpress.org/Function_Reference/remove_menu_page

    Best regards,
    Ismael

    #366703

    Hey, 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.

    #367045

    Hey!

    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 9 years, 11 months ago by Elliott.
    #408565

    Just had this issue and adding your code to functions.php in my child-theme did the trick.
    Excellent support information, thanx! :)

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Disable Appearance > Install Plugins’ is closed to new replies.