示例#1
0
 /**
  * Inlince editor methods {{ Fix cactusthemes
  */
 public function inlineEditor()
 {
     if (!isset($this->inline_editor)) {
         require_once self::config('APP_ROOT') . '/inline/editor.php';
         $this->inline_editor = new_vc();
     }
     return $this->inline_editor;
 }
 public function loadInline()
 {
     $post = !empty($_POST['template_id']) ? get_post($_POST['template_id']) : false;
     if (!$post || $post->post_type !== self::$post_type) {
         die;
     }
     set_vc_is_inline();
     new_vc()->enqueueRequired();
     new_vc()->setTemplateContent($post->post_content);
     new_vc()->render('template');
     die;
 }