khaihihi
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
<?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;
|
||||
$custom_tag = 'script'; // TODO: Use ajax for variables
|
||||
?>
|
||||
<<?php echo esc_attr( $custom_tag ); ?>>
|
||||
window.vc_all_presets = <?php echo wp_json_encode( $vc_all_presets ); ?>;
|
||||
window.vc_post_id = <?php echo esc_js( get_the_ID() ); ?>;
|
||||
window.wpbGutenbergEditorUrl = '<?php echo esc_js( set_url_scheme( admin_url( 'post-new.php?post_type=wpb_gutenberg_param' ) ) ); ?>';
|
||||
window.wpbGutenbergEditorSWitchUrl = '<?php echo esc_js( set_url_scheme( admin_url( 'post.php?post=' . get_the_ID() . '&action=edit&vcv-gutenberg-editor' ) ) ); ?>';
|
||||
window.wpbGutenbergEditorClassicSWitchUrl = '<?php echo esc_js( 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'; ?>;
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
|
||||
<?php
|
||||
|
||||
require_once vc_path_dir( 'EDITORS_DIR', 'navbar/class-vc-navbar.php' );
|
||||
/** @var WP_Post $post */
|
||||
$nav_bar = new Vc_Navbar( $post );
|
||||
$nav_bar->render();
|
||||
$first_tag = 'style';
|
||||
/** @var Vc_Backend_Editor $editor */
|
||||
?>
|
||||
<<?php echo esc_attr( $first_tag ); ?>>
|
||||
#wpb_visual_composer {
|
||||
display: none;
|
||||
}
|
||||
</<?php echo esc_attr( $first_tag ); ?>>
|
||||
<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,128 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/** @var Vc_Frontend_Editor $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' );
|
||||
$custom_tag = 'script';
|
||||
?>
|
||||
<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>
|
||||
<<?php echo esc_attr( $custom_tag ); ?>>
|
||||
document.getElementById( 'vc_preloader' ).style.height = window.screen.availHeight;
|
||||
window.vc_mode = '<?php echo esc_js( vc_mode() ); ?>';
|
||||
window.vc_iframe_src = '<?php echo esc_js( $editor->url ); ?>';
|
||||
window.wpbGutenbergEditorUrl = '<?php echo esc_js( set_url_scheme( admin_url( 'post-new.php?post_type=wpb_gutenberg_param' ) ) ); ?>';
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
<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();
|
||||
$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"/>
|
||||
<<?php echo esc_attr( $custom_tag ); ?>>
|
||||
window.vc_user_mapper = <?php echo wp_json_encode( WPBMap::getUserShortCodes() ); ?>;
|
||||
window.vc_mapper = <?php echo wp_json_encode( WPBMap::getShortCodes() ); ?>;
|
||||
window.vc_vendor_settings_presets = <?php echo wp_json_encode( $vc_vendor_settings_presets ); ?>;
|
||||
window.vc_all_presets = <?php echo wp_json_encode( $vc_all_presets ); ?>;
|
||||
window.vc_roles = [];
|
||||
window.vcAdminNonce = '<?php echo esc_js( vc_generate_nonce( 'vc-admin-nonce' ) ); ?>';
|
||||
window.vc_post_id = <?php echo esc_js( $post_ID ); ?>;
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
|
||||
<?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 esc_attr( $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,24 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
?>
|
||||
<div id="vc_template-html">
|
||||
<?php
|
||||
/** @var Vc_Frontend_Editor $editor */
|
||||
?>
|
||||
<?php
|
||||
// @codingStandardsIgnoreLine
|
||||
print 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( wp_json_encode( $editor->post_shortcodes ) ); ?></div>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?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
|
||||
// @codingStandardsIgnoreLine
|
||||
print $nav_bar->getLogo();
|
||||
?>
|
||||
</div>
|
||||
<ul class="vc_navbar-nav">
|
||||
<?php
|
||||
foreach ( $controls as $control ) :
|
||||
// @codingStandardsIgnoreLine
|
||||
print $control[1];
|
||||
endforeach;
|
||||
?>
|
||||
</ul>
|
||||
<!--/.nav-collapse -->
|
||||
</div>
|
||||
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
$custom_tag = 'script';
|
||||
?>
|
||||
<<?php echo esc_attr( $custom_tag ); ?> id="vc_role_access_manager_script">
|
||||
(function ( $ ) {
|
||||
var _localCapabilities, _check, _groupAccessRules, _shortcodesPartSet, _mergedCaps;
|
||||
_localCapabilities = <?php echo wp_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 wp_json_encode( array_merge( array( 'current_user' => wp_get_current_user()->roles ), (array) vc_settings()->get( 'groups_access_rules' ) ) ); ?>;
|
||||
_mergedCaps = <?php echo wp_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;
|
||||
},
|
||||
isBlockEditorIsEnabled: function () {
|
||||
return <?php echo function_exists( 'use_block_editor_for_post_type' ) && use_block_editor_for_post_type( get_post_type() ) ? 'true' : 'false'; ?>;
|
||||
}
|
||||
};
|
||||
};
|
||||
})( window.jQuery );
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?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 esc_attr_e( '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,76 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
$other_tab = false;
|
||||
|
||||
$tabs = array(
|
||||
array(
|
||||
'name' => esc_html__( 'All', 'js_composer' ),
|
||||
'active' => true,
|
||||
'filter' => '*',
|
||||
),
|
||||
);
|
||||
|
||||
foreach ( $categories as $key => $name ) {
|
||||
if ( '_other_category_' === $name ) {
|
||||
$other_tab = array(
|
||||
'name' => esc_html__( 'Other', 'js_composer' ),
|
||||
'filter' => '.js-category-' . $key,
|
||||
'active' => false,
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( 'deprecated' === $name ) {
|
||||
$name = esc_html__( 'Deprecated', 'js_composer' );
|
||||
$filter = '.js-category-deprecated';
|
||||
} elseif ( '_my_elements_' === $name ) {
|
||||
$name = esc_html__( '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 esc_attr( 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 esc_attr( $v['filter'] ); ?>">
|
||||
<?php
|
||||
// @codingStandardsIgnoreLine
|
||||
print $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,53 @@
|
||||
<?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();
|
||||
}
|
||||
$custom_tag = 'script'; // TODO: Use HTML Shadow dom or ajax response for templates
|
||||
?>
|
||||
<<?php echo esc_attr( $custom_tag ); ?>>
|
||||
var vc_user_mapper = <?php echo wp_json_encode( WPBMap::getUserShortCodes() ); ?>,
|
||||
vc_mapper = <?php echo wp_json_encode( WPBMap::getShortCodes() ); ?>,
|
||||
vc_vendor_settings_presets = <?php echo wp_json_encode( $vc_vendor_settings_presets ); ?>,
|
||||
vc_roles = [],
|
||||
vc_frontend_enabled = <?php echo vc_enabled_frontend() ? 'true' : 'false'; ?>,
|
||||
vc_all_presets = <?php echo wp_json_encode( $vc_all_presets ); ?>,
|
||||
vc_mode = '<?php echo esc_js( vc_mode() ); ?>',
|
||||
vcAdminNonce = '<?php echo esc_js( vc_generate_nonce( 'vc-admin-nonce' ) ); ?>';
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
|
||||
<?php vc_include_template( 'editors/partials/vc_settings-image-block.tpl.php' ); ?>
|
||||
|
||||
<?php foreach ( WPBMap::getShortCodes() as $sc_base => $el ) : ?>
|
||||
<<?php echo esc_attr( $custom_tag ); ?> type="text/html" id="vc_shortcode-template-<?php echo esc_attr( $sc_base ); ?>">
|
||||
<?php
|
||||
// @codingStandardsIgnoreLine
|
||||
print visual_composer()->getShortCode( $sc_base )->template();
|
||||
?>
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
<?php endforeach ?>
|
||||
<<?php echo esc_attr( $custom_tag ); ?> type="text/html" id="vc_row-inner-element-template">
|
||||
<?php
|
||||
// @codingStandardsIgnoreLine
|
||||
print visual_composer()->getShortCode( 'vc_row_inner' )->template();
|
||||
?>
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
<<?php echo esc_attr( $custom_tag ); ?> 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>
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?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();
|
||||
// @codingStandardsIgnoreStart
|
||||
?>
|
||||
<div class="vc_controls<?php echo ! empty( esc_attr( $extended_css ) ) ? ' ' . esc_attr( $extended_css ) : ''; ?>">
|
||||
<div class="vc_controls-<?php echo esc_attr( $position ); ?>">
|
||||
<a class="<?php echo esc_attr( $name_css_class ); ?>">
|
||||
<span class="vc_btn-content" title="<?php
|
||||
if ( $allAccess && $moveAccess ) :
|
||||
printf( esc_attr__( 'Drag to move %s', 'js_composer' ), esc_attr( $name ) );
|
||||
?>"><i class="vc-composer-icon vc-c-icon-dragndrop"></i>
|
||||
<?php
|
||||
else : print( esc_attr( $name ) );
|
||||
echo '">';
|
||||
endif;
|
||||
echo esc_html( $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( esc_attr__( 'Prepend to %s', 'js_composer' ), esc_attr( $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( esc_attr__( 'Edit %s', 'js_composer' ), esc_attr( $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( esc_attr__( 'Clone %s', 'js_composer' ), esc_attr( $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( esc_attr__( 'Delete %s', 'js_composer' ), esc_attr( $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>
|
||||
<?php
|
||||
// @codingStandardsIgnoreEnd
|
||||
@@ -0,0 +1,37 @@
|
||||
<?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( esc_attr( $extended_css ) ) ? ' ' . esc_attr( $extended_css ) : ''; ?>">
|
||||
<div class="vc_controls-<?php echo esc_attr( $position ); ?>">
|
||||
<a class="vc_element-name">
|
||||
<span class="vc_btn-content">
|
||||
<?php echo esc_html( $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( esc_html__( 'Prepend to %s', 'js_composer' ), esc_attr( $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( esc_html__( 'Edit %s', 'js_composer' ), esc_attr( $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( esc_html__( 'Clone %s', 'js_composer' ), esc_attr( $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( esc_html__( 'Delete %s', 'js_composer' ), esc_attr( $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 Vc_Backend_Editor $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' );
|
||||
}
|
||||
|
||||
$custom_tag = 'script';
|
||||
?>
|
||||
<<?php echo esc_attr( $custom_tag ); ?> 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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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>
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
<<?php echo esc_attr( $custom_tag ); ?> 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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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 -->
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
<<?php echo esc_attr( $custom_tag ); ?> 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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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 -->
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
<<?php echo esc_attr( $custom_tag ); ?> 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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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 -->
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
<<?php echo esc_attr( $custom_tag ); ?> 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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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 -->
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
<<?php echo esc_attr( $custom_tag ); ?> 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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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( esc_attr__( '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 -->
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
$custom_tag = 'script'; // TODO: Update response to ajax array
|
||||
?>
|
||||
<<?php echo esc_attr( $custom_tag ); ?>>
|
||||
window.vc_post_shortcodes = JSON.parse( decodeURIComponent( ("<?php echo rawurlencode( wp_json_encode( $editor->post_shortcodes ) ); ?>" + '') ) );
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
@@ -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 esc_html_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 esc_html_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 esc_html_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 esc_html_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 esc_html_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 esc_html_e( 'Save changes', 'js_composer' ); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
$saveAsTemplateElements = apply_filters( 'vc_popup_save_as_template_elements', array(
|
||||
'vc_row',
|
||||
'vc_section',
|
||||
) );
|
||||
$custom_tag = 'script'; // TODO: Remove this file after 6.2 when BC is completed
|
||||
?>
|
||||
<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 esc_html_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 esc_html_e( 'Save as Element', 'js_composer' ); ?>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<<?php echo esc_attr( $custom_tag ); ?>>
|
||||
window.vc_presets_data = {
|
||||
"presets": <?php echo wp_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 esc_attr_e( 'Untitled', 'js_composer' ); ?>"
|
||||
}
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
</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 esc_attr_e( '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,15 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
$custom_tag = 'script';
|
||||
?>
|
||||
<<?php echo esc_attr( $custom_tag ); ?> 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>
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
@@ -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 esc_attr_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,26 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/** @var Vc_Templates_Panel_Editor $box */
|
||||
$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=' . esc_attr( trim( $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,69 @@
|
||||
<?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 esc_url( vc_asset_url( 'vc/logo/wpb-logo.svg' ) ); ?>" alt="">
|
||||
</div>
|
||||
<div class="vc_welcome-header vc_welcome-visible-e">
|
||||
<?php esc_html_e( 'You have blank page', 'js_composer' ); ?>
|
||||
<br />
|
||||
<?php esc_html_e( '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 esc_attr_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 esc_html_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 esc_attr_e( 'Add text block', 'js_composer' ); ?>">
|
||||
<i class="vc-composer-icon vc-c-icon-text-block"></i>
|
||||
<span><?php esc_html_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 esc_html_e( '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 esc_attr_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 echo sprintf( esc_html__( 'Don\'t know where to start? Visit our %s.', 'js_composer' ), '<a href="https://kb.wpbakery.com" target="_blank">' . esc_html__( 'knowledge base', 'js_composer' ) . '</a>' ); ?>
|
||||
</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">×</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 esc_html_e( 'Close', 'js_composer' ); ?></button>
|
||||
<button type="button"
|
||||
class="btn btn-primary vc_save"><?php esc_html_e( 'Save Changes', 'js_composer' ); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
?>
|
||||
<div id="vc_multi-properties-panel" class="vc_panel">
|
||||
<div class="vc_panel-heading">
|
||||
<a title="<?php esc_attr_e( 'Close panel', 'js_composer' ); ?>" href="#" class="vc_close" data-dismiss="panel" aria-hidden="true"><i class="icon"></i></a>
|
||||
<a title="<?php esc_attr_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 esc_html_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 esc_html_e( 'Close', 'js_composer' ); ?></button>
|
||||
<button type="button" class="vc_btn vc_panel-btn-save vc_save" data-save="true"><?php esc_html_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 esc_attr_e( 'Close panel', 'js_composer' ); ?>" href="#" class="vc_close" data-dismiss="panel"
|
||||
aria-hidden="true"><i class="vc_icon"></i></a>
|
||||
<a title="<?php esc_attr_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 esc_html_e( 'Close', 'js_composer' ); ?></button>
|
||||
<button type="button" class="vc_btn vc_panel-btn-save vc_btn-primary"
|
||||
data-save="true"><?php esc_html_e( 'Save Changes', 'js_composer' ); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,170 @@
|
||||
<?php
|
||||
/** @var Vc_Shared_Templates $controller
|
||||
* @package WPBakeryPageBuilder
|
||||
*/
|
||||
|
||||
/** @var array $templates */
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
$custom_tag = 'script';
|
||||
?>
|
||||
|
||||
<<?php echo esc_attr( $custom_tag ); ?>>
|
||||
window.vcTemplatesLibraryData = {
|
||||
templates: <?php echo wp_json_encode( $templates ); ?>
|
||||
};
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
<div class="vc_ui-panel-popup vc_ui-hidden">
|
||||
<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"><?php esc_html_e( 'Exit Template Library', 'js_composer' ); ?></span>
|
||||
</button>
|
||||
<?php
|
||||
if ( ! vc_license()->isActivated() ) :
|
||||
?>
|
||||
<div class="vc_ui-panel-message">
|
||||
<h3 class="vc_ui-panel-title"><?php esc_html_e( 'Activate WPBakery Page Builder', 'js_composer' ); ?></h3>
|
||||
<p class="vc_description"><?php esc_html_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 esc_url( 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 esc_html_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 esc_attr_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() ) : ?>
|
||||
<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 esc_html_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 esc_html_e( 'Downloading template ... please wait!', 'js_composer' ); ?></h3>
|
||||
<p class="vc_description">
|
||||
<?php
|
||||
esc_html_e( 'Don\'t close this window until download 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 esc_html_e( 'Download Templates', 'js_composer' ); ?></h3>
|
||||
<p class="vc_description">
|
||||
<?php
|
||||
esc_html_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 esc_html_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 esc_html_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>
|
||||
|
||||
<<?php echo esc_attr( $custom_tag ); ?> 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 esc_attr_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 esc_attr_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 esc_attr_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="<%- post_id %>"]" title="<?php esc_attr_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>
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
|
||||
<<?php echo esc_attr( $custom_tag ); ?> 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>
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?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 ) ? esc_attr( $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,35 @@
|
||||
<?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,59 @@
|
||||
<?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-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' => esc_html__( '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
|
||||
// @codingStandardsIgnoreLine
|
||||
print vc_message_warning( esc_html__( 'Elements within this list are deprecated and are no longer supported in newer versions of WPBakery Page Builder.', 'js_composer' ) );
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
// @codingStandardsIgnoreLine
|
||||
print $box->getControls();
|
||||
?>
|
||||
</li>
|
||||
<?php if ( $box->isShowEmptyMessage() && true !== $box->getPartState() ) : ?>
|
||||
<li class="vc_add-element-access-warning">
|
||||
<div class="wpb_element_wrapper">
|
||||
<?php
|
||||
// @codingStandardsIgnoreLine
|
||||
print vc_message_warning( esc_html__( '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 esc_html_e( 'Manage elements', 'js_composer' ); ?></span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,57 @@
|
||||
<?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' => esc_html__( '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' => esc_html__( 'Close', 'js_composer' ),
|
||||
'css_classes' => 'vc_ui-button-fw',
|
||||
),
|
||||
array(
|
||||
'name' => 'save',
|
||||
'label' => esc_html__( 'Save changes', 'js_composer' ),
|
||||
'css_classes' => 'vc_ui-button-fw',
|
||||
'style' => 'action',
|
||||
),
|
||||
),
|
||||
) );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?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' => esc_html__( '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 esc_html_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 esc_attr_e( 'Please enter page title', 'js_composer' ); ?>">
|
||||
<span class="vc_description"><?php printf( esc_html__( 'Change title of the current %s (Note: changes may not be displayed in a preview, but will take effect after saving page).', 'js_composer' ), esc_html( get_post_type() ) ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vc_col-sm-12 vc_column">
|
||||
<div class="wpb_element_label"><?php esc_html_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 esc_html_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' => esc_html__( 'Close', 'js_composer' ),
|
||||
),
|
||||
array(
|
||||
'name' => 'save',
|
||||
'label' => esc_html__( 'Save changes', 'js_composer' ),
|
||||
'css_classes' => 'vc_ui-button-fw',
|
||||
'style' => 'action',
|
||||
),
|
||||
),
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?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' => esc_html__( '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 esc_html_e( 'Manage My Elements', 'js_composer' ); ?></h3>
|
||||
<p class="vc_description"><?php esc_html_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 esc_attr_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 esc_attr_e( 'Delete element', 'js_composer' ); ?>">
|
||||
<i class="vc-composer-icon vc-c-icon-delete_empty"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
// @codingStandardsIgnoreLine
|
||||
print $box->getPresets();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--/ temp content -->
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
// @codingStandardsIgnoreStart
|
||||
?>
|
||||
<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' => esc_html__( '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 esc_html_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="' . esc_attr( $layout['cells'] ) . '" data-cells-mask="' . esc_attr( $layout['mask'] ) . '" title="' . esc_attr( $layout['title'] )
|
||||
?>">
|
||||
<i class="vc-composer-icon vc-c-icon-<?php echo esc_attr( $layout['icon_class'] ); ?>"></i>
|
||||
</a>
|
||||
<?php endforeach ?>
|
||||
<span class="vc_description vc_clearfix"><?php esc_html_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 esc_html_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 esc_html_e( 'Update', 'js_composer' ); ?></span>
|
||||
<span
|
||||
class="vc_description vc_clearfix"><?php esc_html_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>
|
||||
<?php
|
||||
// @codingStandardsIgnoreEnd
|
||||
@@ -0,0 +1,58 @@
|
||||
<?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' => esc_html__( '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'] ) ) {
|
||||
// @codingStandardsIgnoreLine
|
||||
print $templates_block['output'];
|
||||
}
|
||||
echo '</div>';
|
||||
$first = false;
|
||||
endforeach;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--/ temp content -->
|
||||
@@ -0,0 +1,92 @@
|
||||
<?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';
|
||||
$custom_tag = 'script';
|
||||
$first_tag = 'style';
|
||||
?>
|
||||
<<?php echo esc_attr( $custom_tag ); ?>>
|
||||
window.vc_user_mapper = <?php echo wp_json_encode( WPBMap::getUserShortCodes() ); ?>;
|
||||
window.vc_mapper = <?php echo wp_json_encode( WPBMap::getShortCodes() ); ?>;
|
||||
window.vc_roles = [];
|
||||
window.vcAdminNonce = '<?php echo esc_js( vc_generate_nonce( 'vc-admin-nonce' ) ); ?>';
|
||||
window.vc_post_id = <?php echo esc_js( $post_ID ); ?>;
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
<<?php echo esc_attr( $first_tag ); ?>>
|
||||
#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;
|
||||
}
|
||||
</<?php echo esc_attr( $first_tag ); ?>>
|
||||
<div class="vc_not-remove-overlay"></div>
|
||||
<div class="vc_ui-template-preview">
|
||||
<textarea id="content" style="display: none;">
|
||||
<?php
|
||||
// @codingStandardsIgnoreLine
|
||||
print $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 esc_html( $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 esc_html( $title ); ?>
|
||||
</a>
|
||||
<?php endforeach ?>
|
||||
</h2>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/** @var string $part */
|
||||
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 ),
|
||||
'capabilities' => array(
|
||||
array(
|
||||
'disabled_ce_editor',
|
||||
esc_html__( 'Disable Classic editor', 'js_composer' ),
|
||||
),
|
||||
),
|
||||
'options' => array(
|
||||
array(
|
||||
true,
|
||||
esc_html__( 'Enabled', 'js_composer' ),
|
||||
),
|
||||
array(
|
||||
'default',
|
||||
esc_html__( 'Enabled and default', 'js_composer' ),
|
||||
),
|
||||
array(
|
||||
false,
|
||||
esc_html__( 'Disabled', 'js_composer' ),
|
||||
),
|
||||
),
|
||||
'main_label' => esc_html__( 'Backend editor', 'js_composer' ),
|
||||
'custom_label' => esc_html__( 'Backend editor', 'js_composer' ),
|
||||
) );
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/** @var string $part */
|
||||
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, esc_html__( 'Enabled', 'js_composer' ) ),
|
||||
array( false, esc_html__( 'Disabled', 'js_composer' ) ),
|
||||
),
|
||||
'main_label' => esc_html__( 'Drag and Drop', 'js_composer' ),
|
||||
'description' => esc_html__( 'Control access rights to drag and drop functionality within the editor.', 'js_composer' ),
|
||||
) );
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
if ( vc_frontend_editor()->inlineEnabled() ) {
|
||||
/** @var string $part */
|
||||
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,
|
||||
esc_html__( 'Enabled', 'js_composer' ),
|
||||
),
|
||||
array(
|
||||
false,
|
||||
esc_html__( 'Disabled', 'js_composer' ),
|
||||
),
|
||||
),
|
||||
'main_label' => esc_html__( 'Frontend editor', 'js_composer' ),
|
||||
'custom_label' => esc_html__( 'Frontend editor', 'js_composer' ),
|
||||
) );
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/** @var string $part */
|
||||
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,
|
||||
esc_html__( 'Enabled', 'js_composer' ),
|
||||
),
|
||||
array(
|
||||
false,
|
||||
esc_html__( 'Disabled', 'js_composer' ),
|
||||
),
|
||||
),
|
||||
'main_label' => esc_html__( 'Grid Builder', 'js_composer' ),
|
||||
'custom_label' => esc_html__( 'Grid Builder', 'js_composer' ),
|
||||
'description' => esc_html__( 'Control user access to Grid Builder and Grid Builder Elements.', 'js_composer' ),
|
||||
) );
|
||||
@@ -0,0 +1,159 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
?>
|
||||
<?php /** @var Vc_Role_Access_Controller $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, true ) ) : ?>
|
||||
<?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
|
||||
// @codingStandardsIgnoreLine
|
||||
print $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, esc_html__( 'Enabled', 'js_composer' ) ),
|
||||
array( false, esc_html__( 'Disabled', 'js_composer' ) ),
|
||||
),
|
||||
'main_label' => esc_html__( 'Page settings', 'js_composer' ),
|
||||
'description' => esc_html__( '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, esc_html__( 'Pages only', 'js_composer' ) ),
|
||||
array( 'custom', esc_html__( 'Custom', 'js_composer' ) ),
|
||||
array( false, esc_html__( 'Disabled', 'js_composer' ) ),
|
||||
),
|
||||
'main_label' => esc_html__( 'Post types', 'js_composer' ),
|
||||
'custom_label' => esc_html__( 'Post types', 'js_composer' ),
|
||||
'description' => esc_html__( '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, esc_html__( 'All', 'js_composer' ) ),
|
||||
array( 'add', esc_html__( 'Apply presets only', 'js_composer' ) ),
|
||||
array( false, esc_html__( 'Disabled', 'js_composer' ) ),
|
||||
),
|
||||
'main_label' => esc_html__( 'Element Presets', 'js_composer' ),
|
||||
'description' => esc_html__( '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, esc_html__( 'All', 'js_composer' ) ),
|
||||
array( 'custom', esc_html__( 'Custom', 'js_composer' ) ),
|
||||
array( false, esc_html__( 'Disabled', 'js_composer' ) ),
|
||||
),
|
||||
'main_label' => esc_html__( 'Settings options', 'js_composer' ),
|
||||
'custom_label' => esc_html__( 'Settings options', 'js_composer' ),
|
||||
'description' => esc_html__( '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', esc_html__( 'All', 'js_composer' ) ),
|
||||
array( 'edit', esc_html__( 'Edit', 'js_composer' ) ),
|
||||
),
|
||||
'item_header_name' => esc_html__( 'Element', 'js_composer' ),
|
||||
'options' => array(
|
||||
array( true, esc_html__( 'All', 'js_composer' ) ),
|
||||
array( 'edit', esc_html__( 'Edit only', 'js_composer' ) ),
|
||||
array( 'custom', esc_html__( 'Custom', 'js_composer' ) ),
|
||||
),
|
||||
'main_label' => esc_html__( 'Elements', 'js_composer' ),
|
||||
'custom_label' => esc_html__( 'Elements', 'js_composer' ),
|
||||
'description' => esc_html__( '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, esc_html__( 'All', 'js_composer' ) ),
|
||||
array( 'add', esc_html__( 'Apply templates only', 'js_composer' ) ),
|
||||
array( false, esc_html__( 'Disabled', 'js_composer' ) ),
|
||||
),
|
||||
'main_label' => esc_html__( 'Templates', 'js_composer' ),
|
||||
'description' => esc_html__( '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,44 @@
|
||||
<?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 esc_html_e( 'Post type', 'js_composer' ); ?></th>
|
||||
<th><?php esc_html_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 esc_attr( $field_key ); ?>[<?php echo esc_attr( $post_type[0] ); ?>]">
|
||||
<option value=""><?php esc_html_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'] );
|
||||
?>
|
||||
<option value="<?php echo esc_attr( $key ); ?>"<?php echo isset( $value[ $post_type[0] ] ) && $value[ $post_type[0] ] === $key ? ' selected="true"' : ''; ?>><?php echo esc_html( $template['name'] ); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</optgroup>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
?>
|
||||
<div class="wrap vc_settings" id="wpb-js-composer-settings">
|
||||
<h2><?php esc_html_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,89 @@
|
||||
<?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 esc_attr( admin_url( 'admin-ajax.php' ) ); ?>" method="post"
|
||||
id="vc_settings-<?php echo esc_attr( $tab ); ?>"
|
||||
class="vc_settings-tab-content vc_settings-tab-content-active"
|
||||
data-vc-roles="form">
|
||||
<div class="tab_intro">
|
||||
<p><?php esc_html_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( esc_html__( '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 esc_attr( $tab ); ?>-action"/>
|
||||
</form>
|
||||
@@ -0,0 +1,126 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
$tab = esc_attr( 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 );
|
||||
$custom_tag = 'script';
|
||||
?>
|
||||
<<?php echo esc_attr( $custom_tag ); ?>>
|
||||
window.vcAdminNonce = '<?php echo esc_js( vc_generate_nonce( 'vc-admin-nonce' ) ); ?>';
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
<?php if ( 'updater' === $tab && $dev_environment && ! vc_license()->isActivated() ) : ?>
|
||||
<br/>
|
||||
<div class="updated vc_updater-result-message">
|
||||
<p>
|
||||
<strong>
|
||||
<?php esc_html_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 esc_attr( $tab ); ?>"
|
||||
data-vc-ui-element="settings-tab-<?php echo esc_attr( $tab ); ?>"
|
||||
class="<?php echo esc_attr( $classes ); ?>"
|
||||
<?php echo apply_filters( 'vc_setting-tab-form-' . esc_attr( $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 esc_html_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 esc_attr_e( 'Done', 'js_composer' ); ?>"><?php esc_html_e( 'Reset', 'js_composer' ); ?></a>
|
||||
|
||||
<p
|
||||
class="description indicator-hint"><?php esc_html_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( esc_html__( 'Save Changes', 'js_composer' ), 'primary', 'submit_btn', true, $submit_button_attributes ); ?>
|
||||
<?php endif ?>
|
||||
|
||||
<input type="hidden" name="vc_action" value="vc_action-<?php echo esc_attr( $tab ); ?>"
|
||||
id="vc_settings-<?php echo esc_attr( $tab ); ?>-action"/>
|
||||
|
||||
<?php if ( 'color' === $tab ) : ?>
|
||||
<a href="#" class="button vc_restore-button" id="vc_settings-color-restore-default">
|
||||
<?php echo esc_html__( '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 esc_html__( '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 esc_html__( 'Deactivate WPBakery Page Builder', 'js_composer' ); ?>
|
||||
</button>
|
||||
|
||||
<img src="<?php echo esc_url( 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 sprintf( esc_html__( '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 - %1$sdirect plugin updates%2$s, access to %1$stemplate library%2$s and %1$sofficial support.%2$s', 'js_composer' ), '<strong>', '</strong>' ); ?>
|
||||
</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 esc_html__( 'Activate WPBakery Page Builder', 'js_composer' ); ?>
|
||||
</button>
|
||||
|
||||
<img src="<?php echo esc_url( 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 printf( esc_html__( 'Don\'t have direct license yet? %sPurchase WPBakery Page Builder license%s.', 'js_composer' ), '<a href="' . esc_url( 'https://go.wpbakery.com/wpb-buy' ) . '" target="_blank">', '</a>' ); ?>
|
||||
</p>
|
||||
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
<?php endif ?>
|
||||
</form>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
$custom_tag = 'script';
|
||||
?>
|
||||
<<?php echo esc_attr( $custom_tag ); ?>>
|
||||
window.vcAdminNonce = '<?php echo esc_js( vc_generate_nonce( 'vc-admin-nonce' ) ); ?>';
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
<form action="options.php" method="post" id="vc_settings-automapper"
|
||||
class="vc_settings-tab-content vc_settings-tab-content-active"
|
||||
>
|
||||
<?php vc_automapper()->renderHtml(); ?>
|
||||
</form>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
preg_match( '/^(\d+)(\.\d+)?/', WPB_VC_VERSION, $matches );
|
||||
$custom_tag = 'script'; // Update to wp_add_inline later
|
||||
?>
|
||||
<div class="wrap vc-page-welcome about-wrap">
|
||||
<h1><?php echo sprintf( esc_html__( 'Welcome to WPBakery Page Builder %s', 'js_composer' ), esc_html( isset( $matches[0] ) ? $matches[0] : WPB_VC_VERSION ) ); ?></h1>
|
||||
|
||||
<div class="about-text">
|
||||
<?php esc_html_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( esc_html__( 'Version %s', 'js_composer' ), esc_html( 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_url( admin_url( 'admin.php?page=vc-general' ) ); ?>"
|
||||
class="button button-primary"><?php esc_html_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="https://wpbakery.com" data-size="large">Tweet</a>
|
||||
<<?php echo esc_attr( $custom_tag ); ?>>! 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' );</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
</p>
|
||||
<?php
|
||||
vc_include_template( '/pages/partials/_tabs.php', array(
|
||||
'slug' => $page->getSlug(),
|
||||
'active_tab' => $active_page->getSlug(),
|
||||
'tabs' => $pages,
|
||||
) );
|
||||
?>
|
||||
<?php
|
||||
// @codingStandardsIgnoreLine
|
||||
print $active_page->render();
|
||||
?>
|
||||
</div>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
?>
|
||||
<div class="vc_faq-tab changelog">
|
||||
<h3><?php esc_html_e( 'New to WPBakery Page Builder or Looking for More Information?', 'js_composer' ); ?></h3>
|
||||
|
||||
<p><?php printf( esc_html__( 'WPBakery has complete documentation available at our knowledge base: %s which covers everything related to WPBakery Page Builder starting from Installation and up to more advanced features based on our Inner API.', 'js_composer' ), '<a target="_blank" href="https://kb.wpbakery.com">kb.wpbakery.com</a>' ); ?></p>
|
||||
|
||||
<div class="feature-section vc_row">
|
||||
<div class="vc_col-xs-4">
|
||||
<h4><a target="_blank" href="https://go.wpbakery.com/preface"><?php esc_html_e( 'Preface', 'js_composer' ); ?></a></h4>
|
||||
<ul>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/introduction"><?php esc_html_e( 'Introduction', 'js_composer' ); ?></a></li>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/support-and-resources"><?php esc_html_e( 'Support and Resources', 'js_composer' ); ?></a></li>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/support-policy"><?php esc_html_e( 'Support Policy', 'js_composer' ); ?></a></li>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/release-notes"><?php esc_html_e( 'Release Notes', 'js_composer' ); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="vc_col-xs-4">
|
||||
<h4><a target="_blank" href="https://go.wpbakery.com/licensing"><?php esc_html_e( 'Licensing', 'js_composer' ); ?></a></h4>
|
||||
<ul>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/regular-license"><?php esc_html_e( 'Regular License', 'js_composer' ); ?></a></li>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/extended-license"><?php esc_html_e( 'Extended License', 'js_composer' ); ?></a></li>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/in-stock-license-terms"><?php esc_html_e( 'In - Stock License( Theme Integration)', 'js_composer' ); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="vc_col-xs-4">
|
||||
<h4><a target="_blank" href="https://go.wpbakery.com/getting-started"><?php esc_html_e( 'Getting Started', 'js_composer' ); ?></a></h4>
|
||||
<ul>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/install"><?php esc_html_e( 'Plugin Installation', 'js_composer' ); ?></a></li>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/activation"><?php esc_html_e( 'Activation', 'js_composer' ); ?></a></li>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/update"><?php esc_html_e( 'Update', 'js_composer' ); ?></a></li>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/content-type"><?php esc_html_e( 'Content Type', 'js_composer' ); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="feature-section vc_row">
|
||||
<div class="vc_col-xs-4">
|
||||
<h4><a target="_blank" href="https://go.wpbakery.com/learning-more"><?php esc_html_e( 'Learning More', 'js_composer' ); ?></a>
|
||||
</h4>
|
||||
<ul>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/basic-concept"><?php esc_html_e( 'Basic Concept', 'js_composer' ); ?></a></li>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/content-elements"><?php esc_html_e( 'Content Elements', 'js_composer' ); ?></a></li>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/general-settings"><?php esc_html_e( 'General Settings', 'js_composer' ); ?></a></li>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/custom-css"><?php esc_html_e( 'Custom CSS', 'js_composer' ); ?></a></li>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/element-design-options"><?php esc_html_e( 'Element Design Options', 'js_composer' ); ?></a></li>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/responsive-settings"><?php esc_html_e( 'Responsive Settings', 'js_composer' ); ?></a></li>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/templates"><?php esc_html_e( 'Templates', 'js_composer' ); ?></a></li>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/predefined-layouts"><?php esc_html_e( 'Predefined Layouts', 'js_composer' ); ?></a></li>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/shortcode-mapper"><?php esc_html_e( 'Shortcode Mapper', 'js_composer' ); ?></a></li>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/grid-builder"><?php esc_html_e( 'Grid Builder', 'js_composer' ); ?></a></li>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/image-filters"><?php esc_html_e( 'Image filters', 'js_composer' ); ?></a></li>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/element-presets"><?php esc_html_e( 'Element Presets', 'js_composer' ); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="vc_col-xs-4">
|
||||
<h4><a target="_blank" href="https://go.wpbakery.com/vc-how-tos"><?php esc_html_e( 'WPBakery Page Builder "How To\'s"', 'js_composer' ); ?></a></h4>
|
||||
|
||||
<p><?php esc_html_e( 'In this section, you will find quick tips in form of video tutorials on how to operate with WPBakery Page Builder . ', 'js_composer' ); ?></p>
|
||||
</div>
|
||||
|
||||
<div class="vc_col-xs-4">
|
||||
<h4><a target="_blank" href="https://go.wpbakery.com/faq"><?php esc_html_e( 'FAQ', 'js_composer' ); ?></a></h4>
|
||||
|
||||
<p><?php esc_html_e( 'Here you can find answers to the Frequently Asked Question about WPBakery Page Builder . ', 'js_composer' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="feature-section vc_row">
|
||||
<div class="vc_col-xs-4">
|
||||
<h4><a target="_blank" href="https://go.wpbakery.com/addons"><?php esc_html_e( 'Add - ons', 'js_composer' ); ?></a></h4>
|
||||
<ul>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/templatera"><?php esc_html_e( 'Templatera', 'js_composer' ); ?></a></li>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/easy-tables"><?php esc_html_e( 'Easy Tables', 'js_composer' ); ?></a></li>
|
||||
<li><a target="_blank" href="https://go.wpbakery.com/addon-development-rules"><?php esc_html_e( 'Add - on Development Rules', 'js_composer' ); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="vc_col-xs-4">
|
||||
<h4><a target="_blank" href="https://go.wpbakery.com/theme-integration"><?php esc_html_e( 'Theme Integration', 'js_composer' ); ?></a></h4>
|
||||
|
||||
<p><?php esc_html_e( 'See how you can integrate WPBakery Page Builder within your WordPress theme . ', 'js_composer' ); ?></p>
|
||||
</div>
|
||||
|
||||
<div class="vc_col-xs-4">
|
||||
<h4><a target="_blank" href="https://go.wpbakery.com/inner-api"><?php esc_html_e( 'Inner API', 'js_composer' ); ?></a></h4>
|
||||
|
||||
<p><?php esc_html_e( 'Inner API section describes capabilities of interaction with WPBakery Page Builder . ', 'js_composer' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="return-to-dashboard">
|
||||
<a target="_blank" href="https://kb.wpbakery.com"><?php esc_html_e( 'Visit Knowledge Base for more information', 'js_composer' ); ?></a>
|
||||
</div>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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 esc_html_e( 'Resources', 'js_composer' ); ?></h3>
|
||||
|
||||
<p><?php esc_html_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="https://wpbakery.com/?utm_campaign=VCplugin&utm_source=vc_user&utm_medium=welcome_page" target="_blank"><?php esc_html_e( 'Official website', 'js_composer' ); ?></a>
|
||||
</li>
|
||||
<li><a href="https://kb.wpbakery.com" target="_blank"><?php esc_html_e( 'Official Knowledge Base', 'js_composer' ); ?></a></li>
|
||||
<li><a href="https://wpbakery.com/video-academy/" target="_blank"><?php esc_html_e( 'Video Academy', 'js_composer' ); ?></a></li>
|
||||
<li><a href="https://support.wpbakery.com" target="_blank"><?php esc_html_e( 'Official support', 'js_composer' ); ?></a></li>
|
||||
<li><a href="https://facebook.com/wpbakery" target="_blank"><?php esc_html_e( 'Facebook page', 'js_composer' ); ?></a></li>
|
||||
<li><a href="https://twitter.com/wpbakery" target="_blank"><?php esc_html_e( 'Twitter account', 'js_composer' ); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="vc_col-xs-6">
|
||||
<h3><?php esc_html_e( 'Official Support', 'js_composer' ); ?></h3>
|
||||
|
||||
<p><?php printf( esc_html__( 'To get your support related question answered in the fastest timing, please head over to our %ssupport page%s 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 %spurchase support extension%s on support.wpbakery.com.', 'js_composer' ), '<a href="https://support.wpbakery.com" target="_blank">', '</a>', '<a href="https://support.wpbakery.com" target="_blank">', '</a>' ); ?></p>
|
||||
|
||||
<p><?php printf( esc_html__( 'Before applying for support please make sure you understand the rules of support and go through all steps described and listed in %sSupport Policy%s in order to get your issues solved as soon as possible.', 'js_composer' ), '<a href="https://go.wpbakery.com/support-policy" target="_blank">', '</a>' ); ?></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 esc_url( vc_asset_url( 'vc/vc-welcome/vc_5-6/1.png' ) ); ?>"/>
|
||||
|
||||
<h3><?php esc_html_e( 'WordPress 5.0 Compatible', 'js_composer' ); ?></h3>
|
||||
|
||||
<p><?php esc_html_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,82 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* @var Vc_Column_Offset $param
|
||||
* @var Vc_Column_Offset $sizes ::$size_types
|
||||
*/
|
||||
$layouts = array(
|
||||
'xs' => 'portrait-smartphones',
|
||||
'sm' => 'portrait-tablets',
|
||||
'md' => 'landscape-tablets',
|
||||
'lg' => 'default',
|
||||
);
|
||||
$custom_tag = 'script';
|
||||
?>
|
||||
<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( esc_html__( 'Responsive design settings are currently disabled. You can enable them in WPBakery Page Builder %ssettings page%s by unchecking "Disable responsive content elements".', 'js_composer' ), '<a href="' . esc_url( admin_url( 'admin.php?page=vc-general' ) ) . '">', '</a>' ); ?></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 esc_html_e( 'Device', 'js_composer' ); ?>
|
||||
</th>
|
||||
<th>
|
||||
<?php esc_html_e( 'Offset', 'js_composer' ); ?>
|
||||
</th>
|
||||
<th>
|
||||
<?php esc_html_e( 'Width', 'js_composer' ); ?>
|
||||
</th>
|
||||
<th>
|
||||
<?php esc_html_e( 'Hide on device?', 'js_composer' ); ?>
|
||||
</th>
|
||||
</tr>
|
||||
<?php foreach ( $sizes as $key => $size ) : ?>
|
||||
<tr class="vc_size-<?php echo esc_attr( $key ); ?>">
|
||||
<td class="vc_screen-size vc_screen-size-<?php echo esc_attr( $key ); ?>">
|
||||
<span title="<?php echo esc_attr( $size ); ?>">
|
||||
<i class="vc-composer-icon vc-c-icon-layout_<?php echo isset( $layouts[ $key ] ) ? esc_attr( $layouts[ $key ] ) : esc_attr( $key ); ?>"></i>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
// @codingStandardsIgnoreLine
|
||||
print $param->offsetControl( $key );
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
// @codingStandardsIgnoreLine
|
||||
print $param->sizeControl( $key );
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<label>
|
||||
<input type="checkbox" name="vc_hidden-<?php echo esc_attr( $key ); ?>"
|
||||
value="yes"<?php echo in_array( 'vc_hidden-' . $key, $data, true ) ? ' checked="true"' : ''; ?>
|
||||
class="vc_column_offset_field">
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
</div>
|
||||
<<?php echo esc_attr( $custom_tag ); ?>>
|
||||
window.VcI8nColumnOffsetParam =
|
||||
<?php
|
||||
echo wp_json_encode( array(
|
||||
'inherit' => esc_html__( 'Inherit: ', 'js_composer' ),
|
||||
'inherit_default' => esc_html__( 'Inherit from default', 'js_composer' ),
|
||||
) )
|
||||
?>
|
||||
;
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
?>
|
||||
<div class="vc_row-fluid vc_column">
|
||||
<div class="wpb_element_label"><?php esc_html_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 esc_attr( $values['font_style'] ); ?>">
|
||||
<?php
|
||||
/** @var Vc_Google_Fonts $this */
|
||||
$fonts = $this->_vc_google_fonts_get_fonts();
|
||||
foreach ( $fonts as $font_data ) :
|
||||
?>
|
||||
<option value="<?php echo esc_attr( $font_data->font_family ) . ':' . esc_attr( $font_data->font_styles ); ?>"
|
||||
data[font_types]="<?php echo esc_attr( $font_data->font_types ); ?>"
|
||||
data[font_family]="<?php echo esc_attr( $font_data->font_family ); ?>"
|
||||
data[font_styles]="<?php echo esc_attr( $font_data->font_styles ); ?>"
|
||||
class="<?php echo esc_attr( 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 esc_html( $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 esc_html( $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 esc_html_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 esc_html( $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 esc_html_e( 'Google Fonts preview', 'js_composer' ); ?>:</div>
|
||||
<div class="vc_google_fonts_form_field-preview-container">
|
||||
<span><?php esc_html_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 esc_attr( $settings['param_name'] ); ?>"
|
||||
class="wpb_vc_param_value <?php echo esc_attr( $settings['param_name'] ) . ' ' . esc_attr( $settings['type'] ); ?>_field" type="hidden"
|
||||
value="<?php echo esc_attr( $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 esc_html_e('Post types', 'js_composer') ?></label>
|
||||
|
||||
<div class="post-types-list">
|
||||
{{{ vc.loop_partial('checkboxes', 'post_type', loop) }}}
|
||||
</div>
|
||||
<span class="description clear"><?php esc_html_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 esc_html_e('Post count', 'js_composer') ?></label>
|
||||
{{{ vc.loop_partial('text-input', 'size', loop) }}}
|
||||
<span class="description clear"><?php esc_html_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 esc_html_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="https://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 esc_html_e('Sort order', 'js_composer') ?></label>
|
||||
{{{ vc.loop_partial('dropdown', 'order', loop) }}}
|
||||
<span class="description clear"><?php esc_html_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 esc_html_e('Categories', 'js_composer') ?></label>
|
||||
{{{ vc.loop_partial('autosuggest', 'categories', loop) }}}
|
||||
<span class="description clear"><?php esc_html_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 esc_html_e('Tags', 'js_composer') ?></label>
|
||||
{{{ vc.loop_partial('autosuggest', 'tags', loop) }}}
|
||||
<span class="description clear"><?php esc_html_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 esc_html_e('Taxonomies', 'js_composer') ?></label>
|
||||
{{{ vc.loop_partial('autosuggest', 'tax_query', loop) }}}
|
||||
<span class="description clear"><?php esc_html_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 esc_html_e('Individual Posts/Pages/Custom Post Types', 'js_composer') ?></label>
|
||||
{{{ vc.loop_partial('autosuggest', 'by_id', loop) }}}
|
||||
<span class="description clear"><?php esc_html_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 esc_html_e('Author', 'js_composer') ?></label>
|
||||
{{{ vc.loop_partial('autosuggest', 'authors', loop) }}}
|
||||
<span class="description clear"><?php esc_html_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 esc_html_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 esc_html_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="' . esc_attr__( '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="' . esc_attr__( '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="' . esc_attr__( '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="' . esc_attr__( '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 WPBakeryShortCode_Vc_Single_image $img_class */
|
||||
$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="' . esc_attr( $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 WPBakeryShortCode_Vc_Gitem_Post_Categories $vc_btn
|
||||
* @var WP_Post $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="' . sprintf( esc_attr__( '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,238 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* @var WPBakeryShortCode_Vc_Btn $vc_btn
|
||||
* @var WP_Post $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 WPBakeryShortCode_Vc_Btn $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"> </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;
|
||||
}
|
||||
}
|
||||
|
||||
$output = '';
|
||||
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();
|
||||
$first_tag = 'style';
|
||||
$output .= '<' . $first_tag . '>.vc_btn3-style-' . esc_attr( $style ) . '.vc_btn-gradient-btn-' . esc_attr( $uid ) . ':hover{' . esc_attr( implode( ';', $gradient_css_hover ) ) . ';' . '}</' . $first_tag . '>';
|
||||
$output .= '<' . $first_tag . '>.vc_btn3-style-' . esc_attr( $style ) . '.vc_btn-gradient-btn-' . esc_attr( $uid ) . '{' . esc_attr( implode( ';', $gradient_css ) ) . ';' . '}</' . $first_tag . '>';
|
||||
$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 );
|
||||
|
||||
$output .= '<div class="' . esc_attr( trim( $css_class ) ) . '"' . ( ! empty( $el_id ) ? ' id="' . esc_attr( $el_id ) . '"' : '' ) . '>';
|
||||
|
||||
if ( $use_link ) {
|
||||
if ( preg_match( '/href=\"[^\"]+/', $link_output ) ) {
|
||||
$output .= '<a ' . $attributes . '>' . $button_html . '</a>';
|
||||
} elseif ( 'load-more-grid' === $link ) {
|
||||
$output .= '<a href="javascript:;" ' . $attributes . '>' . $button_html . '</a>';
|
||||
}
|
||||
} else {
|
||||
$output .= '<button ' . $attributes . '>' . $button_html . '</button>';
|
||||
}
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
return $output;
|
||||
@@ -0,0 +1,55 @@
|
||||
<?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();
|
||||
}
|
||||
$custom_tag = 'script';
|
||||
?>
|
||||
<<?php echo esc_attr( $custom_tag ); ?>>
|
||||
window.vc_user_mapper = <?php echo wp_json_encode( WpbMap_Grid_Item::getGitemUserShortCodes() ); ?>;
|
||||
window.vc_mapper = <?php echo wp_json_encode( WpbMap_Grid_Item::getShortCodes() ); ?>;
|
||||
window.vc_vendor_settings_presets = <?php echo wp_json_encode( $vc_vendor_settings_presets ); ?>;
|
||||
window.vc_all_presets = <?php echo wp_json_encode( $vc_all_presets ); ?>;
|
||||
window.vc_frontend_enabled = false;
|
||||
window.vc_mode = '<?php echo esc_js( vc_mode() ); ?>';
|
||||
window.vcAdminNonce = '<?php echo esc_js( vc_generate_nonce( 'vc-admin-nonce' ) ); ?>';
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
|
||||
<<?php echo esc_attr( $custom_tag ); ?> 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>
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
<?php foreach ( WpbMap_Grid_Item::getShortCodes() as $sc_base => $el ) : ?>
|
||||
<<?php echo esc_attr( $custom_tag ); ?> type="text/html" id="vc_shortcode-template-<?php echo esc_attr( $sc_base ); ?>">
|
||||
<?php
|
||||
// @codingStandardsIgnoreLine
|
||||
print visual_composer()->getShortCode( $sc_base )->template();
|
||||
?>
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
<?php endforeach ?>
|
||||
|
||||
<?php
|
||||
vc_include_template( 'editors/partials/access-manager-js.tpl.php' );
|
||||
@@ -0,0 +1,68 @@
|
||||
<?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();
|
||||
$custom_tag = 'script';
|
||||
?>
|
||||
<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 esc_html_e( 'Loading, please wait...', 'js_composer' ); ?>"/>
|
||||
<input type="hidden" id="wpb_vc_loading_row" name="wpb_vc_loading_row"
|
||||
value="<?php esc_html_e( 'Crunching...', 'js_composer' ); ?>"/>
|
||||
<input type="hidden" name="vc_grid_item_editor" value="true"/>
|
||||
<<?php echo esc_attr( $custom_tag ); ?>>
|
||||
window.vc_post_id = <?php echo get_the_ID(); ?>;
|
||||
<?php
|
||||
$vc_gitem_template = vc_request_param( 'vc_gitem_template' );
|
||||
$template = Vc_Grid_Item::predefinedTemplate( $vc_gitem_template );
|
||||
if ( strlen( $vc_gitem_template ) && $template ) {
|
||||
echo "var vcDefaultGridItemContent = '" . esc_attr( $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
|
||||
}
|
||||
?>
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
@@ -0,0 +1,130 @@
|
||||
<?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';
|
||||
$custom_tag = 'script';
|
||||
$first_tag = 'style';
|
||||
?>
|
||||
<<?php echo esc_attr( $first_tag ); ?>>
|
||||
#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;
|
||||
}
|
||||
</<?php echo esc_attr( $first_tag ); ?>>
|
||||
<div class="vc_not-remove-overlay"></div>
|
||||
<div class="vc_ui-template-preview">
|
||||
<textarea id="content" style="display: none;">
|
||||
<?php
|
||||
// @codingStandardsIgnoreLine
|
||||
print $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>
|
||||
<<?php echo esc_attr( $custom_tag ); ?>>
|
||||
/**
|
||||
* 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 echo esc_attr( $custom_tag ); ?>>
|
||||
<?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' );
|
||||
}
|
||||
$custom_tag = 'script';
|
||||
$first_tag = 'style';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>"/>
|
||||
<meta name="viewport" content="width=device-width"/>
|
||||
<title><?php wp_title( '|', true, 'right' ); ?></title>
|
||||
<?php wp_head(); ?>
|
||||
<<?php echo esc_attr( $first_tag ); ?>>
|
||||
body {
|
||||
background-color: #FFF;
|
||||
color: #000;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
<?php
|
||||
// @codingStandardsIgnoreLine
|
||||
print 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%;
|
||||
}
|
||||
</<?php echo esc_attr( $first_tag ); ?>>
|
||||
</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
|
||||
// @codingStandardsIgnoreLine
|
||||
print $grid_item->renderItem( $post );
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- #content -->
|
||||
</div>
|
||||
<!-- #primary -->
|
||||
<?php wp_footer(); ?>
|
||||
<<?php echo esc_attr( $custom_tag ); ?>>
|
||||
var currentWidth = '<?php echo esc_js( $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 );
|
||||
} );
|
||||
</<?php echo esc_attr( $custom_tag ); ?>>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
return '{{ vc_btn: ' . http_build_query( $atts ) . ' }}';
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
$wrapper_css_class = 'vc_button-2-wrapper';
|
||||
/** @var WPBakeryShortCode_Vc_Button2 $this */
|
||||
$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_url( $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:' . esc_attr( $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;
|
||||
}
|
||||
|
||||
$output = '<div class="' . esc_attr( $wrapper_css_class ) . '">';
|
||||
$output .= '<' . $link . $target . $rel . '>' . $title . '</a>';
|
||||
$output .= '</div>';
|
||||
|
||||
return $output;
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* @var WPBakeryShortCode_Vc_Custom_heading $this
|
||||
*/
|
||||
|
||||
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, [], WPB_VC_VERSION );
|
||||
}
|
||||
|
||||
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'] . '>';
|
||||
}
|
||||
|
||||
return $output;
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/** @var WPBakeryShortCode_Vc_Icon $this */
|
||||
$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 ) . '"' : '';
|
||||
|
||||
$output = '';
|
||||
$output .= '<div class="vc_icon_element vc_icon_element-outer' . esc_attr( $css_class ) . ' vc_icon_element-align-' . esc_attr( $align );
|
||||
|
||||
if ( $has_style ) {
|
||||
$output .= 'vc_icon_element-have-style';
|
||||
}
|
||||
$output .= '">';
|
||||
$output .= '<div class="vc_icon_element-inner vc_icon_element-color-' . esc_attr( $color ) . ' ';
|
||||
if ( $has_style ) {
|
||||
$output .= 'vc_icon_element-have-style-inner';
|
||||
}
|
||||
$output .= ' vc_icon_element-size-' . esc_attr( $size ) . ' vc_icon_element-style-' . esc_attr( $background_style ) . ' vc_icon_element-background-color-' . esc_attr( $background_color ) . '" ' . $style . '><span class="vc_icon_element-icon ' . esc_attr( ${'icon_' . $type} ) . '" ' . ( 'custom' === $color ? 'style="color:' . esc_attr( $custom_color ) . ' !important"' : '' ) . '></span>';
|
||||
if ( strlen( $link ) > 0 ) {
|
||||
$output .= '<' . $link . '></a>';
|
||||
}
|
||||
$output .= '</div></div>';
|
||||
|
||||
return $output;
|
||||
@@ -0,0 +1,67 @@
|
||||
<?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 WPBakeryShortCode_Vc_Single_image $this */
|
||||
$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 = vc_extract_dimensions( $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="' . esc_url( $custom_src ) . '" />',
|
||||
);
|
||||
break;
|
||||
|
||||
default:
|
||||
$img = false;
|
||||
}
|
||||
|
||||
if ( ! $img ) {
|
||||
$img['thumbnail'] = '<img class="vc_single_image-img" src="' . esc_url( $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>
|
||||
';
|
||||
|
||||
return $output;
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $id
|
||||
* @var $el_class
|
||||
* Shortcode class
|
||||
* @var WPBakeryShortCode_Layerslider_Vc $this
|
||||
*/
|
||||
$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="' . esc_attr( $id ) . '"]' ) );
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/** @var array $block_data */
|
||||
$block = $block_data[0];
|
||||
$settings = $block_data[1];
|
||||
$link_setting = empty( $settings[0] ) ? '' : $settings[0];
|
||||
|
||||
$output = '';
|
||||
if ( 'title' === $block ) {
|
||||
$output .= '<h2 class="post-title">';
|
||||
$output .= empty( $link_setting ) || 'no_link' !== $link_setting ? $this->getLinked( $post, $post->title, $link_setting, 'link_title' ) : $post->title;
|
||||
$output .= '</h2>';
|
||||
} elseif ( 'image' === $block && ! empty( $post->thumbnail ) ) {
|
||||
$output .= '<div class="post-thumb">';
|
||||
$output .= empty( $link_setting ) || 'no_link' !== $link_setting ? $this->getLinked( $post, $post->thumbnail, $link_setting, 'link_image' ) : $post->thumbnail;
|
||||
$output .= '</div>';
|
||||
} elseif ( 'text' === $block ) {
|
||||
$output .= '<div class="entry-content">';
|
||||
$output .= empty( $link_setting ) || 'text' === $link_setting ? $post->content : $post->excerpt;
|
||||
$output .= '</div>';
|
||||
} elseif ( 'link' === $block ) {
|
||||
$output .= '<a href="' . esc_url( $post->link ) . '" class="vc_read_more" title="' . sprintf( esc_attr__( 'Permalink to %s', 'js_composer' ), esc_attr( $post->title_attribute ) ) . '" ';
|
||||
$output .= $this->link_target;
|
||||
$output .= '>';
|
||||
$output .= esc_html__( 'Read more', 'js_composer' );
|
||||
$output .= '</a>';
|
||||
}
|
||||
|
||||
return $output;
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $title
|
||||
* @var $alias
|
||||
* @var $el_class
|
||||
* Shortcode class
|
||||
* @var WPBakeryShortCode_Rev_Slider_Vc $this
|
||||
*/
|
||||
$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="' . $alias . '"]' ) );
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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 WPBakeryShortCode_Vc_Accordion $this
|
||||
*/
|
||||
$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="' . esc_attr( $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>
|
||||
';
|
||||
|
||||
return $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 WPBakeryShortCode_Vc_Accordion_tab $this
|
||||
*/
|
||||
$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 ) ) ? esc_html__( 'Empty section. Edit page to add content here.', 'js_composer' ) : wpb_js_remove_wpautop( $content ) ) . '
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
return $output;
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var array $atts
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var WPBakeryShortCode_Vc_Basic_Grid $this
|
||||
*/
|
||||
$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';
|
||||
|
||||
// Used for preload first page
|
||||
if ( ! vc_is_page_editable() ) {
|
||||
$haystack = array(
|
||||
'load-more',
|
||||
'lazy',
|
||||
'all',
|
||||
);
|
||||
if ( in_array( $this->atts['style'], $haystack, true ) && in_array( $this->settings['base'], array( 'vc_basic_grid' ), true ) ) {
|
||||
$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();
|
||||
}
|
||||
}
|
||||
|
||||
$output = '
|
||||
<div class="vc_grid-container-wrapper vc_clearfix"' . ( ! empty( $atts['el_id'] ) ? ' id="' . esc_attr( $atts['el_id'] ) . '"' : '' ) . '>
|
||||
<div class="' . esc_attr( $css_class ) . '" data-initial-loading-animation="' . esc_attr( $animation ) . '" data-vc-' . esc_attr( $this->pagable_type ) . '-settings="' . esc_attr( wp_json_encode( $this->grid_settings ) ) . '" data-vc-request="' . esc_attr( apply_filters( 'vc_grid_request_url', admin_url( 'admin-ajax.php' ) ) ) . '" data-vc-post-id="' . esc_attr( get_the_ID() ) . '" data-vc-public-nonce="' . esc_attr( vc_generate_nonce( 'vc-public-nonce' ) ) . '">
|
||||
' . $this->renderItems() . '
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
return $output;
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
*/
|
||||
$output = '';
|
||||
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 = esc_html__( 'All', 'js_composer' );
|
||||
}
|
||||
if ( 'dropdown' !== $atts['filter_style'] ) {
|
||||
$output .= '<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="*">';
|
||||
$output .= esc_attr( $filter_default );
|
||||
|
||||
$output .= '</span></li>';
|
||||
foreach ( $terms as $term ) {
|
||||
$output .= '<li class="vc_grid-filter-item"><span' . ' data-vc-grid-filter-value=".vc_grid-term-' . esc_attr( $term->term_id ) . '">';
|
||||
$output .= esc_attr( $term->name );
|
||||
$output .= '</span></li>';
|
||||
}
|
||||
$output .= '</ul>';
|
||||
}
|
||||
|
||||
$output .= '<div class="' . ( 'dropdown' === $atts['filter_style'] ? 'vc_grid-filter-dropdown' : 'vc_grid-filter-select' ) . ' vc_grid-filter-' . esc_attr( $atts['filter_align'] ) . ' vc_grid-filter-color-' . esc_attr( $atts['filter_color'] ) . '" data-vc-grid-filter-select="' . esc_attr( $atts['filter_source'] ) . '"><div class="vc_grid-styled-select"><select data-filter="' . esc_attr( $atts['filter_source'] ) . '"><option class="vc_active" value="*">' . esc_attr( $filter_default ) . ' </option>';
|
||||
|
||||
foreach ( $terms as $term ) {
|
||||
$output .= '<option value=".vc_grid-term-' . esc_attr( $term->term_id ) . '">' . esc_html( $term->name ) . ' </option>';
|
||||
}
|
||||
$output .= '</select><i class="vc_arrow-icon-navicon"></i>
|
||||
</div>
|
||||
</div>';
|
||||
}
|
||||
|
||||
return $output;
|
||||
@@ -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 WPBakeryShortCode_Vc_Btn $this
|
||||
*/
|
||||
$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"> </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;
|
||||
}
|
||||
}
|
||||
$output = '';
|
||||
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();
|
||||
$first_tag = 'style';
|
||||
$output .= '<' . $first_tag . '>.vc_btn3-style-' . esc_attr( $style ) . '.vc_btn-gradient-btn-' . esc_attr( $uid ) . ':hover{' . esc_attr( implode( ';', $gradient_css_hover ) ) . ';' . '}</' . $first_tag . '>';
|
||||
$output .= '<' . $first_tag . '>.vc_btn3-style-' . esc_attr( $style ) . '.vc_btn-gradient-btn-' . esc_attr( $uid ) . '{' . esc_attr( implode( ';', $gradient_css ) ) . ';' . '}</' . $first_tag . '>';
|
||||
$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="' . esc_url( 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 );
|
||||
|
||||
$output .= '<div class="' . esc_attr( trim( $css_class ) ) . '"' . ( ! empty( $el_id ) ? ' id="' . esc_attr( $el_id ) . '"' : '' ) . ' >';
|
||||
|
||||
if ( $use_link ) {
|
||||
$output .= '<a ' . $attributes . '>' . $button_html . '</a>';
|
||||
} else {
|
||||
$output .= '<button ' . $attributes . '>' . $button_html . '</button>';
|
||||
}
|
||||
|
||||
$output .= '</div>';
|
||||
|
||||
return $output;
|
||||
@@ -0,0 +1,66 @@
|
||||
<?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 WPBakeryShortCode_Vc_Button $this
|
||||
*/
|
||||
$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, true ) ) {
|
||||
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, true ) && '' !== $href ) {
|
||||
$a_class .= ' pull-right';
|
||||
$el_class = str_ireplace( 'pull-right', '', $el_class );
|
||||
}
|
||||
if ( in_array( 'pull-left', $tmp_class, true ) && '' !== $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_url( $href ) . '"' . $target . '>' . $output . '</a>';
|
||||
} else {
|
||||
$output .= '<button class="' . esc_attr( $css_class ) . '">' . $title . $i_icon . '</button>';
|
||||
|
||||
}
|
||||
|
||||
return $output;
|
||||
@@ -0,0 +1,52 @@
|
||||
<?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 WPBakeryShortCode_Vc_Button2 $this
|
||||
*/
|
||||
$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;
|
||||
}
|
||||
$output = '';
|
||||
|
||||
$output .= '
|
||||
<div class="' . esc_attr( $wrapper_css_class ) . '"><a class="' . esc_attr( trim( $css_class ) ) . '" href="' . esc_attr( $a_href ) . '" title="' . esc_attr( $a_title ) . '" target="' . esc_attr( $a_target ) . '"' . ( ! empty( $a_rel ) ? ' rel="' . esc_attr( trim( $a_rel ) ) . '"' : '' ) . '>';
|
||||
$output .= $title;
|
||||
$output .= '</a></div>';
|
||||
|
||||
return $output;
|
||||
@@ -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 WPBakeryShortCode_Vc_Column $this
|
||||
*/
|
||||
$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 WPBakeryShortCode_Vc_Column_Inner $this
|
||||
*/
|
||||
$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 WPBakeryShortCode_Vc_Column_text $this
|
||||
*/
|
||||
$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,45 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var WPBakeryShortCode_Vc_Cta $this
|
||||
*/
|
||||
|
||||
$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' ) ) ) );
|
||||
$output = '';
|
||||
|
||||
$output .= '<section class="' . esc_attr( $containerClass ) . '"' . ( ! empty( $atts['el_id'] ) ? ' id="' . esc_attr( $atts['el_id'] ) . '"' : '' ) . '>';
|
||||
$output .= '<div class="' . esc_attr( $cssClass ) . '"';
|
||||
if ( $this->getTemplateVariable( 'inline-css' ) ) {
|
||||
$output .= ' style="' . esc_attr( implode( ' ', $this->getTemplateVariable( 'inline-css' ) ) ) . '"';
|
||||
}
|
||||
$output .= '>'; // div
|
||||
$output .= $this->getTemplateVariable( 'icons-top' );
|
||||
$output .= $this->getTemplateVariable( 'icons-left' );
|
||||
|
||||
$output .= '<div class="vc_cta3_content-container">';
|
||||
$output .= $this->getTemplateVariable( 'actions-top' );
|
||||
$output .= $this->getTemplateVariable( 'actions-left' );
|
||||
$output .= '<div class="vc_cta3-content">';
|
||||
$output .= '<header class="vc_cta3-content-header">';
|
||||
$output .= $this->getTemplateVariable( 'heading1' );
|
||||
$output .= $this->getTemplateVariable( 'heading2' );
|
||||
$output .= '</header>';
|
||||
$output .= $this->getTemplateVariable( 'content' );
|
||||
$output .= '</div>';
|
||||
$output .= $this->getTemplateVariable( 'actions-bottom' );
|
||||
$output .= $this->getTemplateVariable( 'actions-right' );
|
||||
$output .= '</div>';
|
||||
$output .= $this->getTemplateVariable( 'icons-bottom' );
|
||||
$output .= $this->getTemplateVariable( 'icons-right' );
|
||||
$output .= '</div></section>';
|
||||
|
||||
return $output;
|
||||
@@ -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 WPBakeryShortCode_Vc_Cta_button $this
|
||||
*/
|
||||
$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, true ) ) {
|
||||
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="' . esc_url( $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>';
|
||||
|
||||
return $output;
|
||||
@@ -0,0 +1,68 @@
|
||||
<?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 WPBakeryShortCode_Vc_Cta_button2 $this
|
||||
*/
|
||||
$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 );
|
||||
$output = '';
|
||||
|
||||
$output .= '<div ' . $inline_css . ' class="' . esc_attr( trim( $css_class ) ) . '">';
|
||||
if ( '' !== $link && 'bottom' !== $position ) {
|
||||
$output .= do_shortcode( '[vc_button2 align="' . $position . '" link="' . $link . '" title="' . $title . '" color="' . $color . '" size="' . $size . '" style="' . $btn_style . '" el_class="vc_cta_btn"]' );
|
||||
}
|
||||
|
||||
if ( '' !== $h2 || '' !== $h4 ) {
|
||||
$output .= '<hgroup>';
|
||||
if ( '' !== $h2 ) {
|
||||
$output .= '<h2 class="wpb_heading">' . $h2 . '</h2>';
|
||||
}
|
||||
if ( '' !== $h4 ) {
|
||||
$output .= '<h4 class="wpb_heading">' . $h4 . '</h4>';
|
||||
}
|
||||
$output .= '</hgroup>';
|
||||
}
|
||||
$output .= wpb_js_remove_wpautop( $content, true );
|
||||
if ( '' !== $link && 'bottom' === $position ) {
|
||||
$output .= do_shortcode( '[vc_button2 link="' . $link . '" title="' . $title . '" color="' . $color . '" size="' . $size . '" style="' . $btn_style . '" el_class="vc_cta_btn"]' );
|
||||
}
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,26 @@
|
||||
<?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;
|
||||
|
||||
$output = '';
|
||||
if ( strlen( $key ) ) {
|
||||
$output .= '<div class="vc_gitem-custom-field-' . esc_attr( $key ) . '">{{ post_meta_value: ' . esc_attr( $key ) . '}}</div>';
|
||||
}
|
||||
|
||||
return $output;
|
||||
@@ -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 WPBakeryShortCode_Vc_Custom_heading $this
|
||||
*/
|
||||
$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, [], WPB_VC_VERSION );
|
||||
}
|
||||
|
||||
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_url( $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'] . '>';
|
||||
}
|
||||
|
||||
return $output;
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $height
|
||||
* @var $el_class
|
||||
* @var $el_id
|
||||
* @var $css
|
||||
* Shortcode class
|
||||
* @var WPBakeryShortCode_Vc_Empty_space $this
|
||||
*/
|
||||
$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: https://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 ) . '"';
|
||||
}
|
||||
|
||||
$output = '';
|
||||
$output .= '<div class="' . esc_attr( trim( $css_class ) ) . '" ';
|
||||
$output .= implode( ' ', $wrapper_attributes ) . ' ' . $inline_css;
|
||||
$output .= '><span class="vc_empty_space_inner"></span></div>';
|
||||
|
||||
return $output;
|
||||
@@ -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 WPBakeryShortCode_Vc_Facebook $this
|
||||
*/
|
||||
$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="https://www.facebook.com/plugins/like.php?href='
|
||||
. esc_url( $url ) . '&layout='
|
||||
. esc_attr( $type ) . '&show_faces=false&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true"></iframe></div>';
|
||||
|
||||
return $output;
|
||||
@@ -0,0 +1,47 @@
|
||||
<?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 WPBakeryShortCode_Vc_flickr $this
|
||||
*/
|
||||
$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 ) . '"';
|
||||
}
|
||||
$custom_tag = 'script';
|
||||
// @codingStandardsIgnoreStarts
|
||||
$output = '
|
||||
<div class="' . esc_attr( $css_class ) . '" ' . implode( ' ', $wrapper_attributes ) . '>
|
||||
<div class="wpb_wrapper">
|
||||
' . wpb_widget_title( array(
|
||||
'title' => $title,
|
||||
'extraclass' => 'wpb_flickr_heading',
|
||||
) ) . '<' . $custom_tag . ' src="https://www.flickr.com/badge_code_v2.gne?count=' . esc_attr( $count ) . '&display=' . esc_attr( $display ) . '&size=s&layout=x&source=' . esc_attr( $type ) . '&' . esc_attr( $type ) . '=' . esc_attr( $flickr_id ) . '"></' . $custom_tag . '>
|
||||
<p class="flickr_stream_wrap"><a class="wpb_follow_btn wpb_flickr_stream" href="https://www.flickr.com/photos/' . esc_attr( $flickr_id ) . '">' . esc_html__( 'View stream on flickr', 'js_composer' ) . '</a></p>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
return $output;
|
||||
@@ -0,0 +1,175 @@
|
||||
<?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 WPBakeryShortCode_Vc_gallery $this
|
||||
*/
|
||||
$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() . '-' . wp_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="' . esc_url( $default_src ) . '" />';
|
||||
}
|
||||
break;
|
||||
|
||||
case 'external_link':
|
||||
$dimensions = vc_extract_dimensions( $external_img_size );
|
||||
$hwstring = $dimensions ? image_hwstring( $dimensions[0], $dimensions[1] ) : '';
|
||||
$thumbnail = '<img ' . $hwstring . ' src="' . esc_url( $image ) . '" />';
|
||||
$large_img_src = $image;
|
||||
break;
|
||||
}
|
||||
|
||||
$link_start = $link_end = '';
|
||||
|
||||
switch ( $onclick ) {
|
||||
case 'img_link_large':
|
||||
$link_start = '<a href="' . esc_url( $large_img_src ) . '" target="' . $custom_links_target . '">';
|
||||
$link_end = '</a>';
|
||||
break;
|
||||
|
||||
case 'link_image':
|
||||
$link_start = '<a class="prettyphoto" href="' . esc_url( $large_img_src ) . '"' . $pretty_rel_random . '>';
|
||||
$link_end = '</a>';
|
||||
break;
|
||||
|
||||
case 'custom_link':
|
||||
if ( ! empty( $custom_links[ $i ] ) ) {
|
||||
$link_start = '<a href="' . esc_url( $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>';
|
||||
|
||||
return $output;
|
||||
@@ -0,0 +1,46 @@
|
||||
<?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 WPBakeryShortCode_Vc_Gitem $this
|
||||
*/
|
||||
$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="' . esc_attr( $css_class_mini ) . '">' . do_shortcode( $content ) . '</div><div class="vc_clearfix"></div></div>';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $css
|
||||
* @var $animation
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var WPBakeryShortCode_Vc_Gitem_Animated_Block $this
|
||||
*/
|
||||
$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 );
|
||||
}
|
||||
|
||||
$output = '';
|
||||
$output .= '<div class="' . esc_attr( $css_class ) . '" ' . $animation_attr . ( empty( $css_style ) ? '' : ' style="' . esc_attr( $css_style ) ) . '">';
|
||||
$output .= do_shortcode( $content );
|
||||
$output .= '</div>';
|
||||
|
||||
echo $output;
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcode attributes
|
||||
* @var $atts
|
||||
* @var $el_class
|
||||
* @var $background_color
|
||||
* @var $float
|
||||
* @var $content - shortcode content
|
||||
* Shortcode class
|
||||
* @var WPBakeryShortCode_Vc_Gitem $this
|
||||
*/
|
||||
$el_class = $background_color = $float = '';
|
||||
|
||||
$atts = vc_map_get_attributes( $this->getShortcode(), $atts );
|
||||
extract( $atts );
|
||||
|
||||
if ( ! empty( $background_color ) ) {
|
||||
$background_color = ' vc_bg-' . $background_color;
|
||||
}
|
||||
|
||||
$output = '<div class="vc_gitem-block' . esc_attr( $background_color ) . ( strlen( $el_class ) > 0 ? ' ' . esc_attr( $el_class ) : '' ) . ' vc_gitem-float-' . esc_attr( $float ) . '">' . do_shortcode( $content ) . '</div>';
|
||||
|
||||
echo $output;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user