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';
|
||||
Reference in New Issue
Block a user