Skip to content

Commit

Permalink
Merge pull request #388 from thomasgriffin/feature/tgmpa-load-filter-…
Browse files Browse the repository at this point in the history
…logic

Document the `tgmpa_load` filter and reverse its logic ...
  • Loading branch information
GaryJones committed May 4, 2015
2 parents b910379 + 254048d commit a3f5a4f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion class-tgm-plugin-activation.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,14 @@ protected function __construct() {
*/
public function init() {

if ( apply_filters( 'tgmpa_load', ! is_admin() ) ) {
/**
* By default TGMPA only loads on the WP back-end. Using this filter you can overrule that behaviour.
*
* @since 2.5.0
*
* @param bool $load Whether or not TGMPA should load. Defaults to the return of `is_admin()`.
*/
if ( true !== apply_filters( 'tgmpa_load', is_admin() ) ) {
return;
}

Expand Down

0 comments on commit a3f5a4f

Please sign in to comment.