/**
  * vc_filter: vc_frontend_editor_iframe_url - hook to edit iframe url, can be used in vendors like qtranslate do.
  */
 function renderEditor()
 {
     global $current_user;
     get_currentuserinfo();
     $this->current_user = $current_user;
     $this->post_url = vc_str_remove_protocol(get_permalink($this->post_id));
     if (!self::inlineEnabled() || !vc_user_access()->wpAny(array('edit_post', $this->post_id))->get()) {
         header('Location: ' . $this->post_url);
     }
     $this->registerJs();
     $this->registerCss();
     visual_composer()->registerAdminCss();
     //bc
     visual_composer()->registerAdminJavascript();
     //bc
     if ($this->post && 'auto-draft' === $this->post->post_status) {
         $post_data = array('ID' => $this->post_id, 'post_status' => 'draft', 'post_title' => '');
         add_filter('wp_insert_post_empty_content', array($this, 'allowInsertEmptyPost'));
         wp_update_post($post_data, true);
         $this->post->post_status = 'draft';
         $this->post->post_title = '';
     }
     add_filter('admin_body_class', array($this, 'filterAdminBodyClass'));
     $this->post_type = get_post_type_object($this->post->post_type);
     $this->url = $this->post_url . (preg_match('/\\?/', $this->post_url) ? '&' : '?') . 'vc_editable=true&vc_post_id=' . $this->post->ID . '&_vcnonce=' . vc_generate_nonce('vc-admin-nonce');
     $this->url = apply_filters('vc_frontend_editor_iframe_url', $this->url);
     $this->enqueueAdmin();
     $this->enqueueMappedShortcode();
     wp_enqueue_media(array('post' => $this->post_id));
     remove_all_actions('admin_notices', 3);
     remove_all_actions('network_admin_notices', 3);
     $post_custom_css = strip_tags(get_post_meta($this->post_id, '_wpb_post_custom_css', true));
     $this->post_custom_css = $post_custom_css;
     if (!defined('IFRAME_REQUEST')) {
         define('IFRAME_REQUEST', true);
     }
     /**
      * @deprecated vc_admin_inline_editor action hook
      */
     do_action('vc_admin_inline_editor');
     /**
      * new one
      */
     do_action('vc_frontend_editor_render');
     add_filter('admin_title', array(&$this, 'setEditorTitle'));
     $this->render('editor');
     die;
 }
,
			vc_mapper = <?php 
echo json_encode(WPBMap::getShortCodes());
?>
,
			vc_vendor_settings_presets = <?php 
echo json_encode($vc_vendor_settings_presets);
?>
,
			vc_settings_presets = <?php 
echo json_encode($vc_settings_presets);
?>
,
			vc_roles = [], // @todo fix_roles BC for roles
			vcAdminNonce = '<?php 
echo vc_generate_nonce('vc-admin-nonce');
?>
';
	</script>

<?php 
vc_include_template('editors/partials/vc_settings-image-block.tpl.php');
?>
	<div style="height: 1px; visibility: hidden; overflow: hidden;">
		<?php 
// Disable notice in edit-form-advanced.php
$is_IE = false;
require_once ABSPATH . 'wp-admin/edit-form-advanced.php';
// Fix: WP 4.0
wp_dequeue_script('editor-expand');
do_action('vc_frontend_editor_render_template');
Exemple #3
0
    wp_enqueue_script('twbs-pagination');
}
$this->enqueueScripts();
?>
<!-- vc_grid start -->
<div class="vc_grid-container-wrapper vc_clearfix">
	<div class="<?php 
echo esc_attr($css_class);
?>
"
	     data-vc-<?php 
echo esc_attr($this->pagable_type);
?>
-settings="<?php 
echo esc_attr(json_encode($this->grid_settings));
?>
"
		 data-vc-request="<?php 
echo esc_attr(admin_url('admin-ajax.php', 'relative'));
?>
"
		 data-vc-post-id="<?php 
echo esc_attr(get_the_ID());
?>
"
	     data-vc-public-nonce="<?php 
echo vc_generate_nonce('vc-public-nonce');
?>
">
	</div>
</div><!-- vc_grid end -->