Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example of is_callable functionality to example.php. #385

Merged
merged 1 commit into from
May 4, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions example.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,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