コード例 #1
0
	function loadShortcodes() {
		! defined( 'CONCATENATE_SCRIPTS' ) && define( 'CONCATENATE_SCRIPTS', false );
		$this->setPost();
		$shortcodes = (array)vc_post_param( 'shortcodes' );
		$this->renderShortcodes( $shortcodes );
		echo '<div data-type="files">';
		_print_styles();
		print_head_scripts();
		print_late_styles();
		print_footer_scripts();
		echo '</div>';
		die();
	}
コード例 #2
0
ファイル: script-loader.php プロジェクト: vheidari/WordPress
/**
 * Prints the styles that were queued too late for the HTML head.
 *
 * @since 3.3.0
 *
 * @global WP_Styles $wp_styles
 * @global bool      $concatenate_scripts
 *
 * @return array|void
 */
function print_late_styles()
{
    global $wp_styles, $concatenate_scripts;
    if (!$wp_styles instanceof WP_Styles) {
        return;
    }
    $wp_styles->do_concat = $concatenate_scripts;
    $wp_styles->do_footer_items();
    /**
     * Filter whether to print the styles queued too late for the HTML head.
     *
     * @since 3.3.0
     *
     * @param bool $print Whether to print the 'late' styles. Default true.
     */
    if (apply_filters('print_late_styles', true)) {
        _print_styles();
    }
    $wp_styles->reset();
    return $wp_styles->done;
}
コード例 #3
0
/**
 * Prints the styles that were queued too late for the HTML head.
 *
 * @since 3.3.0
 */
function print_late_styles()
{
    global $wp_styles, $concatenate_scripts;
    if (!is_a($wp_styles, 'WP_Styles')) {
        return;
    }
    $wp_styles->do_concat = $concatenate_scripts;
    $wp_styles->do_footer_items();
    if (apply_filters('print_late_styles', true)) {
        _print_styles();
    }
    $wp_styles->reset();
    return $wp_styles->done;
}
コード例 #4
0
<div id="vc_template-html">
    <?php 
echo $editor->parseShortcodesString($editor->getTemplateContent());
?>
    <div data-type="files">
        <?php 
_print_styles();
print_head_scripts();
print_late_styles();
print_footer_scripts();
?>
    </div>
</div>
<div id="vc_template-data"><?php 
echo esc_html_e(json_encode($editor->post_shortcodes));
?>
</div>

コード例 #5
0
 /**
  *
  */
 function loadShortcodes()
 {
     if (is_user_logged_in()) {
         $action = vc_post_param('action');
         if ($action == 'vc_load_shortcode') {
             !defined('CONCATENATE_SCRIPTS') && define('CONCATENATE_SCRIPTS', false);
             ob_start();
             $this->setPost();
             $shortcodes = (array) vc_post_param('shortcodes');
             do_action('vc_load_shortcode', $shortcodes);
             $this->renderShortcodes($shortcodes);
             echo '<div data-type="files">';
             _print_styles();
             print_head_scripts();
             print_late_styles();
             print_footer_scripts();
             do_action('wp_print_footer_scripts');
             echo '</div>';
             $output = ob_get_clean();
             die(apply_filters('vc_frontend_editor_load_shortcode_ajax_output', $output));
         } else {
             if ($action == 'vc_frontend_default_template') {
                 // @deprecated since 4.4 and will be removed and should not be used, use action 'vc_frontend_default_template_modal' instead and templatesPanelEditor
                 $this->setPost();
                 visual_composer()->templatesEditor()->renderFrontendDefaultTemplate();
             } else {
                 if ($action == 'vc_frontend_template') {
                     // @deprecated since 4.4 and will be removed and should not be used, use action 'vc_frontend_template_modal' instead and templatesPanelEditor
                     $this->setPost();
                     visual_composer()->templatesEditor()->renderFrontendTemplate();
                 } else {
                     if ($action == 'vc_frontend_load_template') {
                         $this->setPost();
                         visual_composer()->templatesPanelEditor()->renderFrontendTemplate();
                     }
                 }
             }
         }
     }
     if (vc_post_param('action') != '') {
         do_action('vc_front_load_page_' . esc_attr(vc_post_param('action')));
     }
 }
コード例 #6
0
 /**
  *
  */
 function loadShortcodes()
 {
     if (vc_is_page_editable() && vc_enabled_frontend()) {
         $action = vc_post_param('action');
         if ('vc_load_shortcode' === $action) {
             !defined('CONCATENATE_SCRIPTS') && define('CONCATENATE_SCRIPTS', false);
             ob_start();
             $this->setPost();
             $shortcodes = (array) vc_post_param('shortcodes');
             do_action('vc_load_shortcode', $shortcodes);
             $this->renderShortcodes($shortcodes);
             echo '<div data-type="files">';
             _print_styles();
             print_head_scripts();
             print_late_styles();
             print_footer_scripts();
             do_action('wp_print_footer_scripts');
             echo '</div>';
             $output = ob_get_clean();
             die(apply_filters('vc_frontend_editor_load_shortcode_ajax_output', $output));
         } elseif ('vc_frontend_load_template' === $action) {
             $this->setPost();
             visual_composer()->templatesPanelEditor()->renderFrontendTemplate();
         } else {
             if ('' !== $action) {
                 do_action('vc_front_load_page_' . esc_attr(vc_post_param('action')));
             }
         }
     }
 }
コード例 #7
0
ファイル: editor.php プロジェクト: roycocup/enclothed
 function loadShortcodes()
 {
     $shortcodes = (array) $this->post('shortcodes');
     $this->renderShortcodes($shortcodes);
     echo '<div data-type="files">';
     _print_styles();
     print_head_scripts();
     print_late_styles();
     print_footer_scripts();
     echo '</div>';
     die;
 }