function get_single_shortcode_block($shortcode_name, $output = '') { global $be_shortcode; $hide = ''; if (!array_key_exists('options', $be_shortcode[$shortcode_name]) && empty($be_shortcode[$shortcode_name]['options'])) { $hide = 'hidden'; } $html = ''; $html .= '<div class="portlet be-pb-element be-pb-module-wrap">'; $html .= '<div class="portlet-header"><div class="portlet-header-controls-wrap right"><span class="be-pb-control-icon icon-icon_trash_alt icon-delete icon-be-pb-cancel icon-trash bottom-border" title="Delete"></span><span class="be-pb-control-icon icon-duplicate icon-icon_documents_alt icon-be-pb-book-open bottom-border" title="Duplicate"></span><span class="be-pb-control-icon icon-icon_pencil-edit icon-edit edit-shortcode icon-be-pb-pencil-1 ' . $hide . '" title="Edit" data-shortcode="' . $shortcode_name . '" data-action="edit"></span><span class="be-pb-control-icon icon-download copy-shortcode icon-be-pb-download" title="Copy"></span></div>' . $be_shortcode[$shortcode_name]['name'] . '</div>'; if (isset($be_shortcode[$shortcode_name]['backend_output']) && $be_shortcode[$shortcode_name]['backend_output'] === true) { $html .= '<div class="portlet-content be-pb-content-preview clearfix">' . wp_kses_post(be_pb_output($output, $shortcode_name)) . '</div>'; } $html .= '<pre class="shortcode">' . $output . '</pre>'; $html .= '</div>'; return $html; }
function get_single_shortcode_block($shortcode_name, $output = '') { global $be_shortcode; $hide = ''; if (!array_key_exists('options', $be_shortcode[$shortcode_name]) && empty($be_shortcode[$shortcode_name]['options'])) { $hide = 'hidden'; } $html = ''; $html .= '<div class="portlet be-pb-element">'; $html .= '<div class="portlet-header"><span class="be-pb-control-icon icon-cancel-circled icon-delete" title="Delete"></span><span class="be-pb-control-icon icon-pencil edit-shortcode ' . $hide . '" title="Edit" data-shortcode="' . $shortcode_name . '" data-action="edit"></span><span class="be-pb-control-icon icon-book icon-duplicate" title="Duplicate"></span>' . $be_shortcode[$shortcode_name]['name'] . '</div>'; if (isset($be_shortcode[$shortcode_name]['backend_output']) && $be_shortcode[$shortcode_name]['backend_output'] === true) { $html .= '<div class="portlet-content clearfix">' . be_pb_output($output, $shortcode_name) . '</div>'; } $html .= '<pre class="shortcode">' . $output . '</pre>'; $html .= '</div>'; return $html; }