Import legacy nurinda.co.id website

This commit is contained in:
dirga committed 2026-10-01 14:27:19 +07:00
1 parent 3f59bb9038
commit 6e21646ac4
13389 files changed
+3246690

No files matched your search

@@ -0,0 +1,61 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
// [shortcodes presets data]
if ( vc_user_access()->part( 'presets' )->can()->get() ) {
require_once vc_path_dir( 'AUTOLOAD_DIR', 'class-vc-settings-presets.php' );
$vc_all_presets = Vc_Settings_Preset::listAllPresets();
} else {
$vc_all_presets = array();
}
// [/shortcodes presets data]
global $wp_version;
?>
<script type="text/javascript">
var vc_all_presets = <?php echo json_encode( $vc_all_presets ) ?>;
var vc_post_id = <?php echo get_the_ID(); ?>;
window.wpbGutenbergEditorUrl = '<?php echo set_url_scheme( admin_url( 'post-new.php?post_type=wpb_gutenberg_param' ) ); ?>';
window.wpbGutenbergEditorSWitchUrl = '<?php echo set_url_scheme( admin_url( 'post.php?post=' . get_the_ID() . '&action=edit&vcv-gutenberg-editor' ) ); ?>';
window.wpbGutenbergEditorClassicSWitchUrl = '<?php echo set_url_scheme( admin_url( 'post.php?post=' . get_the_ID() . '&action=edit&classic-editor' ) ); ?>';
window.wpbIsGutenberg = <?php echo version_compare( $wp_version, '4.9.8', '>' ) && ! get_option( 'wpb_js_gutenberg_disable' ) ? 'true' : 'false' ?>;
</script>
<?php
require_once vc_path_dir( 'EDITORS_DIR', 'navbar/class-vc-navbar.php' );
/** @var $post WP_Post */
$nav_bar = new Vc_Navbar( $post );
$nav_bar->render();
/** @var $editor Vc_Backend_Editor */
?>
<style>
#wpb_visual_composer {
display: none;
}
</style>
<div class="metabox-composer-content">
<div id="visual_composer_content" class="wpb_main_sortable main_wrapper"></div>
<?php require vc_path_dir( 'TEMPLATES_DIR', 'editors/partials/vc_welcome_block.tpl.php' ); ?>
</div>
<?php
$wpb_vc_status = apply_filters( 'wpb_vc_js_status_filter', vc_get_param( 'wpb_vc_js_status', get_post_meta( $post->ID, '_wpb_vc_js_status', true ) ) );
if ( '' === $wpb_vc_status || ! isset( $wpb_vc_status ) ) {
$wpb_vc_status = vc_user_access()->part( 'backend_editor' )->checkState( 'default' )->get() ? 'true' : 'false';
}
?>
<input type="hidden" id="wpb_vc_js_status" name="wpb_vc_js_status" value="<?php echo esc_attr( $wpb_vc_status ); ?>"/>
<input type="hidden" id="wpb_vc_loading" name="wpb_vc_loading"
value="<?php esc_attr_e( 'Loading, please wait...', 'js_composer' ) ?>"/>
<input type="hidden" id="wpb_vc_loading_row" name="wpb_vc_loading_row"
value="<?php esc_attr_e( 'Crunching...', 'js_composer' ) ?>"/>
<input type="hidden" name="vc_post_custom_css" id="vc_post-custom-css"
value="<?php echo esc_attr( $editor->post_custom_css ); ?>" autocomplete="off"/>
<div id="vc_preloader" style="display: none;"></div>
<div id="vc_overlay_spinner" class="vc_ui-wp-spinner vc_ui-wp-spinner-dark vc_ui-wp-spinner-lg" style="display:none;"></div>
<?php vc_include_template( 'editors/partials/access-manager-js.tpl.php' );
@@ -0,0 +1,129 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/** @var $editor Vc_Frontend_Editor */
global $menu, $submenu, $parent_file, $post_ID, $post, $post_type, $post_type_object;
$post_ID = $editor->post_id;
$post = $editor->post;
$post_type = $post->post_type;
$post_type_object = get_post_type_object( $post_type );
$post_title = trim( $post->post_title );
$nonce_action = $nonce_action = 'update-post_' . $editor->post_id;
$user_ID = isset( $editor->current_user ) && isset( $editor->current_user->ID ) ? (int) $editor->current_user->ID : 0;
$form_action = 'editpost';
$menu = array();
add_thickbox();
wp_enqueue_media( array( 'post' => $editor->post_id ) );
require_once( $editor->adminFile( 'admin-header.php' ) );
// @since 4.8 js logic for user role access manager.
vc_include_template( 'editors/partials/access-manager-js.tpl.php' );
?>
<div id="vc_preloader"></div>
<div id="vc_overlay_spinner" class="vc_ui-wp-spinner vc_ui-wp-spinner-dark vc_ui-wp-spinner-lg" style="display:none;"></div>
<script type="text/javascript">
document.getElementById( 'vc_preloader' ).style.height = window.screen.availHeight;
var vc_mode = '<?php echo vc_mode() ?>',
vc_iframe_src = '<?php echo esc_attr( $editor->url ); ?>';
window.wpbGutenbergEditorUrl = '<?php echo set_url_scheme( admin_url( 'post-new.php?post_type=wpb_gutenberg_param' ) ); ?>';
</script>
<input type="hidden" name="vc_post_title" id="vc_title-saved" value="<?php echo esc_attr( $post_title ); ?>"/>
<input type="hidden" name="vc_post_id" id="vc_post-id" value="<?php echo esc_attr( $editor->post_id ); ?>"/>
<?php
// [vc_navbar frontend]
require_once vc_path_dir( 'EDITORS_DIR', 'navbar/class-vc-navbar-frontend.php' );
$nav_bar = new Vc_Navbar_Frontend( $post );
$nav_bar->render();
// [/vc_navbar frontend]
?>
<div id="vc_inline-frame-wrapper"></div>
<?php
// [add element popup/box]
require_once vc_path_dir( 'EDITORS_DIR', 'popups/class-vc-add-element-box.php' );
$add_element_box = new Vc_Add_Element_Box( $editor );
$add_element_box->render();
// [/add element popup/box]
// [shortcodes edit form panel render]
visual_composer()->editForm()->render();
// [/shortcodes edit form panel render]
// [templates panel editor render]
if ( vc_user_access()->part( 'templates' )->can()->get() ) {
visual_composer()->templatesPanelEditor()->renderUITemplate();
}
// [/templates panel editor render]
// [preset panel editor render]
visual_composer()->presetPanelEditor()->renderUIPreset();
// [/preset panel editor render]
// [post settings panel render]
if ( vc_user_access()->part( 'post_settings' )->can()->get() ) {
require_once vc_path_dir( 'EDITORS_DIR', 'popups/class-vc-post-settings.php' );
$post_settings = new Vc_Post_Settings( $editor );
$post_settings->renderUITemplate();
}
// [/post settings panel render]
// [panel edit layout render]
require_once vc_path_dir( 'EDITORS_DIR', 'popups/class-vc-edit-layout.php' );
$edit_layout = new Vc_Edit_Layout();
$edit_layout->renderUITemplate();
// [/panel edit layout render]
// fe controls
vc_include_template( 'editors/partials/frontend_controls.tpl.php' );
// [shortcodes presets data]
if ( vc_user_access()->part( 'presets' )->can()->get() ) {
require_once vc_path_dir( 'AUTOLOAD_DIR', 'class-vc-settings-presets.php' );
$vc_vendor_settings_presets = Vc_Settings_Preset::listDefaultVendorSettingsPresets();
$vc_all_presets = Vc_Settings_Preset::listAllPresets();
} else {
$vc_vendor_settings_presets = array();
$vc_all_presets = array();
}
// [/shortcodes presets data]
?>
<input type="hidden" name="vc_post_custom_css" id="vc_post-custom-css"
value="<?php echo esc_attr( $editor->post_custom_css ); ?>" autocomplete="off"/>
<script type="text/javascript">
var vc_user_mapper = <?php echo json_encode( WPBMap::getUserShortCodes() ) ?>,
vc_mapper = <?php echo json_encode( WPBMap::getShortCodes() ) ?>,
vc_vendor_settings_presets = <?php echo json_encode( $vc_vendor_settings_presets ) ?>,
vc_all_presets = <?php echo json_encode( $vc_all_presets ) ?>,
vc_roles = [], // @todo fix_roles BC for roles
vcAdminNonce = '<?php echo vc_generate_nonce( 'vc-admin-nonce' ); ?>',
vc_post_id = <?php echo $post_ID; ?>;
</script>
<?php vc_include_template( 'editors/partials/vc_settings-image-block.tpl.php' ) ?>
<!-- BC for older plugins 5.5 !-->
<input type="hidden" id="post_ID" name="post_ID" value="<?php echo $post_ID; ?>" />
<div style="height: 1px; visibility: hidden; overflow: hidden;">
<?php
// Disable notice in edit-form-advanced.php
$is_IE = false;
wp_editor( '', 'vc-hidden-editor', array(
'editor_height' => 300,
'tinymce' => array(
'resize' => false,
'wp_autoresize_on' => false,
'add_unload_trigger' => false,
'wp_keep_scroll_position' => ! $is_IE,
),
) );
// Fix: WP 4.0
wp_dequeue_script( 'editor-expand' );
do_action( 'vc_frontend_editor_render_template' );
?>
</div>
<?php
// other admin footer files and actions.
require_once( $editor->adminFile( 'admin-footer.php' ) ); ?>
@@ -0,0 +1,23 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<div id="vc_template-html">
<?php
/** @var $editor Vc_Frontend_Editor */
?>
<?php echo apply_filters( 'vc_frontend_template_the_content', $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( json_encode( $editor->post_shortcodes ) ); ?></div>
@@ -0,0 +1,17 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<div class="<?php echo isset( $css_class ) && ! empty( $css_class ) ? esc_attr( $css_class ) : 'vc_navbar' ?>"
role="navigation"
id="vc_navbar">
<div class="vc_navbar-header">
<?php echo $nav_bar->getLogo() ?>
</div>
<ul class="vc_navbar-nav">
<?php foreach ( $controls as $control ) : echo $control[1]; endforeach; ?>
</ul>
<!--/.nav-collapse -->
</div>
@@ -0,0 +1,94 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<script type="text/javascript" id="vc_role_access_manager_script">
(function ( $ ) {
var _localCapabilities, _check, _groupAccessRules, _shortcodesPartSet, _mergedCaps;
_localCapabilities = <?php echo json_encode( vc_user_roles_get_all() ); ?>;
_shortcodesPartSet = <?php echo vc_bc_access_get_shortcodes_state_is_set( vc_user_access()->part( 'shortcodes' )->getRole() ) ? 'true' : 'false'; ?>;
_groupAccessRules = <?php echo json_encode( array_merge( array( 'current_user' => wp_get_current_user()->roles ), (array) vc_settings()->get( 'groups_access_rules' ) ) ); ?>;
_mergedCaps = <?php echo json_encode( vc_user_access()->part( 'shortcodes' )->getMergedCaps() ) ?>;
_check = function ( part, rule, custom, not_check_state ) {
var state, partObj, findRule;
partObj = _.isUndefined( _localCapabilities[ part ] ) ? {} : _localCapabilities[ part ];
rule = vc_user_access().updateMergedCaps(rule);
if ( ! not_check_state ) {
state = _.isUndefined( partObj.state ) ? false : partObj.state; // if we don't have state it is incorrect part
if ( null === state ) {
return true;
} else if ( _.isBoolean( state ) ) {
return state;
}
}
findRule = (
_.isUndefined( partObj.capabilities ) ||
_.isUndefined( partObj.capabilities[ rule ] )
) ? false : partObj.capabilities[ rule ];
return _.isBoolean( findRule ) ? findRule : findRule === custom;
};
// global function
window.vc_user_access = function () {
return {
editor: function ( editor ) {
return this.partAccess( editor );
},
partAccess: function ( editor ) {
return ! _.isUndefined( _localCapabilities[ editor ] ) && false !== _localCapabilities[ editor ][ 'state' ];
},
check: function ( part, rule, custom, not_check_state ) {
return _check( part, rule, custom, not_check_state );
},
getState: function ( part ) {
var state, partObj;
partObj = _.isUndefined( _localCapabilities[ 'shortcodes' ] ) ? {} : _localCapabilities[ part ];
state = _.isUndefined( partObj.state ) ? false : partObj.state;
return state;
},
shortcodeAll: function ( shortcode ) {
if ( ! _shortcodesPartSet ) {
return this.shortcodeValidateOldMethod( shortcode );
}
var state = this.getState( 'shortcodes' );
if ( state === 'edit' ) {
return false;
}
return _check( 'shortcodes', shortcode + '_all' );
},
shortcodeEdit: function ( shortcode ) {
if ( ! _shortcodesPartSet ) {
return this.shortcodeValidateOldMethod( shortcode );
}
var state = this.getState( 'shortcodes' );
if ( state === 'edit' ) {
return true;
}
return _check( 'shortcodes', shortcode + '_all' ) || _check( 'shortcodes', shortcode + '_edit' );
},
shortcodeValidateOldMethod: function ( shortcode ) {
if ( 'vc_row' === shortcode ) {
return true;
}
return _.every( _groupAccessRules.current_user, function ( role ) {
return ! (! _.isUndefined( _groupAccessRules[ role ] ) && ! _.isUndefined( _groupAccessRules[ role ][ 'shortcodes' ] ) && _.isUndefined( _groupAccessRules[ role ][ 'shortcodes' ][ shortcode ] ));
} );
},
updateMergedCaps: function ( rule ) {
if ( undefined !== _mergedCaps[ rule ] ) {
return _mergedCaps[ rule ];
}
return rule;
}
};
};
<?php do_action( 'vc_acesss_manager-js' ); ?>
})( window.jQuery );
</script>
@@ -0,0 +1,17 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<div class="vc_ui-panel-header-actions">
<div class="vc_ui-search-box">
<div class="vc_ui-search-box-input">
<input type="search" id="vc_elements_name_filter"
placeholder="<?php echo __( 'Search element by name', 'js_composer' ) ?>">
<label for="vc_elements_name_filter">
<i class="vc-composer-icon vc-c-icon-search"></i>
</label>
</div>
</div>
</div>
@@ -0,0 +1,74 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
$other_tab = false;
$tabs = array(
array(
'name' => __( 'All', 'js_composer' ),
'active' => true,
'filter' => '*',
),
);
foreach ( $categories as $key => $name ) {
if ( '_other_category_' === $name ) {
$other_tab = array(
'name' => __( 'Other', 'js_composer' ),
'filter' => '.js-category-' . $key,
'active' => false,
);
continue;
}
if ( 'deprecated' === $name ) {
$name = __( 'Deprecated', 'js_composer' );
$filter = '.js-category-deprecated';
} else if ( '_my_elements_' === $name ) {
$name = __( 'My Elements', 'js_composer' );
$filter = '.js-category-_my_elements_';
} else {
$filter = '.js-category-' . md5( $name );
}
$tabs[] = array(
'name' => $name,
'filter' => $filter,
'active' => false,
);
}
if ( $other_tab ) {
$tabs[] = $other_tab;
}
$tabs = apply_filters( 'vc_add_element_categories', $tabs );
?>
<ul class="vc_general vc_ui-tabs-line" data-vc-ui-element="panel-tabs-controls">
<?php foreach ( $tabs as $v ) : ?>
<?php
$classes = array( 'vc_edit-form-tab-control' );
if ( $v['active'] ) {
$classes[] = 'vc_active';
}
?>
<li class="<?php echo implode( ' ', $classes ) ?>" data-vc-ui-element="panel-add-element-tab">
<button class="vc_ui-tabs-line-trigger vc_add-element-filter-button"
data-vc-ui-element="panel-tab-control"
data-filter="<?php echo $v['filter'] ?>">
<?php echo $v['name'] ?>
</button>
</li>
<?php endforeach ?>
<li class="vc_ui-tabs-line-dropdown-toggle" data-vc-action="dropdown" data-vc-content=".vc_ui-tabs-line-dropdown" data-vc-ui-element="panel-tabs-line-toggle">
<span class="vc_ui-tabs-line-trigger" data-vc-accordion="" data-vc-container=".vc_ui-tabs-line-dropdown-toggle"
data-vc-target=".vc_ui-tabs-line-dropdown"> </span>
<ul class="vc_ui-tabs-line-dropdown" data-vc-ui-element="panel-tabs-line-dropdown"></ul>
</li>
</ul>
@@ -0,0 +1,50 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
global $current_user;
wp_get_current_user();
require_once vc_path_dir( 'AUTOLOAD_DIR', 'class-vc-settings-presets.php' );
if ( vc_user_access()->part( 'presets' )->can()->get() ) {
$vc_vendor_settings_presets = Vc_Settings_Preset::listDefaultVendorSettingsPresets();
$vc_all_presets = Vc_Settings_Preset::listAllPresets();
} else {
$vc_vendor_settings_presets = array();
$vc_all_presets = array();
}
?>
<script type="text/javascript">
var vc_user_mapper = <?php echo json_encode( WPBMap::getUserShortCodes() ) ?>,
vc_mapper = <?php echo json_encode( WPBMap::getShortCodes() ) ?>,
vc_vendor_settings_presets = <?php echo json_encode( $vc_vendor_settings_presets ) ?>,
vc_roles = [], // @todo fix_roles check BC
vc_frontend_enabled = <?php echo vc_enabled_frontend() ? 'true' : 'false' ?>,
vc_all_presets = <?php echo json_encode( $vc_all_presets ) ?>,
vc_mode = '<?php echo vc_mode() ?>',
vcAdminNonce = '<?php echo vc_generate_nonce( 'vc-admin-nonce' ); ?>';
</script>
<?php vc_include_template( 'editors/partials/vc_settings-image-block.tpl.php' ) ?>
<?php foreach ( WPBMap::getShortCodes() as $sc_base => $el ) : ?>
<script type="text/html" id="vc_shortcode-template-<?php echo $sc_base ?>">
<?php
echo visual_composer()->getShortCode( $sc_base )->template();
?>
</script>
<?php endforeach ?>
<script type="text/html" id="vc_row-inner-element-template">
<?php
echo visual_composer()->getShortCode( 'vc_row_inner' )->template();
?>
</script>
<script type="text/html" id="vc_settings-page-param-block">
<div class="row-fluid wpb_el_type_<%= type %>">
<div class="wpb_element_label"><%= heading %></div>
<div class="edit_form_line">
<%= form_element %>
</div>
</div>
</script>
@@ -0,0 +1,40 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
$editAccess = vc_user_access_check_shortcode_edit( $shortcode );
$allAccess = vc_user_access_check_shortcode_all( $shortcode );
$moveAccess = vc_user_access()->part( 'dragndrop' )->checkStateAny( true, null )->get();
?>
<div class="vc_controls<?php echo ! empty( $extended_css ) ? ' ' . $extended_css : '' ?>">
<div class="vc_controls-<?php echo $position ?>">
<a class="<?php echo esc_attr( $name_css_class ) ?>">
<span class="vc_btn-content"
title="<?php if ( $allAccess && $moveAccess ) :
printf( __( 'Drag to move %s', 'js_composer' ), $name ); ?>"><i class="vc-composer-icon vc-c-icon-dragndrop"></i><?php else : print( $name );
echo '">';
endif; ?><?php echo $name ?></span>
</a>
<?php foreach ( $controls as $control ) : ?>
<?php if ( 'add' === $control && $add_allowed ) : ?>
<a class="vc_control-btn vc_control-btn-prepend vc_edit" href="#"
title="<?php printf( __( 'Prepend to %s', 'js_composer' ), $name ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-add"></i></span></a>
<?php elseif ( $editAccess && 'edit' === $control ) : ?>
<a class="vc_control-btn vc_control-btn-edit" href="#"
title="<?php printf( __( 'Edit %s', 'js_composer' ), $name ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-mode_edit"></i></span></a>
<?php elseif ( $allAccess && 'clone' === $control ) : ?>
<a class="vc_control-btn vc_control-btn-clone" href="#"
title="<?php printf( __( 'Clone %s', 'js_composer' ), $name ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-content_copy"></i></span></a>
<?php elseif ( $allAccess && 'delete' === $control ) : ?>
<a class="vc_control-btn vc_control-btn-delete" href="#"
title="<?php printf( __( 'Delete %s', 'js_composer' ), $name ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-delete_empty"></i></span></a>
<?php endif ?>
<?php endforeach ?>
</div>
</div>
@@ -0,0 +1,38 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
$editAccess = vc_user_access_check_shortcode_edit( $shortcode );
$allAccess = vc_user_access_check_shortcode_all( $shortcode );
?>
<div class="vc_controls<?php echo ! empty( $extended_css ) ? ' ' . $extended_css : '' ?>">
<div class="vc_controls-<?php echo $position ?>">
<a class="vc_element-name">
<span class="vc_btn-content"><?php echo $name ?></span>
</a>
<?php foreach ( $controls as $control ) : ?>
<?php if ( 'add' === $control && vc_user_access()
->part( 'shortcodes' )
->checkStateAny( true, 'custom', null )
->get() ) : ?>
<a class="vc_control-btn vc_control-btn-prepend vc_edit" href="#"
title="<?php printf( __( 'Prepend to %s', 'js_composer' ), $name ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-add"></i></span></a>
<?php elseif ( $editAccess && 'edit' === $control ) : ?>
<a class="vc_control-btn vc_control-btn-edit" href="#"
title="<?php printf( __( 'Edit %s', 'js_composer' ), $name ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-mode_edit"></i></span></a>
<?php elseif ( $allAccess && 'clone' === $control ) : ?>
<a class="vc_control-btn vc_control-btn-clone" href="#"
title="<?php printf( __( 'Clone %s', 'js_composer' ), $name ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-content_copy"></i></span></a>
<?php elseif ( $allAccess && 'delete' === $control ) : ?>
<a class="vc_control-btn vc_control-btn-delete" href="#"
title="<?php printf( __( 'Delete %s', 'js_composer' ), $name ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-delete_empty"></i></span></a>
<?php endif ?>
<?php endforeach ?>
</div>
</div>
@@ -0,0 +1,42 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/** @var $edit Vc_Backend_Editor */
// [add element box]
require_once vc_path_dir( 'EDITORS_DIR', 'popups/class-vc-add-element-box.php' );
$add_element_box = new Vc_Add_Element_Box();
$add_element_box->render();
// [/add element box]
// [rendering edit form]
visual_composer()->editForm()->render();
// [/rendering edit form]
// [rendering templates panel editor]
if ( vc_user_access()->part( 'templates' )->can()->get() ) {
visual_composer()->templatesPanelEditor()->renderUITemplate();
}
// [/rendering templates panel editor]
// [preset panel editor render]
visual_composer()->presetPanelEditor()->renderUIPreset();
// [/preset panel editor render]
// [post settings]
if ( vc_user_access()->part( 'post_settings' )->can()->get() ) {
require_once vc_path_dir( 'EDITORS_DIR', 'popups/class-vc-post-settings.php' );
$post_settings = new Vc_Post_Settings( $editor );
$post_settings->renderUITemplate();
}
// [/post settings]
// [shortcode edit layout]
require_once vc_path_dir( 'EDITORS_DIR', 'popups/class-vc-edit-layout.php' );
$edit_layout = new Vc_Edit_Layout();
$edit_layout->renderUITemplate();
// [/shortcode edit layout]
vc_include_template( 'editors/partials/backend-shortcodes-templates.tpl.php' );
@@ -0,0 +1,311 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<script type="text/html" id="vc_controls-template-default">
<div
class="vc_controls-element" data-can-all="{{ can_all }}" data-can-edit="{{ can_edit }}">
<div class="vc_controls-cc">
<a class="vc_control-btn vc_element-name{# if( can_all && moveAccess ) { #} vc_element-move{# } #}"><span
class="vc_btn-content"
title="{# if( can_all && moveAccess ) { #}<?php printf( __( 'Drag to move %s', 'js_composer' ), '{{ name }}' ) ?>{# } #}">{# if( can_all && moveAccess ) { #}<i class="vc-composer-icon vc-c-icon-dragndrop"></i>{# } #}
{{ name }}
</span></a>{# if( can_edit ) { #}<a
class="vc_control-btn vc_control-btn-edit" data-control="edit" href="#"
title="<?php printf( __( 'Edit %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-mode_edit"></i></span></a>{# }
if( can_all ) { #}<a class="vc_control-btn vc_control-btn-clone"
data-control="clone"
href="#"
title="<?php printf( __( 'Clone %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-content_copy"></i></span></a><a
class="vc_control-btn vc_control-btn-delete" data-control="delete" href="#"
title="<?php printf( __( 'Delete %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-delete_empty"></i></span></a>{# } #}
</div>
</div>
</script>
<script type="text/html" id="vc_controls-template-container">
<div class="vc_controls-container">
<div class="vc_controls-out-tl">
<div class="vc_element element-{{ tag }}">
<a class="vc_control-btn vc_element-name{# if( can_all && moveAccess ) { #} vc_element-move{# } #}"
title="{# if( can_all && moveAccess ) { #}<?php printf( __( 'Drag to move %s', 'js_composer' ), '{{ name }}' ) ?>{# } #}">{# if( can_all && moveAccess ) { #}<span
class="vc_btn-content">
<i class="vc-composer-icon vc-c-icon-dragndrop"></i>{{ name }}</span>{# } else { #}<span
class="vc_btn-content">
{{ name }}</span>{# } #}</a>{# if( can_edit ) { #}<a class="vc_control-btn vc_control-btn-edit"
href="#"
title="<?php printf( __( 'Edit %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-mode_edit"></i></span></a>{# } #}{# if( 'edit' !== state ) { #}<a
class="vc_control-btn vc_control-btn-prepend" href="#"
title="<?php printf( __( 'Prepend to %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-add"></i></span></a>{# } #}{# if( can_all ) { #}<a
class="vc_control-btn vc_control-btn-clone" href="#"
title="<?php printf( __( 'Clone %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-content_copy"></i></span></a><a
class="vc_control-btn vc_control-btn-delete" href="#"
title="<?php printf( __( 'Delete %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-delete_empty"></i></span></a>{# } #}
</div>
</div>
{# if( 'edit' !== state ) { #}
<div class="vc_controls-bc">
<a class="vc_control-btn vc_control-btn-append" href="#"
title="<?php printf( __( 'Append to %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-add"></i></span></a>
</div>
{# } #}
</div><!-- end vc_controls-column -->
</script>
<script type="text/html" id="vc_controls-template-container-width-parent">
<div class="vc_controls-column">
<div class="vc_controls-out-tl">
<div class="vc_parent parent-{{ parent_tag }}"><a
class="vc_control-btn vc_element-name{# if( parent_can_all && moveAccess ) { #} vc_move-{{ parent_tag }} vc_element-move{# } #}"
title="{# if( can_all && moveAccess ) { #}<?php printf( __( 'Drag to move %s', 'js_composer' ), '{{ parent_name }}' ) ?>{# } #}">{# if( can_all && moveAccess ) { #}<span
class="vc_btn-content">
<i class="vc-composer-icon vc-c-icon-dragndrop"></i>
{{ parent_name }}</span>{# } else { #}<span
class="vc_btn-content">
{{ parent_name }}</span>{# } #}</a><span class="advanced">{# if( parent_can_edit ) { #}<a
class="vc_control-btn vc_control-btn-edit vc_edit" href="#"
title="<?php printf( __( 'Edit %s', 'js_composer' ), '{{ parent_name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-mode_edit"></i></span></a>{# } #}{# if( allowAdd ) { #}<a
class="vc_control-btn vc_control-btn-prepend vc_edit" href="#"
title="<?php printf( __( 'Prepend to %s', 'js_composer' ), '{{ parent_name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-add"></i></span></a>{# } #}{# if( parent_can_all ) { #}<a
class="vc_control-btn vc_control-btn-clone" href="#"
title="<?php printf( __( 'Clone %s', 'js_composer' ), '{{ parent_name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-content_copy"></i></span></a><a
class="vc_control-btn vc_control-btn-delete" href="#"
title="<?php printf( __( 'Delete %s', 'js_composer' ), '{{ parent_name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-delete_empty"></i></span></a>{# } #}</span><a
class="vc_control-btn vc_control-btn-switcher{{ switcherPrefix }}"
title="<?php printf( __( 'Show %s controls', 'js_composer' ), '{{ parent_name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-arrow_drop_right"></i></span></a>
</div>
<div class="vc_element element-{{ tag }} vc_active"><a
class="vc_control-btn vc_element-name vc_move-{{ tag }} {# if( can_all && moveAccess ) { #}vc_element-move{# } #}"
title="{# if( can_all && moveAccess ) { #}<?php printf( __( 'Drag to move %s', 'js_composer' ), '{{ name }}' ) ?>{# } #}">{# if( can_all && moveAccess ) { #}<span
class="vc_btn-content">
<i class="vc-composer-icon vc-c-icon-dragndrop"></i>
{{ name }}</span>{# } else { #}<span
class="vc_btn-content">
{{ name }}</span>{# } #}</a><span class="advanced">{# if( can_edit ) { #}<a
class="vc_control-btn vc_control-btn-edit" href="#"
title="<?php printf( __( 'Edit %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-mode_edit"></i></span></a>{# } #}{# if( 'edit' !== state ) { #}<a
class="vc_control-btn vc_control-btn-prepend" href="#"
title="<?php printf( __( 'Prepend to %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-add"></i></span></a></span>{# } #}<a
class="vc_control-btn vc_control-btn-switcher{{ switcherPrefix }}"
title="<?php printf( __( 'Show %s controls', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-arrow_drop_right"></i></span></a>
</div>
</div>
{# if( 'edit' !== state ) { #}
<div class="vc_controls-bc">
<a class="vc_control-btn vc_control-btn-append" href="#"
title="<?php printf( __( 'Append to %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-add"></i></span></a>
</div>
{# } #}
</div><!-- end vc_controls-column -->
</script>
<script type="text/html" id="vc_controls-template-vc_column">
<div class="vc_controls-column">
<div class="vc_controls-out-tl">
<div class="vc_parent parent-{{ parent_tag }}"><a
class="vc_control-btn vc_element-name{# if( parent_can_all && moveAccess ) { #} vc_element-move vc_move-{{ parent_tag }}{# } #}"
title="{# if( parent_can_all && moveAccess ) { #}<?php printf( __( 'Drag to move %s', 'js_composer' ), '{{ parent_name }}' ) ?>{# } #}">{# if( parent_can_all && moveAccess ) { #}<span
class="vc_btn-content">
<i class="vc-composer-icon vc-c-icon-dragndrop"></i>
{{ parent_name }}</span>{# } else { #}<span
class="vc_btn-content">
{{ parent_name }}</span>{# } #}</a><span class="vc_advanced{{ switcherPrefix }}">{# if( parent_can_edit ) { #}<a
class="vc_control-btn vc_control-btn-edit vc_edit" href="#"
title="<?php printf( __( 'Edit %s', 'js_composer' ), '{{ parent_name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-mode_edit"></i></span></a>{# } #}{# if( parent_can_all ) { #}<a
class="vc_control-btn vc_control-btn-layout vc_edit" href="#"
title="<?php printf( __( 'Change layout', 'js_composer' ) ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-row_default_fe"></i></span></a>{# } #}{# if( allowAdd ) { #}<a
class="vc_control-btn vc_control-btn-prepend vc_edit" href="#"
title="<?php printf( __( 'Add new %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-add"></i></span></a>{# } #}{# if( parent_can_all ) { #}<a
class="vc_control-btn vc_control-btn-clone" href="#"
title="<?php printf( __( 'Clone %s', 'js_composer' ), '{{ parent_name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-content_copy"></i></span></a><a
class="vc_control-btn vc_control-btn-delete" href="#"
title="<?php printf( __( 'Delete %s', 'js_composer' ), '{{ parent_name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-delete_empty"></i></span></a>{# } #}</span><a
class="vc_control-btn vc_control-btn-switcher{{ switcherPrefix }}"
title="<?php printf( __( 'Show %s controls', 'js_composer' ), '{{ parent_name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-arrow_drop_right"></i></span></a>
</div>
<div class="vc_element element-{{ tag }} vc_active"><a
class="vc_control-btn vc_element-name{# if( can_all && moveAccess ) { #} vc_element-move vc_move-vc_column{# } #}"
title="{# if( can_all && moveAccess ) { #}<?php printf( __( 'Drag to move %s', 'js_composer' ), '{{ name }}' ) ?>{# } #}">{# if( can_all && moveAccess ) { #}<span
class="vc_btn-content">
<i class="vc-composer-icon vc-c-icon-dragndrop"></i>
{{ name }}</span>{# } else { #}<span
class="vc_btn-content">
{{ name }}</span>{# } #}</a><span class="vc_advanced{{ switcherPrefix }}">{# if( can_edit ) { #}<a
class="vc_control-btn vc_control-btn-edit" href="#"
title="<?php printf( __( 'Edit %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-mode_edit"></i></span></a>{# } #}{# if( 'edit' !== state ) { #}<a
class="vc_control-btn vc_control-btn-prepend" href="#"
title="<?php printf( __( 'Prepend to %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-add"></i></span></a>{# } #}{# if( can_all ) { #}<a
class="vc_control-btn vc_control-btn-delete" href="#"
title="<?php printf( __( 'Delete %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-delete_empty"></i></span></a>{# } #}"></span><a
class="vc_control-btn vc_control-btn-switcher{{ switcherPrefix }}"
title="<?php printf( __( 'Show %s controls', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-arrow_drop_right"></i></span></a>
</div>
</div>
{# if( 'edit' !== state ) { #}
<div class="vc_controls-bc">
<a class="vc_control-btn vc_control-btn-append" href="#"
title="<?php printf( __( 'Append to %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-add"></i></span></a>
</div>
{# } #}
</div><!-- end vc_controls-column -->
</script>
<script type="text/html" id="vc_controls-template-vc_tab">
<div class="vc_controls-column">
<div class="vc_controls-out-tr">
<div class="vc_parent parent-{{ parent_tag }}"><a
class="vc_control-btn vc_element-name vc_move-{{ parent_tag }}{# if( parent_can_all && moveAccess ) { #} vc_element-move{# } #}"
title="{# if( parent_can_all && moveAccess ) { #}<?php printf( __( 'Drag to move %s', 'js_composer' ), '{{ parent_name }}' ) ?>{# } #}">{# if( parent_can_all && moveAccess ) { #}<span
class="vc_btn-content">
<i class="vc-composer-icon vc-c-icon-dragndrop"></i>
{{ parent_name }}</span>{# } else { #}<span
class="vc_btn-content">
{{ parent_name }}</span>{# } #}</a><span class="vc_advanced{{ switcherPrefix }}">{# if( parent_can_edit ) { #}<a
class="vc_control-btn vc_control-btn-edit vc_edit" href="#"
title="<?php printf( __( 'Edit %s', 'js_composer' ), '{{ parent_name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-mode_edit"></i></span></a>{# } #}{# if( allowAdd ) { #}<a
class="vc_control-btn vc_control-btn-prepend vc_edit" href="#"
class="vc_control-btn vc_control-btn-prepend vc_edit" href="#"
title="<?php printf( __( 'Add new %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-add"></i></span></a>{# } #}{# if( parent_can_all ) { #}<a
class="vc_control-btn vc_control-btn-clone" href="#"
title="<?php printf( __( 'Clone %s', 'js_composer' ), '{{ parent_name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-content_copy"></i></span></a><a
class="vc_control-btn vc_control-btn-delete" href="#"
title="<?php printf( __( 'Delete %s', 'js_composer' ), '{{ parent_name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-delete_empty"></i></span></a>{# } #}</span><a
class="vc_control-btn vc_control-btn-switcher{{ switcherPrefix }}"
title="<?php printf( __( 'Show %s controls', 'js_composer' ), '{{ parent_name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-arrow_drop_right"></i></span></a>
</div>
<div class="vc_element element-{{ tag }} vc_active"><a
class="vc_control-btn vc_element-name vc_move-{{ tag }}{# if( can_all && moveAccess ) { #} vc_element-move{# } #}"
title="{# if( can_all && moveAccess ) { #}<?php printf( __( 'Drag to move %s', 'js_composer' ), '{{ name }}' ) ?>{# } #}">{# if( can_all && moveAccess ) { #}<span
class="vc_btn-content">
<i class="vc-composer-icon vc-c-icon-dragndrop"></i>
{{ name }}</span>{# } else { #}<span
class="vc_btn-content">
{{ name }}</span>{# } #}</a><span class="vc_advanced{{ switcherPrefix }}">{# if( can_edit ) { #}<a
class="vc_control-btn vc_control-btn-edit" href="#"
title="<?php printf( __( 'Edit %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-mode_edit"></i></span></a>{# } #}{# if( 'edit' !== state ) { #}<a
class="vc_control-btn vc_control-btn-prepend" href="#"
title="<?php printf( __( 'Prepend to %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-add"></i></a>{# } #}{# if( can_all ) { #}<a
class="vc_control-btn vc_control-btn-clone" href="#"
title="<?php printf( __( 'Clone %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-content_copy"></i></span></a><a
class="vc_control-btn vc_control-btn-delete" href="#"
title="<?php printf( __( 'Delete %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-delete_empty"></i></span></a>{# } #}</span><a
class="vc_control-btn vc_control-btn-switcher{{ switcherPrefix }}"
title="<?php printf( __( 'Show %s controls', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-arrow_drop_right"></i></span></a>
</div>
</div>
{# if( 'edit' !== state ) { #}
<div class="vc_controls-bc">
<a class="vc_control-btn vc_control-btn-append" href="#"
title="<?php printf( __( 'Append to %s', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-add"></i></span></a>
</div>
{# } #}
</div><!-- end vc_controls-column -->
</script>
<script type="text/html" id="vc_controls-template-vc_tta_section">
<div class="vc_controls-container">
<div class="vc_controls-out-tr">
<div class="vc_parent parent-{{ parent_tag }}"><a
class="vc_control-btn vc_element-name vc_move-{{ parent_tag }}{# if( parent_can_all && moveAccess ) { #} vc_element-move{# } #}"
title="{# if( parent_can_all && moveAccess ) { #}<?php printf( __( 'Drag to move %s', 'js_composer' ), '{{ parent_name }}' ) ?>{# } #}">{# if( parent_can_all && moveAccess ) { #}<span
class="vc_btn-content">
<i class="vc-composer-icon vc-c-icon-dragndrop"></i>
{{ parent_name }}</span>{# } else { #}<span
class="vc_btn-content">
{{ parent_name }}</span>{# } #}</a><span class="vc_advanced{{ switcherPrefix }}">{# if( parent_can_edit ) { #}<a
class="vc_control-btn vc_control-btn-edit vc_edit" href="#"
title="<?php printf( __( 'Edit %s', 'js_composer' ), '{{ parent_name }}' ) ?>"
data-vc-control="parent.edit"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-mode_edit"></i></span></a>{# } #}{# if( allowAdd ) { #}<a
class="vc_control-btn vc_control-btn-prepend vc_edit" href="#"
title="<?php printf( __( 'Add new %s', 'js_composer' ), '{{ name }}' ) ?>"
data-vc-control="parent.append"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-add"></i></span></a>{# } #}{# if( parent_can_all ) { #}<a
class="vc_control-btn vc_control-btn-clone" href="#"
title="<?php printf( __( 'Clone %s', 'js_composer' ), '{{ parent_name }}' ) ?>"
data-vc-control="parent.clone"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-content_copy"></i></span></a><a
class="vc_control-btn vc_control-btn-delete" href="#"
title="<?php printf( __( 'Delete %s', 'js_composer' ), '{{ parent_name }}' ) ?>"
data-vc-control="parent.destroy"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-delete_empty"></i></span></a>{# } #}</span><a
class="vc_control-btn vc_control-btn-switcher{{ switcherPrefix }}"
title="<?php printf( __( 'Show %s controls', 'js_composer' ), '{{ parent_name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-arrow_drop_right"></i></span></a>
</div>
<div class="vc_element element-{{ tag }} vc_active"><a
class="vc_control-btn vc_element-name vc_move-{{ tag }}{# if( can_all && moveAccess ) { #} vc_child-element-move{# } #}"
title="{# if( can_all && moveAccess ) { #}<?php printf( __( 'Drag to move %s', 'js_composer' ), '{{ name }}' ) ?>{# } #}">{# if( can_all && moveAccess ) { #}<span
class="vc_btn-content">
<i class="vc-composer-icon vc-c-icon-dragndrop"></i>
{{ name }}</span>{# } else { #}<span
class="vc_btn-content">
{{ name }}</span>{# } #}</a><span class="vc_advanced{{ switcherPrefix }}">{# if( can_edit ) { #}<a
class="vc_control-btn vc_control-btn-edit" href="#"
title="<?php printf( __( 'Edit %s', 'js_composer' ), '{{ name }}' ) ?>"
data-vc-control="edit"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-mode_edit"></i></span></a>{# } #}{# if( 'edit' !== state ) { #}<a
class="vc_control-btn vc_control-btn-prepend" href="#"
title="<?php printf( __( 'Prepend to %s', 'js_composer' ), '{{ name }}' ) ?>"
data-vc-control="prepend"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-add"></i></span></a>{# } #}{# if( can_all ) { #}<a
class="vc_control-btn vc_control-btn-clone" href="#"
title="<?php printf( __( 'Clone %s', 'js_composer' ), '{{ name }}' ) ?>"
data-vc-control="clone"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-content_copy"></i></span></a><a
class="vc_control-btn vc_control-btn-delete" href="#"
title="<?php printf( __( 'Delete %s', 'js_composer' ), '{{ name }}' ) ?>"
data-vc-control="destroy"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-delete_empty"></i></span></a>{# } #}</span><a
class="vc_control-btn vc_control-btn-switcher{{ switcherPrefix }}"
title="<?php printf( __( 'Show %s controls', 'js_composer' ), '{{ name }}' ) ?>"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-arrow_drop_right"></i></span></a>
</div>
</div>
{# if( 'edit' !== state ) { #}
<div class="vc_controls-bc">
<a class="vc_control-btn vc_control-btn-append" href="#"
title="<?php printf( __( 'Append to %s', 'js_composer' ), '{{ name }}' ) ?>"
data-vc-control="append"><span
class="vc_btn-content"><i class="vc-composer-icon vc-c-icon-add"></i></span></a>
</div>
{# } #}
</div><!-- end vc_controls-vc_tta_section -->
</script>
@@ -0,0 +1,15 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<script type="text/javascript">
window.vc_post_shortcodes = JSON.parse( decodeURIComponent( ("<?php echo rawurlencode( json_encode( $editor->post_shortcodes ) ); ?>" + '') ) );
</script>
<?php /*
<?php echo json_encode($editor->post_shortcodes); ?>
JSON.parse(decodeURIComponent(("<?php echo urlencode(json_encode($editor->post_shortcodes)); ?>"+'').replace(/\+/g,'%20')));
*/
?>
@@ -0,0 +1,32 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<form class="vc_ui-prompt vc_ui-prompt-presets">
<div class="vc_ui-prompt-controls">
<button type="button" class="vc_general vc_ui-control-button vc_ui-prompt-close">
<i class="vc-composer-icon vc-c-icon-close"></i>
</button>
</div>
<div class="vc_ui-prompt-title">
<label for="prompt_title" class="wpb_element_label"><?php _e( 'Element Title', 'js_composer' ) ?></label>
</div>
<div class="vc_ui-prompt-content">
<div class="vc_ui-prompt-column">
<div class="wpb_el_type_textfield vc_wrapper-param-type-textfield vc_properties-list">
<div class="edit_form_line">
<input name="title" id="prompt_title" class="wpb_vc_param_value wpb-textinput h4 textfield"
type="text" value="" data-vc-disable-empty="#vc_ui-save-preset-btn">
<span
class="vc_description vc_clearfix"><?php _e( 'Enter element title.', 'js_composer' ) ?></span>
</div>
</div>
</div>
<div class="vc_ui-prompt-column">
<button type="buttom"
class="vc_general vc_ui-button vc_ui-button-size-sm vc_ui-button-action vc_ui-button-shape-rounded" id="vc_ui-save-preset-btn" disabled><?php _e( 'Save changes', 'js_composer' ) ?></button>
</div>
</div>
</form>
@@ -0,0 +1,32 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<form class="vc_ui-prompt vc_ui-prompt-templates">
<div class="vc_ui-prompt-controls">
<button type="button" class="vc_general vc_ui-control-button vc_ui-prompt-close">
<i class="vc-composer-icon vc-c-icon-close"></i>
</button>
</div>
<div class="vc_ui-prompt-title">
<label for="prompt_title" class="wpb_element_label"><?php _e( 'Template Title', 'js_composer' ) ?></label>
</div>
<div class="vc_ui-prompt-content">
<div class="vc_ui-prompt-column">
<div class="wpb_el_type_textfield vc_wrapper-param-type-textfield vc_properties-list">
<div class="edit_form_line">
<input name="title" id="prompt_templates_title" class="wpb_vc_param_value wpb-textinput h4 textfield"
type="text" value="" data-vc-disable-empty="#vc_ui-save-templates-btn">
<span
class="vc_description vc_clearfix"><?php _e( 'Enter element template title.', 'js_composer' ) ?></span>
</div>
</div>
</div>
<div class="vc_ui-prompt-column">
<button type="buttom"
class="vc_general vc_ui-button vc_ui-button-size-sm vc_ui-button-action vc_ui-button-shape-rounded" id="vc_ui-save-templates-btn" disabled><?php _e( 'Save changes', 'js_composer' ) ?></button>
</div>
</div>
</form>
@@ -0,0 +1,38 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
$saveAsTemplateElements = apply_filters( 'vc_popup_save_as_template_elements', array(
'vc_row',
'vc_section',
) );
?>
<div class="vc_ui-list-bar-group">
<?php if ( in_array( $shortcode_name, $saveAsTemplateElements ) && vc_user_access()->part( 'templates' )->checkStateAny( true, null )->get() ) : ?>
<ul class="vc_ui-list-bar">
<li class="vc_ui-list-bar-item">
<button type="button" class="vc_ui-list-bar-item-trigger" data-vc-save-template>
<?php _e( 'Save as template', 'js_composer' ) ?>
</button>
</li>
</ul>
<?php endif; ?>
<?php if ( ! in_array( $shortcode_name, $saveAsTemplateElements ) && vc_user_access()->part( 'presets' )->checkStateAny( true, null )->get() ) : ?>
<ul class="vc_ui-list-bar">
<li class="vc_ui-list-bar-item">
<button type="button" class="vc_ui-list-bar-item-trigger" data-vc-save-settings-preset>
<?php _e( 'Save as Element', 'js_composer' ) ?>
</button>
</li>
</ul>
<?php endif; ?>
<script>
window.vc_presets_data = {
"presets": <?php echo json_encode( $list_presets ); ?>,
"presetsCount": <?php echo count( $list_presets[0] ) + count( $list_presets[1] ); ?>,
"defaultId": <?php echo (int) $default_id; ?>,
"can": <?php echo (int) vc_user_access()->part( 'presets' )->can()->get(); ?>,
"defaultTitle": "<?php echo esc_attr__( 'Untitled', 'js_composer' ); ?>"
}
</script>
</div>
@@ -0,0 +1,17 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<div class="vc_ui-panel-header-actions">
<div class="vc_ui-search-box">
<div class="vc_ui-search-box-input">
<input type="search" id="vc_templates_name_filter" data-vc-templates-name-filter
placeholder="<?php echo __( 'Search template by name', 'js_composer' ) ?>">
<label for="vc_templates_name_filter">
<i class="vc-composer-icon vc-c-icon-search"></i>
</label>
</div>
</div>
</div>
@@ -0,0 +1,14 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<script type="text/html" id="vc_settings-image-block">
<li class="added">
<div class="inner" style="width: 80px; height: 80px; overflow: hidden;text-align: center;">
<img rel="{{ id }}" src="<# if(obj.sizes && obj.sizes.thumbnail) { #>{{ sizes.thumbnail.url }}<# } else {#>{{ url }}<# } #>"/>
</div>
<a href="#" class="vc_icon-remove"><i class="vc-composer-icon vc-c-icon-close"></i></a>
</li>
</script>
@@ -0,0 +1,20 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<div class="vc_ui-dropdown" data-vc-ui-element="settings-dropdown" data-vc-action="dropdown"
data-vc-content=".vc_ui-dropdown-content">
<div class="vc_ui-dropdown-trigger">
<button class="vc_general vc_ui-control-button vc_ui-settings-button" type="button" title="<?php _e( 'Element Settings', 'js_composer' ); ?>"
data-vc-ui-element="settings-dropdown-button"
data-vc-accordion
data-vc-container=".vc_ui-dropdown" data-vc-target=".vc_ui-dropdown">
<i class="vc-composer-icon vc-c-icon-cog"> </i>
<i class="vc-composer-icon vc-c-icon-check"> </i>
</button>
</div>
<div class="vc_ui-dropdown-content" data-vc-ui-element="settings-dropdown-list">
</div>
</div>
@@ -0,0 +1,27 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/** @var $box Vc_Templates_Panel_Editor */
$with_tabs = count( $categories ) > 0;
if ( count( $categories ) > 0 ) :
$first = true;
?>
<ul class="vc_general vc_ui-tabs-line" data-vc-ui-element="panel-tabs-controls">
<?php foreach ( $categories as $key => $value ) :
echo '<li'
. ' class="vc_panel-tabs-control' . ( $first ? ' vc_active' : '' ) . '"><button data-vc-ui-element-target="[data-tab='
. trim( esc_attr( $key ) )
. ']" class="vc_ui-tabs-line-trigger" data-vc-ui-element="panel-tab-control">' . esc_html( $value ) . '</button>';
echo '</li>';
$first = false;
endforeach;
echo '<li class="vc_ui-tabs-line-dropdown-toggle" data-vc-action="dropdown" data-vc-content=".vc_ui-tabs-line-dropdown" data-vc-ui-element="panel-tabs-line-toggle">
<span class="vc_ui-tabs-line-trigger" data-vc-accordion="" data-vc-container=".vc_ui-tabs-line-dropdown-toggle" data-vc-target=".vc_ui-tabs-line-dropdown"> </span>
<ul class="vc_ui-tabs-line-dropdown" data-vc-ui-element="panel-tabs-line-dropdown">
</ul>
</li>';
echo '</ul>';
endif;
?>
@@ -0,0 +1,64 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
$total_templates = visual_composer()->templatesPanelEditor()->loadDefaultTemplates();
$templates_total_count = count( $total_templates );
?>
<?php if ( vc_user_access()->part( 'shortcodes' )->checkStateAny( true, 'custom', null )
->get() && vc_user_access_check_shortcode_all( 'vc_row' ) && vc_user_access_check_shortcode_all( 'vc_column' ) ) :
?>
<div id="vc_no-content-helper" class="vc_welcome vc_ui-font-open-sans">
<div class="vc_welcome-brand vc_welcome-visible-e">
<img src="<?php echo vc_asset_url( 'vc/logo/wpb-logo.svg' ); ?>" alt="">
</div>
<div class="vc_welcome-header vc_welcome-visible-e">
<?php _e( 'You have blank page <br> Start adding content or templates', 'js_composer' ) ?>
</div>
<div class="vc_ui-btn-group vc_welcome-visible-e">
<?php
if ( vc_user_access()->part( 'shortcodes' )->checkStateAny( true, 'custom', null )
->get() && vc_user_access_check_shortcode_all( 'vc_row' ) && vc_user_access_check_shortcode_all( 'vc_column' ) ) :
?>
<a id="vc_no-content-add-element"
class="vc_general vc_ui-button vc_ui-button-shape-rounded vc_ui-button-info vc_welcome-visible-e"
title="<?php _e( 'Add Element', 'js_composer' ) ?>"
data-vc-element="add-element-action" href="#">
<i class="vc-composer-icon vc-c-icon-add_element"></i>
<span><?php _e( 'Add element', 'js_composer' ) ?></span>
</a><?php
endif;
if ( vc_user_access()->part( 'shortcodes' )->can( 'vc_column_text_all' )->get() ) : ?><a id="vc_no-content-add-text-block"
class="vc_general vc_ui-button vc_ui-button-shape-rounded vc_ui-button-info"
data-vc-element="add-text-block-action" href="#"
title="<?php _e( 'Add text block', 'js_composer' ) ?>">
<i class="vc-composer-icon vc-c-icon-text-block"></i>
<span><?php _e( 'Add Text Block', 'js_composer' ) ?></span>
</a><?php endif;
if ( $templates_total_count > 0 && vc_user_access()->part( 'templates' )->can()->get() ) : ?><a id="vc_templates-more-layouts"
class="vc_general vc_ui-button vc_ui-button-shape-rounded vc_ui-button-info" href="#">
<i class="vc-composer-icon vc-c-icon-add_template"></i>
<span><?php echo __( 'Add template', 'js_composer' ); ?></span>
</a><?php endif; ?></div>
<?php
if ( vc_user_access()->part( 'shortcodes' )->checkStateAny( true, 'custom', null )
->get() && vc_user_access_check_shortcode_all( 'vc_row' ) && vc_user_access_check_shortcode_all( 'vc_column' ) ) :
?>
<div class="vc_welcome-visible-ne">
<a id="vc_not-empty-add-element" class="vc_add-element-not-empty-button"
title="<?php _e( 'Add Element', 'js_composer' ) ?>" data-vc-element="add-element-action">
<i class="vc-composer-icon vc-c-icon-add"></i>
</a>
</div>
<?php endif; ?>
<p class="vc_ui-help-block vc_welcome-visible-e">
<?php
$targetLink = '<a href="http://kb.wpbakery.com" target="_blank">' . __( 'knowledge base', 'js_composer' ) . '</a>';
$targetText = __( 'Don\'t know where to start? Visit our %s.', 'js_composer' );
$targetText = sprintf( $targetText, $targetLink );
echo $targetText;
?>
</p>
</div>
<?php endif; ?>
@@ -0,0 +1,27 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<!-- Modal -->
<div class="vc_general modal fade" id="vc_edit-element-dialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabelTitle"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="myModalLabelTitle"></h4>
</div>
<div class="modal-body vc_properties-list"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default"
data-dismiss="modal"><?php _e( 'Close', 'js_composer' ); ?></button>
<button type="button"
class="btn btn-primary vc_save"><?php _e( 'Save Changes', 'js_composer' ); ?></button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div><!-- /.modal -->
@@ -0,0 +1,24 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<div id="vc_multi-properties-panel" class="vc_panel">
<div class="vc_panel-heading">
<a title="<?php _e( 'Close panel', 'js_composer' ); ?>" href="#" class="vc_close" data-dismiss="panel"
aria-hidden="true"><i class="icon"></i></a>
<a title="<?php _e( 'Hide panel', 'js_composer' ); ?>" href="#" class="vc_transparent" data-transparent="panel"
aria-hidden="true"><i class="icon"></i></a>
<h3 class="vc_panel-title"><?php _e( 'Edit Elements', 'js_composer' ) ?></h3>
</div>
<div class="vc_panel-body vc_properties-list">
</div>
<div class="vc_panel-footer">
<button type="button" class="vc_btn vc_panel-btn-close"
data-dismiss="panel"><?php _e( 'Close', 'js_composer' ) ?></button>
<button type="button" class="vc_btn vc_panel-btn-save vc_save"
data-save="true"><?php _e( 'Save Changes', 'js_composer' ) ?></button>
</div>
</div>
@@ -0,0 +1,24 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<div id="vc_properties-panel"
class="<?php echo esc_attr( apply_filters( 'vc_edit_form_css_class', 'vc_panel vc_shortcode-edit-form vc_media-xs' ) ) ?>">
<div class="vc_panel-heading">
<a title="<?php _e( 'Close panel', 'js_composer' ); ?>" href="#" class="vc_close" data-dismiss="panel"
aria-hidden="true"><i class="vc_icon"></i></a>
<a title="<?php _e( 'Hide panel', 'js_composer' ); ?>" href="#" class="vc_transparent" data-transparent="panel"
aria-hidden="true"><i class="vc_icon"></i></a>
<h3 class="vc_panel-title"></h3>
</div>
<div class="vc_panel-body vc_properties-list wpb-edit-form">
</div>
<div class="vc_panel-footer">
<button type="button" class="vc_btn vc_panel-btn-close vc_close vc_btn-default"
data-dismiss="panel"><?php _e( 'Close', 'js_composer' ) ?></button>
<button type="button" class="vc_btn vc_panel-btn-save vc_btn-primary"
data-save="true"><?php _e( 'Save Changes', 'js_composer' ) ?></button>
</div>
</div>
@@ -0,0 +1,190 @@
<?php
/** @var Vc_Shared_Templates $controller */
/** @var array $templates */
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<script>
window.vcTemplatesLibraryData = {
templates: <?php echo json_encode( $templates ); ?>
};
</script>
<div class="vc_ui-panel-popup vc_ui-hidden">
<?php
/*<div class="vc_ui-panel-close">
<button type="button" class="vc_general vc_ui-control-button vc_ui-panel-close-button">
<i class="vc-composer-icon vc-c-icon-arrow_back"></i>
</button>
</div> */
?>
<div class="vc_ui-panel-template-content vc_ui-panel-popup-item vc_ui-hidden">
<button type="button" class="vc_general vc_ui-control-button vc_ui-panel-close-button">
<i class="vc-composer-icon vc-c-icon-arrow_back"></i>
<span class="vc_ui-control-button-text">Exit Template Library</span>
</button>
<?php
if ( ! vc_license()->isActivated() ) :
?>
<div class="vc_ui-panel-message">
<h3 class="vc_ui-panel-title"><?php _e( 'Activate WPBakery Page Builder', 'js_composer' ); ?></h3>
<p class="vc_description"><?php _e( 'WPBakery Page Builder Template Library downloads are available for activated versions only. Activate WPBakery Page Builder direct license to access Template Library and receive other benefits.', 'js_composer' ); ?></p>
<a href="<?php echo admin_url( 'admin.php?page=vc-updater' ); ?>" target="_blank" class="vc_general vc_ui-button vc_ui-button-size-sm vc_ui-button-shape-rounded vc_ui-button-action">
<?php _e( 'Activate License', 'js_composer' ); ?>
</a>
</div>
<?php endif; ?>
<div class="vc_ui-search-box vc_ui-panel-search-box">
<div class="vc_ui-search-box-input vc_ui-panel-search">
<input type="search" id="vc_template_lib_name_filter" data-vc-template-lib-name-filter=""
placeholder="<?php _e( 'Search template by name', 'js_composer' ); ?>">
<label for="vc_template_lib_name_filter"><i class="vc-composer-icon vc-c-icon-search"></i></label>
</div>
</div>
<div class="vc_ui-panel-template-grid" id="vc_template-library-template-grid">
</div>
</div>
<div class="vc_ui-panel-template-preview vc_ui-panel-popup-item vc_ui-hidden">
<div class="vc_ui-panel-template-preview-inner">
<button type="button" class="vc_general vc_ui-control-button vc_ui-panel-back-button">
<i class="vc-composer-icon vc-c-icon-arrow_back"></i>
</button>
<h3 class="vc_ui-panel-title"></h3>
<?php if ( vc_license()->isActivated() ) : ?>
<?php
/*
<div class="vc_ui-panel-template-update vc_ui-hidden" id="vc_template-library-update">
<p class="vc_description"><?php _e( 'Update for template available.', 'js_composer' ); ?></p>
<button id="vc_template-library-update-btn" class="vc_general vc_ui-button vc_ui-button-size-sm vc_ui-button-shape-rounded vc_ui-button-action">
<?php _e( 'Update Template', 'js_composer' ); ?>
</button>
</div>
*/
?>
<div class="vc_ui-panel-template-download vc_ui-hidden" id="vc_template-library-download">
<button id="vc_template-library-download-btn" class="vc_general vc_ui-button vc_ui-button-size-sm vc_ui-button-shape-rounded vc_ui-button-action">
<?php _e( 'Download Template', 'js_composer' ); ?>
</button>
</div>
<?php endif; ?>
</div>
<div class="vc_ui-panel-preview-content">
<img class="vc_ui-panel-preview-image" src="" alt="">
</div>
</div>
<div class="vc_ui-panel-download vc_ui-panel-popup-item vc_ui-hidden">
<div class="vc_ui-panel-loading-content">
<div class="vc_preloader-box"></div>
<h3 class="vc_ui-panel-title"><?php _e( 'Downloading template ... please wait!', 'js_composer' ); ?></h3>
<p class="vc_description"><?php _e( 'Don\'t close this window until download is complete - you will
be redirected back to Template Library automatically.', 'js_composer' ); ?></p>
</div>
</div>
<?php
/*
<div class="vc_ui-panel-update vc_ui-panel-popup-item vc_ui-hidden">
<div class="vc_ui-panel-loading-content">
<div class="vc_preloader-box"></div>
<h3 class="vc_ui-panel-title"><?php _e( 'Updating template ... please wait!', 'js_composer' ); ?></h3>
<p class="vc_description"><?php _e( 'Don\'t close this window until update is complete - you will
be redirected back to Template Library automatically.', 'js_composer' ); ?></p>
</div>
</div>
*/
?>
</div>
<div class="vc_ui-panel-loading vc_ui-hidden">
<div class="vc_preloader-box"></div>
</div>
<div class="vc_ui-templates-content">
<?php
if ( vc_user_access()->part( 'templates' )->checkStateAny( true, null )->get() ) :
?>
<div class="vc_column vc_col-sm-12 vc_access-library-col">
<h3 class="vc_ui-panel-title"><?php _e( 'Download Templates', 'js_composer' ); ?></h3>
<p class="vc_description"><?php _e( 'Access WPBakery Page Builder Template Library for unique layout
templates. Download chosen templates and discover new layouts with regular template
updates from WPBakery Page Builder team.', 'js_composer' ); ?></p>
<button class="vc_general vc_ui-button vc_ui-button-size-sm vc_ui-button-shape-rounded vc_ui-button-action vc_ui-access-library-btn">
<?php _e( 'Access Library', 'js_composer' ); ?>
</button>
</div>
<?php
else :
?>
<div class="vc_column vc_col-sm-12 vc_access-library-col">
<h3 class="vc_ui-panel-title"><?php _e( 'Template library', 'js_composer' ); ?></h3>
</div>
<?php
endif;
?>
<div class="vc_column vc_col-sm-12">
<div class="vc_ui-template-list vc_templates-list-shared_templates vc_ui-list-bar" id="vc_template-library-shared_templates">
</div>
</div>
</div>
<script type="text/html" id="vc_template-item">
<div class="vc_ui-template vc_templates-template-type-shared_templates"
data-template_id="<%- post_id %>"
data-template_name="<%- title %>"
data-category="shared_templates"
data-template_type="shared_templates"
data-template_action="vc_delete_template"
data-vc-content=".vc_ui-template-content">
<div class="vc_ui-list-bar-item">
<button type="button" class="vc_ui-list-bar-item-trigger" data-template-handler data-vc-ui-element="template-title" title="<?php _e( 'Add template', 'js_composer' ); ?>"><%- title %></button>
<div class="vc_ui-list-bar-item-actions">
<button type="button" class="vc_general vc_ui-control-button" data-template-handler title="<?php _e( 'Add template', 'js_composer' ); ?>">
<i class="vc-composer-icon vc-c-icon-add"></i>
</button>
<?php
if ( vc_user_access()->part( 'templates' )->checkStateAny( true, null )->get() ) :
?>
<button type="button" class="vc_general vc_ui-control-button" data-vc-ui-delete="template-title" title="<?php _e( 'Delete template', 'js_composer' ); ?>">
<i class="vc-composer-icon vc-c-icon-delete_empty"></i>
</button>
<?php
endif;
?>
<button type="button" class="vc_general vc_ui-control-button" data-vc-preview-handler data-vc-container=".vc_ui-list-bar" data-vc-target="[data-template_id=&quot;<%- post_id %>&quot;]" title="<?php _e( 'Preview template', 'js_composer' ); ?>">
<i class="vc-composer-icon vc-c-icon-arrow_drop_down"></i>
</button>
</div>
</div>
<div class="vc_ui-template-content" data-js-content>
</div>
</div>
</script>
<script type="text/html" id="vc_template-grid-item">
<div class="vc_ui-panel-template-item vc_ui-visible" data-template-id="<%- id %>">
<span class="vc_ui-panel-template-item-content">
<img src="<%- thumbnailUrl %>" alt=""/>
<span class="vc_ui-panel-template-item-overlay">
<a href="javascript:;" class="vc_ui-panel-template-item-overlay-button vc_ui-panel-template-preview-button"
data-preview-url="<%- previewUrl %>" data-title="<%- title %>" data-template-id="<%- id %>" data-template-version="<%- version %>"><i class="vc-composer-icon vc-c-icon-search"></i></a>
<?php if ( vc_license()->isActivated() ) : ?>
<% if (!downloaded) { %>
<a href="javascript:;" class="vc_ui-panel-template-item-overlay-button vc_ui-panel-template-download-button">
<i class="vc-composer-icon vc-c-icon-arrow_downward"></i>
</a>
<% } else if (downloaded && downloaded.version < version) { %>
<a href="javascript:;" class="vc_ui-panel-template-item-overlay-button vc_ui-panel-template-update-button">
<i class="vc-composer-icon vc-c-icon-sync"></i>
</a>
<% } %>
<?php endif; ?>
</span>
</span>
<span class="vc_ui-panel-template-item-name">
<span><%- title %></span>
</span>
<%= status %>
</div>
</script>
@@ -0,0 +1,23 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<div class="vc_ui-panel-footer-container" data-vc-ui-element="panel-footer">
<div class="vc_ui-panel-footer">
<div class="vc_ui-button-group">
<?php foreach ( $controls as $control ) : ?>
<?php extract( shortcode_atts( array(
'name' => '',
'label' => '',
'css_classes' => '',
'style' => 'default',
), (array) $control ) ); ?>
<span
class="vc_general vc_ui-button vc_ui-button-<?php echo esc_attr( $style ) ?> vc_ui-button-shape-<?php echo isset( $shape ) ? $shape : 'rounded' ?><?php echo strlen( $css_classes ) > 0 ? ' ' . esc_attr( $css_classes ) : '' ?>"
data-vc-ui-element="button-<?php echo esc_attr( $name ) ?>"><?php echo esc_html( $label ) ?></span>
<?php endforeach ?>
</span>
</div>
</div>
</div>
@@ -0,0 +1,36 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<!-- param window header-->
<div
class="<?php echo esc_attr( $header_css_class ) ?> vc_ui-panel-header-container <?php echo ( isset( $stacked_bottom ) && $stacked_bottom ) || ! isset( $stacked_bottom ) ? 'vc_ui-panel-header-o-stacked-bottom' : ''; ?>"
data-vc-ui-element="panel-heading">
<div class="vc_ui-panel-header">
<div class="vc_ui-panel-header-controls">
<?php foreach ( $controls as $key => $control ) : ?>
<?php if ( is_array( $control ) && isset( $control['template'] ) ) : ?>
<?php vc_include_template( $control['template'], isset( $control['variables'] ) ? $control['variables'] : array() ) ?>
<?php else : ?>
<button type="button" class="vc_general vc_ui-control-button vc_ui-<?php echo esc_attr( $control ) ?>-button" data-vc-ui-element="button-<?php echo esc_attr( $control ) ?>">
<i class="vc-composer-icon vc-c-icon-<?php echo esc_attr( $control ) ?>"></i></button>
<?php endif ?>
<?php endforeach; ?>
</div>
<div class="vc_ui-panel-header-header vc_ui-grid-gap" data-vc-panel-container=".vc_ui-panel-header-container">
<h3 class="vc_ui-panel-header-heading"
data-vc-ui-element="panel-title"><?php echo isset( $title ) ? esc_html( $title ) : '' ?></h3>
<?php if ( isset( $search_template ) && ! empty( $search_template ) ) : ?>
<?php vc_include_template( $search_template ) ?>
<?php endif ?>
</div>
<div class="vc_ui-panel-header-content" data-vc-ui-element="panel-header-content">
<?php if ( isset( $content_template ) && ! empty( $content_template ) ) : ?>
<?php vc_include_template( $content_template, isset( $template_variables ) && is_array( $template_variables ) ? $template_variables : array() ) ?>
<?php endif ?>
</div>
</div>
</div>
@@ -0,0 +1,47 @@
<?php
/** @var $box Vc_Add_Element_Box */
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<div class="vc_ui-font-open-sans vc_ui-panel-window vc_media-xs vc_ui-panel"
data-vc-panel=".vc_ui-panel-header-header" data-vc-ui-element="panel-add-element" id="vc_ui-panel-add-element">
<div class="vc_ui-panel-window-inner">
<?php vc_include_template( 'editors/popups/vc_ui-header.tpl.php', array(
'title' => __( 'Add Element', 'js_composer' ),
'controls' => array( 'close' ),
'header_css_class' => 'vc_ui-add-element-header-container',
'content_template' => 'editors/partials/add_element_tabs.tpl.php',
'search_template' => 'editors/partials/add_element_search.tpl.php',
'template_variables' => $template_variables,
) ) ?>
<div class="vc_ui-panel-content-container">
<div class="vc_add-element-container">
<div class="wpb-elements-list vc_filter-all" data-vc-ui-filter="*"
data-vc-ui-element="panel-add-element-list">
<ul class="wpb-content-layouts-container">
<li class="vc_add-element-deprecated-warning">
<div class="wpb_element_wrapper">
<?php echo vc_message_warning( __( 'Elements within this list are deprecated and are no longer supported in newer versions of WPBakery Page Builder.', 'js_composer' ) ) ?>
</div>
</li>
<li><?php echo $box->getControls() ?></li>
<?php if ( $box->isShowEmptyMessage() && true !== $box->getPartState() ) : ?>
<li class="vc_add-element-access-warning">
<div class="wpb_element_wrapper">
<?php echo vc_message_warning( __( 'Your user role have restricted access to content elements. If required, contact your site administrator to change WPBakery Page Builder Role Manager settings for your user role.', 'js_composer' ) ) ?>
</div>
</li>
<?php endif; ?>
</ul>
<div class="vc_clearfix"></div>
<?php if ( vc_user_access()->part( 'presets' )->checkStateAny( true, null )->get() ) : ?>
<div class="vc_align_center">
<span class="vc_general vc_ui-button vc_ui-button-action vc_ui-button-shape-rounded vc_ui-button-fw" data-vc-manage-elements style="display:none;"><?php _e( 'Manage elements', 'js_composer' ); ?></span>
</div>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,54 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<div class="vc_ui-font-open-sans vc_ui-panel-window vc_media-xs vc_ui-panel"
data-vc-panel=".vc_ui-panel-header-header" data-vc-ui-element="panel-edit-element" id="vc_ui-panel-edit-element">
<div class="vc_ui-panel-window-inner">
<?php
$controls = array(
'minimize',
'close',
);
if ( vc_user_access()->part( 'presets' )->checkStateAny( true, null )->get() || vc_user_access()->part( 'templates' )->checkStateAny( true, null )->get() ) {
$controls = array_merge( array(
'settings' => array(
'template' => 'editors/partials/vc_ui-settings-dropdown.tpl.php',
),
), $controls );
}
vc_include_template( 'editors/popups/vc_ui-header.tpl.php', array(
'title' => __( 'Page settings', 'js_composer' ),
'controls' => $controls,
'header_css_class' => 'vc_ui-post-settings-header-container',
'content_template' => '',
) ); ?>
<!-- param window footer-->
<div class="vc_ui-panel-content-container">
<div class="vc_ui-panel-content vc_properties-list vc_edit_form_elements">
<!--/ temp content -->
</div>
</div>
<!-- param window footer-->
<?php vc_include_template( 'editors/popups/vc_ui-footer.tpl.php', array(
'controls' => array(
array(
'name' => 'close',
'label' => __( 'Close', 'js_composer' ),
'css_classes' => 'vc_ui-button-fw',
),
array(
'name' => 'save',
'label' => __( 'Save changes', 'js_composer' ),
'css_classes' => 'vc_ui-button-fw',
'style' => 'action',
),
),
) ); ?>
</div>
</div>
@@ -0,0 +1,54 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<div class="vc_ui-font-open-sans vc_ui-panel-window vc_media-xs vc_ui-panel" data-vc-panel=".vc_ui-panel-header-header" data-vc-ui-element="panel-post-settings" id="vc_ui-panel-post-settings">
<div class="vc_ui-panel-window-inner">
<?php vc_include_template('editors/popups/vc_ui-header.tpl.php', array(
'title' => __( 'Page Settings', 'js_composer' ),
'controls' => array( 'minimize', 'close' ),
'header_css_class' => 'vc_ui-post-settings-header-container',
'content_template' => '',
)); ?>
<div class="vc_ui-panel-content-container">
<div class="vc_ui-panel-content vc_properties-list vc_edit_form_elements" data-vc-ui-element="panel-content">
<div class="vc_row">
<div class="vc_col-sm-12 vc_column" id="vc_settings-title-container">
<div class="wpb_element_label"><?php _e( 'Page title', 'js_composer' ) ?></div>
<div class="edit_form_line">
<input name="page_title" class="wpb-textinput vc_title_name" type="text" value=""
id="vc_page-title-field"
placeholder="<?php _e( 'Please enter page title', 'js_composer' ) ?>">
<span
class="vc_description"><?php printf( __( 'Change title of the current %s (Note: changes may not be displayed in a preview, but will take effect after saving page).', 'js_composer' ), get_post_type() ); ?></span>
</div>
</div>
<div class="vc_col-sm-12 vc_column">
<div class="wpb_element_label"><?php _e( 'Custom CSS settings', 'js_composer' ) ?></div>
<div class="edit_form_line">
<pre id="wpb_csseditor" class="wpb_content_element custom_css wpb_frontend"></pre>
<span
class="vc_description vc_clearfix"><?php _e( 'Enter custom CSS (Note: it will be outputted only on this particular page).', 'js_composer' ) ?></span>
</div>
</div>
</div>
</div>
</div>
<!-- param window footer-->
<?php vc_include_template('editors/popups/vc_ui-footer.tpl.php', array(
'controls' => array(
array(
'name' => 'close',
'label' => __( 'Close', 'js_composer' ),
),
array(
'name' => 'save',
'label' => __( 'Save changes', 'js_composer' ),
'css_classes' => 'vc_ui-button-fw',
'style' => 'action',
),
),
)); ?>
</div>
</div>
@@ -0,0 +1,44 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<div class="vc_ui-font-open-sans vc_ui-panel-window vc_preset-panel vc_media-xs vc_ui-panel"
data-vc-panel=".vc_ui-panel-header-header" data-vc-ui-element="panel-preset" id="vc_ui-panel-preset">
<div class="vc_ui-panel-window-inner">
<?php vc_include_template( 'editors/popups/vc_ui-header.tpl.php', array(
'title' => __( 'My Elements', 'js_composer' ),
'controls' => array(
'minimize',
'close',
),
'header_css_class' => 'vc_ui-preset-panel-header-container',
) ); ?>
<!-- param window footer-->
<div class="vc_ui-panel-content-container">
<div class="vc_ui-panel-content vc_properties-list vc_row"
data-vc-ui-element="panel-content">
<div class="vc_column vc_col-sm-12">
<h3><?php _e( 'Manage My Elements', 'js_composer' );?></h3>
<p class="vc_description"><?php _e( 'Remove existing elements', 'js_composer' );?></p>
</div>
<div class="vc_column vc_col-sm-12">
<div class="vc_ui-template-list vc_ui-list-bar" data-vc-action="collapseAll" data-vc-presets-list-content>
<div class="vc_ui-template" style="display:none;">
<div class="vc_ui-list-bar-item">
<button type="button" class="vc_ui-list-bar-item-trigger" title="" data-vc-ui-element="template-title"></button>
<div class="vc_ui-list-bar-item-actions">
<button type="button" class="vc_general vc_ui-control-button" title="<?php _e( 'Add element', 'js_composer' ); ?>" data-template-handler data-vc-ui-add-preset><i class="vc-composer-icon vc-c-icon-add"></i></button>
<button type="button" class="vc_general vc_ui-control-button" data-vc-ui-delete="preset-title" data-preset="" data-preset-parent="" title="<?php _e( 'Delete element', 'js_composer' ); ?>">
<i class="vc-composer-icon vc-c-icon-delete_empty"></i></button>
</div>
</div>
</div>
<?php echo $box->getPresets(); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<!--/ temp content -->
@@ -0,0 +1,41 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<div class="vc_ui-font-open-sans vc_ui-panel-window vc_media-xs vc_ui-panel" data-vc-panel=".vc_ui-panel-header-header" data-vc-ui-element="panel-row-layout" id="vc_ui-panel-row-layout">
<div class="vc_ui-panel-window-inner">
<?php vc_include_template('editors/popups/vc_ui-header.tpl.php', array(
'title' => __( 'Row Layout', 'js_composer' ),
'controls' => array( 'minimize', 'close' ),
'header_css_class' => 'vc_ui-row-layout-header-container',
)); ?>
<div class="vc_ui-panel-content-container">
<div class="vc_ui-panel-content vc_properties-list vc_edit_form_elements" data-vc-ui-element="panel-content">
<div class="vc_row vc_ui-flex-row">
<div class="vc_col-sm-12 vc_column vc_layout-panel-switcher">
<div class="wpb_element_label"><?php _e( 'Row layout', 'js_composer' ) ?></div>
<?php foreach ( $vc_row_layouts as $layout ) : ?>
<a data-vc-ui-element="button-layout" class="vc_layout-btn" <?php echo 'data-cells="' . $layout['cells']
. '" data-cells-mask="' . $layout['mask']
. '" title="' . $layout['title'] ?>">
<i class="vc-composer-icon vc-c-icon-<?php echo $layout['icon_class'] ?>"></i>
</a>
<?php endforeach ?>
<span
class="vc_description vc_clearfix"><?php _e( 'Select row layout from predefined options.', 'js_composer' ); ?></span>
</div>
<div class="vc_col-sm-12 vc_column">
<div class="wpb_element_label"><?php _e( 'Enter custom layout for your row', 'js_composer' ) ?></div>
<div class="edit_form_line">
<input name="padding" class="wpb-textinput vc_row_layout" type="text" value="" id="vc_row-layout">
<span class="vc_general vc_ui-button vc_ui-button-size-sm vc_ui-button-action vc_ui-button-shape-rounded vc_ui-button-update-layout" data-vc-ui-element="button-update-layout"><?php _e( 'Update', 'js_composer' ) ?></span>
<span
class="vc_description vc_clearfix"><?php _e( 'Change particular row layout manually by specifying number of columns and their size value.', 'js_composer' ); ?></span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,53 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<div class="vc_ui-font-open-sans vc_ui-panel-window vc_templates-panel vc_media-xs vc_ui-panel"
data-vc-panel=".vc_ui-panel-header-header" data-vc-ui-element="panel-templates" id="vc_ui-panel-templates">
<div class="vc_ui-panel-window-inner">
<!-- param window header-->
<?php
$categories_data = $box->getAllTemplatesSorted();
$categories = $box->getAllCategoriesNames( $categories_data ); ?>
<?php vc_include_template( 'editors/popups/vc_ui-header.tpl.php', array(
'title' => __( 'Templates', 'js_composer' ),
'controls' => array(
'minimize',
'close',
),
'header_css_class' => 'vc_ui-template-panel-header-container',
'content_template' => 'editors/partials/vc_ui-templates-tabs.tpl.php',
'search_template' => 'editors/partials/templates_search.tpl.php',
'template_variables' => array(
'categories_data' => $categories_data,
'categories' => $categories,
),
) ); ?>
<!-- param window footer-->
<div class="vc_ui-panel-content-container">
<div class="vc_ui-panel-content vc_properties-list"
data-vc-ui-element="panel-content">
<div class="vc_panel-tabs">
<?php
/**
* Preparing tabs content
*/
?>
<?php
$first = true;
foreach ( $categories_data as $key => $category ) :
echo '<div class="vc_edit-form-tab vc_row vc_ui-flex-row' . ( $first ? ' vc_active' : '' ) . '"' . ' data-vc-ui-element="panel-edit-element-tab"' . ' data-tab="' . esc_attr( $category['category'] ) . '">';
$templates_block = apply_filters( 'vc_templates_render_category', $category );
if ( isset( $templates_block['output'] ) && is_string( $templates_block['output'] ) ) {
echo $templates_block['output'];
}
echo '</div>';
$first = false;
endforeach; ?>
</div>
</div>
</div>
</div>
</div>
<!--/ temp content -->
@@ -0,0 +1,82 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
if ( ! defined( 'VC_IS_TEMPLATE_PREVIEW' ) ) {
define( 'VC_IS_TEMPLATE_PREVIEW', true );
}
add_action( 'admin_enqueue_scripts', array( vc_backend_editor(), 'enqueueEditorScripts' ) );
add_action( 'admin_enqueue_scripts', array( visual_composer()->templatesPanelEditor(), 'enqueuePreviewScripts' ) );
add_filter( 'admin_body_class', array( visual_composer()->templatesPanelEditor(), 'addBodyClassTemplatePreview' ) );
do_action( 'vc-render-templates-preview-template' );
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_script( 'vc_editors-templates-preview-js' );
wp_enqueue_media( array( 'post' => $post_ID ) );
visual_composer()->templatesPanelEditor()->registerPreviewScripts();
require_once( ABSPATH . 'wp-admin/admin-header.php' );
?>
<style type="text/css">
#screen-meta, #adminmenumain, .notice, #wpfooter, #message, .updated {
display: none !important;
}
#wpcontent {
margin-left: 0 !important;
padding-left: 0 !important;
}
.vc_not-remove-overlay {
position: fixed !important;
width: 100%;
height: 100%;
z-index: 199999999;
}
html {
overflow: hidden;
background: transparent;
}
</style>
<div class="vc_not-remove-overlay"></div>
<div class="vc_ui-template-preview">
<textarea id="content" style="display: none;"><?php echo $content ?></textarea>
<div id="wpb_visual_composer" class="postbox " style="display: block;">
<div class="inside">
<div class="metabox-composer-content">
<div id="visual_composer_content" class="wpb_main_sortable main_wrapper ui-sortable ui-droppable"></div>
<div id="vc_no-content-helper" class="vc_welcome"></div>
</div>
<input type="hidden" name="vc_js_composer_group_access_show_rule"
class="vc_js_composer_group_access_show_rule" value="all">
<input type="hidden" id="wpb_vc_js_status" name="wpb_vc_js_status" value="true">
<input type="hidden" id="wpb_vc_loading" name="wpb_vc_loading" value="Loading, please wait...">
<input type="hidden" id="wpb_vc_loading_row" name="wpb_vc_loading_row" value="Crunching...">
<input type="hidden" name="vc_post_custom_css" id="vc_post-custom-css" value="" autocomplete="off"></div>
</div>
<input type="hidden" id="wpb_vc_loading" name="wpb_vc_loading"
value="<?php esc_attr_e( 'Loading, please wait...', 'js_composer' ) ?>"/>
<input type="hidden" id="wpb_vc_loading_row" name="wpb_vc_loading_row"
value="<?php esc_attr_e( 'Crunching...', 'js_composer' ) ?>"/>
</div>
<?php
add_filter( 'vc_role_access_with_backend_editor_get_state', '__return_true' );
vc_include_template( 'editors/partials/access-manager-js.tpl.php' );
vc_include_template( 'editors/partials/backend-shortcodes-templates.tpl.php' );
do_action( 'vc_ui-template-preview' );
// fix bug #59741644518985 in firefox
//wp_dequeue_script( 'isotope' );
require_once( ABSPATH . 'wp-admin/admin-footer.php' );
@@ -0,0 +1,14 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<h2 class="nav-tab-wrapper">
<?php foreach ( $tabs as $slug => $title ) : ?>
<?php $url = 'admin.php?page=' . rawurlencode( $slug ); ?>
<a href="<?php echo esc_attr( is_network_admin() ? network_admin_url( $url ) : admin_url( $url ) ) ?>"
class="nav-tab<?php echo $active_tab === $slug ? esc_attr( ' nav-tab-active' ) : '' ?>">
<?php echo $title ?>
</a>
<?php endforeach ?>
</h2>
@@ -0,0 +1,14 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<h2 class="nav-tab-wrapper">
<?php foreach ( $tabs as $tab_slug => $title ) : ?>
<?php $url = 'admin.php?page=' . rawurlencode( $slug ) . '&tab=' . rawurlencode( $tab_slug ); ?>
<a href="<?php echo esc_attr( is_network_admin() ? network_admin_url( $url ) : admin_url( $url ) ) ?>"
class="nav-tab<?php echo $active_tab === $tab_slug ? esc_attr( ' nav-tab-active' ) : '' ?>">
<?php echo $title ?>
</a>
<?php endforeach ?>
</h2>
@@ -0,0 +1,21 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
vc_include_template( 'pages/partials/vc-roles-parts/_part.tpl.php', array(
'part' => $part,
'role' => $role,
'params_prefix' => 'vc_roles[' . $role . '][' . $part . ']',
'controller' => vc_role_access()->who( $role )->part( $part ),
// 'custom_value' => array(true, 'default'),
'capabilities' => array(
array( 'disabled_ce_editor', __( 'Disable Classic editor', 'js_composer' ) ),
),
'options' => array(
array( true, __( 'Enabled', 'js_composer' ) ),
array( 'default', __( 'Enabled and default', 'js_composer' ) ),
array( false, __( 'Disabled', 'js_composer' ) ),
),
'main_label' => __( 'Backend editor', 'js_composer' ),
'custom_label' => __( 'Backend editor', 'js_composer' ),
) );
@@ -0,0 +1,16 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
vc_include_template( 'pages/partials/vc-roles-parts/_part.tpl.php', array(
'part' => $part,
'role' => $role,
'params_prefix' => 'vc_roles[' . $role . '][' . $part . ']',
'controller' => vc_role_access()->who( $role )->part( $part ),
'options' => array(
array( true, __( 'Enabled', 'js_composer' ) ),
array( false, __( 'Disabled', 'js_composer' ) ),
),
'main_label' => __( 'Drag and Drop', 'js_composer' ),
'description' => __( 'Control access rights to drag and drop functionality within the editor.', 'js_composer' ),
) );
@@ -0,0 +1,20 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
if ( vc_frontend_editor()->inlineEnabled() ) {
vc_include_template( 'pages/partials/vc-roles-parts/_part.tpl.php', array(
'part' => $part,
'role' => $role,
'params_prefix' => 'vc_roles[' . $role . '][' . $part . ']',
'controller' => vc_role_access()->who( $role )->part( $part ),
'custom_value' => 'custom',
'options' => array(
array( true, __( 'Enabled', 'js_composer' ) ),
array( false, __( 'Disabled', 'js_composer' ) ),
),
'main_label' => __( 'Frontend editor', 'js_composer' ),
'custom_label' => __( 'Frontend editor', 'js_composer' ),
) );
}
@@ -0,0 +1,17 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
vc_include_template( 'pages/partials/vc-roles-parts/_part.tpl.php', array(
'part' => $part,
'role' => $role,
'params_prefix' => 'vc_roles[' . $role . '][' . $part . ']',
'controller' => vc_role_access()->who( $role )->part( $part ),
'options' => array(
array( true, __( 'Enabled', 'js_composer' ) ),
array( false, __( 'Disabled', 'js_composer' ) ),
),
'main_label' => __( 'Grid Builder', 'js_composer' ),
'custom_label' => __( 'Grid Builder', 'js_composer' ),
'description' => __( 'Control user access to Grid Builder and Grid Builder Elements.', 'js_composer' ),
) );
@@ -0,0 +1,166 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<?php /** @var $controller Vc_Role_Access_Controller */ ?>
<tr>
<th scope="row"><?php echo esc_html( $main_label ) ?></th>
<td>
<fieldset>
<legend class="screen-reader-text">
<span><?php esc_html( $main_label ) ?></span></legend>
<select name="<?php echo esc_attr( $params_prefix . '[_state]' ) ?>"
data-vc-part="<?php echo esc_attr( $part ) ?>"
data-vc-name="<?php echo esc_attr( '_state' ) ?>"
<?php if ( ! empty( $capabilities ) ) : ?>data-vc-roles="part-state"
data-vc-role-part="<?php echo esc_attr( $part . '-' . $role ) ?>"<?php endif; ?>
class="vc_ui-settings-roles-dropdown">
<?php foreach ( $options as $option ) : ?>
<option
value="<?php echo esc_attr( $option[0] ? (string) $option[0] : '0' ) ?>"
<?php echo isset( $option[2] ) ? ' data-vc-custom-selector="' . esc_attr( $option[2] ) . '"' : '' ?>
<?php echo $controller->getState() === $option[0] ? ' selected' : '' ?>><?php echo esc_html( $option[1] ) ?></option>
<?php endforeach; ?>
</select>
<?php if ( isset( $description ) && ! empty( $description ) ) : ?>
<p class="description"><?php echo esc_html( $description ) ?></p>
<?php endif; ?>
</fieldset>
</td>
</tr>
<?php if ( ! empty( $capabilities ) ) : ?>
<?php if ( isset( $use_table ) && true === $use_table ) : ?>
<?php
require_once vc_path_dir( 'EDITORS_DIR', 'popups/class-vc-add-element-box.php' );
$add_box = new Vc_Add_Element_Box();
?>
<tr data-vc-role-related-part="<?php echo esc_attr( $part . '-' . $role ) ?>"
data-vc-role-part-state="<?php echo esc_attr( isset( $custom_value ) ? $custom_value : '*' ) ?>"
class="vc_role-custom-settings<?php echo ! isset( $custom_value ) || (string) $controller->getState() === (string) $custom_value ? ' vc_visible' : '' ?>">
<th scope="row"></th>
<td>
<fieldset>
<legend class="screen-reader-text">
<span><?php echo esc_html( $custom_label ) ?></span>
</legend>
<?php if ( isset( $categories ) && ! empty( $categories ) ) : ?>
<?php vc_include_template( 'editors/partials/add_element_tabs.tpl.php', array(
'categories' => $categories,
) ) ?>
<?php endif; ?>
<table class="vc_general vc_wp-form-table fixed" data-vc-roles="table">
<thead>
<tr>
<th><?php echo esc_html( $item_header_name ) ?></th>
<?php foreach ( $cap_types as $type ) : ?>
<th class="column-date">
<label>
<input type="checkbox" name="all"
data-vc-related-controls="tfoot [data-vc-roles-select-all-checkbox]"
data-vc-roles-select-all-checkbox="<?php echo esc_attr( $type[0] ) ?>"><?php echo esc_html( $type[1] ) ?>
</label>
</th>
<?php endforeach; ?>
</tr>
</thead>
<tfoot<?php echo isset( $global_set ) ? ' style="display: none;"' : '' ?>>
<tr>
<th><?php echo esc_html( $item_header_name ) ?></th>
<?php foreach ( $cap_types as $type ) : ?>
<th class="column-date">
<label>
<input type="checkbox" name="all"
data-vc-related-controls="thead [data-vc-roles-select-all-checkbox]"
data-vc-roles-select-all-checkbox="<?php echo esc_attr( $type[0] ) ?>"><?php echo esc_html( $type[1] ) ?>
</label>
</th>
<?php endforeach; ?>
</tr>
</tfoot>
<tbody<?php echo isset( $global_set ) ? ' style="display: none;"' : '' ?>>
<?php foreach ( $capabilities as $cap ) : ?>
<?php if ( ! isset( $ignore_capabilities ) || ! in_array( $cap['base'], $ignore_capabilities ) ) : ?>
<?php
$category_css_classes = '';
if ( isset( $cap['_category_ids'] ) ) {
foreach ( $cap['_category_ids'] as $id ) {
$category_css_classes .= ' js-category-' . $id;
}
}
?>
<tr data-vc-capability="<?php echo esc_attr( $cap['base'] ) ?>"
class="<?php echo esc_attr( trim( $category_css_classes ) ) ?>">
<td title="<?php echo esc_attr( $cap['base'] ) ?>">
<?php echo $add_box->renderIcon( $cap ) ?>
<div>
<?php echo esc_html( $cap['name'] ) ?>
<?php echo ! empty( $cap['description'] ) ? '<span class="vc_element-description">' . esc_html( $cap['description'] ) . '</span>' : '' ?>
</div>
</td>
<?php foreach ( $cap_types as $type ) : ?>
<td>
<div class="vc_wp-form-checkbox">
<label>
<input type="checkbox"
name="<?php echo esc_attr( $params_prefix . '[' . $role . '][' . $part . ']' . '[' . $cap['base'] . '_' . $type[0] . ']' ) ?>"
data-vc-part="<?php echo esc_attr( $part ) ?>"
data-vc-name="<?php echo esc_attr( $cap['base'] . '_' . $type[0] ) ?>"
data-vc-roles="table-checkbox"
data-vc-cap="<?php echo esc_attr( $type[0] ) ?>"
value="1"<?php echo ! isset( $global_set ) && $controller->can( $cap['base'] . '_' . $type[0], false )->get() ? ' checked' : '' ?>>
<?php echo esc_html( $type[1] ) ?>
</label>
</div>
</td>
<?php endforeach; ?>
</tr>
<?php endif; ?>
<?php endforeach; ?>
</tbody>
</table>
</fieldset>
</td>
</tr>
<?php else : ?>
<tr data-vc-role-related-part="<?php echo esc_attr( $part . '-' . $role ) ?>"
data-vc-role-part-state="<?php echo esc_attr( isset( $custom_value ) ? $custom_value : '*' ) ?>"
class="vc_role-custom-settings<?php echo ! isset( $custom_value ) || $controller->getState() === $custom_value ? ' vc_visible' : '' ?>">
<th scope="row"></th>
<td>
<fieldset>
<legend class="screen-reader-text">
<span><?php echo esc_html( $custom_label ) ?></span>
</legend>
<div class="vc_wp-form-row">
<?php foreach ( $capabilities as $cap ) : ?>
<div class="vc_wp-form-col vc_wp-form-checkbox">
<label>
<input type="checkbox"
name="<?php echo esc_attr( $params_prefix . '[' . $cap[0] . ']' ) ?>"
value="1"
class="vc_roles-settings-checkbox"
<?php
// hard coded yes :)
if ( 'administrator' === $role && 'settings' === $part && ( 'vc-roles-tab' === $cap[0] || 'vc-updater-tab' === $cap[0] ) ) {
echo ' disabled checked';
} else {
?>
data-vc-part="<?php echo esc_attr( $part ) ?>"
data-vc-name="<?php echo esc_attr( $cap[0] ) ?>"
data-vc-roles="serialize"
data-vc-roles="checkbox"<?php echo $controller->can( $cap[0], false )
->get() ? ' checked' : '' ?>
<?php
}
?>>
<?php echo esc_html( $cap[1] ) ?>
</label>
</div>
<?php endforeach; ?>
</div>
</fieldset>
</td>
</tr>
<?php endif; ?>
<?php endif; ?>
@@ -0,0 +1,16 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
vc_include_template( 'pages/partials/vc-roles-parts/_part.tpl.php', array(
'part' => $part,
'role' => $role,
'params_prefix' => 'vc_roles[' . $role . '][' . $part . ']',
'controller' => vc_role_access()->who( $role )->part( $part ),
'options' => array(
array( true, __( 'Enabled', 'js_composer' ) ),
array( false, __( 'Disabled', 'js_composer' ) ),
),
'main_label' => __( 'Page settings', 'js_composer' ),
'description' => __( 'Control access to WPBakery Page Builder page settings. Note: Disable page settings to restrict editing of Custom CSS through page.', 'js_composer' ),
) );
@@ -0,0 +1,21 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
vc_include_template( 'pages/partials/vc-roles-parts/_part.tpl.php', array(
'part' => $part,
'role' => $role,
'params_prefix' => 'vc_roles[' . $role . '][' . $part . ']',
'controller' => vc_role_access()->who( $role )->part( $part ),
'custom_value' => 'custom',
'capabilities' => $vc_role->getPostTypes(),
'options' => array(
array( true, __( 'Pages only', 'js_composer' ) ),
array( 'custom', __( 'Custom', 'js_composer' ) ),
array( false, __( 'Disabled', 'js_composer' ) ),
),
'main_label' => __( 'Post types', 'js_composer' ),
'custom_label' => __( 'Post types', 'js_composer' ),
'description' => __( 'Enable WPBakery Page Builder for pages, posts and custom post types. Note: By default WPBakery Page Builder is available for pages only.', 'js_composer' ),
) );
@@ -0,0 +1,17 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
vc_include_template( 'pages/partials/vc-roles-parts/_part.tpl.php', array(
'part' => $part,
'role' => $role,
'params_prefix' => 'vc_roles[' . $role . '][' . $part . ']',
'controller' => vc_role_access()->who( $role )->part( $part ),
'options' => array(
array( true, __( 'All', 'js_composer' ) ),
array( 'add', __( 'Apply presets only', 'js_composer' ) ),
array( false, __( 'Disabled', 'js_composer' ) ),
),
'main_label' => __( 'Element Presets', 'js_composer' ),
'description' => __( 'Control access rights to element presets in element edit form. Note: "Apply presets only" restricts users from saving new presets and deleting existing.', 'js_composer' ),
) );
@@ -0,0 +1,24 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
$tabs = array();
foreach ( vc_settings()->getTabs() as $tab => $title ) {
$tabs[] = array( $tab . '-tab', $title );
}
vc_include_template( 'pages/partials/vc-roles-parts/_part.tpl.php', array(
'part' => $part,
'role' => $role,
'params_prefix' => 'vc_roles[' . $role . '][' . $part . ']',
'controller' => vc_role_access()->who( $role )->part( $part ),
'custom_value' => 'custom',
'capabilities' => $tabs,
'options' => array(
array( true, __( 'All', 'js_composer' ) ),
array( 'custom', __( 'Custom', 'js_composer' ) ),
array( false, __( 'Disabled', 'js_composer' ) ),
),
'main_label' => __( 'Settings options', 'js_composer' ),
'custom_label' => __( 'Settings options', 'js_composer' ),
'description' => __( 'Control access rights to WPBakery Page Builder admin settings tabs (e.g. General Settings, Shortcode Mapper, ...)', 'js_composer' ),
) );
@@ -0,0 +1,39 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
vc_include_template( 'pages/partials/vc-roles-parts/_part.tpl.php', array(
'part' => $part,
'role' => $role,
'params_prefix' => 'vc_roles[' . $role . '][' . $part . ']',
'controller' => vc_role_access()->who( $role )->part( $part ),
'custom_value' => 'custom',
'capabilities' => WPBMap::getSortedAllShortCodes(),
'ignore_capabilities' => array(
'vc_gitem',
'vc_gitem_animated_block',
'vc_gitem_zone',
'vc_gitem_zone_a',
'vc_gitem_zone_b',
'vc_gitem_zone_c',
'vc_column',
'vc_row_inner',
'vc_column_inner',
'vc_posts_grid',
),
'categories' => WPBMap::getCategories(),
'cap_types' => array(
array( 'all', __( 'All', 'js_composer' ) ),
array( 'edit', __( 'Edit', 'js_composer' ) ),
),
'item_header_name' => __( 'Element', 'js_composer' ),
'options' => array(
array( true, __( 'All', 'js_composer' ) ),
array( 'edit', __( 'Edit only', 'js_composer' ) ),
array( 'custom', __( 'Custom', 'js_composer' ) ),
),
'main_label' => __( 'Elements', 'js_composer' ),
'custom_label' => __( 'Elements', 'js_composer' ),
'description' => __( 'Control user access to content elements.', 'js_composer' ),
'use_table' => true,
) );
@@ -0,0 +1,17 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
vc_include_template( 'pages/partials/vc-roles-parts/_part.tpl.php', array(
'part' => $part,
'role' => $role,
'params_prefix' => 'vc_roles[' . $role . '][' . $part . ']',
'controller' => vc_role_access()->who( $role )->part( $part ),
'options' => array(
array( true, __( 'All', 'js_composer' ) ),
array( 'add', __( 'Apply templates only', 'js_composer' ) ),
array( false, __( 'Disabled', 'js_composer' ) ),
),
'main_label' => __( 'Templates', 'js_composer' ),
'description' => __( 'Control access rights to templates and predefined templates. Note: "Apply templates only" restricts users from saving new templates and deleting existing.', 'js_composer' ),
) );
@@ -0,0 +1,45 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<fieldset>
<legend class="screen-reader-text">
<span><?php echo esc_html( $title ) ?></span>
</legend>
<table class="vc_general vc_wp-form-table fixed">
<thead>
<tr>
<th><?php _e( 'Post type', 'js_composer' ) ?></th>
<th><?php _e( 'Template', 'js_composer' ) ?></th>
</tr>
</thead>
<tbody>
<?php foreach ( $post_types as $post_type ) : ?>
<?php $post_type_object = get_post_type_object( $post_type[0] ); ?>
<tr>
<td title="<?php echo esc_attr( $post_type[0] ) ?>">
<?php echo esc_html( $post_type_object ? $post_type_object->labels->name : $post_type[0] ) ?>
</td>
<td>
<select name="<?php echo $field_key ?>[<?php echo $post_type[0] ?>]">
<option value=""><?php _e( 'None', 'js_composer' ) ?></option>
<?php foreach ( $templates as $templates_category ) : ?>
<optgroup label="<?php echo esc_attr( $templates_category['category_name'] ) ?>">
<?php foreach ( $templates_category['templates'] as $template ) : ?>
<?php
$key = $template['type'] . '::' . esc_attr( $template['unique_id'] );
$selected = isset( $value[ $post_type[0] ] ) && $value[ $post_type[0] ] === $key ? ' selected="true"' : '';
?>
<option value="<?php echo esc_attr( $key ) ?>"<?php echo $selected ?>><?php echo esc_html( $template['name'] ) ?></option>
<?php endforeach; ?>
</optgroup>
<?php endforeach; ?>
</select>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</fieldset>
@@ -0,0 +1,16 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<div class="wrap vc_settings" id="wpb-js-composer-settings">
<h2><?php _e( 'WPBakery Page Builder Settings', 'js_composer' ); ?></h2>
<?php settings_errors(); ?>
<?php vc_include_template( '/pages/partials/_settings_tabs.php',
array(
'active_tab' => $active_page->getSlug(),
'tabs' => $pages,
) );
?>
<?php $active_page->render(); ?>
</div>
@@ -0,0 +1,88 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
$tab = esc_attr( preg_replace( '/^vc\-/', '', $page->getSlug() ) );
$editable_roles = get_editable_roles();
require_once vc_path_dir( 'SETTINGS_DIR', 'class-vc-roles.php' );
$vc_role = new Vc_Roles();
?>
<form action="<?php echo admin_url( 'admin-ajax.php' ); ?>" method="post"
id="vc_settings-<?php echo $tab ?>"
class="vc_settings-tab-content vc_settings-tab-content-active"<?php echo apply_filters( 'vc_setting-tab-form-' . $tab, '' ) ?>
data-vc-roles="form">
<div class="tab_intro">
<p><?php _e( 'Control user group role access to the features and options of WPBakery Page Builder - manage WordPress default and custom roles.', 'js_composer' ) ?></p>
</div>
<!-- Settings template start -->
<div class="vc_wp-settings">
<div class="vc_wp-accordion" data-vc-action="collapseAll">
<?php foreach ( $editable_roles as $role => $details ) :
$name = translate_user_role( $details['name'] );
$unique_id = 'vc_role-' . $role;
$valid_roles = array();
foreach ( $vc_role->getParts() as $part ) {
if ( $vc_role->hasRoleCapability( $role, $vc_role->getPartCapability( $part ) ) ) {
$valid_roles[] = $part;
}
}
if ( count( $valid_roles ) > 0 ) :
?>
<div
class="vc_wp-accordion-panel vc_ui-settings-roles-role<?php echo ! isset( $next ) ? ' vc_active' : '' ?>"
data-vc-unique-id="<?php echo esc_attr( $unique_id ) ?>"
data-vc-content=".vc_wp-accordion-panel-body"
data-vc-role="<?php echo esc_attr( $role ) ?>">
<div class="widget" data-vc-accordion=""
data-vc-container=".vc_wp-accordion"
data-vc-target="[data-vc-unique-id=<?php echo esc_attr( $unique_id ) ?>]">
<div class="widget-top">
<div class="widget-title-action">
<button type="button" class="widget-action hide-if-no-js" aria-expanded="true">
<span class="screen-reader-text">Edit widget: Search</span>
<span class="toggle-indicator" aria-hidden="true"></span>
</button>
</div>
<div class="widget-title">
<h4>
<?php echo esc_html( $name ) ?>
<span class="in-widget-title"></span>
</h4>
</div>
</div>
</div>
<div class="vc_wp-accordion-panel-body">
<table class="form-table">
<tbody>
<?php
$next = true;
foreach ( $valid_roles as $part ) {
vc_include_template( 'pages/partials/vc-roles-parts/_' . $part . '.tpl.php', array(
'part' => $part,
'role' => $role,
'vc_role' => $vc_role,
) );
}
?>
</tbody>
</table>
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
</div>
<span class="vc_settings-spinner vc_ui-wp-spinner" style="display: none;" id="vc_wp-spinner"></span>
<!-- Settings template end -->
<?php
wp_nonce_field( 'vc_settings-' . $tab . '-action', 'vc_nonce_field' );
$submit_button_attributes = array();
$submit_button_attributes = apply_filters( 'vc_settings-tab-submit-button-attributes', $submit_button_attributes, $tab );
$submit_button_attributes = apply_filters( 'vc_settings-tab-submit-button-attributes-' . $tab, $submit_button_attributes, $tab );
submit_button( __( 'Save Changes', 'js_composer' ), 'primary', 'submit_btn', true, $submit_button_attributes );
?>
<input type="hidden" name="action" value="vc_roles_settings_save"
id="vc_settings-<?php echo $tab; ?>-action"/>
</form>
@@ -0,0 +1,127 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
$tab = preg_replace( '/^vc\-/', '', $page->getSlug() );
$use_custom = get_option( vc_settings()->getFieldPrefix() . 'use_custom' );
$css = ( ( 'color' === $tab ) && $use_custom ) ? ' color_enabled' : '';
$dev_environment = vc_license()->isDevEnvironment();
$license_key = vc_license()->getLicenseKey();
$classes = 'vc_settings-tab-content vc_settings-tab-content-active ' . esc_attr( $css );
?>
<script type="text/javascript">
var vcAdminNonce = '<?php echo vc_generate_nonce( 'vc-admin-nonce' ); ?>';
</script>
<?php if ( 'updater' === $tab && $dev_environment && ! vc_license()->isActivated() ) : ?>
<br/>
<div class="updated vc_updater-result-message">
<p>
<strong>
<?php _e( 'It is optional to activate license on localhost development environment. You can still activate license on localhost to receive plugin updates and get access to template library.', 'js_composer' ) ?>
</strong>
</p>
</div>
<?php endif ?>
<form action="options.php"
method="post"
id="vc_settings-<?php echo $tab ?>"
data-vc-ui-element="settings-tab-<?php echo $tab ?>"
class="<?php echo $classes ?>"
<?php echo apply_filters( 'vc_setting-tab-form-' . $tab, '' ) ?>
>
<?php settings_fields( vc_settings()->getOptionGroup() . '_' . $tab ) ?>
<?php do_settings_sections( vc_settings()->page() . '_' . $tab ) ?>
<?php if ( 'general' === $tab && vc_pointers_is_dismissed() ) : ?>
<table class="form-table">
<tr>
<th scope="row"><?php _e( 'Guide tours', 'js_composer' ) ?></th>
<td>
<a href="#" class="button vc_pointers-reset-button"
id="vc_settings-vc-pointers-reset"
data-vc-done-txt="<?php _e( 'Done', 'js_composer' ) ?>"><?php _e( 'Reset', 'js_composer' ) ?></a>
<p
class="description indicator-hint"><?php _e( 'Guide tours are shown in VC editors to help you to start working with editors. You can see them again by clicking button above.', 'js_composer' ) ?></p>
</td>
</tr>
</table>
<?php endif ?>
<?php
$submit_button_attributes = array();
$submit_button_attributes = apply_filters( 'vc_settings-tab-submit-button-attributes', $submit_button_attributes, $tab );
$submit_button_attributes = apply_filters( 'vc_settings-tab-submit-button-attributes-' . $tab, $submit_button_attributes, $tab );
?>
<?php if ( 'updater' !== $tab ) : ?>
<?php submit_button( __( 'Save Changes', 'js_composer' ), 'primary', 'submit_btn', true, $submit_button_attributes ); ?>
<?php endif ?>
<input type="hidden" name="vc_action" value="vc_action-<?php echo $tab; ?>"
id="vc_settings-<?php echo $tab; ?>-action"/>
<?php if ( 'color' === $tab ) : ?>
<a href="#" class="button vc_restore-button" id="vc_settings-color-restore-default">
<?php echo __( 'Restore Default', 'js_composer' ) ?>
</a>
<?php endif ?>
<?php if ( 'updater' === $tab ) : ?>
<div class="vc_settings-activation-deactivation">
<?php if ( vc_license()->isActivated() ) : ?>
<p>
<?php echo __( 'You have activated WPBakery Page Builder version which allows you to access all the customer benefits. Thank you for choosing WPBakery Page Builder as your page builder. If you do not wish to use WPBakery Page Builder on this WordPress site you can deactivate your license below.', 'js_composer' ) ?>
</p>
<br/>
<p>
<button
class="button button-primary button-hero button-updater"
data-vc-action="deactivation"
type="button"
id="vc_settings-updater-button">
<?php echo __( 'Deactivate WPBakery Page Builder', 'js_composer' ) ?>
</button>
<img src="<?php echo get_admin_url() ?>/images/wpspin_light.gif" class="vc_updater-spinner"
id="vc_updater-spinner" width="16" height="16" alt="spinner"/>
</p>
<?php else : ?>
<p>
<?php echo __( 'In order to receive all benefits of WPBakery Page Builder, you need to activate your copy of the plugin. By activating WPBakery Page Builder license you will unlock premium options - <strong>direct plugin updates</strong>, access to <strong>template library</strong> and <strong>official support.</strong>', 'js_composer' ) ?>
</p>
<br/>
<p>
<button
class="button button-primary button-hero button-updater"
data-vc-action="activation"
type="button"
id="vc_settings-updater-button">
<?php echo __( 'Activate WPBakery Page Builder', 'js_composer' ) ?>
</button>
<img src="<?php echo get_admin_url() ?>/images/wpspin_light.gif" class="vc_updater-spinner"
id="vc_updater-spinner" width="16" height="16" alt="spinner"/>
</p>
<p class="description">
<?php echo sprintf( __( 'Don\'t have direct license yet? <a href="%s" target="_blank">Purchase WPBakery Page Builder license</a>.', 'js_composer' ), esc_url( 'http://go.wpbakery.com/wpb-buy' ) ) ?>
</p>
<?php endif ?>
</div>
<?php endif ?>
</form>
@@ -0,0 +1,12 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<script type="text/javascript">
var vcAdminNonce = '<?php echo vc_generate_nonce( 'vc-admin-nonce' ); ?>';
</script>
<form action="options.php" method="post" id="vc_settings-automapper"
class="vc_settings-tab-content vc_settings-tab-content-active"<?php echo apply_filters( 'vc_setting-tab-form-automapper', '' ) ?>>
<?php vc_automapper()->renderHtml(); ?>
</form>
@@ -0,0 +1,46 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
preg_match( '/^(\d+)(\.\d+)?/', WPB_VC_VERSION, $matches );
?>
<div class="wrap vc-page-welcome about-wrap">
<h1><?php echo sprintf( __( 'Welcome to WPBakery Page Builder %s', 'js_composer' ), isset( $matches[0] ) ? $matches[0] : WPB_VC_VERSION ) ?></h1>
<div class="about-text">
<?php _e( 'Congratulations! You are about to use most powerful time saver for WordPress ever - page builder plugin with Frontend and Backend editors by WPBakery.', 'js_composer' ) ?>
</div>
<div class="wp-badge vc-page-logo">
<?php echo sprintf( __( 'Version %s', 'js_composer' ), WPB_VC_VERSION ) ?>
</div>
<p class="vc-page-actions">
<?php if ( vc_user_access()
->wpAny( 'manage_options' )
->part( 'settings' )
->can( 'vc-general-tab' )
->get() && ( ! is_multisite() || ! is_main_site() )
) : ?>
<a href="<?php echo esc_attr( admin_url( 'admin.php?page=vc-general' ) ) ?>"
class="button button-primary"><?php _e( 'Settings', 'js_composer' ) ?></a><?php endif; ?>
<a href="https://twitter.com/share" class="twitter-share-button"
data-via="wpbakery"
data-text="Take full control over your #WordPress site with WPBakery Page Builder page builder"
data-url="http://wpbakery.com" data-size="large">Tweet</a>
<script>! function ( d, s, id ) {
var js, fjs = d.getElementsByTagName( s )[ 0 ], p = /^http:/.test( d.location ) ? 'http' : 'https';
if ( ! d.getElementById( id ) ) {
js = d.createElement( s );
js.id = id;
js.src = p + '://platform.twitter.com/widgets.js';
fjs.parentNode.insertBefore( js, fjs );
}
}( document, 'script', 'twitter-wjs' );</script>
</p>
<?php vc_include_template( '/pages/partials/_tabs.php', array(
'slug' => $page->getSlug(),
'active_tab' => $active_page->getSlug(),
'tabs' => $pages,
) );
?>
<?php echo $active_page->render(); ?>
</div>
@@ -0,0 +1,101 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<div class="vc_faq-tab changelog">
<h3><?php _e( 'New to WPBakery Page Builder or Looking for More Information?', 'js_composer' ); ?></h3>
<p><?php printf( __( 'WPBakery has complete documentation available at our knowledge base: <a target="_blank" href="%s">kb.wpbakery.com</a> which covers everything related to WPBakery Page Builder starting from Installation and up to more advanced features based on our Inner API.', 'js_composer' ), 'http://kb.wpbakery.com' ); ?></p>
<div class="feature-section vc_row">
<div class="vc_col-xs-4">
<h4><a target="_blank" href="http://go.wpbakery.com/preface">Preface</a></h4>
<ul>
<li><a target="_blank" href="http://go.wpbakery.com/introduction">Introduction</a></li>
<li><a target="_blank" href="http://go.wpbakery.com/support-and-resources">Support and Resources</a></li>
<li><a target="_blank" href="http://go.wpbakery.com/support-policy">Support Policy</a></li>
<li><a target="_blank" href="http://go.wpbakery.com/release-notes">Release Notes</a></li>
</ul>
</div>
<div class="vc_col-xs-4">
<h4><a target="_blank" href="http://go.wpbakery.com/licensing">Licensing</a></h4>
<ul>
<li><a target="_blank" href="http://go.wpbakery.com/regular-license">Regular License</a></li>
<li><a target="_blank" href="http://go.wpbakery.com/extended-license">Extended License</a></li>
<li><a target="_blank" href="http://go.wpbakery.com/in-stock-license-terms">In-Stock License (Theme Integration)</a></li>
</ul>
</div>
<div class="vc_col-xs-4">
<h4><a target="_blank" href="http://go.wpbakery.com/getting-started">Getting Started</a></h4>
<ul>
<li><a target="_blank" href="http://go.wpbakery.com/install">Plugin Installation</a></li>
<li><a target="_blank" href="http://go.wpbakery.com/activation">Activation</a></li>
<li><a target="_blank" href="http://go.wpbakery.com/update">Update</a></li>
<li><a target="_blank" href="http://go.wpbakery.com/content-type">Content Type</a></li>
</ul>
</div>
</div>
<div class="feature-section vc_row">
<div class="vc_col-xs-4">
<h4><a target="_blank" href="http://go.wpbakery.com/learning-more">Learning More</a>
</h4>
<ul>
<li><a target="_blank" href="http://go.wpbakery.com/basic-concept">Basic Concept</a></li>
<li><a target="_blank" href="http://go.wpbakery.com/content-elements">Content Elements</a></li>
<li><a target="_blank" href="http://go.wpbakery.com/general-settings">General Settings</a></li>
<li><a target="_blank" href="http://go.wpbakery.com/custom-css">Custom CSS</a></li>
<li><a target="_blank" href="http://go.wpbakery.com/element-design-options">Element Design Options</a></li>
<li><a target="_blank" href="http://go.wpbakery.com/responsive-settings">Responsive Settings</a></li>
<li><a target="_blank" href="http://go.wpbakery.com/templates">Templates</a></li>
<li><a target="_blank" href="http://go.wpbakery.com/predefined-layouts">Predefined Layouts</a></li>
<li><a target="_blank" href="http://go.wpbakery.com/shortcode-mapper">Shortcode Mapper</a></li>
<li><a target="_blank" href="http://go.wpbakery.com/grid-builder">Grid Builder</a></li>
<li><a target="_blank" href="http://go.wpbakery.com/image-filters">Image filters</a></li>
<li><a target="_blank" href="http://go.wpbakery.com/element-presets">Element Presets</a></li>
</ul>
</div>
<div class="vc_col-xs-4">
<h4><a target="_blank" href="http://go.wpbakery.com/vc-how-tos">WPBakery Page Builder "How To's"</a></h4>
<p>In this section, you will find quick tips in form of video tutorials on how to operate with WPBakery Page Builder.</p>
</div>
<div class="vc_col-xs-4">
<h4><a target="_blank" href="http://go.wpbakery.com/faq">FAQ</a></h4>
<p>Here you can find answers to the Frequently Asked Question about WPBakery Page Builder.</p>
</div>
</div>
<div class="feature-section vc_row">
<div class="vc_col-xs-4">
<h4><a target="_blank" href="http://go.wpbakery.com/addons">Add-ons</a></h4>
<ul>
<li><a target="_blank" href="http://go.wpbakery.com/templatera">Templatera</a></li>
<li><a target="_blank" href="http://go.wpbakery.com/easy-tables">Easy Tables</a></li>
<li><a target="_blank" href="http://go.wpbakery.com/addon-development-rules">Add-on Development Rules</a></li>
</ul>
</div>
<div class="vc_col-xs-4">
<h4><a target="_blank" href="http://go.wpbakery.com/theme-integration">Theme Integration</a></h4>
<p>See how you can integrate WPBakery Page Builder within your WordPress theme.</p>
</div>
<div class="vc_col-xs-4">
<h4><a target="_blank" href="http://go.wpbakery.com/inner-api">Inner API</a></h4>
<p>Inner API section describes capabilities of interaction with WPBakery Page Builder.</p>
</div>
</div>
</div>
<div class="return-to-dashboard">
<a target="_blank" href="http://kb.wpbakery.com"><?php _e( 'Visit Knowledge Base for more information', 'js_composer' ); ?></a>
</div>
@@ -0,0 +1,30 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<div class="vc_resources-tab changelog">
<div class="feature-section vc_row">
<div class="vc_col-xs-6">
<h3><?php _e( 'Resources', 'js_composer' ); ?></h3>
<p><?php _e( 'There are several resources available to WPBakery Page Builder users to help you to get around plugin:', 'js_composer' ); ?></p>
<ul>
<li><a href="http://wpbakery.com/?utm_campaign=VCplugin&amp;utm_source=vc_user&amp;utm_medium=welcome_page" target="_blank">Official website</a></li>
<li><a href="http://kb.wpbakery.com" target="_blank">Official Knowledge Base</a></li>
<li><a href="http://wpbakery.com/video-academy/" target="_blank">Video Academy</a></li>
<li><a href="http://support.wpbakery.com" target="_blank">Official support</a></li>
<li><a href="http://facebook.com/wpbakery" target="_blank">Facebook page</a></li>
<li><a href="http://twitter.com/wpbakery" target="_blank">Twitter account</a></li>
</ul>
</div>
<div class="vc_col-xs-6">
<h3><?php _e( 'Official Support', 'js_composer' ); ?></h3>
<p><?php printf( __( 'To get your support related question answered in the fastest timing, please head over to our <a href="%s" target="_blank">support page</a> and open Support ticket. To open a support ticket you should have a valid support subscription in case if your support has expired you can <a href="%s" target="_blank">purchase support extension</a> on support.wpbakery.com.', 'js_composer' ), 'http://support.wpbakery.com', 'http://support.wpbakery.com' ); ?></p>
<p><?php printf( __( 'Before applying for support please make sure you understand the rules of support and go through all steps described and listed in <a href="%s" target="_blank">Support Policy</a> in order to get your issues solved as soon as possible.', 'js_composer' ), 'http://go.wpbakery.com/support-policy' ); ?></p>
</div>
</div>
</div>
@@ -0,0 +1,17 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<div class="vc_welcome-tab changelog">
<div class="vc_feature-section-teaser">
<div>
<img class="vc-featured-img" src="<?php echo vc_asset_url( 'vc/vc-welcome/vc_5-6/1.png' ); ?>"/>
<h3><?php _e( 'WordPress 5.0 Compatible', 'js_composer' ); ?></h3>
<p><?php _e( 'WPBakery Page Builder goes hand in hand with the latest releases of WordPress. Want to stay up to date with WordPress 5.0? No problem, WPBakery Page Builder is fully compatible with the latest WordPress version and the new editor.', 'js_composer' ); ?></p>
</div>
</div>
<p class="vc-thank-you">Thank you for choosing WPBakery Page Builder,<br/>Michael M, CEO at WPBakery</p>
</div>
@@ -0,0 +1,72 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* @var $param Vc_Column_Offset
* @var $sizes Vc_Column_Offset::$size_types
*/
$layouts = array(
'xs' => 'portrait-smartphones',
'sm' => 'portrait-tablets',
'md' => 'landscape-tablets',
'lg' => 'default',
);
?>
<div class="vc_column-offset" data-column-offset="true">
<?php if ( '1' === vc_settings()->get( 'not_responsive_css' ) ) : ?>
<div class="wpb_alert wpb_content_element vc_alert_rounded wpb_alert-warning">
<div class="messagebox_text">
<p><?php printf( __( 'Responsive design settings are currently disabled. You can enable them in WPBakery Page Builder <a href="%s">settings page</a> by unchecking "Disable responsive content elements".', 'js_composer' ), admin_url( 'admin.php?page=vc-general' ) ) ?></p>
</div>
</div>
<?php endif ?>
<input name="<?php echo esc_attr( $settings['param_name'] ) ?>"
class="wpb_vc_param_value <?php echo esc_attr( $settings['param_name'] ) ?>
<?php echo esc_attr( $settings['type'] ) ?> '_field" type="hidden" value="<?php echo esc_attr( $value ) ?>"/>
<table class="vc_table vc_column-offset-table">
<tr>
<th>
<?php _e( 'Device', 'js_composer' ) ?>
</th>
<th>
<?php _e( 'Offset', 'js_composer' ) ?>
</th>
<th>
<?php _e( 'Width', 'js_composer' ) ?>
</th>
<th>
<?php _e( 'Hide on device?', 'js_composer' ) ?>
</th>
</tr>
<?php foreach ( $sizes as $key => $size ) : ?>
<tr class="vc_size-<?php echo $key ?>">
<td class="vc_screen-size vc_screen-size-<?php echo $key ?>">
<span title="<?php echo $size ?>">
<i class="vc-composer-icon vc-c-icon-layout_<?php echo isset( $layouts[ $key ] ) ? $layouts[ $key ] : $key ?>"></i>
</span>
</td>
<td>
<?php echo $param->offsetControl( $key ) ?>
</td>
<td>
<?php echo $param->sizeControl( $key ) ?>
</td>
<td>
<label>
<input type="checkbox" name="vc_hidden-<?php echo $key ?>"
value="yes"<?php echo in_array( 'vc_hidden-' . $key, $data ) ? ' checked="true"' : '' ?>
class="vc_column_offset_field">
</label>
</td>
</tr>
<?php endforeach ?>
</table>
</div>
<script type="text/javascript">
window.VcI8nColumnOffsetParam = <?php echo json_encode( array(
'inherit' => __( 'Inherit: ', 'js_composer' ),
'inherit_default' => __( 'Inherit from default', 'js_composer' ),
) ) ?>;
</script>
@@ -0,0 +1,50 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<div class="vc_row-fluid vc_column">
<div class="wpb_element_label"><?php _e( 'Font Family', 'js_composer' ); ?></div>
<div class="vc_google_fonts_form_field-font_family-container">
<select class="vc_google_fonts_form_field-font_family-select"
default[font_style]="<?php echo $values['font_style']; ?>">
<?php
/** @var $this Vc_Google_Fonts */
$fonts = $this->_vc_google_fonts_get_fonts();
foreach ( $fonts as $font_data ) : ?>
<option value="<?php echo $font_data->font_family . ':' . $font_data->font_styles; ?>"
data[font_types]="<?php echo $font_data->font_types; ?>"
data[font_family]="<?php echo $font_data->font_family; ?>"
data[font_styles]="<?php echo $font_data->font_styles; ?>"
class="<?php echo vc_build_safe_css_class( $font_data->font_family ); ?>" <?php echo( strtolower( $values['font_family'] ) == strtolower( $font_data->font_family ) || strtolower( $values['font_family'] ) == strtolower( $font_data->font_family ) . ':' . $font_data->font_styles ? 'selected' : '' ); ?> ><?php echo $font_data->font_family ?></option>
<?php endforeach ?>
</select>
</div>
<?php if ( isset( $fields['font_family_description'] ) && strlen( $fields['font_family_description'] ) > 0 ) : ?>
<span class="vc_description clear"><?php echo $fields['font_family_description']; ?></span>
<?php endif ?>
</div>
<?php if ( isset( $fields['no_font_style'] ) && false === $fields['no_font_style'] || ! isset( $fields['no_font_style'] ) ) : ?>
<div class="vc_row-fluid vc_column">
<div class="wpb_element_label"><?php _e( 'Font style', 'js_composer' ); ?></div>
<div class="vc_google_fonts_form_field-font_style-container">
<select class="vc_google_fonts_form_field-font_style-select"></select>
</div>
</div>
<?php if ( isset( $fields['font_style_description'] ) && strlen( $fields['font_style_description'] ) > 0 ) : ?>
<span class="vc_description clear"><?php echo $fields['font_style_description']; ?></span>
<?php endif ?>
<?php endif ?>
<div class="vc_row-fluid vc_column vc_google_fonts_form_field-preview-wrapper">
<div class="wpb_element_label"><?php _e( 'Google Fonts preview', 'js_composer' ); ?>:</div>
<div class="vc_google_fonts_form_field-preview-container">
<span><?php _e( 'Grumpy wizards make toxic brew for the evil Queen and Jack.', 'js_composer' ); ?></span>
</div>
<div class="vc_google_fonts_form_field-status-container"><span></span></div>
</div>
<input name="<?php echo $settings['param_name']; ?>"
class="wpb_vc_param_value <?php echo $settings['param_name'] . ' ' . $settings['type']; ?>_field" type="hidden"
value="<?php echo $value; ?>"/>
@@ -0,0 +1,163 @@
<script type="text/html" id="vcl-loop-frame">
<div class="vc_row">
<div class="vc_col-sm-12">
<# if(vc.loop_field_not_hidden('post_type', loop)) { #>
<label class="wpb_element_label"><?php _e('Post types', 'js_composer') ?></label>
<div class="post-types-list">
{{{ vc.loop_partial('checkboxes', 'post_type', loop) }}}
</div>
<span class="description clear"><?php _e('Select post types to populate posts from. Note: If no post type is selected, WordPress will use default "Post" value.', 'js_composer'); ?></span>
<# } #>
</div>
</div>
<div class="vc_row">
<# if(vc.loop_field_not_hidden('size', loop)) { #>
<div class="vc_col-sm-4">
<label class="wpb_element_label"><?php _e('Post count', 'js_composer') ?></label>
{{{ vc.loop_partial('text-input', 'size', loop) }}}
<span class="description clear"><?php _e('How many teasers to show? Enter number or word "All".', 'js_composer'); ?></span>
</div>
<# } #>
<# if(vc.loop_field_not_hidden('order_by', loop)) { #>
<div class="vc_col-sm-4">
<label class="wpb_element_label"><?php _e('Order by', 'js_composer') ?></label>
{{{ vc.loop_partial('dropdown', 'order_by', loop) }}}
<span class="description clear"><?php echo sprintf(__('Select how to sort retrieved posts. More at %s.', 'js_composer'), '<a href="http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters" target="_blank">
WordPress codex page</a>'); ?></span>
</div>
<# } #>
<# if(vc.loop_field_not_hidden('order', loop)) { #>
<div class="vc_col-sm-4">
<label class="wpb_element_label"><?php _e('Sort order', 'js_composer') ?></label>
{{{ vc.loop_partial('dropdown', 'order', loop) }}}
<span class="description clear"><?php _e('Designates the ascending or descending order.', 'js_composer'); ?></span>
</div>
<# } #>
</div>
<# if(vc.loop_field_not_hidden('categories', loop)) { #>
<div class="vc_row">
<div class="vc_col-sm-12">
<div class="vc_suggest-field" data-block="suggestion">
<label class="wpb_element_label"><?php _e('Categories', 'js_composer') ?></label>
{{{ vc.loop_partial('autosuggest', 'categories', loop) }}}
<span class="description clear"><?php _e('Filter output by posts categories, enter category names here.', 'js_composer'); ?></span>
</div>
</div>
</div>
<# } #>
<# if(vc.loop_field_not_hidden('tags', loop)) { #>
<div class="vc_row">
<div class="vc_col-sm-12">
<div class="vc_suggest-field" data-block="suggestion">
<label class="wpb_element_label"><?php _e('Tags', 'js_composer') ?></label>
{{{ vc.loop_partial('autosuggest', 'tags', loop) }}}
<span class="description clear"><?php _e('Filter output by posts tags, enter tag names here.', 'js_composer'); ?></span>
</div>
</div>
</div>
<# } #>
<# if(vc.loop_field_not_hidden('tax_query', loop)) { #>
<div class="vc_row">
<div class="vc_col-sm-12">
<div class="vc_suggest-field" data-block="suggestion">
<label class="wpb_element_label"><?php _e('Taxonomies', 'js_composer') ?></label>
{{{ vc.loop_partial('autosuggest', 'tax_query', loop) }}}
<span class="description clear"><?php _e('Filter output by custom taxonomies categories, enter category names here.', 'js_composer'); ?></span>
</div>
</div>
</div>
<# } #>
<# if(vc.loop_field_not_hidden('by_id', loop)) { #>
<div class="vc_row">
<div class="vc_col-sm-12">
<div class="vc_suggest-field" data-block="suggestion">
<label class="wpb_element_label"><?php _e('Individual Posts/Pages/Custom Post Types', 'js_composer') ?></label>
{{{ vc.loop_partial('autosuggest', 'by_id', loop) }}}
<span class="description clear"><?php _e('Only entered posts/pages will be included in the output. Note: Works in conjunction with selected "Post types".', 'js_composer'); ?></span>
</div>
</div>
</div>
<# } #>
<# if(vc.loop_field_not_hidden('authors', loop)) { #>
<div class="vc_row">
<div class="vc_col-sm-12">
<div class="vc_suggest-field" data-block="suggestion">
<label class="wpb_element_label"><?php _e('Author', 'js_composer') ?></label>
{{{ vc.loop_partial('autosuggest', 'authors', loop) }}}
<span class="description clear"><?php _e('Filter by author name.', 'js_composer'); ?></span>
</div>
</div>
</div>
<# } #>
</script>
<script type="text/html" id="_vcl-text-input">
<#
var is_locked = vc.is_locked(data),
disabled = is_locked ? ' disabled="true"' : '',
value = _.isObject(data) && !_.isUndefined(data.value) ? data.value : '';
#>
<input type="text" name="{{ name }}" value="{{ value }}" class="vc_{{ name }}_field" {{ disabled }}>
</script>
<script type="text/html" id="_vcl-dropdown">
<#
var is_locked = vc.is_locked(data),
disabled = is_locked ? ' disabled="true"' : '';
#>
<select name="{{ name }}" class="vc_dropdown" {{ disabled }}>
<option value=""></option>
<# if(_.isObject(data) && _.isArray(data.options)) { #>
<#
_.each(data.options, function(opt) {
var value, label;
if(_.isArray(opt)) {
value = opt[0];
label = opt[1];
} else {
value = opt;
label = opt;
}#>
<option value="{{ value }}"
{{ data.value===value ?
' selected="true"' : '' }}>{{ label }}</option>
<#
});
#>
<# } #>
</select>
</script>
<script type="text/html" id="_vcl-checkboxes">
<#
var is_locked = vc.is_locked(data);
#>
<input type="hidden" name="{{ name }}" value="{{ data.value }}" data-name="{{ name }}">
<# if(_.isObject(data) && _.isArray(data.options)) {
_.each(data.options, function(opt) {
var value, label, params;
if(_.isArray(opt)) {
value = opt[0];
label = opt[1];
} else {
value = opt;
label = opt;
}
params = _.indexOf(data.value, value) >=0 ? ' checked="true"' : '';
if(!_.isEmpty(params) && is_locked) params += ' disabled="true"';
#>
<label><input type="checkbox" data-input="{{ name }}" value="{{ value }}" {{ params }}/> {{ label }}</label>
<#
});
} #>
</script>
<script type="text/html" id="_vcl-autosuggest">
<# limit_param = _.isObject(settings) && !_.isUndefined(settings.limit) ? ' data-limit="' + settings.limit + '"' : ''; #>
<input type="hidden" data-suggest-prefill="{{ name }}"
value="{{ _.isObject(data) && _.isArray(data.options) ? window.encodeURIComponent(JSON.stringify(data.options)) : '' }}">
<input type="hidden" name="{{ name }}"
value="{{ _.isObject(data) && _.isArray(data.value) ? data.value.join(',') : '' }}"
data-suggest-value="{{ name }}">
<input type="text" name="{{ name }}_autosuggest" value=""
placeholder="<?php _e('Click here and start typing...', 'js_composer'); ?>" class="vc_{{ name }}_field"
data-suggest="{{ name }}" {{ limit_param }}/>
</script>
@@ -0,0 +1,63 @@
<script type="text/html" id="vcl-options-field-input">
<div class="vc_row">
<div class="vc_col-sm-12">
<label class="wpb_element_label">{{ label }}</label>
<input type="text" name="{{ name }}" value="{{ value[0] }}">
<div class="descr"><i>{{ description }}</i></div>
</div>
</div>
</script>
<script type="text/html" id="vcl-options-field-select">
<div class="vc_row">
<div class="vc_col-sm-12">
<label class="wpb_element_label">{{ label }}</label>
<select name="{{ name }}">
<# _.each(options, function(option) { #>
<# if(_.isArray(option)) { #>
<option value="{{ option[0] }}"
{{ value[0]===option[0] ?
' selected="true"' : '' }}>{{ option[1] }}</option>
<# } else { #>
<option value="{{ option }}"
{{ value[0]===option ?
' selected="true"' : '' }}>{{ option }}</option>
<# } #>
<# }); #>
</select>
<div class="descr"><i>{{ description }}</i></div>
</div>
</div>
</script>
<script type="text/html" id="vcl-options-field-checkbox">
<div class="vc_row">
<div class="vc_col-sm-12">
<label class="wpb_element_label">{{ label }}</label>
<div class="vc_options-checkboxes">
<# _.each(options, function(option) { #>
<label><input type="checkbox" name="{{ name }}" value="{{ option[0] }}" {{ _.indexOf(value,
option[0])> -1 ? ' checked="true"' : '' }}> {{ option[1] }}</label>
<# }); #>
</div>
<div class="descr"><i>{{ description }}</i></div>
</div>
</div>
</script>
<script type="text/html" id="vcl-options-field-boolean">
<div class="vc_row">
<div class="vc_col-sm-12">
<label class="wpb_element_label">{{ label }}</label>
<div class="vc_options-checkbox">
<label><input type="checkbox" name="{{ name }}" value="true" {{ value[0] === 'true' ? ' checked="true"' :
'' }}> <?php _e('Yes', 'js_composer') ?></label>
</div>
<div class="descr"><i>{{ description }}</i></div>
</div>
</div>
</script>
<script type="text/html" id="vcl-options-field-separator">
<h4>{{label}}</h4>
</script>
@@ -0,0 +1,8 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
$template = vc_include_template( 'params/param_group/inner_content.tpl.php' );
return '<li class="vc_param wpb_vc_row vc_param_group-collapsed vc_param_group-add_content-wrapper" style="display:none">' . $template . '</li>';
@@ -0,0 +1,9 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
$template = vc_include_template( 'params/param_group/inner_content.tpl.php' );
return '<li class="vc_param wpb_vc_row vc_param_group-collapsed">' . $template . '</li>';
@@ -0,0 +1,25 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
return '
<div class="vc_controls vc_controls-row vc_clearfix vc_param_group-controls">
<a class="vc_control column_move vc_move-param" href="#" title="' . __( 'Drag row to reorder', 'js_composer' ) . '" data-vc-control="move"><i class="vc-composer-icon vc-c-icon-dragndrop"></i></a>
<span class="vc_param-group-admin-labels"></span>
<span class="vc_row_edit_clone_delete">
<a class="vc_control column_delete vc_delete-param" href="#" title="' . __( 'Delete this param', 'js_composer' ) . '"><i class="vc-composer-icon vc-c-icon-delete_empty"></i></a>
<a class="vc_control column_clone" href="#" title="' . __( 'Clone this row', 'js_composer' ) . '"><i class="vc-composer-icon vc-c-icon-content_copy"></i></a>
<a class="vc_control column_toggle" href="#" title="' . __( 'Toggle row', 'js_composer' ) . '"><i class="vc-composer-icon vc-c-icon-arrow_drop_down"></i></a>
</span>
</div>
<div class="wpb_element_wrapper">
<div class="vc_row vc_row-fluid wpb_row_container">
<div class="wpb_vc_column wpb_sortable vc_col-sm-12 wpb_content_holder vc_empty-column">
<div class="wpb_element_wrapper">
<div class="vc_fields vc_clearfix">
%content%
</div>
</div>
</div>
</div>
</div>';
@@ -0,0 +1,48 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
VcShortcodeAutoloader::getInstance()->includeClass( 'WPBakeryShortCode_VC_Single_image' );
$atts = array();
parse_str( $data, $atts );
$el_class = $image = $img_size = $img_link = $img_link_target = $img_link_large = $title = $alignment = $css_animation = $css = '';
$image_string = '';
$img_class = new WPBakeryShortCode_VC_Single_image( array( 'base' => 'vc_single_image' ) );
/** @var $img_class WPBakeryShortCode_VC_Single_image */
$atts = vc_map_get_attributes( $img_class->getShortcode(), $atts );
extract( $atts );
$style = ( '' !== $style ) ? $style : '';
$border_color = ( '' !== $border_color ) ? ' vc_box_border_' . $border_color : '';
$img_id = has_post_thumbnail( $post->ID ) ? get_post_thumbnail_id( $post->ID ) : $post->ID;
$img = wpb_getImageBySize( array(
'attach_id' => $img_id,
'thumb_size' => $img_size,
'class' => 'vc_single_image-img',
) );
$img = apply_filters( 'vc_gitem_attribute_featured_image_img', $img );
if ( null === $img || false === $img ) {
return '';
}
$el_class = $img_class->getExtraClass( $el_class );
$style = preg_replace( '/_circle_2$/', '_circle', $style );
$wrapperClass = 'vc_single_image-wrapper ' . $style . ' ' . $border_color;
$link = vc_gitem_create_link_real( $atts, $post, $wrapperClass, $title );
$image_string = ! empty( $link ) ? '<' . $link . '>' . $img['thumbnail'] . '</a>' : '<div class="' . $wrapperClass . '">' . $img['thumbnail'] . '</div>';
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_single_image wpb_content_element' . $el_class . vc_shortcode_custom_css_class( $css, ' ' ), $img_class->settings( 'base' ), $atts );
$css_class .= $img_class->getCSSAnimation( $css_animation );
$css_class .= ' vc_align_' . $alignment;
$output = '
<div class="' . $css_class . '">
<figure class="wpb_wrapper vc_figure">
' . $image_string . '
</figure>
</div>
';
return $output;
@@ -0,0 +1,48 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* @var $vc_btn WPBakeryShortCode_VC_Gitem_Post_Categories
* @var $post WP_Post
* @var $atts
*
*/
VcShortcodeAutoloader::getInstance()->includeClass( 'WPBakeryShortCode_VC_Gitem_Post_Categories' );
$categories = get_the_category();
$separator = '';
$css_class = array( 'vc_gitem-post-data' );
$css_class[] = vc_shortcode_custom_css_class( $atts['css'] );
$css_class[] = $atts['el_class'];
$css_class[] = 'vc_gitem-post-data-source-post_categories';
$style = str_replace( ',', 'comma', $atts['category_style'] );
$output = '<div class="' . esc_attr( implode( ' ', array_filter( $css_class ) ) ) . ' vc_grid-filter vc_clearfix vc_grid-filter-' . esc_attr( $style ) . ' vc_grid-filter-size-' . esc_attr( $atts['category_size'] ) . ' vc_grid-filter-center vc_grid-filter-color-' . esc_attr( $atts['category_color'] ) . '">';
$data = array();
if ( ! empty( $categories ) ) {
foreach ( $categories as $category ) {
$category_link = '';
if ( ! empty( $atts['link'] ) ) {
$category_link = 'href="' . esc_url( get_category_link( $category->term_id ) ) . '" alt="' . esc_attr( sprintf( __( 'View all posts in %s', 'js_composer' ), $category->name ) ) . '"';
}
$wrapper = '<div class="vc_grid-filter-item vc_gitem-post-category-name">';
$content = esc_html( $category->name );
if ( ! empty( $category_link ) ) {
$content = '<span class="vc_gitem-post-category-name"><a ' . $category_link . ' class="vc_gitem-link">' . $content . '</a>' . '</span>';
} else {
$content = '<span class="vc_gitem-post-category-name">' . $content . '</span>';
}
$wrapper_end = '</div>';
$data[] = $wrapper . $content . $wrapper_end;
}
}
if ( empty( $atts['category_style'] ) || ' ' === $atts['category_style'] || ', ' === $atts['category_style'] ) {
$separator = $atts['category_style'];
}
$output .= implode( $separator, $data );
$output .= '</div>';
return $output;
@@ -0,0 +1,243 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* @var $vc_btn WPBakeryShortCode_VC_Btn
* @var $post WP_Post
* @var $atts
*
* @var $style
* @var $shape
* @var $color
* @var $custom_background
* @var $custom_text
* @var $size
* @var $align
* @var $link
* @var $title
* @var $button_block
* @var $el_id
* @var $el_class
* @var $outline_custom_color
* @var $outline_custom_hover_background
* @var $outline_custom_hover_text
* @var $add_icon
* @var $i_align
* @var $i_type
* @var $i_icon_fontawesome
* @var $i_icon_openiconic
* @var $i_icon_typicons
* @var $i_icon_entypo
* @var $i_icon_linecons
* @var $i_icon_pixelicons
* @var $css_animation
* @var $css
* @var $gradient_color_1
* @var $gradient_color_2
* @var $gradient_custom_color_1 ;
* @var $gradient_custom_color_2 ;
* @var $gradient_text_color ;
*/
$atts = array();
parse_str( $data, $atts );
VcShortcodeAutoloader::getInstance()->includeClass( 'WPBakeryShortCode_VC_Btn' );
$vc_btn = new WPBakeryShortCode_VC_Btn( array( 'base' => 'vc_btn' ) );
$style = $shape = $color = $size = $custom_background = $custom_text = $align = $link = $title = $button_block = $el_class = $outline_custom_color = $outline_custom_hover_background = $outline_custom_hover_text = $add_icon = $i_align = $i_type = $i_icon_entypo = $i_icon_fontawesome = $i_icon_linecons = $i_icon_pixelicons = $i_icon_typicons = $css = $css_animation = '';
$gradient_color_1 = $gradient_color_2 = $gradient_custom_color_1 = $gradient_custom_color_2 = $gradient_text_color = '';
$custom_onclick = $custom_onclick_code = '';
$a_href = $a_title = $a_target = $a_rel = '';
$styles = array();
$icon_wrapper = false;
$icon_html = false;
$attributes = array();
/** @var $vc_btn WPBakeryShortCode_VC_Btn */
$atts = vc_map_get_attributes( $vc_btn->getShortcode(), $atts );
extract( $atts );
//parse link
$link = trim( $link );
$use_link = strlen( $link ) > 0 && 'none' !== $link;
$wrapper_classes = array(
'vc_btn3-container',
$vc_btn->getExtraClass( $el_class ),
$vc_btn->getCSSAnimation( $css_animation ),
'vc_btn3-' . $align,
);
$button_classes = array(
'vc_general',
'vc_btn3',
'vc_btn3-size-' . $size,
'vc_btn3-shape-' . $shape,
'vc_btn3-style-' . $style,
);
$button_html = $title;
if ( '' === trim( $title ) ) {
$button_classes[] = 'vc_btn3-o-empty';
$button_html = '<span class="vc_btn3-placeholder">&nbsp;</span>';
}
if ( 'true' === $button_block && 'inline' !== $align ) {
$button_classes[] = 'vc_btn3-block';
}
if ( 'true' === $add_icon ) {
$button_classes[] = 'vc_btn3-icon-' . $i_align;
vc_icon_element_fonts_enqueue( $i_type );
if ( isset( ${'i_icon_' . $i_type} ) ) {
if ( 'pixelicons' === $i_type ) {
$icon_wrapper = true;
}
$icon_class = ${'i_icon_' . $i_type};
} else {
$icon_class = 'fa fa-adjust';
}
if ( $icon_wrapper ) {
$icon_html = '<i class="vc_btn3-icon"><span class="vc_btn3-icon-inner ' . esc_attr( $icon_class ) . '"></span></i>';
} else {
$icon_html = '<i class="vc_btn3-icon ' . esc_attr( $icon_class ) . '"></i>';
}
if ( 'left' === $i_align ) {
$button_html = $icon_html . ' ' . $button_html;
} else {
$button_html .= ' ' . $icon_html;
}
}
if ( 'custom' === $style ) {
if ( $custom_background ) {
$styles[] = vc_get_css_color( 'background-color', $custom_background );
}
if ( $custom_text ) {
$styles[] = vc_get_css_color( 'color', $custom_text );
}
if ( ! $custom_background && ! $custom_text ) {
$button_classes[] = 'vc_btn3-color-grey';
}
} elseif ( 'outline-custom' === $style ) {
if ( $outline_custom_color ) {
$styles[] = vc_get_css_color( 'border-color', $outline_custom_color );
$styles[] = vc_get_css_color( 'color', $outline_custom_color );
$attributes[] = 'onmouseleave="this.style.borderColor=\'' . $outline_custom_color . '\'; this.style.backgroundColor=\'transparent\'; this.style.color=\'' . $outline_custom_color . '\'"';
} else {
$attributes[] = 'onmouseleave="this.style.borderColor=\'\'; this.style.backgroundColor=\'transparent\'; this.style.color=\'\'"';
}
$onmouseenter = array();
if ( $outline_custom_hover_background ) {
$onmouseenter[] = 'this.style.borderColor=\'' . $outline_custom_hover_background . '\';';
$onmouseenter[] = 'this.style.backgroundColor=\'' . $outline_custom_hover_background . '\';';
}
if ( $outline_custom_hover_text ) {
$onmouseenter[] = 'this.style.color=\'' . $outline_custom_hover_text . '\';';
}
if ( $onmouseenter ) {
$attributes[] = 'onmouseenter="' . implode( ' ', $onmouseenter ) . '"';
}
if ( ! $outline_custom_color && ! $outline_custom_hover_background && ! $outline_custom_hover_text ) {
$button_classes[] = 'vc_btn3-color-inverse';
foreach ( $button_classes as $k => $v ) {
if ( 'vc_btn3-style-outline-custom' === $v ) {
unset( $button_classes[ $k ] );
break;
}
}
$button_classes[] = 'vc_btn3-style-outline';
}
} elseif ( 'gradient' === $style || 'gradient-custom' === $style ) {
$gradient_color_1 = vc_convert_vc_color( $gradient_color_1 );
$gradient_color_2 = vc_convert_vc_color( $gradient_color_2 );
$button_text_color = '#fff';
if ( 'gradient-custom' === $style ) {
$gradient_color_1 = $gradient_custom_color_1;
$gradient_color_2 = $gradient_custom_color_2;
$button_text_color = $gradient_text_color;
}
$gradient_css = array();
$gradient_css[] = 'color: ' . $button_text_color;
$gradient_css[] = 'border: none';
$gradient_css[] = 'background-color: ' . $gradient_color_1;
$gradient_css[] = 'background-image: -webkit-linear-gradient(left, ' . $gradient_color_1 . ' 0%, ' . $gradient_color_2 . ' 50%,' . $gradient_color_1 . ' 100%)';
$gradient_css[] = 'background-image: linear-gradient(to right, ' . $gradient_color_1 . ' 0%, ' . $gradient_color_2 . ' 50%,' . $gradient_color_1 . ' 100%)';
$gradient_css[] = '-webkit-transition: all .2s ease-in-out';
$gradient_css[] = 'transition: all .2s ease-in-out';
$gradient_css[] = 'background-size: 200% 100%';
// hover css
$gradient_css_hover = array();
$gradient_css_hover[] = 'color: ' . $button_text_color;
$gradient_css_hover[] = 'background-color: ' . $gradient_color_2;
$gradient_css_hover[] = 'border: none';
$gradient_css_hover[] = 'background-position: 100% 0';
$uid = uniqid();
echo '<style type="text/css">.vc_btn3-style-' . $style . '.vc_btn-gradient-btn-' . $uid . ':hover{' . implode( ';', $gradient_css_hover ) . ';' . '}</style>';
echo '<style type="text/css">.vc_btn3-style-' . $style . '.vc_btn-gradient-btn-' . $uid . '{' . implode( ';', $gradient_css ) . ';' . '}</style>';
$button_classes[] = 'vc_btn-gradient-btn-' . $uid;
$attributes[] = 'data-vc-gradient-1="' . $gradient_color_1 . '"';
$attributes[] = 'data-vc-gradient-2="' . $gradient_color_2 . '"';
} else {
$button_classes[] = 'vc_btn3-color-' . $color;
}
if ( $styles ) {
$attributes[] = 'style="' . implode( ' ', $styles ) . '"';
}
$class_to_filter = implode( ' ', array_filter( $wrapper_classes ) );
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $vc_btn->settings( 'base' ), $atts );
if ( $button_classes ) {
$button_classes = esc_attr( apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, implode( ' ', array_filter( $button_classes ) ), $vc_btn->settings( 'base' ), $atts ) );
$attributes[] = 'class="' . trim( $button_classes ) . '"';
}
if ( $use_link ) {
$link_output = vc_gitem_create_link_real( $atts, $post, 'vc_general vc_btn3 ' . trim( $button_classes ), $title );
$attributes[] = $link_output;
}
if ( ! empty( $custom_onclick ) && $custom_onclick_code ) {
$attributes[] = 'onclick="' . esc_attr( $custom_onclick_code ) . '"';
}
$attributes = implode( ' ', $attributes );
$wrapper_attributes = array();
if ( ! empty( $el_id ) ) {
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
}
ob_start();
?>
<div class="<?php echo trim( esc_attr( $css_class ) ) ?>" <?php echo implode( ' ', $wrapper_attributes ); ?>>
<?php
if ( $use_link ) {
if ( preg_match( '/href=\"[^\"]+/', $link_output ) ) {
echo '<a ' . $attributes . '>' . $button_html . '</a>';
} elseif ( 'load-more-grid' === $link ) {
echo '<a href="javascript:;" ' . $attributes . '>' . $button_html . '</a>';
}
} else {
echo '<button ' . $attributes . '>' . $button_html . '</button>';
}
?></div>
<?php
return ob_get_clean();
@@ -0,0 +1,53 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
require_once vc_path_dir( 'PARAMS_DIR', 'vc_grid_item/editor/popups/class-vc-add-element-box-grid-item.php' );
$add_element_box = new Vc_Add_Element_Box_Grid_Item();
$add_element_box->render();
// Edit form for mapped shortcode.
visual_composer()->editForm()->render();
require_once vc_path_dir( 'PARAMS_DIR', 'vc_grid_item/editor/popups/class-vc-templates-editor-grid-item.php' );
$templates_editor = new Vc_Templates_Editor_Grid_Item();
$templates_editor->renderUITemplate();
$grid_item = new Vc_Grid_Item();
$shortcodes = $grid_item->shortcodes();
if ( vc_user_access()->part( 'presets' )->can()->get() ) {
require_once vc_path_dir( 'AUTOLOAD_DIR', 'class-vc-settings-presets.php' );
$vc_vendor_settings_presets = Vc_Settings_Preset::listDefaultVendorSettingsPresets();
$vc_all_presets = Vc_Settings_Preset::listAllPresets();
} else {
$vc_vendor_settings_presets = array();
$vc_all_presets = array();
}
?>
<script type="text/javascript">
var vc_user_mapper = <?php echo json_encode( WpbMap_Grid_Item::getGitemUserShortCodes() ) ?>,
vc_mapper = <?php echo json_encode( WpbMap_Grid_Item::getShortCodes() ) ?>,
vc_vendor_settings_presets = <?php echo json_encode( $vc_vendor_settings_presets ) ?>,
vc_all_presets = <?php echo json_encode( $vc_all_presets ) ?>,
vc_frontend_enabled = false,
vc_mode = '<?php echo vc_mode(); ?>',
vcAdminNonce = '<?php echo vc_generate_nonce( 'vc-admin-nonce' ); ?>';
</script>
<script type="text/html" id="vc_settings-image-block">
<li class="added">
<div class="inner" style="width: 80px; height: 80px; overflow: hidden;text-align: center;">
<img rel="{{ id }}" src="<# if(sizes && sizes.thumbnail) { #>{{ sizes.thumbnail.url }}<# } else {#>{{ url }}<# } #>"/>
</div>
<a href="#" class="vc_icon-remove"><i class="vc-composer-icon vc-c-icon-close"></i></a>
</li>
</script>
<?php foreach ( WpbMap_Grid_Item::getShortCodes() as $sc_base => $el ) : ?>
<script type="text/html" id="vc_shortcode-template-<?php echo $sc_base ?>">
<?php
echo visual_composer()->getShortCode( $sc_base )->template();
?>
</script>
<?php endforeach ?>
<?php vc_include_template( 'editors/partials/access-manager-js.tpl.php' );
@@ -0,0 +1,67 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
require_once vc_path_dir( 'PARAMS_DIR', 'vc_grid_item/editor/navbar/class-vc-navbar-grid-item.php' );
$nav_bar = new Vc_Navbar_Grid_Item( $post );
$nav_bar->render();
?>
<div class="metabox-composer-content">
<div id="visual_composer_content" class="wpb_main_sortable main_wrapper"
data-type="<?php echo esc_attr( get_post_type() ) ?>"></div>
<div id="vc_gitem-preview" class="main_wrapper vc_gitem-preview" data-vc-grid-item="preview">
</div>
</div>
<input type="hidden" id="wpb_vc_js_status" name="wpb_vc_js_status" value="true"/>
<input type="hidden" id="wpb_vc_loading" name="wpb_vc_loading"
value="<?php _e( 'Loading, please wait...', 'js_composer' ) ?>"/>
<input type="hidden" id="wpb_vc_loading_row" name="wpb_vc_loading_row"
value="<?php _e( 'Crunching...', 'js_composer' ) ?>"/>
<input type="hidden" name="vc_grid_item_editor" value="true"/>
<script type="text/javascript">
var vc_post_id = <?php echo get_the_ID(); ?>;
<?php
$vc_gitem_template = vc_request_param( 'vc_gitem_template' );
if ( strlen( $vc_gitem_template ) && false !== ( $template = Vc_Grid_Item::predefinedTemplate( $vc_gitem_template ) ) ) {
echo "var vcDefaultGridItemContent = '" . $template['template'] . "';";
} else {
?>
/**
* Get content of grid item editor of current post. Data is used as models collection of shortcodes.
* Data always wrapped with vc_gitem shortcode.
* @return {*}
*/
var vcDefaultGridItemContent = '' +
'[vc_gitem]' +
'[vc_gitem_animated_block]' +
'[vc_gitem_zone_a]' +
'[vc_gitem_row position="top"]' +
'[vc_gitem_col width="1/1"][/vc_gitem_col]' +
'[/vc_gitem_row]' +
'[vc_gitem_row position="middle"]' +
'[vc_gitem_col width="1/2"][/vc_gitem_col]' +
'[vc_gitem_col width="1/2"][/vc_gitem_col]' +
'[/vc_gitem_row]' +
'[vc_gitem_row position="bottom"]' +
'[vc_gitem_col width="1/1"][/vc_gitem_col]' +
'[/vc_gitem_row]' +
'[/vc_gitem_zone_a]' +
'[vc_gitem_zone_b]' +
'[vc_gitem_row position="top"]' +
'[vc_gitem_col width="1/1"][/vc_gitem_col]' +
'[/vc_gitem_row]' +
'[vc_gitem_row position="middle"]' +
'[vc_gitem_col width="1/2"][/vc_gitem_col]' +
'[vc_gitem_col width="1/2"][/vc_gitem_col]' +
'[/vc_gitem_row]' +
'[vc_gitem_row position="bottom"]' +
'[vc_gitem_col width="1/1"][/vc_gitem_col]' +
'[/vc_gitem_row]' +
'[/vc_gitem_zone_b]' +
'[/vc_gitem_animated_block]' +
'[/vc_gitem]';
<?php
}
?>
</script>
@@ -0,0 +1,127 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
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 ) {
$vc_grid_item_editor->registerBackendCss();
$vc_grid_item_editor->registerBackendJavascript();
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 ) );
visual_composer()->templatesPanelEditor()->registerPreviewScripts();
require_once( ABSPATH . 'wp-admin/admin-header.php' );
?>
<style type="text/css">
#screen-meta, #adminmenumain, .notice, #wpfooter, #message, .updated {
display: none !important;
}
#wpcontent {
margin-left: 0 !important;
padding-left: 0 !important;
}
.vc_not-remove-overlay {
position: fixed !important;
width: 100%;
height: 100%;
z-index: 199999999;
}
html {
overflow: hidden;
background: transparent;
}
</style>
<div class="vc_not-remove-overlay"></div>
<div class="vc_ui-template-preview">
<textarea id="content" style="display: none;"><?php echo $content ?></textarea>
<div id="wpb_visual_composer" class="postbox " style="display: block;">
<div class="inside">
<div class="metabox-composer-content">
<div id="visual_composer_content"
class="wpb_main_sortable main_wrapper ui-sortable ui-droppable"></div>
<div id="vc_no-content-helper" class="vc_welcome"></div>
</div>
<input type="hidden" name="vc_js_composer_group_access_show_rule"
class="vc_js_composer_group_access_show_rule" value="all">
<input type="hidden" id="wpb_vc_js_status" name="wpb_vc_js_status" value="true">
<input type="hidden" id="wpb_vc_loading" name="wpb_vc_loading" value="Loading, please wait...">
<input type="hidden" id="wpb_vc_loading_row" name="wpb_vc_loading_row" value="Crunching...">
<input type="hidden" name="vc_grid_item_editor" value="true"/>
<input type="hidden" name="vc_post_custom_css" id="vc_post-custom-css" value="" autocomplete="off">
</div>
</div>
<input type="hidden" id="wpb_vc_loading" name="wpb_vc_loading"
value="<?php esc_attr_e( 'Loading, please wait...', 'js_composer' ) ?>"/>
<input type="hidden" id="wpb_vc_loading_row" name="wpb_vc_loading_row"
value="<?php esc_attr_e( 'Crunching...', 'js_composer' ) ?>"/>
</div>
<script type="text/javascript">
/**
* Get content of grid item editor of current post. Data is used as models collection of shortcodes.
* Data always wrapped with vc_gitem shortcode.
* @return {*}
*/
var vcDefaultGridItemContent = '' +
'[vc_gitem]' +
'[vc_gitem_animated_block]' +
'[vc_gitem_zone_a]' +
'[vc_gitem_row position="top"]' +
'[vc_gitem_col width="1/1"][/vc_gitem_col]' +
'[/vc_gitem_row]' +
'[vc_gitem_row position="middle"]' +
'[vc_gitem_col width="1/2"][/vc_gitem_col]' +
'[vc_gitem_col width="1/2"][/vc_gitem_col]' +
'[/vc_gitem_row]' +
'[vc_gitem_row position="bottom"]' +
'[vc_gitem_col width="1/1"][/vc_gitem_col]' +
'[/vc_gitem_row]' +
'[/vc_gitem_zone_a]' +
'[vc_gitem_zone_b]' +
'[vc_gitem_row position="top"]' +
'[vc_gitem_col width="1/1"][/vc_gitem_col]' +
'[/vc_gitem_row]' +
'[vc_gitem_row position="middle"]' +
'[vc_gitem_col width="1/2"][/vc_gitem_col]' +
'[vc_gitem_col width="1/2"][/vc_gitem_col]' +
'[/vc_gitem_row]' +
'[vc_gitem_row position="bottom"]' +
'[vc_gitem_col width="1/1"][/vc_gitem_col]' +
'[/vc_gitem_row]' +
'[/vc_gitem_zone_b]' +
'[/vc_gitem_animated_block]' +
'[/vc_gitem]';
</script>
<?php
vc_include_template( 'editors/partials/backend-shortcodes-templates.tpl.php' );
do_action( 'vc_backend_editor_render' );
do_action( 'vc_vc_grid_item_editor_render' );
do_action( 'vc_ui-template-preview' );
// fix bug #59741644518985 in firefox
//wp_dequeue_script( 'isotope' );
require_once( ABSPATH . 'wp-admin/admin-footer.php' );
@@ -0,0 +1,91 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>
<!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 7) | !(IE 8) ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>"/>
<meta name="viewport" content="width=device-width"/>
<title><?php wp_title( '|', true, 'right' ); ?></title>
<?php wp_head(); ?>
<style type="text/css">
body {
background-color: #FFF;
color: #000;
font-size: 12px;
}
<?php echo visual_composer()->parseShortcodesCustomCss( $shortcodes_string ) ?>
.vc_gitem-preview {
margin: 60px auto;
}
.vc_gitem-preview .vc_grid-item {
display: block;
margin: 0 auto;
}
.vc_grid-item-width-dropdown {
margin-top: 10px;
text-align: center;
}
.vc_container {
margin: 0 15px;
}
img {
width: 100%;
}
</style>
</head>
<div id="vc_grid-item-primary" class="vc_grid-item-site-content">
<div id="vc_grid-item-content" role="vc_grid-item-main">
<div class="vc_gitem-preview" data-vc-grid-settings="{}">
<div class="vc_container">
<div class="vc_row">
<?php echo $grid_item->renderItem( $post ); ?>
</div>
</div>
</div>
</div>
<!-- #content -->
</div>
<!-- #primary -->
<?php wp_footer(); ?>
<script type="text/javascript">
var currentWidth = '<?php echo $default_width_value ?>',
vcSetItemWidth = function ( value ) {
jQuery( '.vc_grid-item' ).removeClass( 'vc_col-sm-' + currentWidth )
.addClass( 'vc_col-sm-' + value );
currentWidth = value;
}, changeAnimation;
changeAnimation = function ( animation ) {
var $animatedBlock, prevAnimation;
$animatedBlock = jQuery( '.vc_gitem-animated-block' );
prevAnimation = $animatedBlock.data( 'vcAnimation' );
$animatedBlock.hide()
.addClass( 'vc_gitem-animate vc_gitem-animate-' + animation )
.removeClass( 'vc_gitem-animate-' + prevAnimation )
.data( 'vcAnimation', animation );
setTimeout( function () {
$animatedBlock.show();
}, 100 );
};
jQuery( document ).ready( function ( $ ) {
window.parent.vc && window.parent.vc.app.showPreview( currentWidth );
} );
</script>
</body>
</html>
@@ -0,0 +1,5 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
?>{{ vc_btn:<?php echo http_build_query( $atts ) ?> }}
@@ -0,0 +1,53 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
$wrapper_css_class = 'vc_button-2-wrapper';
/** @var $this WPBakeryShortCode_VC_Button2 */
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );
$class = 'vc_btn';
//parse link
$class .= ( '' !== $color ) ? ( ' vc_btn_' . $color . ' vc_btn-' . $color ) : '';
$class .= ( '' !== $size ) ? ( ' vc_btn_' . $size . ' vc_btn-' . $size ) : '';
$class .= ( '' !== $style ) ? ' vc_btn_' . $style : '';
$css = isset( $css ) ? $css : '';
$class_to_filter = $class;
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
$link = 'class="' . esc_attr( $css_class ) . '"';
$target = '';
$rel = '';
if ( isset( $atts['link'] ) ) {
$css_class .= ' vc_gitem-link';
if ( 'custom' === $atts['link'] && ! empty( $atts['url'] ) ) {
$vc_link = vc_build_link( $atts['url'] );
if ( strlen( $vc_link['target'] ) ) {
$target = ' target="' . esc_attr( $vc_link['target'] ) . '"';
}
if ( strlen( $vc_link['rel'] ) ) {
$rel = ' rel="' . esc_attr( $vc_link['rel'] ) . '"';
}
$link = 'href="' . esc_attr( $vc_link['url'] ) . '" class="' . esc_attr( $css_class ) . '"';
} elseif ( 'post_link' === $atts['link'] ) {
$link = 'href="{{ post_link_url }}" class="' . esc_attr( $css_class ) . '"';
} elseif ( 'image' === $atts['link'] ) {
$link = '{{ post_image_url_href }} class="' . esc_attr( $css_class ) . '"';
} elseif ( 'image_lightbox' === $atts['link'] ) {
$link = '{{ post_image_url_attr_prettyphoto:' . $css_class . ' }}';
}
}
$link = apply_filters( 'vc_gitem_post_data_get_link_link', 'a ' . $link, $atts, $css_class ) . apply_filters( 'vc_gitem_post_data_get_link_target', $target, $atts ) . apply_filters( 'vc_gitem_post_data_get_link_rel', $rel, $atts );
if ( $align ) {
$wrapper_css_class .= ' vc_button-2-align-' . $align;
}
?>
<div class="<?php echo esc_attr( $wrapper_css_class ) ?>">
<?php echo '<' . $link . $target . $rel . '>' . $title . '</a>' ?>
</div>
@@ -0,0 +1,48 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* @var $this WPBakeryShortCode_VC_Custom_heading
*/
extract( $this->getAttributes( $atts ) );
extract( $this->getStyles( $el_class, $css, $google_fonts_data, $font_container_data, $atts ) );
$settings = get_option( 'wpb_js_google_fonts_subsets' );
if ( is_array( $settings ) && ! empty( $settings ) ) {
$subsets = '&subset=' . implode( ',', $settings );
} else {
$subsets = '';
}
$link = vc_gitem_create_link( $atts );
if ( ! empty( $link ) ) {
$text = '<' . $link . '>' . $text . '</a>';
}
if ( ( ! isset( $atts['use_theme_fonts'] ) || 'yes' !== $atts['use_theme_fonts'] ) && ! empty( $google_fonts_data ) && isset( $google_fonts_data['values']['font_family'] ) ) {
wp_enqueue_style( 'vc_google_fonts_' . vc_build_safe_css_class( $google_fonts_data['values']['font_family'] ), 'https://fonts.googleapis.com/css?family=' . $google_fonts_data['values']['font_family'] . $subsets );
}
if ( ! empty( $styles ) ) {
$style = 'style="' . esc_attr( implode( ';', $styles ) ) . '"';
} else {
$style = '';
}
$output = '';
if ( apply_filters( 'vc_custom_heading_template_use_wrapper', false ) ) {
$output .= '<div class="' . esc_attr( $css_class ) . '" >';
$output .= '<' . $font_container_data['values']['tag'] . ' ' . $style . ' >';
$output .= $text;
$output .= '</' . $font_container_data['values']['tag'] . '>';
$output .= '</div>';
} else {
$output .= '<' . $font_container_data['values']['tag'] . ' ' . $style . ' class="' . esc_attr( $css_class ) . '">';
$output .= $text;
$output .= '</' . $font_container_data['values']['tag'] . '>';
}
echo $output;
@@ -0,0 +1,52 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/** @var $this WPBakeryShortCode_VC_Icon */
$icon = $color = $size = $align = $el_class = $custom_color = $link = $background_style = $background_color =
$type = $icon_fontawesome = $icon_openiconic = $icon_typicons = $icon_entypoicons = $icon_linecons =
$custom_background_color = '';
/** @var array $atts - shortcode attributes */
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );
$link = vc_gitem_create_link( $atts, 'vc_icon_element-link' );
$class_to_filter = $this->getCSSAnimation( $css_animation );
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
// Enqueue needed icon font.
vc_icon_element_fonts_enqueue( $type );
$has_style = false;
if ( strlen( $background_style ) > 0 ) {
$has_style = true;
if ( false !== strpos( $background_style, 'outline' ) ) {
$background_style .= ' vc_icon_element-outline'; // if we use outline style it is border in css
} else {
$background_style .= ' vc_icon_element-background';
}
}
$style = '';
if ( 'custom' === $background_color ) {
if ( false !== strpos( $background_style, 'outline' ) ) {
$style = 'border-color:' . $custom_background_color;
} else {
$style = 'background-color:' . $custom_background_color;
}
}
$style = $style ? 'style="' . esc_attr( $style ) . '"' : '';
?>
<div
class="vc_icon_element vc_icon_element-outer<?php echo esc_attr( $css_class ); ?> vc_icon_element-align-<?php echo esc_attr( $align ); ?> <?php if ( $has_style ) { echo 'vc_icon_element-have-style'; } ?>">
<div
class="vc_icon_element-inner vc_icon_element-color-<?php echo esc_attr( $color ); ?> <?php if ( $has_style ) { echo 'vc_icon_element-have-style-inner'; } ?> vc_icon_element-size-<?php echo esc_attr( $size ); ?> vc_icon_element-style-<?php echo esc_attr( $background_style ); ?> vc_icon_element-background-color-<?php echo esc_attr( $background_color ); ?>" <?php echo $style ?>><span
class="vc_icon_element-icon <?php echo esc_attr( ${'icon_' . $type} ); ?>" <?php echo( 'custom' === $color ? 'style="color:' . esc_attr( $custom_color ) . ' !important"' : '' ); ?>></span><?php
if ( strlen( $link ) > 0 ) {
echo '<' . $link . '></a>';
}
?></div>
</div>
@@ -0,0 +1,64 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
$el_class = $image = $img_size = $img_link = $img_link_target = $img_link_large = $title = $alignment = $css_animation = $css = '';
/** @var $this WPBakeryShortCode_VC_Single_image */
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );
$default_src = vc_asset_url( 'vc/no_image.png' );
$style = ( '' !== $style ) ? $style : '';
$border_color = ( '' !== $border_color ) ? ' vc_box_border_' . $border_color : '';
$img_id = preg_replace( '/[^\d]/', '', $image );
switch ( $source ) {
case 'media_library':
$img = wpb_getImageBySize( array(
'attach_id' => $img_id,
'thumb_size' => $img_size,
'class' => 'vc_single_image-img',
) );
break;
case 'external_link':
$dimensions = vcExtractDimensions( $img_size );
$hwstring = $dimensions ? image_hwstring( $dimensions[0], $dimensions[1] ) : '';
$custom_src = $custom_src ? esc_attr( $custom_src ) : $default_src;
$img = array(
'thumbnail' => '<img class="vc_single_image-img" ' . $hwstring . ' src="' . $custom_src . '" />',
);
break;
default:
$img = false;
}
if ( ! $img ) {
$img['thumbnail'] = '<img class="vc_single_image-img" src="' . $default_src . '" />';
}
$wrapperClass = 'vc_single_image-wrapper ' . $style . ' ' . $border_color;
$link = vc_gitem_create_link( $atts, $wrapperClass );
$image_string = ! empty( $link ) ? '<' . $link . '>' . $img['thumbnail'] . '</a>' : '<div class="' . $wrapperClass . '"> ' . $img['thumbnail'] . ' </div>';
$class_to_filter = 'wpb_single_image wpb_content_element vc_align_' . $alignment . ' ' . $this->getCSSAnimation( $css_animation );
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
$output = '
<div class="' . esc_attr( $css_class ) . '">
' . wpb_widget_title( array( 'title' => $title, 'extraclass' => 'wpb_singleimage_heading' ) ) . '
<figure class="wpb_wrapper vc_figure">
' . $image_string . '
</figure>
</div>
';
echo $output;
@@ -0,0 +1,28 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $atts
* @var $title
* @var $id
* @var $el_class
* Shortcode class
* @var $this WPBakeryShortCode_Layerslider_Vc
*/
$el_class = $title = $id = '';
$output = '';
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );
$el_class = $this->getExtraClass( $el_class );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_layerslider_element wpb_content_element' . $el_class, $this->settings['base'], $atts );
$output .= '<div class="' . esc_attr( $css_class ) . '">';
$output .= wpb_widget_title( array( 'title' => $title, 'extraclass' => 'wpb_layerslider_heading' ) );
$output .= apply_filters( 'vc_layerslider_shortcode', do_shortcode( '[layerslider id="' . $id . '"]' ) );
$output .= '</div>';
echo $output;
@@ -0,0 +1,23 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
$block = $block_data[0];
$settings = $block_data[1];
$link_setting = empty( $settings[0] ) ? '' : $settings[0];
?>
<?php if ( 'title' === $block ) : ?>
<h2 class="post-title">
<?php echo empty( $link_setting ) || 'no_link' !== $link_setting ? $this->getLinked( $post, $post->title, $link_setting, 'link_title' ) : $post->title ?>
</h2>
<?php elseif ( 'image' === $block && ! empty( $post->thumbnail ) ) : ?>
<div class="post-thumb">
<?php echo empty( $link_setting ) || 'no_link' !== $link_setting ? $this->getLinked( $post, $post->thumbnail, $link_setting, 'link_image' ) : $post->thumbnail ?>
</div>
<?php elseif ( 'text' === $block ) : ?>
<div class="entry-content">
<?php echo empty( $link_setting ) || 'text' === $link_setting ? $post->content : $post->excerpt; ?>
</div>
<?php elseif ( 'link' === $block ) : ?>
<a href="<?php echo $post->link ?>" class="vc_read_more" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'js_composer' ), $post->title_attribute ) ); ?>"<?php echo $this->link_target ?>><?php _e( 'Read more', 'js_composer' ) ?></a>
<?php endif ?>
@@ -0,0 +1,28 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $atts
* @var $title
* @var $alias
* @var $el_class
* Shortcode class
* @var $this WPBakeryShortCode_Rev_Slider_Vc
*/
$title = $alias = $el_class = '';
$output = '';
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );
$el_class = $this->getExtraClass( $el_class );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_revslider_element wpb_content_element' . $el_class, $this->settings['base'], $atts );
$output .= '<div class="' . esc_attr( $css_class ) . '">';
$output .= wpb_widget_title( array( 'title' => $title, 'extraclass' => 'wpb_revslider_heading' ) );
$output .= apply_filters( 'vc_revslider_shortcode', do_shortcode( '[rev_slider ' . $alias . ']' ) );
$output .= '</div>';
echo $output;
@@ -0,0 +1,36 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* @deprecated
* Shortcode attributes
* @var $atts
* @var $title
* @var $el_class
* @var $collapsible
* @var $disable_keyboard
* @var $active_tab
* @var $content - shortcode content
* Shortcode class
* @var $this WPBakeryShortCode_VC_Accordion
*/
$title = $el_class = $collapsible = $disable_keyboard = $active_tab = '';
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );
wp_enqueue_script( 'jquery-ui-accordion' );
$el_class = $this->getExtraClass( $el_class );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_accordion wpb_content_element ' . $el_class . ' not-column-inherit', $this->settings['base'], $atts );
$output = '
<div class="' . esc_attr( $css_class ) . '" data-collapsible="' . esc_attr( $collapsible ) . '" data-vc-disable-keydown="' . ( esc_attr( ( 'yes' === $disable_keyboard ? 'true' : 'false' ) ) ) . '" data-active-tab="' . $active_tab . '">
<div class="wpb_wrapper wpb_accordion_wrapper ui-accordion">
' . wpb_widget_title( array( 'title' => $title, 'extraclass' => 'wpb_accordion_heading' ) ) . '
' . wpb_js_remove_wpautop( $content ) . '
</div>
</div>
';
echo $output;
@@ -0,0 +1,31 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* @deprecated
* Shortcode attributes
* @var $atts
* @var $title
* @var $el_id
* @var $content - shortcode content
* Shortcode class
* @var $this WPBakeryShortCode_VC_Accordion_tab
*/
$title = $el_id = '';
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_accordion_section group', $this->settings['base'], $atts );
$output = '
<div ' . ( isset( $el_id ) && ! empty( $el_id ) ? "id='" . esc_attr( $el_id ) . "'" : '' ) . 'class="' . esc_attr( $css_class ) . '">
<h3 class="wpb_accordion_header ui-accordion-header"><a href="#' . sanitize_title( $title ) . '">' . $title . '</a></h3>
<div class="wpb_accordion_content ui-accordion-content vc_clearfix">
' . ( ( '' === trim( $content ) ) ? __( 'Empty section. Edit page to add content here.', 'js_composer' ) : wpb_js_remove_wpautop( $content ) ) . '
</div>
</div>
';
echo $output;
@@ -0,0 +1,67 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $atts array
* @var $content - shortcode content
* Shortcode class
* @var $this WPBakeryShortCode_VC_Basic_Grid
*/
$this->post_id = false;
$this->items = array();
$css = $el_class = '';
$posts = $filter_terms = array();
$this->buildAtts( $atts, $content );
$css = isset( $atts['css'] ) ? $atts['css'] : '';
$el_class = isset( $atts['el_class'] ) ? $atts['el_class'] : '';
$class_to_filter = 'vc_grid-container vc_clearfix wpb_content_element ' . $this->shortcode;
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
wp_enqueue_script( 'prettyphoto' );
wp_enqueue_style( 'prettyphoto' );
if ( 'true' === $this->atts['btn_add_icon'] ) {
vc_icon_element_fonts_enqueue( $this->atts['btn_i_type'] );
}
$this->buildGridSettings();
if ( isset( $this->atts['style'] ) && 'pagination' === $this->atts['style'] ) {
wp_enqueue_script( 'twbs-pagination' );
}
if ( ! empty( $atts['page_id'] ) ) {
$this->grid_settings['page_id'] = (int) $atts['page_id'];
}
$this->enqueueScripts();
$animation = isset( $this->atts['initial_loading_animation'] ) ? $this->atts['initial_loading_animation'] : 'zoomIn';
$wrapper_attributes = array();
// Used for preload first page
if ( ! vc_is_page_editable() ) {
if ( in_array( $this->atts['style'], array(
'load-more',
'lazy',
'all',
) ) && in_array( $this->settings['base'], array( 'vc_basic_grid' ) ) ) {
$this->atts['max_items'] = 'all' === $this->atts['style'] || $this->atts['items_per_page'] > $this->atts['max_items'] ? $this->atts['max_items'] : $this->atts['items_per_page'];
$this->buildItems();
}
}
if ( ! empty( $atts['el_id'] ) ) {
$wrapper_attributes[] = 'id="' . esc_attr( $atts['el_id'] ) . '"';
}
?><!-- vc_grid start -->
<div class="vc_grid-container-wrapper vc_clearfix" <?php echo implode( ' ', $wrapper_attributes ); ?>>
<div class="<?php echo esc_attr( $css_class ) ?>" data-initial-loading-animation="<?php echo esc_attr( $animation ); ?>" 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( apply_filters( 'vc_grid_request_url', admin_url( 'admin-ajax.php' ) ) ); ?>" data-vc-post-id="<?php echo esc_attr( get_the_ID() ); ?>" data-vc-public-nonce="<?php echo vc_generate_nonce( 'vc-public-nonce' ); ?>">
<?php
// preload first page
echo $this->renderItems();
?>
</div>
</div><!-- vc_grid end -->
@@ -0,0 +1,46 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $atts
*/
if ( 'yes' === $atts['show_filter'] && ! empty( $filter_terms ) ) :
$unique_terms = array_unique( $filter_terms );
$terms_ids = ! empty( $atts['exclude_filter'] ) ? array_diff( $unique_terms, // Posts filter terms
array_map( 'abs', preg_split( '/\s*\,\s*/', $atts['exclude_filter'] ) ) ) : $unique_terms;
$terms = count( $terms_ids ) > 0 ? get_terms( $atts['filter_source'], array(
'include' => implode( ',', $terms_ids ),
) ) : array();
$filter_default = $atts['filter_default_title'];
if ( empty( $filter_default ) ) {
$filter_default = __( 'All', 'js_composer' );
}
if ( 'dropdown' !== $atts['filter_style'] ) {
echo '<ul class="vc_grid-filter vc_clearfix vc_grid-filter-' . esc_attr( $atts['filter_style'] ) . ' vc_grid-filter-size-' . esc_attr( $atts['filter_size'] ) . ' vc_grid-filter-' . esc_attr( $atts['filter_align'] ) . ' vc_grid-filter-color-' . esc_attr( $atts['filter_color'] ) . '" data-vc-grid-filter="' . esc_attr( $atts['filter_source'] ) . '"><li class="vc_active vc_grid-filter-item"><span data-vc-grid-filter-value="*">';
echo esc_attr( $filter_default );;
echo '</span></li>';
foreach ( $terms as $term ) {
echo '<li class="vc_grid-filter-item"><span' . ' data-vc-grid-filter-value=".vc_grid-term-' . $term->term_id . '">';
echo esc_attr( $term->name );
echo '</span><!-- fix whitespace
--></li>';
}
echo '</ul>';
}
?>
<!-- for responsive vc_responsive !-->
<div class="<?php echo 'dropdown' === $atts['filter_style'] ? 'vc_grid-filter-dropdown' : 'vc_grid-filter-select'; ?> vc_grid-filter-<?php echo esc_attr( $atts['filter_align'] ); ?> vc_grid-filter-color-<?php echo esc_attr( $atts['filter_color'] ); ?>" data-vc-grid-filter-select="<?php echo esc_attr( $atts['filter_source'] ) ?>">
<div class="vc_grid-styled-select"><select data-filter="<?php echo esc_attr( $atts['filter_source'] ) ?>">
<option class="vc_active" value="*"><?php echo esc_attr( $filter_default ); ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>
<?php foreach ( $terms as $term ) :
echo '<option value=".vc_grid-term-' . esc_attr( $term->term_id ) . '">' . esc_html( $term->name ) . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>';
endforeach; ?>
</select><i class="vc_arrow-icon-navicon"></i>
</div>
</div>
<?php endif;
@@ -0,0 +1,242 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $atts
* @var $style
* @var $shape
* @var $color
* @var $custom_background
* @var $custom_text
* @var $size
* @var $align
* @var $link
* @var $title
* @var $button_block
* @var $el_id
* @var $el_class
* @var $outline_custom_color
* @var $outline_custom_hover_background
* @var $outline_custom_hover_text
* @var $add_icon
* @var $i_align
* @var $i_type
* @var $i_icon_fontawesome
* @var $i_icon_openiconic
* @var $i_icon_typicons
* @var $i_icon_entypo
* @var $i_icon_linecons
* @var $i_icon_pixelicons
* @var $css_animation
* @var $css
* @var $gradient_color_1
* @var $gradient_color_2
* @var $gradient_custom_color_1 ;
* @var $gradient_custom_color_2 ;
* @var $gradient_text_color ;
* Shortcode class
* @var $this WPBakeryShortCode_VC_Btn
*/
$style = $shape = $color = $size = $custom_background = $custom_text = $align = $link = $title = $button_block = $el_class = $outline_custom_color = $outline_custom_hover_background = $outline_custom_hover_text = $add_icon = $i_align = $i_type = $i_icon_entypo = $i_icon_fontawesome = $i_icon_linecons = $i_icon_pixelicons = $i_icon_typicons = $css = $css_animation = '';
$gradient_color_1 = $gradient_color_2 = $gradient_custom_color_1 = $gradient_custom_color_2 = $gradient_text_color = '';
$custom_onclick = $custom_onclick_code = '';
$a_href = $a_title = $a_target = $a_rel = '';
$styles = array();
$icon_wrapper = false;
$icon_html = false;
$attributes = array();
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );
//parse link
$link = trim( $link );
$link = ( '||' === $link ) ? '' : $link;
$link = vc_build_link( $link );
$use_link = false;
if ( strlen( $link['url'] ) > 0 ) {
$use_link = true;
$a_href = $link['url'];
$a_href = apply_filters( 'vc_btn_a_href', $a_href );
$a_title = $link['title'];
$a_title = apply_filters( 'vc_btn_a_title', $a_title );
$a_target = $link['target'];
$a_rel = $link['rel'];
}
$wrapper_classes = array(
'vc_btn3-container',
$this->getExtraClass( $el_class ),
$this->getCSSAnimation( $css_animation ),
'vc_btn3-' . $align,
);
$button_classes = array(
'vc_general',
'vc_btn3',
'vc_btn3-size-' . $size,
'vc_btn3-shape-' . $shape,
'vc_btn3-style-' . $style,
);
$button_html = $title;
if ( '' === trim( $title ) ) {
$button_classes[] = 'vc_btn3-o-empty';
$button_html = '<span class="vc_btn3-placeholder">&nbsp;</span>';
}
if ( 'true' === $button_block && 'inline' !== $align ) {
$button_classes[] = 'vc_btn3-block';
}
if ( 'true' === $add_icon ) {
$button_classes[] = 'vc_btn3-icon-' . $i_align;
vc_icon_element_fonts_enqueue( $i_type );
if ( isset( ${'i_icon_' . $i_type} ) ) {
if ( 'pixelicons' === $i_type ) {
$icon_wrapper = true;
}
$icon_class = ${'i_icon_' . $i_type};
} else {
$icon_class = 'fa fa-adjust';
}
if ( $icon_wrapper ) {
$icon_html = '<i class="vc_btn3-icon"><span class="vc_btn3-icon-inner ' . esc_attr( $icon_class ) . '"></span></i>';
} else {
$icon_html = '<i class="vc_btn3-icon ' . esc_attr( $icon_class ) . '"></i>';
}
if ( 'left' === $i_align ) {
$button_html = $icon_html . ' ' . $button_html;
} else {
$button_html .= ' ' . $icon_html;
}
}
if ( 'custom' === $style ) {
if ( $custom_background ) {
$styles[] = vc_get_css_color( 'background-color', $custom_background );
}
if ( $custom_text ) {
$styles[] = vc_get_css_color( 'color', $custom_text );
}
if ( ! $custom_background && ! $custom_text ) {
$button_classes[] = 'vc_btn3-color-grey';
}
} elseif ( 'outline-custom' === $style ) {
if ( $outline_custom_color ) {
$styles[] = vc_get_css_color( 'border-color', $outline_custom_color );
$styles[] = vc_get_css_color( 'color', $outline_custom_color );
$attributes[] = 'onmouseleave="this.style.borderColor=\'' . $outline_custom_color . '\'; this.style.backgroundColor=\'transparent\'; this.style.color=\'' . $outline_custom_color . '\'"';
} else {
$attributes[] = 'onmouseleave="this.style.borderColor=\'\'; this.style.backgroundColor=\'transparent\'; this.style.color=\'\'"';
}
$onmouseenter = array();
if ( $outline_custom_hover_background ) {
$onmouseenter[] = 'this.style.borderColor=\'' . $outline_custom_hover_background . '\';';
$onmouseenter[] = 'this.style.backgroundColor=\'' . $outline_custom_hover_background . '\';';
}
if ( $outline_custom_hover_text ) {
$onmouseenter[] = 'this.style.color=\'' . $outline_custom_hover_text . '\';';
}
if ( $onmouseenter ) {
$attributes[] = 'onmouseenter="' . implode( ' ', $onmouseenter ) . '"';
}
if ( ! $outline_custom_color && ! $outline_custom_hover_background && ! $outline_custom_hover_text ) {
$button_classes[] = 'vc_btn3-color-inverse';
foreach ( $button_classes as $k => $v ) {
if ( 'vc_btn3-style-outline-custom' === $v ) {
unset( $button_classes[ $k ] );
break;
}
}
$button_classes[] = 'vc_btn3-style-outline';
}
} elseif ( 'gradient' === $style || 'gradient-custom' === $style ) {
$gradient_color_1 = vc_convert_vc_color( $gradient_color_1 );
$gradient_color_2 = vc_convert_vc_color( $gradient_color_2 );
$button_text_color = '#fff';
if ( 'gradient-custom' === $style ) {
$gradient_color_1 = $gradient_custom_color_1;
$gradient_color_2 = $gradient_custom_color_2;
$button_text_color = $gradient_text_color;
}
$gradient_css = array();
$gradient_css[] = 'color: ' . $button_text_color;
$gradient_css[] = 'border: none';
$gradient_css[] = 'background-color: ' . $gradient_color_1;
$gradient_css[] = 'background-image: -webkit-linear-gradient(left, ' . $gradient_color_1 . ' 0%, ' . $gradient_color_2 . ' 50%,' . $gradient_color_1 . ' 100%)';
$gradient_css[] = 'background-image: linear-gradient(to right, ' . $gradient_color_1 . ' 0%, ' . $gradient_color_2 . ' 50%,' . $gradient_color_1 . ' 100%)';
$gradient_css[] = '-webkit-transition: all .2s ease-in-out';
$gradient_css[] = 'transition: all .2s ease-in-out';
$gradient_css[] = 'background-size: 200% 100%';
// hover css
$gradient_css_hover = array();
$gradient_css_hover[] = 'color: ' . $button_text_color;
$gradient_css_hover[] = 'background-color: ' . $gradient_color_2;
$gradient_css_hover[] = 'border: none';
$gradient_css_hover[] = 'background-position: 100% 0';
$uid = uniqid();
echo '<style type="text/css">.vc_btn3-style-' . $style . '.vc_btn-gradient-btn-' . $uid . ':hover{' . implode( ';', $gradient_css_hover ) . ';' . '}</style>';
echo '<style type="text/css">.vc_btn3-style-' . $style . '.vc_btn-gradient-btn-' . $uid . '{' . implode( ';', $gradient_css ) . ';' . '}</style>';
$button_classes[] = 'vc_btn-gradient-btn-' . $uid;
$attributes[] = 'data-vc-gradient-1="' . $gradient_color_1 . '"';
$attributes[] = 'data-vc-gradient-2="' . $gradient_color_2 . '"';
} else {
$button_classes[] = 'vc_btn3-color-' . $color;
}
if ( $styles ) {
$attributes[] = 'style="' . implode( ' ', $styles ) . '"';
}
$class_to_filter = implode( ' ', array_filter( $wrapper_classes ) );
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
if ( $button_classes ) {
$button_classes = esc_attr( apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, implode( ' ', array_filter( $button_classes ) ), $this->settings['base'], $atts ) );
$attributes[] = 'class="' . trim( $button_classes ) . '"';
}
if ( $use_link ) {
$attributes[] = 'href="' . trim( $a_href ) . '"';
$attributes[] = 'title="' . esc_attr( trim( $a_title ) ) . '"';
if ( ! empty( $a_target ) ) {
$attributes[] = 'target="' . esc_attr( trim( $a_target ) ) . '"';
}
if ( ! empty( $a_rel ) ) {
$attributes[] = 'rel="' . esc_attr( trim( $a_rel ) ) . '"';
}
}
if ( ! empty( $custom_onclick ) && $custom_onclick_code ) {
$attributes[] = 'onclick="' . esc_attr( $custom_onclick_code ) . '"';
}
$attributes = implode( ' ', $attributes );
$wrapper_attributes = array();
if ( ! empty( $el_id ) ) {
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
}
?>
<div class="<?php echo trim( esc_attr( $css_class ) ) ?>" <?php echo implode( ' ', $wrapper_attributes ); ?>>
<?php
if ( $use_link ) {
echo '<a ' . $attributes . '>' . $button_html . '</a>';
} else {
echo '<button ' . $attributes . '>' . $button_html . '</button>';
}
?></div>
@@ -0,0 +1,65 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $atts
* @var $color
* @var $size
* @var $icon
* @var $target
* @var $href
* @var $el_class
* @var $title
* Shortcode class
* @var $this WPBakeryShortCode_VC_Button
*/
$color = $size = $icon = $target = $href = $el_class = $title = '';
$output = '';
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );
$a_class = '';
if ( '' !== $el_class ) {
$tmp_class = explode( ' ', strtolower( $el_class ) );
$tmp_class = str_replace( '.', '', $tmp_class );
if ( in_array( 'prettyphoto', $tmp_class ) ) {
wp_enqueue_script( 'prettyphoto' );
wp_enqueue_style( 'prettyphoto' );
$a_class .= ' prettyphoto';
$el_class = str_ireplace( 'prettyphoto', '', $el_class );
}
if ( in_array( 'pull-right', $tmp_class ) && '' !== $href ) {
$a_class .= ' pull-right';
$el_class = str_ireplace( 'pull-right', '', $el_class );
}
if ( in_array( 'pull-left', $tmp_class ) && '' !== $href ) {
$a_class .= ' pull-left';
$el_class = str_ireplace( 'pull-left', '', $el_class );
}
}
if ( 'same' === $target || '_self' === $target ) {
$target = '';
}
$target = ( '' !== $target ) ? ' target="' . esc_attr( $target ) . '"' : '';
$color = ( '' !== $color ) ? ' wpb_' . $color : '';
$size = ( '' !== $size && 'wpb_regularsize' !== $size ) ? ' wpb_' . $size : ' ' . $size;
$icon = ( '' !== $icon && 'none' !== $icon ) ? ' ' . $icon : '';
$i_icon = ( '' !== $icon ) ? ' <i class="icon"> </i>' : '';
$el_class = $this->getExtraClass( $el_class );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_button ' . $color . $size . $icon . $el_class, $this->settings['base'], $atts );
if ( '' !== $href ) {
$output .= '<span class="' . esc_attr( $css_class ) . '">' . $title . $i_icon . '</span>';
$output = '<a class="wpb_button_a' . esc_attr( $a_class ) . '" title="' . esc_attr( $title ) . '" href="' . esc_attr( $href ) . '"' . $target . '>' . $output . '</a>';
} else {
$output .= '<button class="' . esc_attr( $css_class ) . '">' . $title . $i_icon . '</button>';
}
echo $output;
@@ -0,0 +1,47 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $atts
* @var $link
* @var $title
* @var $color
* @var $size
* @var $style
* @var $el_class
* @var $align
* Shortcode class
* @var $this WPBakeryShortCode_VC_Button2
*/
$link = $title = $color = $size = $style = $el_class = $align = '';
$wrapper_start = $wrapper_end = '';
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );
$class = 'vc_btn';
//parse link
$link = ( '||' === $link ) ? '' : $link;
$link = vc_build_link( $link );
$a_href = $link['url'];
$a_title = $link['title'];
$a_target = $link['target'];
$a_rel = $link['rel'];
if ( ! empty( $a_rel ) ) {
$a_rel = ' rel="' . esc_attr( trim( $a_rel ) ) . '"';
}
$class .= ( '' !== $color ) ? ( ' vc_btn_' . $color . ' vc_btn-' . $color ) : '';
$class .= ( '' !== $size ) ? ( ' vc_btn_' . $size . ' vc_btn-' . $size ) : '';
$class .= ( '' !== $style ) ? ' vc_btn_' . $style : '';
$el_class = $this->getExtraClass( $el_class );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, ' ' . $class . $el_class, $this->settings['base'], $atts );
$wrapper_css_class = 'vc_button-2-wrapper';
if ( $align ) {
$wrapper_css_class .= ' vc_button-2-align-' . $align;
}
?>
<div class="<?php echo esc_attr( $wrapper_css_class ) ?>"><a class="<?php echo esc_attr( trim( $css_class ) ); ?>" href="<?php echo esc_attr( $a_href ); ?>" title="<?php echo esc_attr( $a_title ); ?>" target="<?php echo esc_attr( $a_target ); ?>"<?php echo $a_rel; ?>><?php echo $title; ?></a>
</div>
@@ -0,0 +1,177 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $atts
* @var $el_class
* @var $posts_query
* @var $mode
* @var $speed
* @var $slides_per_view
* @var $wrap
* @var $autoplay
* @var $hide_pagination_control
* @var $hide_prev_next_buttons
* @var $layout
* @var $link_target
* @var $thumb_size
* @var $partial_view
* @var $title
* Shortcode class
* @var $this WPBakeryShortCode_Vc_Carousel
*/
$el_class = $posts_query = $mode = $speed = $slides_per_view =
$wrap = $autoplay = $hide_pagination_control = $hide_prev_next_buttons =
$layout = $link_target = $thumb_size = $partial_view = $title = '';
global $vc_teaser_box;
$args = $my_query = '';
$posts = array();
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );
global $vc_posts_grid_exclude_id;
$vc_posts_grid_exclude_id[] = get_the_ID(); // fix recursive nesting
if ( is_array( $posts_query ) ) {
$posts_query['post_status'] = 'publish';
} else {
$posts_query .= '|post_status:publish';
}
list( $args, $my_query ) = vc_build_loop_query( $posts_query, get_the_ID() );
$teaser_blocks = vc_sorted_list_parse_value( $layout );
/** @var $my_query WP_Query */
while ( $my_query->have_posts() ) {
$my_query->the_post(); // Get post from query
if ( in_array( get_the_ID(), $vc_posts_grid_exclude_id ) ) {
continue;
}
$post = new stdClass(); // Creating post object.
$post->id = get_the_ID();
$post->link = get_permalink( $post->id );
$post->post_type = get_post_type();
if ( '1' === $vc_teaser_box->getTeaserData( 'enable', $post->id ) ) {
$post->custom_user_teaser = true;
$data = $vc_teaser_box->getTeaserData( 'data', $post->id );
if ( ! empty( $data ) ) {
$data = json_decode( $data );
}
$post->bgcolor = $vc_teaser_box->getTeaserData( 'bgcolor', $post->id );
$post->custom_teaser_blocks = array();
$post->title_attribute = the_title_attribute( 'echo=0' );
if ( ! empty( $data ) ) {
foreach ( $data as $block ) {
$settings = array();
if ( 'title' === $block->name ) {
$post->title = the_title( '', '', false );
} elseif ( 'image' === $block->name ) {
if ( 'featured' === $block->image ) {
$post->thumbnail_data = $this->getPostThumbnail( $post->id, $thumb_size );
} elseif ( ! empty( $block->image ) ) {
$post->thumbnail_data = wpb_getImageBySize( array(
'attach_id' => (int) $block->image,
'thumb_size' => $thumb_size,
) );
} else {
$post->thumbnail_data = false;
}
$post->thumbnail = $post->thumbnail_data && isset( $post->thumbnail_data['thumbnail'] ) ? $post->thumbnail_data['thumbnail'] : '';
$post->image_link = empty( $video ) && $post->thumbnail && isset( $post->thumbnail_data['p_img_large'][0] ) ? $post->thumbnail_data['p_img_large'][0] : $video;
} elseif ( 'text' === $block->name ) {
if ( 'custom' === $block->mode ) {
$settings[] = 'text';
$post->content = $block->text;
} elseif ( 'excerpt' === $block->mode ) {
$settings[] = $block->mode;
$post->excerpt = $this->getPostExcerpt();
} else {
$settings[] = $block->mode;
$post->content = $this->getPostContent();
}
}
if ( isset( $block->link ) ) {
if ( 'post' === $block->link ) {
$settings[] = 'link_post';
} elseif ( 'big_image' === $block->link ) {
$settings[] = 'link_image';
} else {
$settings[] = 'no_link';
}
$settings[] = '';
}
$post->custom_teaser_blocks[] = array( $block->name, $settings );
}
}
} else {
$post->custom_user_teaser = false;
$post->title = the_title( '', '', false );
$post->title_attribute = the_title_attribute( 'echo=0' );
$post->post_type = get_post_type();
$post->content = $this->getPostContent();
$post->excerpt = $this->getPostExcerpt();
$post->thumbnail_data = $this->getPostThumbnail( $post->id, $thumb_size );
$post->thumbnail = $post->thumbnail_data && isset( $post->thumbnail_data['thumbnail'] ) ? $post->thumbnail_data['thumbnail'] : '';
$video = get_post_meta( $post->id, '_p_video', true );
$post->image_link = empty( $video ) && $post->thumbnail && isset( $post->thumbnail_data['p_img_large'][0] ) ? $post->thumbnail_data['p_img_large'][0] : $video;
}
$post->categories_css = $this->getCategoriesCss( $post->id );
$posts[] = $post;
}
wp_reset_query();
$this->setLinkTarget( $link_target );
wp_enqueue_script( 'vc_carousel_js' );
wp_enqueue_style( 'vc_carousel_css' );
$css_class = $this->settings['base'] . ' wpb_content_element vc_carousel_slider_' . $slides_per_view . ' vc_carousel_' . $mode . ( empty( $el_class ) ? '' : ' ' . $el_class );
$carousel_id = esc_attr( 'vc_carousel-' . WPBakeryShortCode_Vc_Carousel::getCarouselIndex() );
?>
<div
class="<?php echo esc_attr( apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $css_class, $this->settings['base'], $atts ) ) ?>">
<div class="wpb_wrapper">
<?php echo wpb_widget_title( array( 'title' => $title, 'extraclass' => 'wpb_gallery_heading' ) ) ?>
<div id="<?php echo $carousel_id ?>" data-ride="vc_carousel" data-wrap="<?php echo 'yes' === $wrap ? 'true' : 'false' ?>" data-interval="<?php echo 'yes' === $autoplay ? $speed : 0 ?>" data-auto-height="true" data-mode="<?php echo $mode ?>" data-partial="<?php echo 'yes' === $partial_view ? 'true' : 'false' ?>" data-per-view="<?php echo $slides_per_view ?>" data-hide-on-end="<?php echo 'yes' === $autoplay ? 'false' : 'true' ?>" class="vc_carousel vc_slide">
<?php if ( 'yes' !== $hide_pagination_control ) : ?>
<!-- Indicators -->
<ol class="vc_carousel-indicators">
<?php for ( $i = 0; $i < count( $posts ); $i ++ ) : ?>
<li data-target="#<?php echo $carousel_id ?>" data-slide-to="<?php echo $i ?>"></li>
<?php endfor; ?>
</ol>
<?php endif ?>
<!-- Wrapper for slides -->
<div class="vc_carousel-inner">
<div class="vc_carousel-slideline">
<div class="vc_carousel-slideline-inner">
<?php foreach ( $posts as $post ) : ?>
<?php
$blocks_to_build = true === $post->custom_user_teaser ? $post->custom_teaser_blocks : $teaser_blocks;
$block_style = isset( $post->bgcolor ) ? ' style="background-color: ' . $post->bgcolor . '"' : '';
?>
<div class="vc_item vc_slide_<?php echo $post->post_type ?>"<?php echo $block_style ?>>
<div class="vc_inner">
<?php foreach ( $blocks_to_build as $block_data ) : ?>
<?php include $this->getBlockTemplate() ?>
<?php endforeach ?>
</div>
</div>
<?php endforeach ?>
</div>
</div>
</div>
<?php if ( 'yes' !== $hide_prev_next_buttons ) : ?>
<!-- Controls -->
<a class="vc_left vc_carousel-control" href="#<?php echo $carousel_id ?>" data-slide="prev">
<span class="icon-prev"></span>
</a>
<a class="vc_right vc_carousel-control" href="#<?php echo $carousel_id ?>" data-slide="next">
<span class="icon-next"></span>
</a>
<?php endif ?>
</div>
</div>
</div>
@@ -0,0 +1,99 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $atts
* @var $el_id
* @var $el_class
* @var $width
* @var $css
* @var $offset
* @var $content - shortcode content
* @var $css_animation
* Shortcode class
* @var $this WPBakeryShortCode_VC_Column
*/
$el_class = $el_id = $width = $parallax_speed_bg = $parallax_speed_video = $parallax = $parallax_image = $video_bg = $video_bg_url = $video_bg_parallax = $css = $offset = $css_animation = '';
$output = '';
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );
wp_enqueue_script( 'wpb_composer_front_js' );
$width = wpb_translateColumnWidthToSpan( $width );
$width = vc_column_offset_class_merge( $offset, $width );
$css_classes = array(
$this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation ),
'wpb_column',
'vc_column_container',
$width,
);
if ( vc_shortcode_custom_css_has_property( $css, array(
'border',
'background',
) ) || $video_bg || $parallax
) {
$css_classes[] = 'vc_col-has-fill';
}
$wrapper_attributes = array();
$has_video_bg = ( ! empty( $video_bg ) && ! empty( $video_bg_url ) && vc_extract_youtube_id( $video_bg_url ) );
$parallax_speed = $parallax_speed_bg;
if ( $has_video_bg ) {
$parallax = $video_bg_parallax;
$parallax_speed = $parallax_speed_video;
$parallax_image = $video_bg_url;
$css_classes[] = 'vc_video-bg-container';
wp_enqueue_script( 'vc_youtube_iframe_api_js' );
}
if ( ! empty( $parallax ) ) {
wp_enqueue_script( 'vc_jquery_skrollr_js' );
$wrapper_attributes[] = 'data-vc-parallax="' . esc_attr( $parallax_speed ) . '"'; // parallax speed
$css_classes[] = 'vc_general vc_parallax vc_parallax-' . $parallax;
if ( false !== strpos( $parallax, 'fade' ) ) {
$css_classes[] = 'js-vc_parallax-o-fade';
$wrapper_attributes[] = 'data-vc-parallax-o-fade="on"';
} elseif ( false !== strpos( $parallax, 'fixed' ) ) {
$css_classes[] = 'js-vc_parallax-o-fixed';
}
}
if ( ! empty( $parallax_image ) ) {
if ( $has_video_bg ) {
$parallax_image_src = $parallax_image;
} else {
$parallax_image_id = preg_replace( '/[^\d]/', '', $parallax_image );
$parallax_image_src = wp_get_attachment_image_src( $parallax_image_id, 'full' );
if ( ! empty( $parallax_image_src[0] ) ) {
$parallax_image_src = $parallax_image_src[0];
}
}
$wrapper_attributes[] = 'data-vc-parallax-image="' . esc_attr( $parallax_image_src ) . '"';
}
if ( ! $parallax && $has_video_bg ) {
$wrapper_attributes[] = 'data-vc-video-bg="' . esc_attr( $video_bg_url ) . '"';
}
$css_class = preg_replace( '/\s+/', ' ', apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, implode( ' ', array_filter( $css_classes ) ), $this->settings['base'], $atts ) );
$wrapper_attributes[] = 'class="' . esc_attr( trim( $css_class ) ) . '"';
if ( ! empty( $el_id ) ) {
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
}
$output .= '<div ' . implode( ' ', $wrapper_attributes ) . '>';
$innerColumnClass = 'vc_column-inner ' . esc_attr( trim( vc_shortcode_custom_css_class( $css ) ) );
$output .= '<div class="' . trim( $innerColumnClass ) . '">';
$output .= '<div class="wpb_wrapper">';
$output .= wpb_js_remove_wpautop( $content );
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
echo $output;
@@ -0,0 +1,56 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $atts
* @var $el_class
* @var $el_id
* @var $width
* @var $css
* @var $offset
* @var $content - shortcode content
* Shortcode class
* @var $this WPBakeryShortCode_VC_Column_Inner
*/
$el_class = $width = $el_id = $css = $offset = '';
$output = '';
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );
$width = wpb_translateColumnWidthToSpan( $width );
$width = vc_column_offset_class_merge( $offset, $width );
$css_classes = array(
$this->getExtraClass( $el_class ),
'wpb_column',
'vc_column_container',
$width,
);
if ( vc_shortcode_custom_css_has_property( $css, array(
'border',
'background',
) ) ) {
$css_classes[] = 'vc_col-has-fill';
}
$wrapper_attributes = array();
$css_class = preg_replace( '/\s+/', ' ', apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, implode( ' ', array_filter( $css_classes ) ), $this->settings['base'], $atts ) );
$wrapper_attributes[] = 'class="' . esc_attr( trim( $css_class ) ) . '"';
if ( ! empty( $el_id ) ) {
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
}
$output .= '<div ' . implode( ' ', $wrapper_attributes ) . '>';
$innerColumnClass = 'vc_column-inner ' . esc_attr( trim( vc_shortcode_custom_css_class( $css ) ) );
$output .= '<div class="' . trim( $innerColumnClass ) . '">';
$output .= '<div class="wpb_wrapper">';
$output .= wpb_js_remove_wpautop( $content );
$output .= '</div>';
$output .= '</div>';
$output .= '</div>';
echo $output;
@@ -0,0 +1,36 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $atts
* @var $el_class
* @var $el_id
* @var $css_animation
* @var $css
* @var $content - shortcode content
* Shortcode class
* @var $this WPBakeryShortCode_VC_Column_text
*/
$el_class = $el_id = $css = $css_animation = '';
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );
$class_to_filter = 'wpb_text_column wpb_content_element ' . $this->getCSSAnimation( $css_animation );
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
$wrapper_attributes = array();
if ( ! empty( $el_id ) ) {
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
}
$output = '
<div class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $wrapper_attributes ) . '>
<div class="wpb_wrapper">
' . wpb_js_remove_wpautop( $content, true ) . '
</div>
</div>
';
echo $output;
@@ -0,0 +1,47 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $atts
* @var $content - shortcode content
* Shortcode class
* @var $this WPBakeryShortCode_VC_Cta
*/
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
$this->buildTemplate( $atts, $content );
$containerClass = trim( 'vc_cta3-container ' . esc_attr( implode( ' ', $this->getTemplateVariable( 'container-class' ) ) ) );
$cssClass = trim( 'vc_general ' . esc_attr( implode( ' ', $this->getTemplateVariable( 'css-class' ) ) ) );
$wrapper_attributes = array();
if ( ! empty( $atts['el_id'] ) ) {
$wrapper_attributes[] = 'id="' . esc_attr( $atts['el_id'] ) . '"';
}
?>
<section class="<?php echo esc_attr( $containerClass ); ?>" <?php echo implode( ' ', $wrapper_attributes ); ?>>
<div class="<?php echo esc_attr( $cssClass ); ?>"<?php
if ( $this->getTemplateVariable( 'inline-css' ) ) {
echo ' style="' . esc_attr( implode( ' ', $this->getTemplateVariable( 'inline-css' ) ) ) . '"';
}
?>>
<?php echo $this->getTemplateVariable( 'icons-top' ); ?>
<?php echo $this->getTemplateVariable( 'icons-left' ); ?>
<div class="vc_cta3_content-container">
<?php echo $this->getTemplateVariable( 'actions-top' ); ?>
<?php echo $this->getTemplateVariable( 'actions-left' ); ?>
<div class="vc_cta3-content">
<header class="vc_cta3-content-header">
<?php echo $this->getTemplateVariable( 'heading1' ); ?>
<?php echo $this->getTemplateVariable( 'heading2' ); ?>
</header>
<?php echo $this->getTemplateVariable( 'content' ); ?>
</div>
<?php echo $this->getTemplateVariable( 'actions-bottom' ); ?>
<?php echo $this->getTemplateVariable( 'actions-right' ); ?>
</div>
<?php echo $this->getTemplateVariable( 'icons-bottom' ); ?>
<?php echo $this->getTemplateVariable( 'icons-right' ); ?>
</div>
</section>
@@ -0,0 +1,73 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $atts
* @var $color
* @var $icon
* @var $size
* @var $target
* @var $href
* @var $title
* @var $call_text
* @var $position
* @var $el_class
* @var $css_animation
* Shortcode class
* @var $this WPBakeryShortCode_VC_Cta_button
*/
$color = $icon = $size = $target = $href = $target = $call_text = $position = $el_class = $css_animation = '';
$output = '';
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );
$el_class = $this->getExtraClass( $el_class );
if ( 'same' === $target || '_self' === $target ) {
$target = '';
}
if ( '' !== $target ) {
$target = ' target="' . esc_attr( $target ) . '"';
}
$icon = ( '' !== $icon && 'none' !== $icon ) ? ' ' . $icon : '';
$i_icon = ( '' !== $icon ) ? ' <i class="icon"> </i>' : '';
$color = ( '' !== $color ) ? ' wpb_' . $color : '';
$size = ( '' !== $size && 'wpb_regularsize' !== $size ) ? ' wpb_' . $size : ' ' . $size;
$a_class = '';
if ( '' !== $el_class ) {
$tmp_class = explode( ' ', $el_class );
if ( in_array( 'prettyphoto', $tmp_class ) ) {
wp_enqueue_script( 'prettyphoto' );
wp_enqueue_style( 'prettyphoto' );
$a_class .= ' prettyphoto';
$el_class = str_ireplace( 'prettyphoto', '', $el_class );
}
}
if ( '' !== $href ) {
$button = '<span class="wpb_button ' . esc_attr( $color . $size . $icon ) . '">' . $title . $i_icon . '</span>';
$button = '<a class="wpb_button_a' . esc_attr( $a_class ) . '" href="' . $href . '"' . $target . '>' . $button . '</a>';
} else {
$button = '';
$el_class .= ' cta_no_button';
}
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, 'wpb_call_to_action wpb_content_element vc_clearfix ' . $position . $el_class, $this->settings['base'], $atts );
$css_class .= $this->getCSSAnimation( $css_animation );
$output .= '<div class="' . esc_attr( $css_class ) . '">';
if ( 'cta_align_bottom' !== $position ) {
$output .= $button;
}
$output .= apply_filters( 'wpb_cta_text', '<h2 class="wpb_call_text">' . $call_text . '</h2>', array( 'content' => $call_text ) );
if ( 'cta_align_bottom' === $position ) {
$output .= $button;
}
$output .= '</div>';
echo $output;
@@ -0,0 +1,60 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $atts
* @var $h2
* @var $h4
* @var $position
* @var $el_width
* @var $style
* @var $txt_align
* @var $accent_color
* @var $link
* @var $title
* @var $color
* @var $size
* @var $btn_style
* @var $el_class
* @var $css_animation
* @var $content - shortcode content
* Shortcode class
* @var $this WPBakeryShortCode_VC_Cta_button2
*/
$h2 = $h4 = $position = $el_class = $el_width = $size = $txt_align = $accent_color = $link = $title = $color = $size = $btn_style = $css_animation = '';
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );
$class = 'vc_call_to_action wpb_content_element';
$link = ( '||' === $link ) ? '' : $link;
$class .= ( '' !== $position ) ? ' vc_cta_btn_pos_' . $position : '';
$class .= ( '' !== $el_width ) ? ' vc_el_width_' . $el_width : '';
$class .= ( '' !== $color ) ? ' vc_cta_' . $color : '';
$class .= ( '' !== $style ) ? ' vc_cta_' . $style : '';
$class .= ( '' !== $txt_align ) ? ' vc_txt_align_' . $txt_align : '';
$inline_css = ( '' !== $accent_color ) ? ' style="' . vc_get_css_color( 'background-color', $accent_color ) . vc_get_css_color( 'border-color', $accent_color ) . '"' : '';
$class .= $this->getExtraClass( $el_class );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class, $this->settings['base'], $atts );
$css_class .= $this->getCSSAnimation( $css_animation );
?>
<div<?php echo $inline_css; ?> class="<?php echo esc_attr( trim( $css_class ) ); ?>">
<?php if ( '' !== $link && 'bottom' !== $position ) {
echo do_shortcode( '[vc_button2 align="' . $position . '" link="' . $link . '" title="' . $title . '" color="' . $color . '" size="' . $size . '" style="' . $btn_style . '" el_class="vc_cta_btn"]' );
} ?>
<?php if ( '' !== $h2 || '' !== $h4 ) : ?>
<hgroup>
<?php if ( '' !== $h2 ) : ?><h2 class="wpb_heading"><?php echo $h2; ?></h2><?php endif ?>
<?php if ( '' !== $h4 ) : ?><h4 class="wpb_heading"><?php echo $h4; ?></h4><?php endif ?>
</hgroup>
<?php endif ?>
<?php echo wpb_js_remove_wpautop( $content, true ); ?>
<?php if ( '' !== $link && 'bottom' === $position ) {
echo do_shortcode( '[vc_button2 link="' . $link . '" title="' . $title . '" color="' . $color . '" size="' . $size . '" style="' . $btn_style . '" el_class="vc_cta_btn"]' );
} ?>
</div>
@@ -0,0 +1,25 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* @var array $atts
* @var string $field_key
* @var string $custom_field_key
* @var string $el_class
*/
$field_key = $custom_field_key = $el_class = '';
extract( shortcode_atts( array(
'field_key' => '',
'custom_field_key' => '',
'el_class' => '',
), $atts ) );
$key = strlen( $custom_field_key ) > 0 ? $custom_field_key : $field_key;
if ( strlen( $key ) ) : ?>
<div class="vc_gitem-custom-field-<?php echo esc_attr( $key ) ?>">{{ post_meta_value:<?php echo esc_attr( $key ) ?>
}}
</div>
<?php endif ?>
@@ -0,0 +1,77 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $atts
* @var $source
* @var $text
* @var $link
* @var $google_fonts
* @var $font_container
* @var $el_class
* @var $el_id
* @var $css
* @var $css_animation
* @var $font_container_data - returned from $this->getAttributes
* @var $google_fonts_data - returned from $this->getAttributes
* Shortcode class
* @var $this WPBakeryShortCode_VC_Custom_heading
*/
$source = $text = $link = $google_fonts = $font_container = $el_id = $el_class = $css = $css_animation = $font_container_data = $google_fonts_data = array();
// This is needed to extract $font_container_data and $google_fonts_data
extract( $this->getAttributes( $atts ) );
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );
/**
* @var $css_class
*/
extract( $this->getStyles( $el_class . $this->getCSSAnimation( $css_animation ), $css, $google_fonts_data, $font_container_data, $atts ) );
$settings = get_option( 'wpb_js_google_fonts_subsets' );
if ( is_array( $settings ) && ! empty( $settings ) ) {
$subsets = '&subset=' . implode( ',', $settings );
} else {
$subsets = '';
}
if ( ( ! isset( $atts['use_theme_fonts'] ) || 'yes' !== $atts['use_theme_fonts'] ) && isset( $google_fonts_data['values']['font_family'] ) ) {
wp_enqueue_style( 'vc_google_fonts_' . vc_build_safe_css_class( $google_fonts_data['values']['font_family'] ), 'https://fonts.googleapis.com/css?family=' . $google_fonts_data['values']['font_family'] . $subsets );
}
if ( ! empty( $styles ) ) {
$style = 'style="' . esc_attr( implode( ';', $styles ) ) . '"';
} else {
$style = '';
}
if ( 'post_title' === $source ) {
$text = get_the_title( get_the_ID() );
}
if ( ! empty( $link ) ) {
$link = vc_build_link( $link );
$text = '<a href="' . esc_attr( $link['url'] ) . '"' . ( $link['target'] ? ' target="' . esc_attr( $link['target'] ) . '"' : '' ) . ( $link['rel'] ? ' rel="' . esc_attr( $link['rel'] ) . '"' : '' ) . ( $link['title'] ? ' title="' . esc_attr( $link['title'] ) . '"' : '' ) . '>' . $text . '</a>';
}
$wrapper_attributes = array();
if ( ! empty( $el_id ) ) {
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
}
$output = '';
if ( apply_filters( 'vc_custom_heading_template_use_wrapper', false ) ) {
$output .= '<div class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $wrapper_attributes ) . '>';
$output .= '<' . $font_container_data['values']['tag'] . ' ' . $style . ' >';
$output .= $text;
$output .= '</' . $font_container_data['values']['tag'] . '>';
$output .= '</div>';
} else {
$output .= '<' . $font_container_data['values']['tag'] . ' ' . $style . ' class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $wrapper_attributes ) . '>';
$output .= $text;
$output .= '</' . $font_container_data['values']['tag'] . '>';
}
echo $output;
@@ -0,0 +1,35 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $atts
* @var $height
* @var $el_class
* @var $el_id
* @var $css
* Shortcode class
* @var $this WPBakeryShortCode_VC_Empty_space
*/
$height = $el_class = $el_id = $css = '';
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );
$pattern = '/^(\d*(?:\.\d+)?)\s*(px|\%|in|cm|mm|em|rem|ex|pt|pc|vw|vh|vmin|vmax)?$/';
// allowed metrics: http://www.w3schools.com/cssref/css_units.asp
$regexr = preg_match( $pattern, $height, $matches );
$value = isset( $matches[1] ) ? (float) $matches[1] : (float) WPBMap::getParam( 'vc_empty_space', 'height' );
$unit = isset( $matches[2] ) ? $matches[2] : 'px';
$height = $value . $unit;
$inline_css = ( (float) $height >= 0.0 ) ? ' style="height: ' . esc_attr( $height ) . '"' : '';
$class = 'vc_empty_space ' . $this->getExtraClass( $el_class ) . vc_shortcode_custom_css_class( $css, ' ' );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class, $this->settings['base'], $atts );
$wrapper_attributes = array();
if ( ! empty( $el_id ) ) {
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
}
?>
<div class="<?php echo esc_attr( trim( $css_class ) ); ?>" <?php echo implode( ' ', $wrapper_attributes ); ?> <?php echo $inline_css; ?> ><span class="vc_empty_space_inner"></span></div>
@@ -0,0 +1,36 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $atts
* @var $type
* @var $el_class
* @var $el_id
* @var $css
* @var $css_animation
* Shortcode class
* @var $this WPBakeryShortCode_VC_Facebook
*/
$type = $css = $el_class = $el_id = '';
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );
$url = get_permalink();
$el_class = isset( $el_class ) ? $el_class : '';
$class_to_filter = 'fb_like wpb_content_element fb_type_' . $type;
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
$wrapper_attributes = array();
if ( ! empty( $el_id ) ) {
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
}
$output = '<div class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $wrapper_attributes ) . '><iframe src="//www.facebook.com/plugins/like.php?href='
. $url . '&amp;layout='
. $type . '&amp;show_faces=false&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true"></iframe></div>';
echo $output;
@@ -0,0 +1,46 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $atts
* @var $el_class
* @var $el_id
* @var $title
* @var $flickr_id
* @var $count
* @var $type
* @var $display
* @var $css
* @var $css_animation
* Shortcode class
* @var $this WPBakeryShortCode_VC_flickr
*/
$el_class = $el_id = $title = $flickr_id = $css = $css_animation = $count = $type = $display = '';
$output = '';
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $atts );
$class_to_filter = 'wpb_flickr_widget wpb_content_element';
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
$wrapper_attributes = array();
if ( ! empty( $el_id ) ) {
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
}
$output = '
<div class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $wrapper_attributes ) . '>
<div class="wpb_wrapper">
' . wpb_widget_title( array(
'title' => $title,
'extraclass' => 'wpb_flickr_heading',
) ) . '
<script type="text/javascript" src="//www.flickr.com/badge_code_v2.gne?count=' . $count . '&amp;display=' . $display . '&amp;size=s&amp;layout=x&amp;source=' . $type . '&amp;' . $type . '=' . $flickr_id . '"></script>
<p class="flickr_stream_wrap"><a class="wpb_follow_btn wpb_flickr_stream" href="//www.flickr.com/photos/' . $flickr_id . '">' . __( 'View stream on flickr', 'js_composer' ) . '</a></p>
</div>
</div>
';
echo $output;
@@ -0,0 +1,176 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $atts
* @var $title
* @var $source
* @var $type
* @var $onclick
* @var $custom_links
* @var $custom_links_target
* @var $img_size
* @var $external_img_size
* @var $images
* @var $custom_srcs
* @var $el_class
* @var $el_id
* @var $interval
* @var $css
* @var $css_animation
* Shortcode class
* @var $this WPBakeryShortCode_VC_gallery
*/
$thumbnail = '';
$title = $source = $type = $onclick = $custom_links = $custom_links_target = $img_size = $external_img_size = $images = $custom_srcs = $el_class = $el_id = $interval = $css = $css_animation = '';
$large_img_src = '';
$attributes = vc_map_get_attributes( $this->getShortcode(), $atts );
extract( $attributes );
$default_src = vc_asset_url( 'vc/no_image.png' );
$gal_images = '';
$link_start = '';
$link_end = '';
$el_start = '';
$el_end = '';
$slides_wrap_start = '';
$slides_wrap_end = '';
$el_class = $this->getExtraClass( $el_class );
if ( 'nivo' === $type ) {
$type = ' wpb_slider_nivo theme-default';
wp_enqueue_script( 'nivo-slider' );
wp_enqueue_style( 'nivo-slider-css' );
wp_enqueue_style( 'nivo-slider-theme' );
$slides_wrap_start = '<div class="nivoSlider">';
$slides_wrap_end = '</div>';
} elseif ( 'flexslider' === $type || 'flexslider_fade' === $type || 'flexslider_slide' === $type || 'fading' === $type ) {
$el_start = '<li>';
$el_end = '</li>';
$slides_wrap_start = '<ul class="slides">';
$slides_wrap_end = '</ul>';
wp_enqueue_style( 'flexslider' );
wp_enqueue_script( 'flexslider' );
} elseif ( 'image_grid' === $type ) {
wp_enqueue_script( 'vc_grid-js-imagesloaded' );
wp_enqueue_script( 'isotope' );
wp_enqueue_style( 'isotope-css' );
$el_start = '<li class="isotope-item">';
$el_end = '</li>';
$slides_wrap_start = '<ul class="wpb_image_grid_ul">';
$slides_wrap_end = '</ul>';
}
if ( 'link_image' === $onclick ) {
wp_enqueue_script( 'prettyphoto' );
wp_enqueue_style( 'prettyphoto' );
}
$flex_fx = '';
if ( 'flexslider' === $type || 'flexslider_fade' === $type || 'fading' === $type ) {
$type = ' wpb_flexslider flexslider_fade flexslider';
$flex_fx = ' data-flex_fx="fade"';
} elseif ( 'flexslider_slide' === $type ) {
$type = ' wpb_flexslider flexslider_slide flexslider';
$flex_fx = ' data-flex_fx="slide"';
} elseif ( 'image_grid' === $type ) {
$type = ' wpb_image_grid';
}
if ( '' === $images ) {
$images = '-1,-2,-3';
}
$pretty_rel_random = ' data-rel="prettyPhoto[rel-' . get_the_ID() . '-' . rand() . ']"';
if ( 'custom_link' === $onclick ) {
$custom_links = vc_value_from_safe( $custom_links );
$custom_links = explode( ',', $custom_links );
}
switch ( $source ) {
case 'media_library':
$images = explode( ',', $images );
break;
case 'external_link':
$images = vc_value_from_safe( $custom_srcs );
$images = explode( ',', $images );
break;
}
foreach ( $images as $i => $image ) {
switch ( $source ) {
case 'media_library':
if ( $image > 0 ) {
$img = wpb_getImageBySize( array(
'attach_id' => $image,
'thumb_size' => $img_size,
) );
$thumbnail = $img['thumbnail'];
$large_img_src = $img['p_img_large'][0];
} else {
$large_img_src = $default_src;
$thumbnail = '<img src="' . $default_src . '" />';
}
break;
case 'external_link':
$image = esc_attr( $image );
$dimensions = vcExtractDimensions( $external_img_size );
$hwstring = $dimensions ? image_hwstring( $dimensions[0], $dimensions[1] ) : '';
$thumbnail = '<img ' . $hwstring . ' src="' . $image . '" />';
$large_img_src = $image;
break;
}
$link_start = $link_end = '';
switch ( $onclick ) {
case 'img_link_large':
$link_start = '<a href="' . $large_img_src . '" target="' . $custom_links_target . '">';
$link_end = '</a>';
break;
case 'link_image':
$link_start = '<a class="prettyphoto" href="' . $large_img_src . '"' . $pretty_rel_random . '>';
$link_end = '</a>';
break;
case 'custom_link':
if ( ! empty( $custom_links[ $i ] ) ) {
$link_start = '<a href="' . $custom_links[ $i ] . '"' . ( ! empty( $custom_links_target ) ? ' target="' . $custom_links_target . '"' : '' ) . '>';
$link_end = '</a>';
}
break;
}
$gal_images .= $el_start . $link_start . $thumbnail . $link_end . $el_end;
}
$class_to_filter = 'wpb_gallery wpb_content_element vc_clearfix';
$class_to_filter .= vc_shortcode_custom_css_class( $css, ' ' ) . $this->getExtraClass( $el_class ) . $this->getCSSAnimation( $css_animation );
$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $class_to_filter, $this->settings['base'], $atts );
$wrapper_attributes = array();
if ( ! empty( $el_id ) ) {
$wrapper_attributes[] = 'id="' . esc_attr( $el_id ) . '"';
}
$output = '';
$output .= '<div class="' . $css_class . '" ' . implode( ' ', $wrapper_attributes ) . '>';
$output .= '<div class="wpb_wrapper">';
$output .= wpb_widget_title( array(
'title' => $title,
'extraclass' => 'wpb_gallery_heading',
) );
$output .= '<div class="wpb_gallery_slides' . $type . '" data-interval="' . $interval . '"' . $flex_fx . '>' . $slides_wrap_start . $gal_images . $slides_wrap_end . '</div>';
$output .= '</div>';
$output .= '</div>';
echo $output;
@@ -0,0 +1,52 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $atts
* @var $el_class
* @var $width
* @var $is_end
* @var $css
* @var $c_zone_position
* @var $bgimage
* @var $height
* @var $content - shortcode content
* Shortcode class
* @var $this WPBakeryShortCode_VC_Gitem
*/
$el_class = $width = $is_end = $css = $c_zone_position = $bgimage = $height = '';
extract( shortcode_atts( array(
'el_class' => '',
'width' => '12',
'is_end' => '',
'css' => '',
'c_zone_position' => '',
'bgimage' => '',
'height' => '',
), $atts ) );
$css_class = 'vc_grid-item vc_clearfix' . ( 'true' === $is_end ? ' vc_grid-last-item' : '' )
. ( strlen( $el_class ) ? ' ' . $el_class : '' )
. ' vc_col-sm-'
. $width
. ( ! empty( $c_zone_position ) ? ' vc_grid-item-zone-c-' . $c_zone_position : '' );
$css_class_mini = 'vc_grid-item-mini vc_clearfix ' . vc_shortcode_custom_css_class( $css, ' ' );
$css_class .= '{{ filter_terms_css_classes }}';
$css_style = '';
if ( 'featured' === $bgimage ) {
$css_style = 'background-image: url(\'{{ post_image_url }}\');';
$css_class .= ' vc_grid-item-background-cover';
}
if ( strlen( $height ) > 0 ) {
$css_style .= 'height: ' . $height . ';';
}
$output = '<div class="' . esc_attr( $css_class ) . '"'
. ( empty( $css_style ) ? '' : ' style="' . esc_attr( $css_style ) . '"' )
. '><div class="' . $css_class_mini . '">' . do_shortcode( $content )
. '</div><div class="vc_clearfix"></div></div>';
echo $output;
@@ -0,0 +1,32 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
/**
* Shortcode attributes
* @var $atts
* @var $css
* @var $animation
* @var $content - shortcode content
* Shortcode class
* @var $this WPBakeryShortCode_VC_Gitem_Animated_Block
*/
$css = $animation = $animation_attr = '';
extract( shortcode_atts( array(
'css' => '', // unmapped
'animation' => '',
), $atts ) );
$css_style = '';
$css_class = 'vc_gitem-animated-block ' . vc_shortcode_custom_css_class( $css, ' ' );
if ( ! empty( $animation ) ) {
$css_class .= ' vc_gitem-animate vc_gitem-animate-' . $animation;
$animation_attr .= ' data-vc-animation="' . esc_attr( $animation ) . '"';
} elseif ( 'vc_gitem_preview' !== vc_request_param( 'action' ) && vc_verify_admin_nonce() && ( current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' ) ) ) {
$content = preg_replace( '/(?<=\[)(vc_gitem_zone_b\b)/', '$1 render="no"', $content );
}
?>
<div class="<?php echo esc_attr( $css_class ) ?>"<?php echo $animation_attr ?><?php
echo( empty( $css_style ) ? '' : ' style="' . esc_attr( $css_style ) . '"' )
?>><?php echo do_shortcode( $content ) ?></div>
Loaded 100 of 13389 files, more files were not shown because too many files have changed in this diff. Show more