You are here

function panels_renderer_editor::render_add_content_link in Panels 6.3

Render a single link to add a content type.

2 calls to panels_renderer_editor::render_add_content_link()
panels_renderer_editor::render_category in plugins/display_renderers/panels_renderer_editor.class.php
Render all of the content links in a category.
panels_renderer_editor::render_category_selector in plugins/display_renderers/panels_renderer_editor.class.php
Render the selector widget in the add content modal to select categories.

File

plugins/display_renderers/panels_renderer_editor.class.php, line 610
Class file to control the main Panels editor.

Class

panels_renderer_editor
@file Class file to control the main Panels editor.

Code

function render_add_content_link($region, $content_type) {
  $title = filter_xss_admin($content_type['title']);
  $description = isset($content_type['description']) ? $content_type['description'] : $title;
  $icon = ctools_content_admin_icon($content_type);
  $url = $this
    ->get_url('add-pane', $region, $content_type['type_name'], $content_type['subtype_name']);
  $output = '<div class="content-type-button clear-block">';
  $output .= ctools_ajax_image_button($icon, $url, $description, 'panels-modal-add-config');
  $output .= '<div>' . ctools_ajax_text_button($title, $url, $description, 'panels-modal-add-config') . '</div>';
  $output .= '</div>';
  return $output;
}