(Created page with "__NOTOC__ == Filter == <tt>pagelines_welcome_plugins</tt> will filter the display of the plugins listed on the main welcome page found under PageLines > Settings. == Usage ==...") |
|||
| Line 10: | Line 10: | ||
<syntaxhighlight><?php add_filter( 'pagelines_welcome_plugins', '__return_false' ); ?></syntaxhighlight> | <syntaxhighlight><?php add_filter( 'pagelines_welcome_plugins', '__return_false' ); ?></syntaxhighlight> | ||
| + | |||
| + | Now, instead of simply blanking out the default plugins you want to replace them with a list of plugins you have enhanced your theme for. Use this code for a starting point: | ||
| + | |||
| + | <syntaxhighlight><?php | ||
| + | add_filter( 'pagelines_welcome_plugins', 'my_welcome_plugins' ); | ||
| + | function my_welcome_plugins() { | ||
| + | $plugins = array( | ||
| + | 'my_plugin' => array( | ||
| + | 'name' => __( 'My Plugin' ), | ||
| + | 'url' => 'http://wordpress.org/extend/plugins/my-plugin/', | ||
| + | 'desc' => __( 'My Plugin is really cool to use with my theme' ) | ||
| + | ) | ||
| + | ); | ||
| + | return $plugins; | ||
| + | } | ||
| + | ?></syntaxhighlight> | ||
| + | |||
| + | NB: <tt>my_plugin</tt> is just a placeholder name, use the appropriate name and references for the actual plugins. | ||
| + | |||
| + | == Source == | ||
| + | |||
| + | ---- | ||
| + | |||
| + | [[Category:Draft]] | ||
| + | [[Category:New Page]] | ||
| + | [[Category:Filters]] | ||
pagelines_welcome_plugins will filter the display of the plugins listed on the main welcome page found under PageLines > Settings.
Say you want to remove the list (only) of the default plugins PageLines has added advanced support for. Just add this to your 'functions.php' template file in your (Child-)Theme:
Now, instead of simply blanking out the default plugins you want to replace them with a list of plugins you have enhanced your theme for. Use this code for a starting point:
array(
'name' => __( 'My Plugin' ),
'url' => 'http://wordpress.org/extend/plugins/my-plugin/',
'desc' => __( 'My Plugin is really cool to use with my theme' )
)
);
return $plugins;
}
?>
NB: my_plugin is just a placeholder name, use the appropriate name and references for the actual plugins.