diff --git a/includes/action-links.theme.inc b/includes/action-links.theme.inc new file mode 100644 index 0000000..3a2398a --- /dev/null +++ b/includes/action-links.theme.inc @@ -0,0 +1,33 @@ + 'links', + 'file' => 'includes/action-links.theme.inc', + ); +} + +/** + * Render a menu local actions wrapper. + * + * @param $links + * Local actions links. + * @param $attributes + * An array of attributes to append to the wrapper. + */ +function theme_ctools_menu_local_actions_wrapper($variables) { + $links = drupal_render($variables['links']); + + if (empty($links)) { + return; + } + + return ''; +} \ No newline at end of file diff --git a/plugins/content_types/page/page_actions.inc b/plugins/content_types/page/page_actions.inc index e8762d4..c20c408 100644 --- a/plugins/content_types/page/page_actions.inc +++ b/plugins/content_types/page/page_actions.inc @@ -26,7 +26,7 @@ $plugin = array( */ function ctools_page_actions_content_type_render($subtype, $conf, $panel_args) { $block = new stdClass(); - $block->content = menu_local_actions(); + $block->content = theme('ctools_menu_local_actions_wrapper', array('links' => menu_local_actions())); return $block; }