[wp-trac] [WordPress Trac] #40285: Themes in the Theme Directory should be required to use TGM-Plugin-Activation version of at least 2.6.1

WordPress Trac noreply at wordpress.org
Tue Mar 28 15:13:31 UTC 2017


#40285: Themes in the Theme Directory should be required to use TGM-Plugin-
Activation version of at least 2.6.1
--------------------------+------------------------------
 Reporter:  beeneeb       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Themes        |     Version:  4.7.3
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by jrf):

 Hi @beeneeb,

 Just to clarify: this is not an issue with the TGMPA **version** being
 used, there is no conflict between TGMPA 2.4.1+ and higher versions.

 This is a "typo" - or rather, search and replace error - made by the theme
 author who has manually adjusted the code in the TGMPA class.

 Around line 1920, you will find a line that should read:
 `if ( ! function_exists( 'tgmpa' ) ) {`

 but will have been changed to read:
 `if ( ! function_exists( 'theme-slug' ) ) {`

 As they incorrectly changed it, the actual function which is wrapped
 within that if statement is being redefined causing that error.

 Theme authors are advised to download a fresh copy of TGMPA whenever they
 release and/or upgrade a theme using the
 [http://tgmpluginactivation.com/download/ Custom TGMPA Generator]. The
 Custom TGMPA Generator will serve them with a customized download of TGMPA
 which will automagically have done the search & replace for them in the
 correct way which prevents this issue.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40285#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list