<?php

vc_grid_item_map_shortcodes();
do_action('vc-render-templates-preview-template');
/** @var $vc_grid_item_editor Vc_Grid_Item_Editor */
global $vc_grid_item_editor;
if ($vc_grid_item_editor) {
    add_filter('admin_body_class', array($vc_grid_item_editor->templatesEditor(), 'addBodyClassTemplatePreview'));
    add_action('admin_enqueue_scripts', array(&$vc_grid_item_editor, 'enqueueEditorScripts'));
    add_action('admin_footer', array(&$vc_grid_item_editor, 'renderEditorFooter'));
    add_filter('vc_wpbakery_shortcode_get_controls_list', array($vc_grid_item_editor, 'shortcodesControls'));
}
add_action('admin_enqueue_scripts', array(visual_composer()->templatesPanelEditor(), 'enqueuePreviewScripts'));
global $menu, $submenu, $parent_file, $post_ID, $post, $post_type;
$post_ID = $editorPost->ID;
$post_type = $editorPost->post_type;
$post_title = trim($editorPost->post_title);
$nonce_action = $nonce_action = 'update-post_' . $post_ID;
$user_ID = isset($current_user) && isset($current_user->ID) ? (int) $current_user->ID : 0;
$form_action = 'editpost';
$menu = array();
remove_action('wp_head', 'print_emoji_detection_script');
remove_action('wp_print_styles', 'print_emoji_styles');
remove_action('admin_print_scripts', 'print_emoji_detection_script');
remove_action('admin_print_styles', 'print_emoji_styles');
add_thickbox();
wp_enqueue_media(array('post' => $post_ID));
require_once ABSPATH . 'wp-admin/admin-header.php';
?>
	<style type="text/css">
		#screen-meta, #adminmenumain, .notice {
/**
 * Check and Map grid element shortcodes if required.
 * @since 4.5
 */
function vc_grid_item_editor_shortcodes()
{
    require_once vc_path_dir('PARAMS_DIR', 'vc_grid_item/editor/class-vc-grid-item-editor.php');
    // @todo remove this because mapping can be based on post_type
    if (vc_request_param('vc_grid_item_editor') === 'true' || is_admin() && vc_grid_item_get_post_type() === Vc_Grid_Item_Editor::postType()) {
        vc_grid_item_map_shortcodes();
    }
}
Example #3
0
/**
 * Check and Map grid element shortcodes if required.
 * @since 4.5
 */
function vc_grid_item_editor_shortcodes()
{
    require_once vc_path_dir('PARAMS_DIR', 'vc_grid_item/editor/class-vc-grid-item-editor.php');
    // TODO: remove this because mapping can be based on post_type
    if ('true' === vc_request_param('vc_grid_item_editor') || is_admin() && vc_grid_item_get_post_type() === Vc_Grid_Item_Editor::postType() && vc_user_access()->wpAny('edit_posts', 'edit_pages')->part('grid_builder')->can()->get()) {
        global $vc_grid_item_editor;
        add_action('vc_user_access_check-shortcode_edit', array(&$vc_grid_item_editor, 'accessCheckShortcodeEdit'), 10, 2);
        add_action('vc_user_access_check-shortcode_all', array(&$vc_grid_item_editor, 'accessCheckShortcodeAll'), 10, 2);
        vc_grid_item_map_shortcodes();
    }
}