Skip to content

Commit

Permalink
Add example of is_callable functionality.
Browse files Browse the repository at this point in the history
See #205
  • Loading branch information
jrfnl authored and GaryJones committed May 8, 2015
1 parent 68644dc commit e13e186
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions example.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@ function my_theme_register_required_plugins() {
'slug' => 'buddypress',
'required' => false,
),

// This is an example of the use of 'is_callable' functionality. A user could - for instance -
// have WPSEO installed *or* WPSEO Premium. The slug would in that last case be different, i.e.
// 'wordpress-seo-premium'.
// By setting 'is_callable' to either a function from that plugin or a class method
// `array( 'class', 'method' )` similar to how you hook in to actions and filters, TGMPA can still
// recognize the plugin as being installed.
array(
'name' => 'WordPress SEO by Yoast',
'slug' => 'wordpress-seo',
'is_callable' => 'wpseo_init',
),

);

Expand Down

0 comments on commit e13e186

Please sign in to comment.