function register_comments_cell_init()
 {
     if (function_exists('register_dd_layout_cell_type')) {
         register_dd_layout_cell_type('comments-cell', array('name' => __('Comments', 'ddl-layouts'), 'description' => __('Display the comments section. This cell is typically used in layouts for blog posts and pages that need comments enable.', 'ddl-layouts'), 'category' => __('Site elements', 'ddl-layouts'), 'cell-image-url' => DDL_ICONS_SVG_REL_PATH . 'layouts-comments-cell.svg', 'button-text' => __('Assign comments cell', 'ddl-layouts'), 'dialog-title-create' => __('Create a new comments cell', 'ddl-layouts'), 'dialog-title-edit' => __('Edit comments cell', 'ddl-layouts'), 'dialog-template-callback' => 'comments_cell_dialog_template_callback', 'cell-content-callback' => 'comments_cell_content_callback', 'cell-template-callback' => 'comments_cell_template_callback', 'has_settings' => true, 'cell-class' => '', 'preview-image-url' => DDL_ICONS_PNG_REL_PATH . 'comments_expand-image.png', 'allow-multiple' => false, 'register-scripts' => array(array('ddl-comments-cell-script', WPDDL_GUI_RELPATH . 'editor/js/ddl-comments-cell-script.js', array('jquery'), WPDDL_VERSION, true)), 'translatable_fields' => array('title_one_comment' => array('title' => 'One comment text', 'type' => 'LINE'), 'title_multi_comments' => array('title' => 'Multiple comments text', 'type' => 'LINE'), 'ddl_prev_link_text' => array('title' => 'Older Comments text', 'type' => 'LINE'), 'ddl_next_link_text' => array('title' => 'Newer Comments text', 'type' => 'LINE'), 'comments_closed_text' => array('title' => 'Comments are closed text', 'type' => 'LINE'), 'reply_text' => array('title' => 'Reply text', 'type' => 'LINE'), 'password_text' => array('title' => 'Password protected post text', 'type' => 'LINE'))));
         add_action('wp_ajax_ddl_load_comments_page_content', 'ddl_load_comments_page_content');
         add_action('wp_ajax_nopriv_ddl_load_comments_page_content', 'ddl_load_comments_page_content');
     }
 }
function register_reference_cell_init()
{
    register_dd_layout_cell_type('reference-cell', array('name' => __('Reference cell', 'theme-context'), 'cell-image-url' => 'footer-cell', 'description' => __('A cell that demonstrates the Layouts plugin API.', 'theme-context'), 'category' => __('Example cells', 'theme-context'), 'button-text' => __('Assign Reference cell', 'theme-context'), 'dialog-title-create' => __('Create a new Reference cell', 'theme-context'), 'dialog-title-edit' => __('Edit Reference cell', 'theme-context'), 'dialog-template-callback' => 'reference_cell_dialog_template_callback', 'cell-content-callback' => 'reference_cell_content_callback', 'cell-template-callback' => 'reference_cell_template_callback', 'cell-class' => 'reference-cell', 'preview-image-url' => 'http://placehold.it/350x150', 'register-styles' => array(array('reference_cell_css', WPDDL_RELPATH . '/reference-cell/reference-cell.css', null, WPDDL_VERSION, null)), 'register-scripts' => array(array('reference_cell_js', WPDDL_RELPATH . '/reference-cell/reference-cell.js', array('jquery'), WPDDL_VERSION, true))));
}
 function register_slider_cell_init()
 {
     if (function_exists('register_dd_layout_cell_type')) {
         register_dd_layout_cell_type('slider-cell', array('name' => __('Slider', 'ddl-layouts'), 'cell-image-url' => DDL_ICONS_SVG_REL_PATH . 'layouts-slider-cell.svg', 'description' => __('Display an image slider, built using the Bootstrap Carousel component.', 'ddl-layouts'), 'category' => __('Text and media', 'ddl-layouts'), 'button-text' => __('Assign slider cell', 'ddl-layouts'), 'dialog-title-create' => __('Create a new slider cell', 'ddl-layouts'), 'dialog-title-edit' => __('Edit slider cell', 'ddl-layouts'), 'dialog-template-callback' => 'slider_cell_dialog_template_callback', 'cell-content-callback' => 'slider_cell_content_callback', 'cell-template-callback' => 'slider_cell_template_callback', 'cell-class' => '', 'has_settings' => true, 'preview-image-url' => DDL_ICONS_PNG_REL_PATH . 'slider_expand-image.png', 'translatable_fields' => array('slider[slide_url]' => array('title' => 'Slide URL', 'type' => 'LINE'), 'slider[slide_title]' => array('title' => 'Slide title', 'type' => 'LINE'), 'slider[slide_text]' => array('title' => 'Slide description', 'type' => 'AREA')), 'register-scripts' => array(array('ddl-slider-cell-script', WPDDL_GUI_RELPATH . 'editor/js/ddl-slider-cell-script.js', array('jquery'), WPDDL_VERSION, true))));
     }
 }
 function register_video_cell_init()
 {
     if (function_exists('register_dd_layout_cell_type')) {
         register_dd_layout_cell_type('video-cell', array('name' => __('YouTube video', 'ddl-layouts'), 'description' => __('Display a video from YouTube.', 'ddl-layouts'), 'category' => __('Text and media', 'ddl-layouts'), 'cell-image-url' => DDL_ICONS_SVG_REL_PATH . 'layouts-video-cell.svg', 'button-text' => __('Assign YouTube video cell', 'ddl-layouts'), 'dialog-title-create' => __('Create a new YouTube video cell', 'ddl-layouts'), 'dialog-title-edit' => __('Edit YouTube video cell', 'ddl-layouts'), 'dialog-template-callback' => 'video_cell_dialog_template_callback', 'cell-content-callback' => 'video_cell_content_callback', 'cell-template-callback' => 'video_cell_template_callback', 'has_settings' => true, 'cell-class' => '', 'preview-image-url' => DDL_ICONS_PNG_REL_PATH . 'youtube_expand-image.png', 'register-scripts' => array(array('ddl-video-cell-script', WPDDL_GUI_RELPATH . 'editor/js/ddl-video-cell-script.js', array('jquery'), WPDDL_VERSION, true))));
     }
 }
 private function register_bp_cell()
 {
     register_dd_layout_cell_type('buddypress', array('name' => __('BuddyPress', 'theme-context'), 'cell-image-url' => DDL_ICONS_SVG_REL_PATH . 'buddypress-cell.svg', 'description' => __('BuddyPress loop.', 'theme-context'), 'category' => __('Buddypress', 'theme-context'), 'button-text' => __('Add', 'theme-context'), 'dialog-title-create' => __('Insert BuddyPress output', 'theme-context'), 'dialog-title-edit' => __('Edit', 'theme-context'), 'dialog-template-callback' => array($this, 'dialog_template_callback'), 'cell-content-callback' => array($this, 'content_callback'), 'cell-template-callback' => array($this, 'template_callback'), 'cell-class' => 'bp-cell', 'preview-image-url' => $this->_relpath . '/icon.png'));
 }
 function register_cred_cell_init()
 {
     if (function_exists('register_dd_layout_cell_type')) {
         register_dd_layout_cell_type($this->cell_type, array('name' => __('CRED Post Form', 'ddl-layouts'), 'description' => __('Display a CRED Post Form which allows users to create and edit Posts, Pages and Custom content from the front-end.', 'ddl-layouts'), 'category' => __('Forms', 'ddl-layouts'), 'cell-image-url' => DDL_ICONS_SVG_REL_PATH . 'cred-form.svg', 'button-text' => __('Assign CRED Post Form cell', 'ddl-layouts'), 'dialog-title-create' => __('Create a new CRED Post Form cell', 'ddl-layouts'), 'dialog-title-edit' => __('Edit CRED Post Form cell', 'ddl-layouts'), 'dialog-template-callback' => array(&$this, 'cred_cell_dialog_template_callback'), 'cell-content-callback' => array(&$this, 'cred_cell_content_callback'), 'cell-template-callback' => array(&$this, 'cred_cell_template_callback'), 'cell-class' => '', 'has_settings' => false, 'preview-image-url' => DDL_ICONS_PNG_REL_PATH . 'CRED-form_expand-image.png', 'register-scripts' => array(array('ddl-cred-cell-script', WPDDL_RELPATH . '/inc/gui/dialogs/js/cred-cell.js', array('jquery'), WPDDL_VERSION, true))));
     }
 }
 function register_views_content_grid_cell_init()
 {
     if (function_exists('register_dd_layout_cell_type')) {
         register_dd_layout_cell_type('views-content-grid-cell', array('name' => __('View (Content lists, parametric searches, custom sliders)', 'ddl-layouts'), 'description' => __('Load content and display it with your styling. A View is used for any custom content display, including parametric searches, tables, grids, sliders and content lists.', 'ddl-layouts'), 'category' => __('Content display', 'ddl-layouts'), 'button-text' => __('Assign View', 'ddl-layouts'), 'dialog-title-create' => __('Create a new View', 'ddl-layouts'), 'dialog-title-edit' => __('Edit View', 'ddl-layouts'), 'dialog-template-callback' => 'views_content_grid_dialog_template_callback', 'cell-content-callback' => 'views_content_grid_content_callback', 'cell-template-callback' => 'views_content_grid_template_callback', 'preview-image-url' => DDL_ICONS_PNG_REL_PATH . 'views-content-grid_expand-image2.png', 'cell-image-url' => DDL_ICONS_SVG_REL_PATH . 'views-grid-01.svg', 'has_settings' => false, 'register-scripts' => array(array('ddl_views_content_grid_js', WPDDL_RELPATH . '/inc/gui/dialogs/js/views-grid-cell.js', array('jquery'), WPDDL_VERSION, true))));
     }
 }
 function register_imagebox_cell_init()
 {
     if (function_exists('register_dd_layout_cell_type')) {
         register_dd_layout_cell_type('imagebox-cell', array('name' => __('Image box', 'ddl-layouts'), 'cell-image-url' => DDL_ICONS_SVG_REL_PATH . 'layouts-imagebox-cell.svg', 'description' => __('Display an image with a header and text. Suitable for callout boxes, key features, services showcase etc. Use the Visual Editor cell if you need more flexibility.', 'ddl-layouts'), 'category' => __('Text and media', 'ddl-layouts'), 'button-text' => __('Assign imagebox cell', 'ddl-layouts'), 'dialog-title-create' => __('Create a new imagebox cell', 'ddl-layouts'), 'dialog-title-edit' => __('Edit imagebox cell', 'ddl-layouts'), 'dialog-template-callback' => 'imagebox_cell_dialog_template_callback', 'cell-content-callback' => 'imagebox_cell_content_callback', 'cell-template-callback' => 'imagebox_cell_template_callback', 'has_settings' => true, 'preview-image-url' => DDL_ICONS_PNG_REL_PATH . 'image-box_expand-image.png', 'translatable_fields' => array('box_title' => array('title' => 'Image Box Title', 'type' => 'LINE'), 'box_content' => array('title' => 'Image Box Content', 'type' => 'AREA'))));
     }
 }
function register_widget_cell_init()
{
    $widget_scripts = array(array('widget_cell_js', WPDDL_RELPATH . '/inc/gui/editor/js/widget-cell.js', array('jquery'), WPDDL_VERSION, true));
    $widget_scripts = apply_filters('wpdll_cell_widget_scripts', $widget_scripts);
    register_dd_layout_cell_type('widget-cell', array('name' => __('Single widget', 'ddl-layouts'), 'cell-image-url' => DDL_ICONS_SVG_REL_PATH . 'single-widget.svg', 'description' => __('Display a single WordPress Widget. You will be able to choose which widget to display, without having to create new widgets areas.', 'ddl-layouts'), 'button-text' => __('Assign Widget cell', 'ddl-layouts'), 'dialog-title-create' => __('Create a Widget cell', 'ddl-layouts'), 'dialog-title-edit' => __('Edit Widget cell', 'ddl-layouts'), 'dialog-template-callback' => 'widget_cell_dialog_template_callback', 'cell-content-callback' => 'widget_cell_content_callback', 'cell-template-callback' => 'widget_cell_template_callback', 'cell-class' => 'widget-cell', 'has_settings' => true, 'preview-image-url' => DDL_ICONS_PNG_REL_PATH . 'widget_expand-image.png', 'register-scripts' => $widget_scripts, 'category' => __('Site elements', 'ddl-layouts')));
}
 function register_menu_cell_init()
 {
     if (function_exists('register_dd_layout_cell_type')) {
         register_dd_layout_cell_type('menu-cell', array('name' => __('Menu', 'ddl-layouts'), 'cell-image-url' => DDL_ICONS_SVG_REL_PATH . 'layouts-menu-cell.svg', 'description' => __('Display one of the WordPress menus that exist in your site.', 'ddl-layouts'), 'category' => __('Site elements', 'ddl-layouts'), 'button-text' => __('Assign menu cell', 'ddl-layouts'), 'dialog-title-create' => __('Create a new menu cell', 'ddl-layouts'), 'dialog-title-edit' => __('Edit menu cell', 'ddl-layouts'), 'dialog-template-callback' => 'menu_cell_dialog_template_callback', 'cell-content-callback' => 'menu_cell_content_callback', 'cell-template-callback' => 'menu_cell_template_callback', 'has_settings' => true, 'preview-image-url' => DDL_ICONS_PNG_REL_PATH . 'menu_expand-image.png'));
     }
 }