本文整理汇总了PHP中WPBakeryVisualComposer::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP WPBakeryVisualComposer::getInstance方法的具体用法?PHP WPBakeryVisualComposer::getInstance怎么用?PHP WPBakeryVisualComposer::getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WPBakeryVisualComposer
的用法示例。
在下文中一共展示了WPBakeryVisualComposer::getInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: singleParamHtmlHolder
public function singleParamHtmlHolder($param, $value)
{
$output = '';
// Compatibility fixes
$old_names = array('yellow_message', 'blue_message', 'green_message', 'button_green', 'button_grey', 'button_yellow', 'button_blue', 'button_red', 'button_orange');
$new_names = array('alert-block', 'alert-info', 'alert-success', 'btn-success', 'btn', 'btn-info', 'btn-primary', 'btn-danger', 'btn-warning');
$value = str_ireplace($old_names, $new_names, $value);
//$value = __($value, "js_composer");
//
$param_name = isset($param['param_name']) ? $param['param_name'] : '';
$type = isset($param['type']) ? $param['type'] : '';
$class = isset($param['class']) ? $param['class'] : '';
if (isset($param['holder']) == false || $param['holder'] == 'hidden') {
$output .= '<input type="hidden" class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" value="' . $value . '" />';
if ($param['type'] == 'attach_image') {
$img = wpb_getImageBySize(array('attach_id' => (int) preg_replace('/[^\\d]/', '', $value), 'thumb_size' => 'thumbnail'));
$output .= ($img ? $img['thumbnail'] : '<img width="150" height="150" src="' . WPBakeryVisualComposer::getInstance()->assetURL('vc/blank.gif') . '" class="attachment-thumbnail" data-name="' . $param_name . '" alt="" title="" style="display: none;" />') . '<img src="' . WPBakeryVisualComposer::getInstance()->assetURL('vc/elements_icons/single_image.png') . '" class="no_image_image' . ($img && !empty($img['p_img_large'][0]) ? ' image-exists' : '') . '" /><a href="#" class="column_edit_trigger' . ($img && !empty($img['p_img_large'][0]) ? ' image-exists' : '') . '">' . __('Add image', 'js_composer') . '</a>';
} else {
if ($param['type'] == 'attach_video') {
$img = wpb_getImageBySize(array('attach_id' => (int) preg_replace('/[^\\d]/', '', $value), 'thumb_size' => 'thumbnail'));
$output .= ($img ? $img['thumbnail'] : '<img width="150" height="150" src="' . WPBakeryVisualComposer::getInstance()->assetURL('vc/blank.gif') . '" class="attachment-thumbnail" data-name="' . $param_name . '" alt="" title="" style="display: none;" />') . '<img src="' . WPBakeryVisualComposer::getInstance()->assetURL('vc/elements_icons/single_image.png') . '" class="no_image_image' . ($img && !empty($img['p_img_large'][0]) ? ' image-exists' : '') . '" /><a href="#" class="column_edit_trigger' . ($img && !empty($img['p_img_large'][0]) ? ' image-exists' : '') . '">' . __('Add image', 'js_composer') . '</a>';
}
}
} else {
$output .= '<' . $param['holder'] . ' class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '">' . $value . '</' . $param['holder'] . '>';
}
return $output;
}
示例2: singleParamHtmlHolder
public function singleParamHtmlHolder($param, $value)
{
$output = '';
// Compatibility fixes
$old_names = array('yellow_message', 'blue_message', 'green_message', 'button_green', 'button_grey', 'button_yellow', 'button_blue', 'button_red', 'button_orange');
$new_names = array('alert-block', 'alert-info', 'alert-success', 'btn-success', 'btn', 'btn-info', 'btn-primary', 'btn-danger', 'btn-warning');
$value = str_ireplace($old_names, $new_names, $value);
//$value = __($value, LANGUAGE_ZONE);
//
$param_name = isset($param['param_name']) ? $param['param_name'] : '';
$type = isset($param['type']) ? $param['type'] : '';
$class = isset($param['class']) ? $param['class'] : '';
if (isset($param['holder']) == true && $param['holder'] !== 'hidden') {
$output .= '<' . $param['holder'] . ' class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '">' . $value . '</' . $param['holder'] . '>';
}
if ($param_name == 'images') {
$images_ids = empty($value) ? array() : explode(',', trim($value));
$output .= '<ul class="attachment-thumbnails' . (empty($images_ids) ? ' image-exists' : '') . '" data-name="' . $param_name . '">';
foreach ($images_ids as $image) {
$img = wpb_getImageBySize(array('attach_id' => (int) $image, 'thumb_size' => 'thumbnail'));
$output .= $img ? '<li>' . $img['thumbnail'] . '</li>' : '<li><img width="150" height="150" test="' . $image . '" src="' . WPBakeryVisualComposer::getInstance()->assetURL('vc/blank.gif') . '" class="attachment-thumbnail" alt="" title="" /></li>';
}
$output .= '</ul>';
$output .= '<a href="#" class="column_edit_trigger' . (!empty($images_ids) ? ' image-exists' : '') . '">' . __('Add images', LANGUAGE_ZONE) . '</a>';
}
return $output;
}
示例3: jsCssScripts
public function jsCssScripts()
{
// wp_register_script('vc_bxslider', WPBakeryVisualComposer::getInstance()->assetURL('lib/bxslider-4/jquery.bxslider.min.js'));
// wp_register_style('vc_bxslider_css', WPBakeryVisualComposer::getInstance()->assetURL('lib/bxslider-4/jquery.bxslider.css'));
wp_register_script('vc_swiper', WPBakeryVisualComposer::getInstance()->assetURL('lib/swiper/dist/idangerous.swiper-2.2.js'), array(), time());
wp_register_style('vc_swiper_css', WPBakeryVisualComposer::getInstance()->assetURL('lib/swiper/dist/idangerous.swiper.css'));
}
示例4: init
public function init($settings)
{
parent::init($settings);
$this->composer = WPBakeryVisualComposer::getInstance();
$this->composer->createColumnShortCode();
// Refactored
$this->addAction('init', 'setUp');
}
示例5: vc_set_as_theme
/**
* Sets plugin as theme plugin.
* @param bool $disable_updater - If value is true disables auto updater options.
*/
function vc_set_as_theme($disable_updater = false)
{
$composer = WPBakeryVisualComposer::getInstance();
$composer->setSettingsAsTheme();
if ($disable_updater) {
$composer->disableUpdater();
}
}
示例6: __construct
function __construct($dir)
{
$this->dir = $dir;
$this->base_url = plugin_basename($this->dir);
$this->composer = WPBakeryVisualComposer::getInstance();
$this->addAction('admin_bar_menu', "adminBarEditLink", 1000);
$this->setPost();
$this->initIfActive();
}
示例7: jsCssScripts
public function jsCssScripts()
{
// wp_register_script('vc_bxslider', WPBakeryVisualComposer::getInstance()->assetURL('lib/bxslider-4/jquery.bxslider.min.js'));
// wp_register_style('vc_bxslider_css', WPBakeryVisualComposer::getInstance()->assetURL('lib/bxslider-4/jquery.bxslider.css'));
// wp_register_script('vc_swiper', WPBakeryVisualComposer::getInstance()->assetURL('lib/swiper/dist/idangerous.swiper-2.2.js'), array(), time());
// wp_register_style('vc_swiper_css', WPBakeryVisualComposer::getInstance()->assetURL('lib/swiper/dist/idangerous.swiper.css'));
wp_register_script('vc_transition_bootstrap_js', WPBakeryVisualComposer::getInstance()->assetURL('lib/vc_carousel/js/transition.js'), array(), time());
wp_register_script('vc_carousel_js', WPBakeryVisualComposer::getInstance()->assetURL('lib/vc_carousel/js/vc_carousel.js'), array('vc_transition_bootstrap_js'), time());
wp_register_style('vc_carousel_css', WPBakeryVisualComposer::getInstance()->assetURL('lib/vc_carousel/css/vc_carousel.css'));
// try bootstap http://jsfiddle.net/HHsxc/2/
}
示例8: init
public function init($settings)
{
parent::init($settings);
$this->composer = WPBakeryVisualComposer::getInstance();
$this->composer->createColumnShortCode();
// Refactored
$this->composer->setTheme();
$this->setUpTheme();
if (function_exists('add_theme_support')) {
add_theme_support('post-thumbnails', array('page'));
}
load_plugin_textdomain('js_composer', false, self::$config['APP_ROOT'] . '/locale/');
add_post_type_support('page', 'excerpt');
}
示例9: singleParamHtmlHolder
public function singleParamHtmlHolder($param, $value, $settings = array(), $atts = array())
{
$output = '';
// Compatibility fixes
$old_names = array('yellow_message', 'blue_message', 'green_message', 'button_green', 'button_grey', 'button_yellow', 'button_blue', 'button_red', 'button_orange');
$new_names = array('alert-block', 'alert-info', 'alert-success', 'btn-success', 'btn', 'btn-info', 'btn-primary', 'btn-danger', 'btn-warning');
$value = str_ireplace($old_names, $new_names, $value);
//$value = __($value, "ts_visual_composer_extend");
//
$param_name = isset($param['param_name']) ? $param['param_name'] : '';
$heading = isset($param['heading']) ? $param['heading'] : '';
$type = isset($param['type']) ? $param['type'] : '';
$class = isset($param['class']) ? $param['class'] : '';
if (isset($param['holder']) === true && in_array($param['holder'], array('div', 'span', 'p', 'pre', 'code'))) {
$output .= '<' . $param['holder'] . ' class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '">' . $value . '</' . $param['holder'] . '>';
} else {
if (isset($param['holder']) === true && $param['holder'] == 'input') {
$output .= '<' . $param['holder'] . ' readonly="true" class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" value="' . $value . '">';
} else {
if (isset($param['holder']) === true && in_array($param['holder'], array('img', 'iframe'))) {
if (!empty($value)) {
$output .= '<' . $param['holder'] . ' class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" src="' . $value . '">';
}
} else {
if (isset($param['holder']) === true && $param['holder'] == 'imagelist') {
$images_ids = empty($value) ? array() : explode(',', trim($value));
$output .= '<ul style="margin-top: 5px;" class="attachment-thumbnails' . (empty($images_ids) ? ' image-exists' : '') . '" data-name="' . $param_name . '">';
foreach ($images_ids as $image) {
$img = wpb_getImageBySize(array('attach_id' => (int) $image, 'thumb_size' => 'thumbnail'));
$output .= $img ? '<li>' . $img['thumbnail'] . '</li>' : '<li><img width="150" height="150" test="' . $image . '" src="' . WPBakeryVisualComposer::getInstance()->assetURL('vc/blank.gif') . '" class="attachment-thumbnail" alt="" title="" /></li>';
}
$output .= '</ul>';
$output .= '<a style="max-width: 100%; display: block;" href="#" class="column_edit_trigger' . (!empty($images_ids) ? ' image-exists' : '') . '" style="margin-bottom: 10px;">' . __('Add or Remove Image(s)', "ts_visual_composer_extend") . '</a>';
}
}
}
}
if (isset($param['admin_label']) && $param['admin_label'] === true) {
$output .= '<span style="max-width: 100%; display: block;" class="vc_admin_label admin_label_' . $param['param_name'] . (empty($value) ? ' hidden-label' : '') . '"><label>' . $param['heading'] . '</label>: ' . $value . '</span>';
}
return $output;
}
示例10: singleParamHtmlHolder
public function singleParamHtmlHolder($param, $value, $settings = array(), $atts = array())
{
$output = '';
$param_name = isset($param['param_name']) ? $param['param_name'] : '';
$heading = isset($param['heading']) ? $param['heading'] : '';
$type = isset($param['type']) ? $param['type'] : '';
$class = isset($param['class']) ? $param['class'] : '';
if (isset($param['holder']) === true && in_array($param['holder'], array('div', 'span', 'p', 'pre', 'code'))) {
$output .= '<' . $param['holder'] . ' class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '">' . $value . '</' . $param['holder'] . '>';
} else {
if (isset($param['holder']) === true && $param['holder'] == 'input') {
$output .= '<' . $param['holder'] . ' readonly="true" class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" value="' . $value . '">';
} else {
if (isset($param['holder']) === true && $param['holder'] == 'img') {
$img = wpb_getImageBySize(array('attach_id' => (int) preg_replace('/[^\\d]/', '', $value), 'thumb_size' => 'thumbnail'));
$output .= $img ? $img['thumbnail'] : '<img width="150" height="150" src="' . vc_asset_url('vc/blank.gif') . '" class="attachment-thumbnail ts_vcsc_holder_image" data-name="' . $param_name . '" alt="" title="" style="display: none;" />';
} else {
if (isset($param['holder']) === true && $param['holder'] == 'imagelist') {
$images_ids = empty($value) ? array() : explode(',', trim($value));
$output .= '<ul style="margin-top: 5px;" class="attachment-thumbnails' . (empty($images_ids) ? ' image-exists' : '') . '" data-name="' . $param_name . '">';
foreach ($images_ids as $image) {
$img = wpb_getImageBySize(array('attach_id' => (int) $image, 'thumb_size' => 'thumbnail'));
$output .= $img ? '<li>' . $img['thumbnail'] . '</li>' : '<li><img width="150" height="150" test="' . $image . '" src="' . WPBakeryVisualComposer::getInstance()->assetURL('vc/blank.gif') . '" class="attachment-thumbnail" alt="" title="" /></li>';
}
$output .= '</ul>';
}
}
}
}
if (isset($param['admin_label']) && $param['admin_label'] === true) {
$output .= '<span style="max-width: 100%; display: block;" class="vc_admin_label admin_label_' . $param['param_name'] . (empty($value) ? ' hidden-label' : '') . '"><label>' . $param['heading'] . '</label>: ' . $value . '</span>';
}
if ('dropdown' === $param['type'] && 'type' === $param_name) {
$output .= '<a style="max-width: 100%; display: block;" href="#" class="column_edit_trigger" style="margin-bottom: 10px;">' . __('Add, Change or Remove Image(s)', "ts_visual_composer_extend") . '</a>';
}
return $output;
}
示例11: registerJavascript
public function registerJavascript()
{
wp_register_script('isotope', $this->composer->assetURL('lib/isotope/jquery.isotope.min.js'), array('jquery'), WPB_VC_VERSION, true);
wp_register_script('wpb_bootstrap_modals_js', $this->composer->assetURL('lib/bootstrap_modals/js/bootstrap.min.js'), array('jquery'), WPB_VC_VERSION, true);
wp_register_script('wpb_scrollTo_js', $this->composer->assetURL('lib/scrollTo/jquery.scrollTo.min.js'), array('jquery'), WPB_VC_VERSION, true);
wp_register_script('wpb_php_js', $this->composer->assetURL('lib/php.default/php.default.min.js'), array('jquery'), WPB_VC_VERSION, true);
wp_register_script('wpb_json-js', $this->composer->assetURL('lib/json-js/json2.js'), false, WPB_VC_VERSION, true);
wp_register_script('wpb_js_composer_js_tools', $this->composer->assetURL('js/backend/composer-tools.js'), array('jquery', 'backbone', 'wpb_json-js'), WPB_VC_VERSION, true);
wp_register_script('wpb_js_composer_js_atts', $this->composer->assetURL('js/backend/composer-atts.js'), array('wpb_js_composer_js_tools'), WPB_VC_VERSION, true);
wp_register_script('wpb_js_composer_js_storage', $this->composer->assetURL('js/backend/composer-storage.js'), array('wpb_js_composer_js_atts'), WPB_VC_VERSION, true);
wp_register_script('wpb_js_composer_js_models', $this->composer->assetURL('js/backend/composer-models.js'), array('wpb_js_composer_js_storage'), WPB_VC_VERSION, true);
wp_register_script('wpb_js_composer_js_view', $this->composer->assetURL('js/backend/composer-view.js'), array('wpb_js_composer_js_models'), WPB_VC_VERSION, true);
wp_register_script('wpb_js_composer_js_custom_views', $this->composer->assetURL('js/backend/composer-custom-views.js'), array('wpb_js_composer_js_view'), WPB_VC_VERSION, true);
wp_register_script('wpb_jscomposer_media_editor_js', $this->composer->assetURL('js/backend/media-editor.js'), array('media-views', 'media-editor', 'mce-view', 'wpb_js_composer_js_view'), WPB_VC_VERSION, true);
wp_register_script('wpb_jscomposer_autosuggest_js', $this->composer->assetURL('lib/autosuggest/jquery.autoSuggest.js'), array('wpb_js_composer_js_view'), WPB_VC_VERSION, true);
wp_register_script('wpb_jscomposer_teaser_js', WPBakeryVisualComposer::getInstance()->assetURL('js/backend/composer-teaser.js'), array(), WPB_VC_VERSION, true);
wp_localize_script('wpb_js_composer_js_view', 'i18nLocale', array('add_remove_picture' => __('Add/remove picture', 'js_composer'), 'finish_adding_text' => __('Finish Adding Images', 'js_composer'), 'add_image' => __('Add Image', 'js_composer'), 'add_images' => __('Add Images', 'js_composer'), 'main_button_title' => __('Visual Composer', 'js_composer'), 'main_button_title_backend_editor' => __('BACKEND EDITOR', 'js_composer'), 'main_button_title_frontend_editor' => __('FRONTEND EDITOR', 'js_composer'), 'main_button_title_revert' => __('CLASSIC MODE', 'js_composer'), 'please_enter_templates_name' => __('Please enter template name', 'js_composer'), 'confirm_deleting_template' => __('Confirm deleting "{template_name}" template, press Cancel to leave. This action cannot be undone.', 'js_composer'), 'press_ok_to_delete_section' => __('Press OK to delete section, Cancel to leave', 'js_composer'), 'drag_drop_me_in_column' => __('Drag and drop me in the column', 'js_composer'), 'press_ok_to_delete_tab' => __('Press OK to delete "{tab_name}" tab, Cancel to leave', 'js_composer'), 'slide' => __('Slide', 'js_composer'), 'tab' => __('Tab', 'js_composer'), 'section' => __('Section', 'js_composer'), 'please_enter_new_tab_title' => __('Please enter new tab title', 'js_composer'), 'press_ok_delete_section' => __('Press OK to delete "{tab_name}" section, Cancel to leave', 'js_composer'), 'section_default_title' => __('Section', 'js_composer'), 'please_enter_section_title' => __('Please enter new section title', 'js_composer'), 'error_please_try_again' => __('Error. Please try again.', 'js_composer'), 'if_close_data_lost' => __('If you close this window all shortcode settings will be lost. Close this window?', 'js_composer'), 'header_select_element_type' => __('Select element type', 'js_composer'), 'header_media_gallery' => __('Media gallery', 'js_composer'), 'header_element_settings' => __('Element settings', 'js_composer'), 'add_tab' => __('Add tab', 'js_composer'), 'are_you_sure_convert_to_new_version' => __('Are you sure you want to convert to new version?', 'js_composer'), 'loading' => __('Loading...', 'js_composer'), 'set_image' => __('Set Image', 'js_composer'), 'are_you_sure_reset_css_classes' => __('Are you sure taht you want to remove all your data?', 'js_composer'), 'loop_frame_title' => __('Loop settings'), 'enter_custom_layout' => __('Enter custom layout for your row:', 'js_composer'), 'wrong_cells_layout' => __('Wrong row layout format! Example: 1/2 + 1/2 or span6 + span6.', 'js_composer'), 'row_background_color' => __('Row background color', 'js_composer'), 'row_background_image' => __('Row background image', 'js_composer'), 'guides_on' => __('Guides ON', 'js_composer'), 'guides_off' => __('Guides OFF', 'js_composer'), 'template_save' => __('New template successfully saved!', 'js_composer'), 'template_added' => __('Template added to the page.', 'js_composer'), 'template_is_empty' => __('Nothing to save. Template is empty.', 'js_composer'), 'css_updated' => __('Page settings updated!', 'js_composer'), 'update_all' => __('Update all', 'js_composer'), 'confirm_to_leave' => __('The changes you made will be lost if you navigate away from this page.', 'js_composer'), 'inline_element_saved' => __('%s saved!', 'js_composer'), 'inline_element_deleted' => __('%s deleted!', 'js_composer'), 'inline_element_cloned' => __('%s cloned. <a href="#" class="vc-edit-cloned" data-model-id="%s">Edit now?</a>', 'js_composer')));
wp_register_script('wpb_js_theme_admin', $this->composer->assetURL('js/theme_admin.js'), array('jquery'), WPB_VC_VERSION, true);
}
示例12: jsScripts
public function jsScripts()
{
wp_register_script('progressCircle', WPBakeryVisualComposer::getInstance()->assetURL('lib/progress-circle/ProgressCircle.js'));
wp_register_script('vc_pie', WPBakeryVisualComposer::getInstance()->assetURL('js/jquery.vc_chart.js'), array('jquery', 'progressCircle'));
//wp_enqueue_script('vc_pie');
}
示例13: td_vc_init
function td_vc_init()
{
// Force Visual Composer to initialize as "built into the theme". This will hide certain tabs under the Settings->Visual Composer page
if (function_exists('vc_set_as_theme')) {
vc_set_as_theme(true);
}
if (function_exists('wpb_map')) {
//map all of our blocks in page builder
td_global_blocks::wpb_map_all();
}
if (function_exists('vc_disable_frontend')) {
vc_disable_frontend();
}
// @todo - this may not be requiered anynmore
if (class_exists('WPBakeryVisualComposer')) {
//disable visual composer updater
$td_composer = WPBakeryVisualComposer::getInstance();
$td_composer->disableUpdater();
}
}
示例14: nectar_page_specific_js
function nectar_page_specific_js()
{
global $post;
global $options;
global $nectar_disable_vc;
if (!is_object($post)) {
$post = (object) array('post_content' => ' ', 'ID' => ' ');
}
$template_name = get_post_meta($post->ID, '_wp_page_template', true);
//home
if (is_page_template('template-home-1.php') || $template_name == 'salient/template-home-1.php' || is_page_template('template-home-2.php') || $template_name == 'salient/template-home-2.php' || is_page_template('template-home-3.php') || $template_name == 'salient/template-home-3.php' || is_page_template('template-home-4.php') || $template_name == 'salient/template-home-4.php') {
wp_enqueue_script('orbit');
}
////infinite scroll
$portfolio_extra_content = get_post_meta($post->ID, '_nectar_portfolio_extra_content', true);
$posttype = get_post_type($post);
if (stripos($post->post_content, '[nectar_blog') !== FALSE || stripos($portfolio_extra_content, '[nectar_blog') !== FALSE || stripos($post->post_content, 'pagination_type="infinite_scroll"') !== FALSE || stripos($portfolio_extra_content, 'pagination_type="infinite_scroll"') !== FALSE || !empty($options['blog_pagination_type']) && $options['blog_pagination_type'] == 'infinite_scroll' || !empty($options['portfolio_pagination_type']) && $options['portfolio_pagination_type'] == 'infinite_scroll' || (is_archive() || is_author() || is_category() || is_home() || is_tag()) && $posttype == 'post' && !is_singular()) {
wp_register_script('infinite_scroll', get_template_directory_uri() . '/js/infinitescroll.js', array('jquery'), '1.0', TRUE);
wp_enqueue_script('infinite_scroll');
if (floatval(get_bloginfo('version')) >= "3.6") {
wp_enqueue_script('wp-mediaelement');
wp_enqueue_style('wp-mediaelement');
}
if (class_exists('WPBakeryVisualComposerAbstract') && $nectar_disable_vc != '1') {
wp_register_script('progressCircle', WPBakeryVisualComposer::getInstance()->assetURL('lib/progress-circle/ProgressCircle.js'));
wp_register_script('vc_pie', WPBakeryVisualComposer::getInstance()->assetURL('js/jquery.vc_chart.js'), array('jquery', 'progressCircle'));
wp_enqueue_script('vc_pie');
}
}
//nectarSlider mediaElement
if (stripos($post->post_content, '[nectar_slider') !== FALSE || stripos($portfolio_extra_content, '[nectar_slider') !== FALSE || stripos($post->post_content, '[vc_gallery type="nectarslider_style"') !== FALSE || stripos($portfolio_extra_content, '[vc_gallery type="nectarslider_style"') !== FALSE) {
if (floatval(get_bloginfo('version')) >= "3.6") {
//wp_enqueue_script('wp-mediaelement');
//wp_enqueue_style('wp-mediaelement');
} else {
//register media element for WordPress 3.5
//wp_register_script('wp-mediaelement', get_template_directory_uri() . '/js/mediaelement-and-player.min.js', array('jquery'), '1.0', TRUE);
//wp_register_style('wp-mediaelement', get_template_directory_uri() . '/css/mediaelementplayer.min.css');
//wp_enqueue_script('wp-mediaelement');
//wp_enqueue_style('wp-mediaelement');
}
wp_enqueue_script('nectarSlider');
}
//comments
if (is_singular() && comments_open() && get_option('thread_comments')) {
wp_enqueue_script('comment-reply');
}
}
示例15: contentAdmin
public function contentAdmin($atts, $content = null)
{
$width = $el_class = $title = '';
extract(shortcode_atts($this->predefined_atts, $atts));
$output = '';
$column_controls = $this->getColumnControls($this->settings('controls'));
$column_controls_bottom = $this->getColumnControls('add', 'bottom-controls');
if ($width == 'column_14' || $width == '1/4') {
$width = array('span3');
} else {
if ($width == 'column_14-14-14-14') {
$width = array('span3', 'span3', 'span3', 'span3');
} else {
if ($width == 'column_13' || $width == '1/3') {
$width = array('span4');
} else {
if ($width == 'column_13-23') {
$width = array('span4', 'span8');
} else {
if ($width == 'column_13-13-13') {
$width = array('span4', 'span4', 'span4');
} else {
if ($width == 'column_12' || $width == '1/2') {
$width = array('span6');
} else {
if ($width == 'column_12-12') {
$width = array('span6', 'span6');
} else {
if ($width == 'column_23' || $width == '2/3') {
$width = array('span8');
} else {
if ($width == 'column_34' || $width == '3/4') {
$width = array('span9');
} else {
if ($width == 'column_16' || $width == '1/6') {
$width = array('span2');
} else {
$width = array('');
}
}
}
}
}
}
}
}
}
}
for ($i = 0; $i < count($width); $i++) {
$output .= '<div class="group wpb_sortable">';
$output .= '<h3><span class="tab-label"><%= params.title %></span></h3>';
$output .= '<div ' . $this->mainHtmlBlockParams($width, 0) . '>';
$output .= str_replace("%column_size%", wpb_translateColumnWidthToFractional($width[0]), $column_controls);
$output .= '<div class="wpb_element_wrapper">';
$output .= '<div ' . $this->containerHtmlBlockParams($width, 0) . '>';
$output .= '<%= params.text %>';
$output .= do_shortcode(shortcode_unautop($content));
$output .= WPBakeryVisualComposer::getInstance()->getLayout()->getContainerHelper();
$output .= '</div>';
if (isset($this->settings['params'])) {
$inner = '';
foreach ($this->settings['params'] as $param) {
$param_value = isset(${$param}['param_name']) ? ${$param}['param_name'] : '';
if (is_array($param_value)) {
// Get first element from the array
reset($param_value);
$first_key = key($param_value);
$param_value = $param_value[$first_key];
}
$inner .= $this->singleParamHtmlHolder($param, $param_value);
}
$output .= $inner;
}
$output .= '</div>';
$output .= str_replace("%column_size%", wpb_translateColumnWidthToFractional($width[$i]), $column_controls_bottom);
$output .= '</div>';
$output .= '</div>';
}
return $output;
}