TGMPA / TGM-Plugin-Activation

TGM Plugin Activation is a PHP library that allows you to easily require or recommend plugins for your WordPress themes (and plugins). It allows your users to install, update and even automatically activate plugins in singular or bulk fashion using native WordPress classes, functions and interfaces. You can reference bundled plugins, plugins from the WordPress Plugin Repository or even plugins hosted elsewhere on the internet.
http://tgmpluginactivation.com/
GNU General Public License v2.0
1.76k stars 429 forks source link

Parent menu slug does not work in $config #672

Closed rinkuyadav999 closed 7 years ago

rinkuyadav999 commented 7 years ago

Hi

I have downloaded class-tgm-plugin-activation for theme and it adds link under themes.php perfectly using config:

$config = array( 'id' => 'mytheme', 'default_path' => '', 'menu' => 'mytheme-install-plugins', 'has_notices' => true, 'dismissable' => true, 'dismiss_msg' => '', 'is_automatic' => false, 'message' => '', );

But i want to display link under plugins.php instead themes.php so i added 'parent_slug' => 'plugins.php', 'capability' => 'manage_options' But it keeps link under themes.php. Expecting sub menu of plugins.php

jrfnl commented 7 years ago

Hi @rinkuyadav999, to help you I need a little more information. Could you answer the following questions ?

rinkuyadav999 commented 7 years ago

Hi @jrfnl

Everything works fine, just i want to display link of 'install plugin' under plugins.php instead themes.php

jrfnl commented 7 years ago

Hi @rinkuyadav999,

Did you choose "WordPress.org" or "ThemeForest" as the publication channel for the theme when you downloaded ? If so, that's the reason.

The theme review rules for themes which are to be published in the WP theme repository (same goes for ThemeForest) do not allow for themes to add an admin page anywhere but under the "Themes" menu, so that functionality gets disabled for the WP version generated by the Custom TGMPA Generator. If you don't intend to publish the theme in the WP theme repository or via ThemeForest, just choose "other publication channel" in the form and you'll receive a full featured version of TGMPA ;-)

For more information about the different versions generated by the Custom TGMPA Generator, see #519.

Does that solve your issue ?

rinkuyadav999 commented 7 years ago

Yes it is TRT cap :(