If your theme or plugin no longer needs TGM Plugin Activation (TGMPA) support, then these are the steps you need to take to remove TGMPA. Some initiative may be needed depending on how the theme or plugin author has added it in, and it is assumed you are comfortable editing PHP files / FTP as needed.
- Find and delete the plugin registration function. It will look something like:
123456789101112131415161718192021222324<span class="cp"><?php</span><span class="sd">/*** Required and Recommended Plugins*/</span><span class="k">function</span> <span class="nf">prefix_register_plugins</span><span class="p">()</span> <span class="p">{</span><span class="sd">/*** Array of plugin arrays. Required keys are name and slug.* If the source is NOT from the .org repo, then source is also required.*/</span><span class="nv">$plugins</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span><span class="c1">// WordPress SEO</span> <span class="k">array</span><span class="p">(</span><span class="s1">'name'</span> <span class="o">=></span> <span class="s1">'WordPress SEO by Yoast'</span><span class="p">,</span><span class="s1">'slug'</span> <span class="o">=></span> <span class="s1">'wordpress-seo'</span><span class="p">,</span><span class="s1">'required'</span> <span class="o">=></span> <span class="kc">false</span><span class="p">,</span><span class="p">),</span><span class="o">...</span><span class="p">);</span><span class="nx">tgmpa</span><span class="p">(</span> <span class="nv">$plugins</span> <span class="p">);</span><span class="p">}</span><span class="nx">add_action</span><span class="p">(</span> <span class="s1">'tgmpa_register'</span><span class="p">,</span> <span class="s1">'prefix_register_plugins'</span> <span class="p">);</span>There should only be one instance of
tgmpa(
ortgmpa_register
in your theme or plugin (other than the TGMPA class file), so search for that. The registration function may be with other code infunctions.php
,init.php
or a separate file such asinclude/tgmpa.php
or other file. - Find and delete the
require_once()
call that references the TGMPA class file:
12345<span class="cp"><?php</span><span class="sd">/*** Include the TGM_Plugin_Activation class.*/</span><span class="k">require_once</span> <span class="nb">dirname</span><span class="p">(</span> <span class="k">__FILE__</span> <span class="p">)</span> <span class="o">.</span> <span class="s1">'/class-tgm-plugin-activation.php'</span><span class="p">;</span>The file name is almost certainly unique, so search your theme or plugin for that. The theme or plugin author may have used
require
,include
orinclude_once
instead ofrequire_once
, and they may have added extra( )
around the file path. - Find and delete the TGMPA class file. Since the class file is no longer referenced, the whole
class-tgm-plugin-activation.php
file (or equivalent if renamed) can be deleted from your theme or plugin.
With the plugins registration, the class file reference, and the class file itself all removed, your theme or plugin will no longer be using TGMPA.
Remove “There is an update available for” From Feedzy
feedzy-rss-feeds-pro/includes/admin/feedzy-rss-feeds-pro-admin.php
Remove or comment
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
/** * Register required plugins default image for Feedzy with PRO version * * @since 1.0.0 * @access public public function register_required_plugins() { if ( ! function_exists( 'tgmpa' ) ) { include_once FEEDZY_PRO_ABSPATH . '/lib/tgmpa/tgm-plugin-activation/class-tgm-plugin-activation.php'; } if ( function_exists( 'tgmpa' ) ) { add_action( 'tgmpa_register', array( $this, 'tgmpa_register' ) ); add_filter( 'tgmpa_notice_action_links', array( $this, 'remove_avada_conflict' ) ); } }*/ |