function panopoly_admin_is_advanced_plugin in Panopoly 7
Helper function to identify advanced plugins
1 call to panopoly_admin_is_advanced_plugin()
- panopoly_admin_prepreprocess_panels_add_content_modal in modules/
panopoly/ panopoly_admin/ panopoly_admin.module - Preprocess the panels_add_content_modal() theme function.
File
- modules/
panopoly/ panopoly_admin/ panopoly_admin.module, line 601
Code
function panopoly_admin_is_advanced_plugin($pane_label, $category_label) {
// Specifically excluded categories
$fixed_advanced_plugins = array(
'View context',
// support for views context
'Page elements',
// sitewide panes that don't work so well in $content region
'Facet API',
// default facet api options subsumed into "Search Facets" option
'File',
// support for file items that is just confusing
'Fieldable_panels_pane',
// duplicated fields for custom panes
'Existing pages',
// pages from pm existing pages module that will break the site
// TODO: this should be added via an alter hook or something!
'Panopoly Test Advanced',
);
// Specifically excluded panes
$fixed_advanced_panes = array(
'Panels pane',
// default fieldable panels panes entity we don't need
'Execute PHP',
// sigh
'Devel',
// devel option for advanced users
'Switch user',
// devel option for advanced users
'Theme switcher',
// devel option for advanced users
'User menu',
// user menu
'Development',
// development menu
'Management',
// management menu
'Navigation',
// navigation menu
'<em class="placeholder">User menu</em> menu tree',
// user menu men tree
'<em class="placeholder">Development</em> menu tree',
// development menu tree
'<em class="placeholder">Management</em> menu tree',
// management menu tree
'<em class="placeholder">Navigation</em> menu tree',
// navigation menu tree
'Manage Apps for Panopoly',
// manage apps for panopoly block
'Shortcuts',
// shortcuts block
'User login',
// user login widget
'Powered by Drupal',
// powere by drupal widget
'Search form',
// search form widget
'Syndicate',
// syndicate widget
'Recent content',
);
// Define this as an advanced plugin if it is in the advance category or pane list or has tokens
return in_array($category_label, $fixed_advanced_plugins) || in_array($pane_label, $fixed_advanced_panes) || strpos($category_label, '(tokens)');
}