Import legacy nurinda.co.id website

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

No files matched your search

@@ -0,0 +1,97 @@
.compose-mode .vc_controls,
.compose-mode .vc_ui-font-open-sans {
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif !important;
}
.compose-mode .vc_empty-placeholder {
margin: 0 !important;
}
.compose-mode .vc_add-element-not-empty-button {
vertical-align: top;
}
.compose-mode .vc_vc_row > [data-vc-full-width="true"],
.compose-mode .vc_vc_row_inner {
padding-top: 0;
}
.compose-mode .vc_vc_row_inner:first-child {
padding-top: 32px;
}
.compose-mode .vc_control-btn-append:before {
top: 3px; /* fixed value */
}
.compose-mode .vc_row {
clear: both;
}
.compose-mode .vc_element:before {
position: absolute;
z-index: 0;
top: 0;
left: 0;
right: 0;
bottom: 0;
height: auto !important;
width: auto !important;
border: 1px solid transparent;
outline: 1px dashed transparent !important;
outline-offset: -1px;
}
.compose-mode .vc_element:hover:before {
content: '';
border-color: #fff !important;
outline-color: #95ca24 !important;
}
.compose-mode .vc_element.vc_vc_column:hover:before,
.compose-mode .vc_element.vc_vc_column_inner:hover:before {
content: '';
border-color: #fff !important;
outline-color: #f3af1c !important;
}
.compose-mode .vc_element.vc_vc_row:before,
.compose-mode .vc_element.vc_vc_row_inner:before {
display: none !important;
}
.compose-mode div:not(.vc_empty-placeholder) + .vc_vc_row > .l-section {
padding-top: 0 !important;
padding-bottom: 0 !important;
}
.compose-mode div:not(.vc_empty-placeholder) + .vc_vc_row > .l-section .l-section-h {
top: auto !important;
}
.compose-mode .vc_column_container {
height: 100%;
}
.vc_empty-placeholder + .vc_vc_row > .l-section.height_auto:before {
display: block;
margin-bottom: 30px;
}
.g-cols.valign_middle > div > div > .vc_column-inner {
justify-content: center;
}
.g-cols.valign_bottom > div > div > .vc_column-inner {
justify-content: flex-end;
}
.g-cols.type_default > div > div > .vc_column-inner {
padding-left: 1.5rem;
padding-right: 1.5rem;
}
.g-cols.type_default > div > div.has-fill > .vc_column-inner {
padding-top: 1.5rem;
padding-bottom: 1.5rem;
}
.g-cols.type_boxes > div > div > .vc_column-inner {
background-position: center center !important;
background-size: cover !important;
padding: 4rem;
}
.vc_element > .w-image {
margin-bottom: 0;
}
.wpb_column.align_center .vc_element.vc_us_btn {
display: inline-block;
vertical-align: top;
}
@@ -0,0 +1,54 @@
! function( $ ) {
var USDOSetValue = function( $container ) {
var $value = $container.find( '.us-design-options-value' ),
value = '',
$inputs = $container.find( '.us-design-options-input' ),
withPosition = false;
$inputs.each( function( index, input ) {
var $input = $( input ),
name = $input.attr( 'name' ).replace( '_', '-' ),
trimmedValue = $input.val().trim();
// If parameter is empty, do not add it to the value
if ( trimmedValue == '' ) {
return;
}
if ( name.substr( 0, 8 ) == 'position' ) {
name = name.replace( 'position-', '' );
withPosition = true;
}
// If a plain number is entered, add 'px' to it's end
if ( trimmedValue.match( /^\d+$/ ) && trimmedValue != 0 ) {
trimmedValue += 'px';
}
value += ' ' + name + ': ' + trimmedValue + ';';
}.bind( this ) );
if ( withPosition ) {
value = 'position: absolute;' + value;
}
$value.val( value.trim() );
};
$( '#usdo_pos_abs' ).change( function() {
var $this = $( this ),
$posWrapper = $( '.usof-design-position' ),
$container = $this.closest( '.usof-design' );
$posWrapper.toggleClass( 'pos_off', ! $this.is( ':checked' ) );
if ( ! $this.is( ':checked' ) ) {
// Clearing all values
$container.find( '.us-design-options-input.for-position' ).val( '' );
}
USDOSetValue( $container );
} );
$( '.us-design-options-input' ).off( 'blur' ).live( 'blur', function( e ) {
var $target = $( e.target ),
trimmedValue = $target.val().trim(),
$container = $target.closest( '.usof-design' );
if ( trimmedValue != '' ) {
$target.val( trimmedValue );
USDOSetValue( $container );
}
} );
}( window.jQuery );
@@ -0,0 +1,19 @@
! function( $ ) {
$( '.us-grid-layout-select' ).off( 'change' ).live( 'change', function() {
var $select = $( this ),
$container = $select.closest( '.us-grid-layout' ),
$descEdit = $container.find( '.us-grid-layout-desc-edit' ),
$descAdd = $container.find( '.us-grid-layout-desc-add' ),
$selectedOption = $select.find( ":selected" ),
$editLink = $descEdit.find( '.edit-link' );
if ( $selectedOption.length && $selectedOption.data( 'edit-url' ) != undefined ) {
$editLink.attr( 'href', $selectedOption.data( 'edit-url' ) );
$descEdit.show();
$descAdd.hide();
} else {
$descAdd.show();
$descEdit.hide();
}
} ).change();
}( window.jQuery );
@@ -0,0 +1,50 @@
! function( $ ) {
var USIconSetValue = function( $container ) {
var $select = $container.find( '.us-icon-select' ),
$input = $container.find( '.us-icon-text' ),
$value = $container.find( '.us-icon-value' ),
$preview = $container.find( '.us-icon-preview > i' ),
icon_set = $select.val(),
icon_name = $.trim( $input.val() ),
icon_no_resize = icon_name.replace( /fa-\dx/gi, ' ' ),
icon_val = '';
if ( icon_name != '' ) {
if ( icon_set == 'material' ) {
icon_name = icon_name.replace( / +/g, '_' );
$preview.attr( 'class', 'material-icons' ).html( icon_name );
} else {
$preview.attr( 'class', icon_set + ' fa-' + icon_no_resize ).html( '' );
}
icon_val = icon_set + '|' + icon_name;
} else {
// Case when removing all text in input at a time, "Crtl + A + Del", for instance
$preview.attr( 'class', '' ).html( '' );
}
$value.val( icon_val );
};
$( '.us-icon-select' ).off( 'change' ).live( 'change', function() {
var $select = $( this ),
$container = $select.closest( '.us-icon' ),
$descContainer = $container.siblings( '.us-icon-desc' ).first(),
$selectedOption = $select.find( ":selected" ),
$setLink = $descContainer.find( '.us-icon-set-link' );
if ( $selectedOption.length ) {
$setLink.attr( 'href', $selectedOption.data( 'info-url' ) );
}
USIconSetValue( $container );
} );
$( '.us-icon-text' ).off( 'change keyup' ).live( 'change keyup', function() {
var $input = $( this ),
$container = $input.closest( '.us-icon' ),
val = $input.val();
if ( val.toLowerCase().replace( /^\s+/g, '' ) !== val ) {
$input.val( $.trim( val.toLowerCase() ) );
}
USIconSetValue( $container );
} );
}( window.jQuery );
@@ -0,0 +1,96 @@
! function( $ ) {
window.ViewUsIcon = vc.shortcode_view.extend( {
// Render method called after element is added( cloned ), and on first initialisation
render: function() {
window.ViewUsIcon.__super__.render.call( this );
this.addedClasses = '';
return this;
},
// Add either FontAwesome of Material icons
changeIcons: function() {
var $icon = this.$el.find( '.vc_element-icon' ),
$button = this.$el.find( 'button' ),
$addedIcon = '',
shortcode = this.currentShortcode,
iconPos = this.model.attributes.params.iconpos,
matchesFa,
matchesMa;
// Catch icon names
matchesFa = this.model.attributes.params.icon.match( /^(fa\w?)\|(.+)$/ );
matchesMa = this.model.attributes.params.icon.match( /^(material)\|(.+)$/ );
// Do only for found elements
if ( $icon.length || $button.length ) {
if ( matchesFa || matchesMa ) {
if ( this.addedClasses.length ) {
$icon.removeClass( this.addedClasses ).html( '' );
}
if ( matchesFa ) {
if ( shortcode == 'us_iconbox' ) {
this.addedClasses = matchesFa[ 1 ] + ' fa-' + matchesFa[ 2 ];
$icon.addClass( this.addedClasses );
} else if ( shortcode == 'us_btn' ) {
$addedIcon = '<i class="' + matchesFa[ 1 ] + ' fa-' + matchesFa[ 2 ] + '"></i>';
if ( iconPos == 'left' ) {
$( $addedIcon ).prependTo( $button );
} else {
// Remove new line from the title to append icon properly
$button.html( $button.html().trim() );
$( $addedIcon ).appendTo( $button );
}
}
} else {
if ( shortcode == 'us_iconbox' ) {
this.addedClasses = 'material-icons';
$icon.addClass( this.addedClasses ).html( matchesMa[ 2 ] );
} else if ( shortcode == 'us_btn' ) {
$addedIcon = '<i class="material-icons">' + matchesMa[ 2 ] + '</i>';
if ( iconPos == 'left' ) {
$( $addedIcon ).prependTo( $button );
} else {
// Remove new line from the title to append icon properly
$button.html( $button.html().trim() );
$( $addedIcon ).appendTo( $button );
}
}
}
}
}
},
// Add default title if empty
checkButtonTitle: function() {
this.currentShortcode = this.model.attributes.shortcode;
if ( this.currentShortcode != 'us_btn' ) {
return;
}
if ( this.currentShortcode == 'us_btn' ) {
if ( ! this.model.attributes.params.label.length && ! this.model.attributes.params.icon.length ) {
$( this.$el.find( 'button' ) ).html( '<p>' + this.params.label.std + '</p>' );
}
}
},
ready: function( e ) {
window.ViewUsIcon.__super__.ready.call( this, e );
return this;
},
// Called every time when params is changed/appended. Also on first initialisation
changeShortcodeParams: function( model ) {
window.ViewUsIcon.__super__.changeShortcodeParams.call( this, model );
this.checkButtonTitle();
this.changeIcons();
},
deleteShortcode: function( e ) {
this.addedClasses = '';
window.ViewUsIcon.__super__.deleteShortcode.call( this, e );
},
editElement: function( e ) {
window.ViewUsIcon.__super__.editElement.call( this, e );
},
clone: function( e ) {
window.ViewUsIcon.__super__.clone.call( this, e );
}
} );
}( window.jQuery );
@@ -0,0 +1,12 @@
! function( $ ) {
$( '.usof-example' ).live( 'click', function( ev ) {
ev.preventDefault();
ev.stopPropagation();
var $target = $( ev.target ).closest( 'span' ),
$input = $target.closest( '.edit_form_line' ).find( 'input[type="text"]' ),
value = $target.html();
$input.val( value ).trigger( 'change' );
} );
}( window.jQuery );
@@ -0,0 +1,998 @@
<?php defined( 'ABSPATH' ) OR die( 'This script cannot be accessed directly.' );
/**
* WPBakery Page Builder support
*
* @link http://codecanyon.net/item/visual-composer-page-builder-for-wordpress/242431?ref=UpSolution
*/
if ( ! class_exists( 'Vc_Manager' ) ) {
/**
* @param $width
*
* @since 4.2
* @return bool|string
*/
function us_wpb_translateColumnWidthToSpan( $width ) {
preg_match( '/(\d+)\/(\d+)/', $width, $matches );
if ( ! empty( $matches ) ) {
$part_x = (int) $matches[1];
$part_y = (int) $matches[2];
if ( $part_x > 0 AND $part_y > 0 ) {
$value = ceil( $part_x / $part_y * 12 );
if ( $value > 0 AND $value <= 12 ) {
$width = 'vc_col-sm-' . $value;
}
}
}
return $width;
}
/**
* @param $column_offset
* @param $width
*
* @return mixed|string
*/
function us_vc_column_offset_class_merge( $column_offset, $width ) {
if ( preg_match( '/vc_col\-sm\-\d+/', $column_offset ) ) {
return $column_offset;
}
return $width . ( empty( $column_offset ) ? '' : ' ' . $column_offset );
}
/**
* @param $subject
* @param $property
* @param bool|false $strict
*
* @since 4.9
* @return bool
*/
function us_vc_shortcode_custom_css_has_property( $subject, $property, $strict = FALSE ) {
$styles = array();
$pattern = '/\{([^\}]*?)\}/i';
preg_match( $pattern, $subject, $styles );
if ( array_key_exists( 1, $styles ) ) {
$styles = explode( ';', $styles[1] );
}
$new_styles = array();
foreach ( $styles as $val ) {
$val = explode( ':', $val );
if ( is_array( $property ) ) {
foreach ( $property as $prop ) {
$pos = strpos( $val[0], $prop );
$full = ( $strict ) ? ( $pos === 0 AND strlen( $val[0] ) === strlen( $prop ) ) : TRUE;
if ( $pos !== FALSE AND $full ) {
$new_styles[] = $val;
}
}
} else {
$pos = strpos( $val[0], $property );
$full = ( $strict ) ? ( $pos === 0 AND strlen( $val[0] ) === strlen( $property ) ) : TRUE;
if ( $pos !== FALSE AND $full ) {
$new_styles[] = $val;
}
}
}
return ! empty( $new_styles );
}
return;
}
add_action( 'vc_before_init', 'us_vc_set_as_theme' );
function us_vc_set_as_theme() {
vc_set_as_theme();
}
add_action( 'vc_after_init', 'us_vc_after_init' );
function us_vc_after_init() {
$updater = vc_manager()->updater();
$updateManager = $updater->updateManager();
remove_filter( 'upgrader_pre_download', array( $updater, 'preUpgradeFilter' ) );
remove_filter( 'pre_set_site_transient_update_plugins', array( $updateManager, 'check_update' ) );
remove_filter( 'plugins_api', array( $updateManager, 'check_info' ) );
remove_action( 'in_plugin_update_message-' . vc_plugin_name(), array( $updateManager, 'addUpgradeMessageLink' ) );
}
add_action( 'vc_after_set_mode', 'us_vc_after_set_mode' );
function us_vc_after_set_mode() {
do_action( 'us_before_js_composer_mappings' );
// Remove VC Font Awesome style in admin pages
add_action( 'admin_head', 'us_remove_js_composer_admin_assets', 1 );
function us_remove_js_composer_admin_assets() {
wp_dequeue_style( 'font-awesome' );
wp_deregister_style( 'font-awesome' );
if ( us_get_option( 'disable_extra_vc', 1 ) ) {
wp_dequeue_style( 'animate-css' );
}
}
if ( ! vc_is_page_editable() ) {
// Remove original VC styles and scripts
add_action( 'wp_enqueue_scripts', 'us_remove_vc_base_css_js', 15 );
function us_remove_vc_base_css_js() {
if ( wp_style_is( 'font-awesome', 'registered' ) ) {
wp_dequeue_style( 'font-awesome' );
wp_deregister_style( 'font-awesome' );
}
if ( us_get_option( 'disable_extra_vc', 1 ) ) {
if ( wp_style_is( 'js_composer_front', 'registered' ) ) {
wp_dequeue_style( 'js_composer_front' );
wp_deregister_style( 'js_composer_front' );
}
if ( wp_script_is( 'wpb_composer_front_js', 'registered' ) ) {
wp_deregister_script( 'wpb_composer_front_js' );
}
}
}
}
if ( vc_is_page_editable() ) {
// Disable some of the shortcodes for frontend editor
US_Shortcodes::instance()->vc_front_end_compatibility();
// Add theme CSS for frontend editor
add_action( 'wp_enqueue_scripts', 'us_process_css_for_frontend_js_composer', 15 );
function us_process_css_for_frontend_js_composer() {
global $us_template_directory_uri;
wp_enqueue_style( 'us_js_composer_front', $us_template_directory_uri . '/framework/plugins-support/js_composer/css/us_frontend_editor.css' );
}
}
if ( is_admin() AND us_get_option( 'disable_extra_vc', 1 ) ) {
// Removing grid elements
add_action( 'admin_menu', 'us_remove_vc_grid_elements_submenu' );
function us_remove_vc_grid_elements_submenu() {
remove_submenu_page( VC_PAGE_MAIN_SLUG, 'edit.php?post_type=vc_grid_item' );
}
}
// Disable Frontend Editor for Page Blocks
add_action( 'current_screen', 'us_disable_frontend_for_page_blocks' );
// Disable Icon Picker assets
if ( us_get_option( 'disable_extra_vc', 1 ) ) {
remove_action( 'vc_backend_editor_enqueue_js_css', 'vc_iconpicker_editor_jscss' );
remove_action( 'vc_frontend_editor_enqueue_js_css', 'vc_iconpicker_editor_jscss' );
}
do_action( 'us_after_js_composer_mappings' );
}
add_action( 'init', 'us_vc_init_shortcodes', 11 );
function us_vc_init_shortcodes() {
if ( ! function_exists( 'vc_mode' ) OR ! function_exists( 'vc_map' ) OR ! function_exists( 'vc_remove_element' ) ) {
return;
}
$shortcodes_config = us_config( 'shortcodes', array(), TRUE );
// Mapping WPBakery Page Builder backend behaviour for used shortcodes
if ( vc_mode() != 'page' ) {
function us_vc_param( $param_name, $param ) {
$related_types = array(
'text' => 'textfield',
'slider' => 'textfield',
'textarea' => 'textarea',
'select' => 'dropdown',
'radio' => 'dropdown',
'color' => 'colorpicker',
'link' => 'vc_link',
'icon' => 'us_icon',
'switch' => 'checkbox',
'checkboxes' => 'checkbox',
'upload' => 'attach_image',
'editor' => 'textarea_html',
'html' => 'textarea_raw_html',
'group' => 'param_group',
'wrapper_start' => 'param_to_delete',
'wrapper_end' => 'param_to_delete',
'heading' => 'param_to_delete',
'ult_param_heading' => 'ult_param_heading',
'autocomplete' => 'autocomplete',
'us_grid_layout' => 'us_grid_layout',
'css_editor' => 'css_editor',
'design_options' => 'us_design_options',
);
$type = ( isset( $param['type'] ) AND isset( $related_types[ $param['type'] ] ) ) ? $related_types[ $param['type'] ] : 'textfield';
if ( $type == 'param_to_delete' ) {
return NULL;
}
$attributes_with_prefixes = array(
'title',
'description',
'options',
'classes',
'cols',
'std',
'show_if',
);
foreach ( $attributes_with_prefixes as $attribute ) {
if ( isset( $param[ 'shortcode_' . $attribute ] ) ) {
$param[ $attribute ] = $param[ 'shortcode_' . $attribute ];
}
}
if ( $param['type'] == 'checkboxes' AND ! empty( $param['std'] ) AND is_array( $param['std'] ) ) {
$param['std'] = implode( ',', $param['std'] );
}
$vc_param = array(
'type' => $type,
'param_name' => $param_name,
'heading' => isset( $param['title'] ) ? $param['title'] : '',
'description' => isset( $param['description'] ) ? $param['description'] : '',
'std' => isset( $param['std'] ) ? $param['std'] : '',
'holder' => isset( $param['holder'] ) ? $param['holder'] : '',
'admin_label' => isset( $param['admin_label'] ) ? $param['admin_label'] : FALSE,
'settings' => isset( $param['settings'] ) ? $param['settings'] : NULL,
);
// Add option CSS classes based on "cols" param
if ( isset( $param['cols'] ) ) {
if ( $param['cols'] == 2 ) {
$vc_param['edit_field_class'] = 'vc_col-sm-6';
} elseif ( $param['cols'] == 3 ) {
$vc_param['edit_field_class'] = 'vc_col-sm-4';
}
} elseif ( isset( $param['classes'] ) AND ! empty( $param['classes'] ) ) {
$vc_param['edit_field_class'] = $param['classes'];
}
if ( isset( $param['group'] ) AND ! empty( $param['group'] ) ) {
$vc_param['group'] = $param['group'];
}
if ( $vc_param['type'] == 'attach_image' AND isset( $param['is_multiple'] ) AND $param['is_multiple'] ) {
$vc_param['type'] = 'attach_images';
}
if ( $vc_param['type'] == 'dropdown' AND isset( $param['options'] ) ) {
$vc_param['value'] = array();
foreach ( $param['options'] as $option_val => $option_name ) {
$vc_param['value'][ $option_name . ' ' ] = $option_val;
}
}
if ( $vc_param['type'] == 'checkbox' ) {
if ( isset( $param['options'] ) ) {
$vc_param['value'] = array_flip( $param['options'] );
} elseif ( isset( $param['switch_text'] ) ) {
$vc_param['value'] = array( $param['switch_text'] => TRUE );
}
if ( is_array( $vc_param['std'] ) ) {
$vc_param['std'] = implode( ',', $vc_param['std'] );
} elseif ( $vc_param['std'] === TRUE ) {
$vc_param['std'] = '1';
} elseif ( $vc_param['std'] === FALSE ) {
$vc_param['std'] = '';
}
}
// Proper dependency rules
if ( isset( $param['show_if'] ) AND count( $param['show_if'] ) == 3 ) {
$vc_param['dependency'] = array(
'element' => $param['show_if'][0],
);
if ( $param['show_if'][1] == '=' AND $param['show_if'][2] == '' ) {
$vc_param['dependency']['is_empty'] = TRUE;
} elseif ( $param['show_if'][1] == '!=' AND $param['show_if'][2] == '' ) {
$vc_param['dependency']['not_empty'] = TRUE;
} elseif ( $param['show_if'][1] == '!=' AND ! empty( $param['show_if'][2] ) ) {
$vc_param['dependency']['value_not_equal_to'] = $param['show_if'][2];
} else {
$vc_param['dependency']['value'] = $param['show_if'][2];
}
}
// Proper group rules
if ( $vc_param['type'] == 'param_group' ) {
if ( isset( $param['params'] ) AND is_array( $param['params'] ) ) {
$group_params = $param['params'];
$param['params'] = array();
foreach ( $group_params as $group_param_name => $group_param ) {
$group_vc_param = us_vc_param( $group_param_name, $group_param );
if ( $group_vc_param != NULL ) {
$vc_param['params'][] = $group_vc_param;
}
}
}
}
return $vc_param;
}
// Adding theme elements maps
foreach ( $shortcodes_config['theme_elements'] as $elm_name ) {
$shortcode = 'us_' . $elm_name;
$elm = us_config( 'elements/' . $elm_name );
$vc_elm = array(
'name' => isset( $elm['title'] ) ? $elm['title'] : $shortcode,
'base' => $shortcode,
'description' => isset( $elm['description'] ) ? $elm['description'] : '',
'class' => 'elm-' . $shortcode,
'category' => isset( $elm['category'] ) ? $elm['category'] : us_translate( 'Content', 'js_composer' ),
'icon' => isset( $elm['icon'] ) ? $elm['icon'] : '',
'weight' => 370, // all elements go after "Text Block" element
'admin_enqueue_js' => isset( $elm['admin_enqueue_js'] ) ? $elm['admin_enqueue_js'] : NULL,
'js_view' => isset( $elm['js_view'] ) ? $elm['js_view'] : NULL,
'as_parent' => isset( $elm['as_parent'] ) ? $elm['as_parent'] : NULL,
'show_settings_on_create' => isset( $elm['show_settings_on_create'] ) ? $elm['show_settings_on_create'] : NULL,
'params' => array(),
);
if ( isset( $elm['params'] ) AND is_array( $elm['params'] ) ) {
foreach ( $elm['params'] as $param_name => &$param ) {
if ( isset( $param['context'] ) AND is_array( $param['context'] ) AND ! in_array( 'shortcode', $param['context'] ) ) {
continue;
}
$vc_param = us_vc_param( $param_name, $param );
if ( $vc_param != NULL ) {
$vc_elm['params'][] = $vc_param;
}
}
}
vc_map( $vc_elm );
}
// Include custom map files based on shortcodes name. Only for vc_ shortcodes
global $us_template_directory;
foreach ( $shortcodes_config['modified'] as $shortcode => $config ) {
if ( file_exists( $us_template_directory . '/plugins-support/js_composer/map/' . $shortcode . '.php' ) ) {
require $us_template_directory . '/plugins-support/js_composer/map/' . $shortcode . '.php';
} elseif ( file_exists( $us_template_directory . '/framework/plugins-support/js_composer/map/' . $shortcode . '.php' ) ) {
require $us_template_directory . '/framework/plugins-support/js_composer/map/' . $shortcode . '.php';
}
}
}
if ( us_get_option( 'disable_extra_vc', 1 ) ) {
// Removing the elements that are not supported at the moment by the theme
if ( is_admin() ) {
foreach ( $shortcodes_config['disabled'] as $shortcode ) {
vc_remove_element( $shortcode );
}
} else {
add_action( 'template_redirect', 'us_vc_disable_extra_sc', 100 );
}
}
}
add_action( 'current_screen', 'us_disable_post_type_specific_elements' );
function us_disable_post_type_specific_elements() {
if ( function_exists( 'get_current_screen' ) ) {
$screen = get_current_screen();
$shortcodes_config = us_config( 'shortcodes', array(), TRUE );
foreach ( $shortcodes_config['theme_elements'] as $elm_name ) {
$shortcode = 'us_' . $elm_name;
$elm = us_config( 'elements/' . $elm_name );
if ( isset( $elm['shortcode_post_type'] ) ) {
if ( ! in_array( $screen->post_type, $elm['shortcode_post_type'] ) ) {
vc_remove_element( $shortcode );
}
}
}
}
}
function us_disable_frontend_for_page_blocks() {
if ( function_exists( 'get_current_screen' ) ) {
$screen = get_current_screen();
if ( $screen->post_type == 'us_page_block' ) {
vc_disable_frontend();
}
}
}
function us_vc_disable_extra_sc() {
$disabled_shortcodes = us_config( 'shortcodes.disabled', array() );
foreach ( $disabled_shortcodes as $shortcode ) {
remove_shortcode( $shortcode );
}
}
// Disable redirect to VC welcome page
remove_action( 'init', 'vc_page_welcome_redirect' );
add_action( 'after_setup_theme', 'us_vc_init_vendor_woocommerce', 99 );
function us_vc_init_vendor_woocommerce() {
remove_action( 'wp_enqueue_scripts', 'vc_woocommerce_add_to_cart_script' );
}
// Add autocomplete for us_grid
add_action( 'vc_after_mapping', 'us_grid_map_shortcodes' );
function us_grid_map_shortcodes() {
add_filter( 'vc_autocomplete_us_carousel_ids_callback', 'us_grid_ids_autocomplete_suggester', 10, 1 );
add_filter( 'vc_autocomplete_us_grid_ids_callback', 'us_grid_ids_autocomplete_suggester', 10, 1 );
function us_grid_ids_autocomplete_suggester( $query ) {
global $wpdb;
$item_id = (int) $query;
// Fetching the available post types to choose from
$available_posts_types = us_grid_available_post_types();
if ( count( $available_posts_types ) > 0 ) {
$available_posts_types = array_keys( $available_posts_types );
$where_post_type = " a.post_type IN ('" . implode( "','", $available_posts_types ) . "') AND ";
} else {
$where_post_type = "";
}
$post_meta_infos = $wpdb->get_results(
$wpdb->prepare(
"SELECT a.ID AS id, a.post_title AS title, a.post_type AS post_type
FROM {$wpdb->posts} AS a
WHERE post_status = 'publish' AND {$where_post_type} ( a.ID = '%d' OR a.post_title LIKE '%%%s%%' )", $item_id > 0 ? $item_id : - 1, stripslashes( $query )
), ARRAY_A
);
$results = array();
if ( is_array( $post_meta_infos ) AND ! empty( $post_meta_infos ) ) {
foreach ( $post_meta_infos as $value ) {
$data = array();
$data['value'] = $value['id'];
$post_type = get_post_type_object( $value['post_type'] );
if ( strlen( $value['title'] ) > 0 ) {
$post_title = $value['title'];
} else {
$post_title = us_translate( '(no title)' );
}
$post_title .= ' <i>' . $post_type->labels->singular_name . '</i>';
$data['label'] = $post_title;
$results[] = $data;
}
}
return $results;
}
add_filter( 'vc_autocomplete_us_carousel_ids_render', 'us_grid_ids_render', 10, 1 );
add_filter( 'vc_autocomplete_us_grid_ids_render', 'us_grid_ids_render', 10, 1 );
function us_grid_ids_render( $query ) {
$query = trim( $query['value'] ); // get value from requested
if ( ! empty( $query ) ) {
// get post
$post_object = get_post( (int) $query );
if ( is_object( $post_object ) ) {
$post_type = get_post_type_object( $post_object->post_type );
if ( strlen( $post_object->post_title ) > 0 ) {
$post_title = $post_object->post_title;
} else {
$post_title = us_translate( '(no title)' );
}
$post_title .= ' <i>' . $post_type->labels->singular_name . '</i>';
$post_id = $post_object->ID;
$data = array();
$data['value'] = $post_id;
$data['label'] = $post_title;
return ! empty( $data ) ? $data : FALSE;
}
return FALSE;
}
return FALSE;
}
}
add_filter( 'us_page_block_the_content', 'us_VC_fixPContent', 11 );
function us_VC_fixPContent( $content = NULL ) {
if ( $content ) {
$s = array(
'/' . preg_quote( '</div>', '/' ) . '[\s\n\f]*' . preg_quote( '</p>', '/' ) . '/i',
'/' . preg_quote( '<p>', '/' ) . '[\s\n\f]*' . preg_quote( '<div ', '/' ) . '/i',
'/' . preg_quote( '<p>', '/' ) . '[\s\n\f]*' . preg_quote( '<section ', '/' ) . '/i',
'/' . preg_quote( '</section>', '/' ) . '[\s\n\f]*' . preg_quote( '</p>', '/' ) . '/i',
);
$r = array(
'</div>',
'<div ',
'<section ',
'</section>',
);
$content = preg_replace( $s, $r, $content );
return $content;
}
return NULL;
}
// Hide activation notice
add_action( 'admin_notices', 'us_hide_js_composer_activation_notice', 100 );
function us_hide_js_composer_activation_notice() {
?>
<script>
( function( $ ) {
var setCookie = function( c_name, value, exdays ) {
var exdate = new Date();
exdate.setDate( exdate.getDate() + exdays );
var c_value = encodeURIComponent( value ) + ( ( null === exdays ) ? "" : "; expires=" + exdate.toUTCString() );
document.cookie = c_name + "=" + c_value;
};
setCookie( 'vchideactivationmsg_vc11', '100', 30 );
$( '#vc_license-activation-notice' ).remove();
} )( window.jQuery );
</script>
<?php
}
// Set Backend Editor as default for post types
$list = array(
'page',
'us_portfolio',
'us_page_block',
);
vc_set_default_editor_post_types( $list );
// Remove Backend Editor for Headers & Grid Layouts
add_filter( 'vc_settings_exclude_post_type', 'us_vc_settings_exclude_post_type' );
function us_vc_settings_exclude_post_type( $types ) {
$types = array(
'us_header',
'us_grid_layout',
);
return $types;
}
add_filter( 'vc_is_valid_post_type_be', 'us_vc_is_valid_post_type_be', 10, 2 );
function us_vc_is_valid_post_type_be( $result, $type ) {
if ( in_array( $type, array( 'us_header', 'us_grid_layout', ) ) ) {
$result = FALSE;
}
return $result;
}
add_action( 'current_screen', 'us_header_vc_check_post_type_validation_fix' );
function us_header_vc_check_post_type_validation_fix( $current_screen ) {
global $pagenow;
if ( $pagenow == 'post.php' AND $current_screen->post_type == 'us_header' ) {
add_filter( 'vc_check_post_type_validation', '__return_false', 12 );
}
}
global $us_template_directory_uri;
if ( ! function_exists( 'us_design_options_settings_field' ) ) {
vc_add_shortcode_param( 'us_design_options', 'us_design_options_settings_field', $us_template_directory_uri . '/framework/plugins-support/js_composer/js/us_design_options.js' );
function us_design_options_settings_field( $settings, $value ) {
$directions = array( 'top', 'right', 'bottom', 'left' );
$with_position = TRUE; // TODO: should we add Position setting?
$output = '<div class="usof-design">';
$output .= '<input name="' . esc_attr( $settings['param_name'] ) . '" class="us-design-options-value wpb_vc_param_value wpb-textinput ' . esc_attr( $settings['param_name'] ) . ' ' . esc_attr( $settings['type'] ) . '_field' . '" type="hidden" value="' . esc_attr( $value ) . '">';
$output .= '<div class="usof-design-control for_default">';
$css_values = array();
$value_pairs = explode( ';', $value );
if ( is_array( $value_pairs ) AND count( $value_pairs ) > 0 ) {
foreach ( $value_pairs as $value_pair ) {
$value_pair_arr = explode( ':', $value_pair );
if ( is_array( $value_pair_arr ) AND count( $value_pair_arr ) == 2 ) {
$_css_name = trim( str_replace( '-', '_', $value_pair_arr[0] ) );
$_css_value = trim( $value_pair_arr[1] );
if ( $_css_name == 'position' ) {
continue;
}
if ( in_array( $_css_name, array( 'top', 'bottom', 'left', 'right', ) ) ) {
$_css_name = 'position_' . $_css_name;
}
$css_values[ $_css_name ] = $_css_value;
}
}
}
if ( $with_position ) {
// Checking if position is enabled
$pos_enabled = FALSE;
foreach ( $directions as $part ) {
$subname = 'position_' . $part;
if ( isset( $css_values[ $subname ] ) AND $css_values[ $subname ] !== '' ) {
$pos_enabled = TRUE;
break;
}
}
// Positioning Switcher
$output .= '<div class="usof-switcher">';
$output .= '<input type="hidden" name="pos_abs" value="0" />';
$output .= '<input type="checkbox" id="usdo_pos_abs" name="pos_abs" value="1"' . ( $pos_enabled ? ' checked="checked"' : '' ) . '>';
$output .= '<label for="usdo_pos_abs">';
$output .= '<span class="usof-switcher-box"><i></i></span>';
$output .= '<span class="usof-switcher-text">' . __( 'Absolute Positioning', 'us' ) . '</span>';
$output .= '</label></div>';
// Position
$output .= '<div class="usof-design-position' . ( $pos_enabled ? '' : ' pos_off' ) . '">';
$output .= '<div class="usof-design-attr">Position</div>';
foreach ( $directions as $part ) {
$subname = 'position_' . $part;
$subvalue = isset( $css_values[ $subname ] ) ? $css_values[ $subname ] : '';
if ( preg_match( '~^\d+$~', $subvalue ) ) {
$subvalue = $subvalue . 'px';
}
$output .= '<input class="us-design-options-input for-position ' . $part . '" type="text" name="' . esc_attr( $subname ) . '" value="' . esc_attr( $subvalue ) . '">';
}
}
// Margin
$output .= '<div class="usof-design-margin">';
$output .= '<div class="usof-design-attr">Margin</div>';
foreach ( $directions as $part ) {
$subname = 'margin_' . $part;
$subvalue = isset( $css_values[ $subname ] ) ? $css_values[ $subname ] : '';
if ( preg_match( '~^\d+$~', $subvalue ) ) {
$subvalue = $subvalue . 'px';
}
$output .= '<input class="us-design-options-input ' . $part . '" type="text" name="' . esc_attr( $subname ) . '" value="' . esc_attr( $subvalue ) . '">';
}
// Border
$output .= '<div class="usof-design-border">';
$output .= '<div class="usof-design-attr">Border</div>';
foreach ( $directions as $part ) {
$subname = 'border_' . $part;
$subvalue = isset( $css_values[ $subname ] ) ? $css_values[ $subname ] : '';
if ( preg_match( '~^\d+$~', $subvalue ) ) {
$subvalue = $subvalue . 'px';
}
$output .= '<input class="us-design-options-input ' . $part . '" type="text" name="' . esc_attr( $subname ) . '" value="' . esc_attr( $subvalue ) . '">';
}
// Padding
$output .= '<div class="usof-design-padding">';
$output .= '<div class="usof-design-attr">Padding</div>';
foreach ( $directions as $part ) {
$subname = 'padding_' . $part;
$subvalue = isset( $css_values[ $subname ] ) ? $css_values[ $subname ] : '';
if ( preg_match( '~^\d+$~', $subvalue ) ) {
$subvalue = $subvalue . 'px';
}
$output .= '<input class="us-design-options-input ' . $part . '" type="text" name="' . esc_attr( $subname ) . '" value="' . esc_attr( $subvalue ) . '">';
}
$output .= '</div>';
// .usof-design-border
$output .= '</div>';
// .usof-design-margin
$output .= '</div>';
if ( $with_position ) {
// .usof-design-position
$output .= '</div>';
}
// .usof-design-control
$output .= '</div>';
$output .= '</div>';
return $output;
}
}
// Add parameter for icon selection
if ( ! function_exists( 'us_icon_settings_field' ) ) {
vc_add_shortcode_param( 'us_icon', 'us_icon_settings_field', $us_template_directory_uri . '/framework/plugins-support/js_composer/js/us_icon.js' );
function us_icon_settings_field( $settings, $value ) {
$icon_sets = us_config( 'icon-sets', array() );
reset( $icon_sets );
$value = trim( $value );
if ( ! preg_match( '/(fas|far|fal|fab|material)\|[a-z0-9-]/i', $value ) ) {
$value = $settings['std'];
}
$select_value = $input_value = '';
$value_arr = explode( '|', $value );
if ( count( $value_arr ) == 2 ) {
$select_value = $value_arr[0];
$input_value = $value_arr[1];
}
if ( empty( $select_value ) ) {
$select_value = key( $icon_sets );
}
ob_start();
?>
<div class="us-icon">
<input name="<?php echo esc_attr( $settings['param_name'] ); ?>"
class="us-icon-value wpb_vc_param_value wpb-textinput <?php echo esc_attr( $settings['param_name'] ) . ' ' . esc_attr( $settings['type'] ) . '_field'; ?>"
type="hidden" value="<?php echo esc_attr( $value ); ?>">
<select name="icon_set" class="us-icon-select">
<?php foreach ( $icon_sets as $set_slug => $set_info ) { ?>
<option value="<?php echo $set_slug ?>"<?php if ( $select_value == $set_slug ) {
echo ' selected="selected"';
} ?> data-info-url="<?php echo $set_info['set_url'] ?>"><?php echo $set_info['set_name'] ?></option>
<?php } ?>
</select>
<div class="us-icon-preview">
<?php
$icon_preview_html = preg_replace( '/fa-\dx/', '', us_prepare_icon_tag( $value ) );
echo ( $icon_preview_html ) ? $icon_preview_html : '<i class="material-icons"></i>';
?>
</div>
<div class="us-icon-input">
<input name="icon_name" class="wpb-textinput us-icon-text" type="text"
value="<?php echo esc_attr( $input_value ); ?>">
</div>
</div>
<div class="us-icon-desc">
<?php echo '<a class="us-icon-set-link" href="' . $icon_sets[ $select_value ]['set_url'] . '" target="_blank">' . __( 'Enter icon name from the list', 'us' ) . '</a>. ' . __( 'Examples:', 'us' ) . ' <span class="usof-example">star</span>, <span class="usof-example">edit</span>, <span class="usof-example">code</span>'; ?>
</div>
<?php
$result = ob_get_clean();
return $result;
}
}
// Add parameter for Grid Layout selection
if ( ! function_exists( 'us_grid_layout_field' ) ) {
vc_add_shortcode_param( 'us_grid_layout', 'us_grid_layout_field', $us_template_directory_uri . '/framework/plugins-support/js_composer/js/us_grid_layout.js' );
function us_grid_layout_field( $settings, $value ) {
$templates_config = us_config( 'grid-templates', array(), TRUE );
$custom_layouts = array_flip( us_get_posts_titles_for( 'us_grid_layout' ) );
ob_start();
?>
<div class="us-grid-layout">
<select name="<?php echo esc_attr( $settings['param_name'] ); ?>"
class="wpb_vc_param_value wpb-input wpb-select <?php echo esc_attr( $settings['param_name'] ) ?> dropdown us-grid-layout-select">
<optgroup label="<?php _e( 'Grid Layouts', 'us' ); ?>">
<?php foreach ( $custom_layouts as $title => $id ) { ?>
<option value="<?php echo $id ?>"<?php if ( $value == $id ) {
echo ' selected="selected"';
} ?>
data-edit-url="<?php echo admin_url( '/post.php?post=' . $id . '&action=edit' ); ?>"><?php echo $title; ?></option>
<?php }
$current_tmpl_group = '';
foreach ( $templates_config as $template_name => $template ) {
if ( ! empty( $template['group'] ) AND $current_tmpl_group != $template['group'] ) {
$current_tmpl_group = $template['group'];
?>
</optgroup>
<optgroup label="<?php echo $template['group']; ?>">
<?php
}
?>
<option value="<?php echo $template_name ?>"<?php if ( $value == $template_name ) {
echo ' selected="selected"';
} ?>><?php echo $template['title']; ?></option>
<?php
}
?>
</optgroup>
</select>
<div class="us-grid-layout-desc-edit">
<?php echo sprintf( _x( '%sEdit selected%s or %screate a new one%s.', 'Grid Layout', 'us' ), '<a href="#" class="edit-link" target="_blank">', '</a>', '<a href="' . admin_url() . 'post-new.php?post_type=us_grid_layout" target="_blank">', '</a>' ); ?>
</div>
<div class="us-grid-layout-desc-add">
<a href="<?php admin_url() ?>post-new.php?post_type=us_grid_layout"
target="_blank"><?php _e( 'Add Grid Layout', 'us' ) ?></a>.
</div>
</div>
<?php
$result = ob_get_clean();
return $result;
}
}
// Add script to fill inputs with examples from description
add_action( 'admin_enqueue_scripts', 'us_input_examples' );
function us_input_examples() {
global $pagenow;
$screen = get_current_screen();
$current_post_type = $screen->post_type;
$excluded_post_types = array(
'us_header',
'us_grid_layout',
);
if ( $pagenow != 'post.php' OR in_array( $current_post_type, $excluded_post_types ) ) {
return;
}
global $us_template_directory_uri;
wp_enqueue_script( 'us_input_examples_vc', $us_template_directory_uri . '/framework/plugins-support/js_composer/js/us_input_examples.js', array( 'jquery' ), US_THEMEVERSION );
}
// Add Theme Color Palette to Iris color pickers, mostly used by WPBakery Page Builder
add_action( 'admin_print_scripts', 'us_override_iris_colorpalette', 100 );
function us_override_iris_colorpalette() {
$screen = get_current_screen();
if ( wp_script_is( 'wp-color-picker', 'enqueued' ) AND $screen->id != 'toplevel_page_us-theme-options' ) {
$palette = get_option( 'usof_color_palette_' . US_THEMENAME );
if ( is_array( $palette ) AND ! empty( $palette ) ) {
$json_palette = array();
$default_color = "#ffffff";
$palette_length = count( $palette );
// Convert all colors to HEX since Page Builder doesn't support transparency in its palette
foreach ( $palette as $color ) {
$color = us_gradient2hex( $color );
$json_palette[] = us_rgba2hex( $color );
}
// Fill till it comes 8 colors
if ( $palette_length !== 8 ) {
for ( $i = 0; $i < 8 - $palette_length; $i ++ ) {
$json_palette[] = $default_color;
}
}
$json_palette = json_encode( $json_palette );
?>
<script>
// Add palette to WordPress iris color pickers
jQuery( document ).ready( function( $ ) {
if ( ! $.wp ) {
return;
}
$.wp.wpColorPicker.prototype.options = {
palettes: <?php echo $json_palette; ?>, width: 255, hide: true,
};
} );
</script>
<?php
}
}
}
// Add design options CSS for shortcodes in custom pages and page blocks
function us_add_page_shortcodes_custom_css( $id ) {
global $wp_query, $vc_manager;
$wp_query = new WP_Query(
array(
'p' => $id,
'post_type' => 'any',
)
);
if ( ! empty( $vc_manager ) AND is_object( $vc_manager ) ) {
$vc_manager->vc()->addPageCustomCss( $id );
$vc_manager->vc()->addShortcodesCustomCss( $id );
}
}
// Add image preview for Image shortcode
if ( ! class_exists( 'WPBakeryShortCode_us_image' ) ) {
class WPBakeryShortCode_us_image extends WPBakeryShortCode {
public function singleParamHtmlHolder( $param, $value ) {
$output = '';
// Compatibility fixes
$param_name = isset( $param['param_name'] ) ? $param['param_name'] : '';
$type = isset( $param['type'] ) ? $param['type'] : '';
$class = isset( $param['class'] ) ? $param['class'] : '';
if ( $type == 'attach_image' AND $param_name == 'image' ) {
$output .= '<input type="hidden" class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" value="' . $value . '" />';
$element_icon = $this->settings( 'icon' );
$img = wpb_getImageBySize(
array(
'attach_id' => (int) preg_replace( '/[^\d]/', '', $value ),
'thumb_size' => 'thumbnail',
)
);
$logo_html = '';
if ( $img ) {
$logo_html .= $img['thumbnail'];
} else {
$logo_html .= '<img width="150" height="150" class="attachment-thumbnail icon-wpb-single-image vc_element-icon" data-name="' . $param_name . '" alt="' . $param_name . '" style="display: none;" />';
}
$logo_html .= '<span class="no_image_image vc_element-icon' . ( ! empty( $element_icon ) ? ' ' . $element_icon : '' ) . ( $img && ! empty( $img['p_img_large'][0] ) ? ' image-exists' : '' ) . '" />';
$this->setSettings( 'logo', $logo_html );
$output .= $this->outputTitleTrue( $this->settings['name'] );
} elseif ( ! empty( $param['holder'] ) ) {
if ( $param['holder'] == 'input' ) {
$output .= '<' . $param['holder'] . ' readonly="true" class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" value="' . $value . '">';
} elseif ( in_array( $param['holder'], array( 'img', 'iframe' ) ) ) {
$output .= '<' . $param['holder'] . ' class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" src="' . $value . '">';
} elseif ( $param['holder'] !== 'hidden' ) {
$output .= '<' . $param['holder'] . ' class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '">' . $value . '</' . $param['holder'] . '>';
}
}
if ( ! empty( $param['admin_label'] ) && $param['admin_label'] === TRUE ) {
$output .= '<span class="vc_admin_label admin_label_' . $param['param_name'] . ( empty( $value ) ? ' hidden-label' : '' ) . '"><label>' . __( $param['heading'], 'js_composer' ) . '</label>: ' . $value . '</span>';
}
return $output;
}
protected function outputTitle( $title ) {
return '';
}
protected function outputTitleTrue( $title ) {
return '<h4 class="wpb_element_title">' . __( $title, 'us' ) . ' ' . $this->settings( 'logo' ) . '</h4>';
}
}
}
// Add image preview for Person shortcode
if ( ! class_exists( 'WPBakeryShortCode_us_person' ) ) {
class WPBakeryShortCode_us_person extends WPBakeryShortCode {
public function singleParamHtmlHolder( $param, $value ) {
$output = '';
// Compatibility fixes
$param_name = isset( $param['param_name'] ) ? $param['param_name'] : '';
$type = isset( $param['type'] ) ? $param['type'] : '';
$class = isset( $param['class'] ) ? $param['class'] : '';
if ( $type == 'attach_image' AND $param_name == 'image' ) {
$output .= '<input type="hidden" class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" value="' . $value . '" />';
$element_icon = $this->settings( 'icon' );
$img = wpb_getImageBySize(
array(
'attach_id' => (int) preg_replace( '/[^\d]/', '', $value ),
'thumb_size' => 'thumbnail',
)
);
$logo_html = '';
if ( $img ) {
$logo_html .= $img['thumbnail'];
} else {
$logo_html .= '<img width="150" height="150" class="attachment-thumbnail ' . $element_icon . ' vc_element-icon" data-name="' . $param_name . '" alt="' . $param_name . '" style="display: none;" />';
}
$logo_html .= '<span class="no_image_image vc_element-icon ' . $element_icon . ( $img AND ! empty( $img['p_img_large'][0] ) ? ' image-exists' : '' ) . '" />';
$this->setSettings( 'logo', $logo_html );
$output .= $this->outputTitleTrue( $this->settings['name'] );
} elseif ( ! empty( $param['holder'] ) ) {
if ( $param['holder'] == 'input' ) {
$output .= '<' . $param['holder'] . ' readonly="true" class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" value="' . $value . '">';
} elseif ( in_array( $param['holder'], array( 'img', 'iframe' ) ) ) {
$output .= '<' . $param['holder'] . ' class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '" src="' . $value . '">';
} elseif ( $param['holder'] !== 'hidden' ) {
$output .= '<' . $param['holder'] . ' class="wpb_vc_param_value ' . $param_name . ' ' . $type . ' ' . $class . '" name="' . $param_name . '">' . $value . '</' . $param['holder'] . '>';
}
}
if ( ! empty( $param['admin_label'] ) AND $param['admin_label'] === TRUE ) {
$output .= '<span class="vc_admin_label admin_label_' . $param['param_name'] . ( empty( $value ) ? ' hidden-label' : '' ) . '"><label>' . __( $param['heading'], 'js_composer' ) . '</label>: ' . $value . '</span>';
}
return $output;
}
protected function outputTitle( $title ) {
return '';
}
protected function outputTitleTrue( $title ) {
return '<h4 class="wpb_element_title">' . __( $title, 'us' ) . ' ' . $this->settings( 'logo' ) . '</h4>';
}
}
}
// Add wrapper behavior for us_hwrapper shortcode
if ( ! class_exists( 'WPBakeryShortCode_us_hwrapper' ) ) {
class WPBakeryShortCode_us_hwrapper extends WPBakeryShortCodesContainer {
}
}
@@ -0,0 +1,113 @@
<?php defined( 'ABSPATH' ) OR die( 'This script cannot be accessed directly.' );
/**
* Extending shortcode: vc_column
*
* @var $shortcode string Current shortcode name
* @var $config array Shortcode's config
*
* @param $config ['atts'] array Shortcode's attributes and default values
*/
vc_remove_param( 'vc_column', 'css_animation' );
vc_remove_param( 'vc_column', 'video_bg' );
vc_remove_param( 'vc_column', 'video_bg_url' );
vc_remove_param( 'vc_column', 'video_bg_parallax' );
vc_remove_param( 'vc_column', 'parallax' );
vc_remove_param( 'vc_column', 'parallax_image' );
vc_remove_param( 'vc_column', 'parallax_speed_video' );
vc_remove_param( 'vc_column', 'parallax_speed_bg' );
vc_update_shortcode_param(
'vc_column', array(
'param_name' => 'width',
'description' => '',
'value' => array(
'1/12 — 8.33%' => '1/12',
'1/6 — 16.66%'=> '1/6',
'1/5 — 20%'=> '1/5',
'1/4 — 25%'=> '1/4',
'1/3 — 33.33%'=> '1/3',
'2/5 — 40%'=> '2/5',
'5/12 — 41.66%'=> '5/12',
'1/2 — 50%'=> '1/2',
'7/12 — 58.33%'=> '7/12',
'3/5 — 60%'=> '3/5',
'2/3 — 66.66%'=> '2/3',
'3/4 — 75%'=> '3/4',
'4/5 — 80%'=> '4/5',
'5/6 — 83.33%'=> '5/6',
'11/12 — 91.66%'=> '11/12',
'1/1 — 100%'=> '1/1',
),
)
);
vc_update_shortcode_param(
'vc_column', array(
'param_name' => 'offset',
'heading' => '',
)
);
vc_update_shortcode_param(
'vc_column', array(
'param_name' => 'el_class',
'description' => '',
'edit_field_class' => 'vc_col-sm-6',
'weight' => 20,
'group' => us_translate( 'Design Options', 'js_composer' ),
)
);
vc_update_shortcode_param(
'vc_column', array(
'param_name' => 'el_id',
'description' => '',
'edit_field_class' => 'vc_col-sm-6',
'group' => us_translate( 'Design Options', 'js_composer' ),
)
);
vc_add_params( 'vc_column', array(
array(
'param_name' => 'link',
'heading' => us_translate( 'Link' ),
'type' => 'vc_link',
'std' => $config['atts']['link'],
'weight' => 40,
),
array(
'param_name' => 'text_color',
'heading' => __( 'Text Color', 'us' ),
'type' => 'colorpicker',
'std' => $config['atts']['text_color'],
'weight' => 30,
),
array(
'param_name' => 'animate',
'heading' => __( 'Animation', 'us' ),
'description' => __( 'Selected animation will be applied to this element, when it enters into the browsers viewport.', 'us' ),
'type' => 'dropdown',
'value' => array(
us_translate( 'None' ) => '',
__( 'Fade', 'us' ) => 'fade',
__( 'Appear From Center', 'us' ) => 'afc',
__( 'Appear From Left', 'us' ) => 'afl',
__( 'Appear From Right', 'us' ) => 'afr',
__( 'Appear From Bottom', 'us' ) => 'afb',
__( 'Appear From Top', 'us' ) => 'aft',
__( 'Height From Center', 'us' ) => 'hfc',
__( 'Width From Center', 'us' ) => 'wfc',
),
'std' => $config['atts']['animate'],
'admin_label' => TRUE,
'weight' => 20,
),
array(
'param_name' => 'animate_delay',
'heading' => __( 'Animation Delay (in seconds)', 'us' ),
'type' => 'textfield',
'std' => $config['atts']['animate_delay'],
'dependency' => array( 'element' => 'animate', 'not_empty' => TRUE ),
'admin_label' => TRUE,
'weight' => 10,
),
)
);
@@ -0,0 +1,105 @@
<?php defined( 'ABSPATH' ) OR die( 'This script cannot be accessed directly.' );
/**
* Extending shortcode: vc_column_inner
*
* @var $shortcode string Current shortcode name
* @var $config array Shortcode's config
*
* @param $config ['atts'] array Shortcode's attributes and default values
*/
vc_update_shortcode_param(
'vc_column_inner', array(
'param_name' => 'width',
'description' => '',
'value' => array(
'1/12 — 8.33%' => '1/12',
'1/6 — 16.66%'=> '1/6',
'1/5 — 20%'=> '1/5',
'1/4 — 25%'=> '1/4',
'1/3 — 33.33%'=> '1/3',
'2/5 — 40%'=> '2/5',
'5/12 — 41.66%'=> '5/12',
'1/2 — 50%'=> '1/2',
'7/12 — 58.33%'=> '7/12',
'3/5 — 60%'=> '3/5',
'2/3 — 66.66%'=> '2/3',
'3/4 — 75%'=> '3/4',
'4/5 — 80%'=> '4/5',
'5/6 — 83.33%'=> '5/6',
'11/12 — 91.66%'=> '11/12',
'1/1 — 100%'=> '1/1',
),
)
);
vc_update_shortcode_param(
'vc_column_inner', array(
'param_name' => 'offset',
'heading' => '',
)
);
vc_update_shortcode_param(
'vc_column_inner', array(
'param_name' => 'el_class',
'description' => '',
'edit_field_class' => 'vc_col-sm-6',
'weight' => 20,
'group' => us_translate( 'Design Options', 'js_composer' ),
)
);
vc_update_shortcode_param(
'vc_column_inner', array(
'param_name' => 'el_id',
'description' => '',
'edit_field_class' => 'vc_col-sm-6',
'group' => us_translate( 'Design Options', 'js_composer' ),
)
);
vc_add_params( 'vc_column_inner', array(
array(
'param_name' => 'link',
'heading' => us_translate( 'Link' ),
'type' => 'vc_link',
'std' => $config['atts']['link'],
'weight' => 40,
),
array(
'param_name' => 'text_color',
'heading' => __( 'Text Color', 'us' ),
'type' => 'colorpicker',
'std' => $config['atts']['text_color'],
'weight' => 30,
),
array(
'param_name' => 'animate',
'heading' => __( 'Animation', 'us' ),
'description' => __( 'Selected animation will be applied to this element, when it enters into the browsers viewport.', 'us' ),
'type' => 'dropdown',
'value' => array(
us_translate( 'None' ) => '',
__( 'Fade', 'us' ) => 'fade',
__( 'Appear From Center', 'us' ) => 'afc',
__( 'Appear From Left', 'us' ) => 'afl',
__( 'Appear From Right', 'us' ) => 'afr',
__( 'Appear From Bottom', 'us' ) => 'afb',
__( 'Appear From Top', 'us' ) => 'aft',
__( 'Height From Center', 'us' ) => 'hfc',
__( 'Width From Center', 'us' ) => 'wfc',
),
'std' => $config['atts']['animate'],
'admin_label' => TRUE,
'weight' => 20,
),
array(
'param_name' => 'animate_delay',
'heading' => __( 'Animation Delay (in seconds)', 'us' ),
'type' => 'textfield',
'std' => $config['atts']['animate_delay'],
'dependency' => array( 'element' => 'animate', 'not_empty' => TRUE ),
'admin_label' => TRUE,
'weight' => 10,
),
)
);
@@ -0,0 +1,38 @@
<?php defined( 'ABSPATH' ) OR die( 'This script cannot be accessed directly.' );
/**
* Modifying shortcode: vc_column_text
*
* @var $shortcode string Current shortcode name
* @var $config array Shortcode's config
*/
vc_remove_param( 'vc_column_text', 'css_animation' );
vc_update_shortcode_param(
'vc_column_text', array(
'param_name' => 'content',
'heading' => '',
'weight' => 20,
)
);
vc_update_shortcode_param(
'vc_column_text', array(
'param_name' => 'el_class',
'description' => '',
'edit_field_class' => 'vc_col-sm-6',
'weight' => 10,
'group' => us_translate( 'Design Options', 'js_composer' ),
)
);
vc_update_shortcode_param(
'vc_column_text', array(
'param_name' => 'el_id',
'description' => '',
'edit_field_class' => 'vc_col-sm-6',
'group' => us_translate( 'Design Options', 'js_composer' ),
)
);
// Setting proper shortcode order in VC shortcodes listing
vc_map_update( 'vc_column_text', array( 'weight' => 380 ) );
@@ -0,0 +1,35 @@
<?php defined( 'ABSPATH' ) OR die( 'This script cannot be accessed directly.' );
/**
* Modifying shortcode: vc_custom_heading
*
* @var $shortcode string Current shortcode name
* @var $config array Shortcode's config
*/
vc_remove_param( 'vc_custom_heading', 'css_animation' );
vc_update_shortcode_param(
'vc_custom_heading', array(
'param_name' => 'el_id',
'description' => '',
'edit_field_class' => 'vc_col-sm-6',
'group' => us_translate( 'Design Options', 'js_composer' ),
)
);
vc_update_shortcode_param(
'vc_custom_heading', array(
'param_name' => 'el_class',
'description' => '',
'edit_field_class' => 'vc_col-sm-6',
'group' => us_translate( 'Design Options', 'js_composer' ),
)
);
// We are removing css_animation param for custom heading, but we are not redefying it's template, so we need to set a default value for css_animation param for front end editor compatibility
add_filter( 'vc_map_get_attributes', 'us_css_animation_default_value_for_vc_custom_heading', 100, 2 );
function us_css_animation_default_value_for_vc_custom_heading( $atts, $tag ) {
if ( $tag == 'vc_custom_heading' ) {
$atts['css_animation'] = '';
}
return $atts;
}
@@ -0,0 +1,336 @@
<?php defined( 'ABSPATH' ) OR die( 'This script cannot be accessed directly.' );
/**
* Extending shortcode: vc_row
*/
vc_remove_param( 'vc_row', 'full_width' );
vc_remove_param( 'vc_row', 'full_height' );
vc_remove_param( 'vc_row', 'content_placement' );
vc_remove_param( 'vc_row', 'video_bg' );
vc_remove_param( 'vc_row', 'video_bg_url' );
vc_remove_param( 'vc_row', 'video_bg_parallax' );
vc_remove_param( 'vc_row', 'columns_placement' );
vc_remove_param( 'vc_row', 'equal_height' );
vc_remove_param( 'vc_row', 'parallax_speed_video' );
vc_remove_param( 'vc_row', 'parallax_speed_bg' );
vc_remove_param( 'vc_row', 'css_animation' );
vc_remove_param( 'vc_row', 'rtl_reverse' );
if ( ! vc_is_page_editable() ) {
vc_remove_param( 'vc_row', 'parallax' );
vc_remove_param( 'vc_row', 'parallax_image' );
}
vc_update_shortcode_param(
'vc_row', array(
'heading' => __( 'Additional gap', 'us' ),
'param_name' => 'gap',
'type' => 'textfield',
'description' => __( 'Examples:', 'us' ) . ' <span class="usof-example">2px</span>, <span class="usof-example">1.5rem</span>, <span class="usof-example">1vw</span>',
'edit_field_class' => 'vc_col-sm-6',
'weight' => 9,
'group' => us_translate( 'Columns' ),
)
);
vc_update_shortcode_param(
'vc_row', array(
'param_name' => 'el_class',
'description' => '',
'edit_field_class' => 'vc_col-sm-6',
'weight' => 1,
'group' => us_translate( 'Design Options', 'js_composer' ),
)
);
vc_update_shortcode_param(
'vc_row', array(
'param_name' => 'el_id',
'description' => '',
'edit_field_class' => 'vc_col-sm-6',
'group' => us_translate( 'Design Options', 'js_composer' ),
)
);
vc_add_params(
'vc_row', array(
array(
'param_name' => 'content_placement',
'heading' => __( 'Columns Content Position', 'us' ),
'type' => 'dropdown',
'value' => array(
us_translate( 'Top' ) => 'top',
us_translate( 'Middle' ) => 'middle',
us_translate( 'Bottom' ) => 'bottom',
),
'std' => $config['atts']['content_placement'],
'edit_field_class' => 'vc_col-sm-6',
'weight' => 10,
'group' => us_translate( 'Columns' ),
),
array(
'param_name' => 'columns_type',
'description' => __( 'Improves apperance of columns with background', 'us' ),
'type' => 'checkbox',
'value' => array( __( 'Add extra padding around columns content', 'us' ) => TRUE ),
( ( $config['atts']['columns_type'] !== FALSE ) ? 'std' : '_std' ) => $config['atts']['columns_type'],
'weight' => 8,
'group' => us_translate( 'Columns' ),
),
array(
'param_name' => 'columns_reverse',
'description' => __( 'The last column will be shown on the top.', 'us' ) . ' ' . sprintf( __( 'Applied when the screen width is less than %s', 'us' ), '<a target="_blank" href="' . admin_url( 'admin.php?page=us-theme-options' ) . '#layout" title="' . __( 'edit in Theme Options', 'us' ) . '">' . us_get_option( 'columns_stacking_width' ) . '</a>' ),
'type' => 'checkbox',
'value' => array( __( 'Reverse order for columns stacking', 'us' ) => TRUE ),
( ( $config['atts']['columns_reverse'] !== FALSE ) ? 'std' : '_std' ) => $config['atts']['columns_reverse'],
'weight' => 7,
'group' => us_translate( 'Columns' ),
),
array(
'param_name' => 'height',
'heading' => __( 'Row Height', 'us' ),
'type' => 'dropdown',
'value' => array(
__( 'Default from Theme Options', 'us' ) => 'default',
__( 'Equals the content height', 'us' ) => 'auto',
__( 'Small', 'us' ) => 'small',
__( 'Medium', 'us' ) => 'medium',
__( 'Large', 'us' ) => 'large',
__( 'Huge', 'us' ) => 'huge',
__( 'Full Screen', 'us' ) => 'full',
),
'std' => $config['atts']['height'],
'weight' => 170,
),
array(
'param_name' => 'valign',
'heading' => __( 'Row Content Position', 'us' ),
'type' => 'dropdown',
'value' => array(
us_translate( 'Top' ) => 'top',
us_translate( 'Middle' ) => 'center',
us_translate( 'Bottom' ) => 'bottom',
),
'std' => $config['atts']['valign'],
'dependency' => array( 'element' => 'height', 'value' => 'full' ),
'weight' => 160,
),
array(
'param_name' => 'width',
'heading' => __( 'Full Width Content', 'us' ),
'type' => 'checkbox',
'value' => array( __( 'Stretch content of this row to the screen width', 'us' ) => 'full' ),
( ( $config['atts']['width'] !== FALSE ) ? 'std' : '_std' ) => $config['atts']['width'],
'weight' => 150,
),
array(
'param_name' => 'color_scheme',
'heading' => __( 'Row Color Style', 'us' ),
'type' => 'dropdown',
'value' => array(
__( 'Content colors', 'us' ) => '',
__( 'Alternate Content colors', 'us' ) => 'alternate',
__( 'Primary bg & White text', 'us' ) => 'primary',
__( 'Secondary bg & White text', 'us' ) => 'secondary',
__( 'Top Footer colors', 'us' ) => 'footer-top',
__( 'Bottom Footer colors', 'us' ) => 'footer-bottom',
__( 'Custom colors', 'us' ) => 'custom',
),
'std' => $config['atts']['color_scheme'],
'weight' => 140,
),
array(
'param_name' => 'us_bg_color',
'heading' => __( 'Background Color', 'us' ),
'type' => 'colorpicker',
'std' => $config['atts']['us_bg_color'],
'edit_field_class' => 'vc_col-sm-6',
'dependency' => array( 'element' => 'color_scheme', 'value' => 'custom' ),
'weight' => 130,
),
array(
'param_name' => 'us_text_color',
'heading' => __( 'Text Color', 'us' ),
'type' => 'colorpicker',
'std' => $config['atts']['us_text_color'],
'dependency' => array( 'element' => 'color_scheme', 'value' => 'custom' ),
'edit_field_class' => 'vc_col-sm-6',
'weight' => 120,
),
array(
'param_name' => 'us_bg_image_source',
'heading' => __( 'Background Image', 'us' ),
'type' => 'dropdown',
'value' => array(
us_translate( 'None' ) => 'none',
us_translate( 'Custom' ) => 'media',
us_translate( 'Featured Image' ) => 'featured',
),
'std' => $config['atts']['us_bg_image_source'],
'weight' => 110,
),
array(
'param_name' => 'us_bg_image',
'type' => 'attach_image',
'std' => $config['atts']['us_bg_image'],
'dependency' => array( 'element' => 'us_bg_image_source', 'value' => 'media' ),
'weight' => 100,
),
array(
'param_name' => 'us_bg_size',
'heading' => __( 'Background Image Size', 'us' ),
'type' => 'dropdown',
'value' => array(
__( 'Fill Area', 'us' ) => 'cover',
__( 'Fit to Area', 'us' ) => 'contain',
__( 'Initial', 'us' ) => 'initial',
),
'std' => $config['atts']['us_bg_size'],
'dependency' => array( 'element' => 'us_bg_image_source', 'value' => array( 'media', 'custom', 'featured' ) ),
'edit_field_class' => 'vc_col-sm-6',
'weight' => 90,
),
array(
'param_name' => 'us_bg_pos',
'heading' => __( 'Background Image Position', 'us' ),
'type' => 'dropdown',
'value' => array(
us_translate( 'Top Left' ) => 'top left',
us_translate( 'Top' ) => 'top center',
us_translate( 'Top Right' ) => 'top right',
us_translate( 'Left' ) => 'center left',
us_translate( 'Center' ) => 'center center',
us_translate( 'Right' ) => 'center right',
us_translate( 'Bottom Left' ) => 'bottom left',
us_translate( 'Bottom' ) => 'bottom center',
us_translate( 'Bottom Right' ) => 'bottom right',
),
'std' => $config['atts']['us_bg_pos'],
'dependency' => array( 'element' => 'us_bg_image_source', 'value' => array( 'media', 'custom', 'featured' ) ),
'edit_field_class' => 'vc_col-sm-6',
'weight' => 85,
),
array(
'param_name' => 'us_bg_parallax',
'heading' => __( 'Parallax Effect', 'us' ),
'type' => 'dropdown',
'value' => array(
us_translate( 'None' ) => '',
__( 'Vertical Parallax', 'us' ) => 'vertical',
__( 'Horizontal Parallax', 'us' ) => 'horizontal',
__( 'Fixed', 'us' ) => 'still',
),
'std' => $config['atts']['us_bg_parallax'],
'dependency' => array( 'element' => 'us_bg_image_source', 'value' => array( 'media', 'custom', 'featured' ) ),
'edit_field_class' => 'vc_col-sm-6',
'weight' => 82,
),
array(
'param_name' => 'us_bg_repeat',
'heading' => __( 'Background Image Repeat', 'us' ),
'type' => 'dropdown',
'value' => array(
__( 'Repeat', 'us' ) => 'repeat',
__( 'Horizontally', 'us' ) => 'repeat-x',
__( 'Vertically', 'us' ) => 'repeat-y',
us_translate( 'None' ) => 'no-repeat',
),
'std' => $config['atts']['us_bg_repeat'],
'dependency' => array( 'element' => 'us_bg_image_source', 'value' => array( 'media', 'custom', 'featured' ) ),
'edit_field_class' => 'vc_col-sm-6',
'weight' => 80,
),
array(
'param_name' => 'us_bg_parallax_width',
'heading' => __( 'Parallax Background Width', 'us' ),
'type' => 'dropdown',
'value' => array(
'110%' => '110',
'120%' => '120',
'130%' => '130',
'140%' => '140',
'150%' => '150',
),
'std' => $config['atts']['us_bg_parallax_width'],
'dependency' => array( 'element' => 'us_bg_parallax', 'value' => 'horizontal' ),
'weight' => 70,
),
array(
'param_name' => 'us_bg_parallax_reverse',
'type' => 'checkbox',
'value' => array( __( 'Reverse Vertical Parallax Effect', 'us' ) => TRUE ),
( ( $config['atts']['us_bg_parallax_reverse'] !== FALSE ) ? 'std' : '_std' ) => $config['atts']['us_bg_parallax_reverse'],
'dependency' => array( 'element' => 'us_bg_parallax', 'value' => 'vertical' ),
'weight' => 60,
),
array(
'param_name' => 'us_bg_video',
'heading' => __( 'Background Video', 'us' ),
'description' => __( 'Link to YouTube, Vimeo or video file (mp4, webm, ogg)', 'us' ),
'type' => 'textfield',
'std' => $config['atts']['us_bg_video'],
'weight' => 50,
),
array(
'param_name' => 'us_bg_overlay_color',
'heading' => __( 'Background Overlay', 'us' ),
'type' => 'colorpicker',
'std' => $config['atts']['us_bg_overlay_color'],
'holder' => 'div',
'weight' => 40,
),
array(
'param_name' => 'sticky',
'heading' => __( 'Sticky Row', 'us' ),
'type' => 'checkbox',
'value' => array( __( 'Fix this row at the top of a page during scroll', 'us' ) => TRUE ),
( ( $config['atts']['sticky'] !== FALSE ) ? 'std' : '_std' ) => $config['atts']['sticky'],
'weight' => 30,
),
array(
'param_name' => 'sticky_disable_width',
'heading' => __( 'Disable Sticky Row at width', 'us' ),
'description' => __( 'When screen width is less than this value, sticky row becomes not sticky.', 'us' ),
'type' => 'textfield',
'std' => $config['atts']['sticky_disable_width'],
'dependency' => array( 'element' => 'sticky', 'not_empty' => TRUE ),
'weight' => 20,
),
)
);
if ( class_exists( 'Ultimate_VC_Addons' ) ) {
vc_add_param(
'vc_row', array(
'param_name' => 'us_notification',
'type' => 'ult_param_heading',
'text' => __( 'Background Image, Background Video, Background Overlay settings located below will override the settings located at "Background" and "Effect" tabs.', 'us' ),
'edit_field_class' => 'ult-param-important-wrapper ult-dashicon vc_column vc_col-sm-12',
'weight' => 110,
)
);
}
// Add option to set Rev Slider as row background
if ( class_exists( 'RevSlider' ) ) {
$slider = new RevSlider();
$arrSliders = $slider->getArrSliders();
$revsliders = array();
if ( $arrSliders ) {
foreach ( $arrSliders as $slider ) {
$revsliders[ $slider->getTitle() ] = $slider->getAlias();
}
}
vc_add_param(
'vc_row', array(
'param_name' => 'us_bg_slider',
'heading' => __( 'Background Slider', 'us' ),
'description' => us_translate( 'Select your Revolution Slider.', 'js_composer' ),
'type' => 'dropdown',
'value' => array_merge( array( '– ' . us_translate( 'None' ) . ' –' => '' ), $revsliders ),
'std' => $config['atts']['us_bg_slider'],
'weight' => 45,
)
);
}
// Setting proper shortcode order in VC shortcodes listing
vc_map_update( 'vc_row', array( 'weight' => 390 ) );
@@ -0,0 +1,84 @@
<?php defined( 'ABSPATH' ) OR die( 'This script cannot be accessed directly.' );
/**
* Extending shortcode: vc_row_inner
*/
vc_remove_param( 'vc_row_inner', 'equal_height' );
vc_remove_param( 'vc_row_inner', 'content_placement' );
vc_remove_param( 'vc_row_inner', 'rtl_reverse' );
vc_update_shortcode_param(
'vc_row_inner', array(
'heading' => __( 'Additional gap', 'us' ),
'param_name' => 'gap',
'type' => 'textfield',
'description' => __( 'Examples:', 'us' ) . ' <span class="usof-example">2px</span>, <span class="usof-example">1.5rem</span>, <span class="usof-example">1vw</span>',
'edit_field_class' => 'vc_col-sm-6',
'weight' => 9,
'group' => us_translate( 'Columns' ),
)
);
vc_update_shortcode_param(
'vc_row_inner', array(
'param_name' => 'disable_element',
'heading' => '',
'value' => array( us_translate( 'Disable row', 'js_composer' ) => 'yes' ),
'weight' => 1,
'group' => us_translate( 'Columns' ),
)
);
vc_update_shortcode_param(
'vc_row_inner', array(
'param_name' => 'el_class',
'description' => '',
'edit_field_class' => 'vc_col-sm-6',
'weight' => 1,
'group' => us_translate( 'Design Options', 'js_composer' ),
)
);
vc_update_shortcode_param(
'vc_row_inner', array(
'param_name' => 'el_id',
'description' => '',
'edit_field_class' => 'vc_col-sm-6',
'group' => us_translate( 'Design Options', 'js_composer' ),
)
);
vc_add_params(
'vc_row_inner', array(
array(
'param_name' => 'content_placement',
'heading' => __( 'Columns Content Position', 'us' ),
'type' => 'dropdown',
'value' => array(
us_translate( 'Top' ) => 'top',
us_translate( 'Middle' ) => 'middle',
us_translate( 'Bottom' ) => 'bottom',
),
'std' => $config['atts']['content_placement'],
'edit_field_class' => 'vc_col-sm-6',
'weight' => 10,
'group' => us_translate( 'Columns' ),
),
array(
'param_name' => 'columns_type',
'description' => __( 'Improves apperance of columns with background', 'us' ),
'type' => 'checkbox',
'value' => array( __( 'Add extra padding around columns content', 'us' ) => TRUE ),
( ( $config['atts']['columns_type'] !== FALSE ) ? 'std' : '_std' ) => $config['atts']['columns_type'],
'weight' => 8,
'group' => us_translate( 'Columns' ),
),
array(
'param_name' => 'columns_reverse',
'description' => __( 'The last column will be shown on the top.', 'us' ) . ' ' . sprintf( __( 'Applied when the screen width is less than %s', 'us' ), '<a target="_blank" href="' . admin_url( 'admin.php?page=us-theme-options' ) . '#layout" title="' . __( 'edit in Theme Options', 'us' ) . '">' . us_get_option( 'columns_stacking_width' ) . '</a>' ),
'type' => 'checkbox',
'value' => array( __( 'Reverse order for columns stacking', 'us' ) => TRUE ),
( ( $config['atts']['columns_reverse'] !== FALSE ) ? 'std' : '_std' ) => $config['atts']['columns_reverse'],
'weight' => 7,
'group' => us_translate( 'Columns' ),
),
)
);
@@ -0,0 +1,124 @@
<?php defined( 'ABSPATH' ) OR die( 'This script cannot be accessed directly.' );
/**
* Modifying shortcode: vc_tta_accordion
*
* @var $shortcode string Current shortcode name
* @var $config array Shortcode's config
*
* @param $config ['atts'] array Shortcode's attributes and default values
*/
$misc = us_config( 'elements_misc' );
if ( version_compare( WPB_VC_VERSION, '4.6', '<' ) ) {
// Oops: the modified shorcode doesn't exist in current VC version. Doing nothing.
return;
}
if ( ! vc_is_page_editable() ) {
vc_remove_param( 'vc_tta_accordion', 'title' );
vc_remove_param( 'vc_tta_accordion', 'style' );
vc_remove_param( 'vc_tta_accordion', 'shape' );
vc_remove_param( 'vc_tta_accordion', 'color' );
vc_remove_param( 'vc_tta_accordion', 'no_fill' );
vc_remove_param( 'vc_tta_accordion', 'spacing' );
vc_remove_param( 'vc_tta_accordion', 'gap' );
vc_remove_param( 'vc_tta_accordion', 'autoplay' );
vc_remove_param( 'vc_tta_accordion', 'collapsible_all' );
vc_remove_param( 'vc_tta_accordion', 'active_section' );
vc_remove_param( 'vc_tta_accordion', 'c_align' );
vc_remove_param( 'vc_tta_accordion', 'c_icon' );
vc_remove_param( 'vc_tta_accordion', 'c_position' );
vc_remove_param( 'vc_tta_accordion', 'css_animation' );
vc_update_shortcode_param(
'vc_tta_accordion', array(
'param_name' => 'el_class',
'description' => '',
'edit_field_class' => 'vc_col-sm-6',
'weight' => 10,
'group' => us_translate( 'Design Options', 'js_composer' ),
)
);
vc_update_shortcode_param(
'vc_tta_accordion', array(
'param_name' => 'el_id',
'description' => '',
'edit_field_class' => 'vc_col-sm-6',
'group' => us_translate( 'Design Options', 'js_composer' ),
)
);
vc_add_params(
'vc_tta_accordion', array(
array(
'param_name' => 'toggle',
'heading' => __( 'Act as Toggles', 'us' ),
'type' => 'checkbox',
'value' => array( __( 'Allow several sections to be opened at the same time', 'us' ) => TRUE ),
( ( $config['atts']['toggle'] !== FALSE ) ? 'std' : '_std' ) => $config['atts']['toggle'],
'weight' => 60,
),
array(
'param_name' => 'c_align',
'heading' => __( 'Title Alignment', 'us' ),
'type' => 'dropdown',
'value' => array(
us_translate( 'Left' ) => 'left',
us_translate( 'Right' ) => 'right',
us_translate( 'Center' ) => 'center',
),
'std' => $config['atts']['c_align'],
'weight' => 50,
),
array(
'param_name' => 'title_tag',
'heading' => __( 'Title HTML tag', 'us' ),
'type' => 'dropdown',
'value' => $misc['html_tag_values'],
'std' => $config['atts']['title_tag'],
'weight' => 40,
),
array(
'param_name' => 'title_size',
'heading' => __( 'Title Size', 'us' ),
'description' => $misc['desc_font_size'],
'type' => 'textfield',
'std' => $config['atts']['title_size'],
'weight' => 30,
),
array(
'param_name' => 'c_icon',
'heading' => __( 'Icon', 'us' ),
'description' => __( 'Select accordion navigation icon.', 'us' ),
'type' => 'dropdown',
'value' => array(
us_translate( 'None' ) => '',
__( 'Chevron', 'us' ) => 'chevron',
__( 'Plus', 'us' ) => 'plus',
__( 'Triangle', 'us' ) => 'triangle',
),
'std' => $config['atts']['c_icon'],
'edit_field_class' => 'vc_col-sm-6',
'weight' => 20,
),
array(
'param_name' => 'c_position',
'heading' => __( 'Icon Position', 'us' ),
'description' => __( 'Select accordion navigation icon position.', 'us' ),
'type' => 'dropdown',
'value' => array(
us_translate( 'Left' ) => 'left',
us_translate( 'Right' ) => 'right',
),
'std' => $config['atts']['c_position'],
'edit_field_class' => 'vc_col-sm-6',
'weight' => 10,
),
)
);
}
// Setting proper shortcode order in VC shortcodes listing
vc_map_update( 'vc_tta_accordion', array( 'weight' => 310 ) );
@@ -0,0 +1,93 @@
<?php defined( 'ABSPATH' ) OR die( 'This script cannot be accessed directly.' );
/**
* Modifying shortcode: vc_tta_section
*
* @var $shortcode string Current shortcode name
* @var $config array Shortcode's config
*
* @param $config ['atts'] array Shortcode's attributes and default values
*/
if ( version_compare( WPB_VC_VERSION, '4.6', '<' ) ) {
// Oops: the modified shorcode doesn't exist in current VC version. Doing nothing.
return;
}
if ( ! vc_is_page_editable() ) {
vc_remove_param( 'vc_tta_section', 'add_icon' );
vc_remove_param( 'vc_tta_section', 'i_type' );
vc_remove_param( 'vc_tta_section', 'i_icon_fontawesome' );
vc_remove_param( 'vc_tta_section', 'i_icon_openiconic' );
vc_remove_param( 'vc_tta_section', 'i_icon_typicons' );
vc_remove_param( 'vc_tta_section', 'i_icon_entypo' );
vc_remove_param( 'vc_tta_section', 'i_icon_linecons' );
vc_remove_param( 'vc_tta_section', 'i_icon_monosocial' );
vc_remove_param( 'vc_tta_section', 'i_icon_material' );
vc_remove_param( 'vc_tta_section', 'i_position' );
vc_update_shortcode_param(
'vc_tta_section', array(
'param_name' => 'title',
'weight' => 90,
)
);
vc_update_shortcode_param(
'vc_tta_section', array(
'param_name' => 'tab_id',
'weight' => 80,
)
);
vc_add_params(
'vc_tta_section', array(
array(
'param_name' => 'active',
'type' => 'checkbox',
'value' => array( __( 'Show this section after page loading', 'us' ) => TRUE ),
( ( $config['atts']['active'] !== FALSE ) ? 'std' : '_std' ) => $config['atts']['active'],
'weight' => 70,
),
array(
'param_name' => 'indents',
'type' => 'checkbox',
'value' => array( __( 'Stretch this section content to the full available area', 'us' ) => 'none' ),
( ( $config['atts']['indents'] !== FALSE ) ? 'std' : '_std' ) => $config['atts']['indents'],
'weight' => 60,
),
array(
'param_name' => 'icon',
'heading' => __( 'Icon', 'us' ),
'type' => 'us_icon',
'std' => $config['atts']['icon'],
'weight' => 50,
),
array(
'param_name' => 'i_position',
'heading' => __( 'Icon Position', 'us' ),
'type' => 'dropdown',
'value' => array(
__( 'Before title', 'us' ) => 'left',
__( 'After title', 'us' ) => 'right',
),
'std' => $config['atts']['i_position'],
'weight' => 40,
),
array(
'param_name' => 'bg_color',
'heading' => __( 'Background Color', 'us' ),
'type' => 'colorpicker',
'value' => '',
'std' => $config['atts']['bg_color'],
'holder' => 'div',
'weight' => 30,
),
array(
'param_name' => 'text_color',
'heading' => __( 'Text Color', 'us' ),
'type' => 'colorpicker',
'value' => '',
'std' => $config['atts']['text_color'],
'holder' => 'div',
'weight' => 20,
),
)
);
}
@@ -0,0 +1,145 @@
<?php defined( 'ABSPATH' ) OR die( 'This script cannot be accessed directly.' );
/**
* Modifying shortcode: vc_tta_tabs
*
* @var $shortcode string Current shortcode name
* @var $config array Shortcode's config
*
* @param $config ['atts'] array Shortcode's attributes and default values
*/
$misc = us_config( 'elements_misc' );
if ( version_compare( WPB_VC_VERSION, '4.6', '<' ) ) {
// Oops: the modified shorcode doesn't exist in current VC version. Doing nothing.
return;
}
if ( ! vc_is_page_editable() ) {
vc_remove_param( 'vc_tta_tabs', 'title' );
vc_remove_param( 'vc_tta_tabs', 'style' );
vc_remove_param( 'vc_tta_tabs', 'shape' );
vc_remove_param( 'vc_tta_tabs', 'color' );
vc_remove_param( 'vc_tta_tabs', 'no_fill_content_area' );
vc_remove_param( 'vc_tta_tabs', 'spacing' );
vc_remove_param( 'vc_tta_tabs', 'gap' );
vc_remove_param( 'vc_tta_tabs', 'tab_position' );
vc_remove_param( 'vc_tta_tabs', 'alignment' );
vc_remove_param( 'vc_tta_tabs', 'autoplay' );
vc_remove_param( 'vc_tta_tabs', 'active_section' );
vc_remove_param( 'vc_tta_tabs', 'pagination_style' );
vc_remove_param( 'vc_tta_tabs', 'pagination_color' );
vc_remove_param( 'vc_tta_tabs', 'css_animation' );
vc_update_shortcode_param(
'vc_tta_tabs', array(
'param_name' => 'el_class',
'description' => '',
'edit_field_class' => 'vc_col-sm-6',
'weight' => 10,
'group' => us_translate( 'Design Options', 'js_composer' ),
)
);
vc_update_shortcode_param(
'vc_tta_tabs', array(
'param_name' => 'el_id',
'description' => '',
'edit_field_class' => 'vc_col-sm-6',
'group' => us_translate( 'Design Options', 'js_composer' ),
)
);
vc_add_params(
'vc_tta_tabs', array(
array(
'param_name' => 'layout',
'heading' => us_translate( 'Layout' ),
'type' => 'dropdown',
'value' => array(
__( 'Simple', 'us' ) => 'default',
__( 'Modern', 'us' ) => 'modern',
__( 'Trendy', 'us' ) => 'trendy',
__( 'Timeline', 'us' ) => 'timeline',
),
'std' => $config['atts']['layout'],
'group' => us_translate( 'Tabs', 'js_composer' ),
'weight' => 180,
),
array(
'param_name' => 'stretch',
'type' => 'checkbox',
'value' => array( __( 'Stretch tabs to the full available width', 'us' ) => TRUE ),
( ( $config['atts']['stretch'] !== FALSE ) ? 'std' : '_std' ) => $config['atts']['stretch'],
'group' => us_translate( 'Tabs', 'js_composer' ),
'weight' => 170,
),
array(
'param_name' => 'title_font',
'heading' => __( 'Font', 'us' ),
'type' => 'dropdown',
'value' => array_flip( us_get_fonts( 'without_groups' ) ),
'std' => $config['atts']['title_font'],
'group' => us_translate( 'Tabs', 'js_composer' ),
'weight' => 160,
),
array(
'param_name' => 'title_weight',
'heading' => __( 'Font Weight', 'us' ),
'type' => 'dropdown',
'value' => array(
us_translate( 'Default' ) => '',
'100 ' . __( 'thin', 'us' ) => '100',
'200 ' . __( 'extra-light', 'us' ) => '200',
'300 ' . __( 'light', 'us' ) => '300',
'400 ' . __( 'normal', 'us' ) => '400',
'500 ' . __( 'medium', 'us' ) => '500',
'600 ' . __( 'semi-bold', 'us' ) => '600',
'700 ' . __( 'bold', 'us' ) => '700',
'800 ' . __( 'extra-bold', 'us' ) => '800',
'900 ' . __( 'ultra-bold', 'us' ) => '900',
),
'std' => $config['atts']['title_weight'],
'edit_field_class' => 'vc_col-sm-6',
'group' => us_translate( 'Tabs', 'js_composer' ),
'weight' => 142,
),
array(
'param_name' => 'title_transform',
'heading' => __( 'Text Transform', 'us' ),
'type' => 'dropdown',
'value' => array(
us_translate( 'Default' ) => '',
us_translate( 'None' ) => 'none',
'UPPERCASE' => 'uppercase',
'lowercase' => 'lowercase',
'Capitalize' => 'capitalize',
),
'std' => $config['atts']['title_transform'],
'edit_field_class' => 'vc_col-sm-6',
'group' => us_translate( 'Tabs', 'js_composer' ),
'weight' => 142,
),
array(
'param_name' => 'title_size',
'heading' => __( 'Font Size', 'us' ),
'description' => $misc['desc_font_size'],
'type' => 'textfield',
'std' => $config['atts']['title_size'],
'group' => us_translate( 'Tabs', 'js_composer' ),
'weight' => 140,
),
array(
'param_name' => 'title_tag',
'heading' => __( 'Sections Title HTML tag', 'us' ),
'type' => 'dropdown',
'value' => $misc['html_tag_values'],
'std' => $config['atts']['title_tag'],
'weight' => 130,
),
)
);
}
// Setting proper shortcode order in VC shortcodes listing
vc_map_update( 'vc_tta_tabs', array( 'weight' => 320 ) );
@@ -0,0 +1,168 @@
<?php defined( 'ABSPATH' ) OR die( 'This script cannot be accessed directly.' );
/**
* Modifying shortcode: vc_tta_tour
*
* @var $shortcode string Current shortcode name
* @var $config array Shortcode's config
*
* @param $config ['atts'] array Shortcode's attributes and default values
*/
$misc = us_config( 'elements_misc' );
if ( version_compare( WPB_VC_VERSION, '4.6', '<' ) ) {
// Oops: the modified shorcode doesn't exist in current VC version. Doing nothing.
return;
}
if ( ! vc_is_page_editable() ) {
vc_remove_param( 'vc_tta_tour', 'title' );
vc_remove_param( 'vc_tta_tour', 'style' );
vc_remove_param( 'vc_tta_tour', 'shape' );
vc_remove_param( 'vc_tta_tour', 'color' );
vc_remove_param( 'vc_tta_tour', 'no_fill_content_area' );
vc_remove_param( 'vc_tta_tour', 'spacing' );
vc_remove_param( 'vc_tta_tour', 'gap' );
vc_remove_param( 'vc_tta_tour', 'tab_position' );
vc_remove_param( 'vc_tta_tour', 'alignment' );
vc_remove_param( 'vc_tta_tour', 'controls_size' );
vc_remove_param( 'vc_tta_tour', 'autoplay' );
vc_remove_param( 'vc_tta_tour', 'active_section' );
vc_remove_param( 'vc_tta_tour', 'pagination_style' );
vc_remove_param( 'vc_tta_tour', 'pagination_color' );
vc_remove_param( 'vc_tta_tour', 'css_animation' );
vc_update_shortcode_param(
'vc_tta_tour', array(
'param_name' => 'el_class',
'description' => '',
'edit_field_class' => 'vc_col-sm-6',
'weight' => 10,
'group' => us_translate( 'Design Options', 'js_composer' ),
)
);
vc_update_shortcode_param(
'vc_tta_tour', array(
'param_name' => 'el_id',
'description' => '',
'edit_field_class' => 'vc_col-sm-6',
'group' => us_translate( 'Design Options', 'js_composer' ),
)
);
vc_add_params(
'vc_tta_tour', array(
array(
'param_name' => 'tab_position',
'heading' => __( 'Position', 'us' ),
'type' => 'dropdown',
'value' => array(
us_translate( 'Left' ) => 'left',
us_translate( 'Right' ) => 'right',
),
'std' => $config['atts']['tab_position'],
'edit_field_class' => 'vc_col-sm-4',
'group' => us_translate( 'Tabs', 'js_composer' ),
'weight' => 170,
),
array(
'param_name' => 'c_align',
'heading' => us_translate( 'Alignment' ),
'type' => 'dropdown',
'value' => array(
us_translate( 'Left' ) => 'left',
us_translate( 'Center' ) => 'center',
us_translate( 'Right' ) => 'right',
),
'std' => $config['atts']['c_align'],
'edit_field_class' => 'vc_col-sm-4',
'group' => us_translate( 'Tabs', 'js_composer' ),
'weight' => 160,
),
array(
'param_name' => 'controls_size',
'heading' => us_translate( 'Width' ),
'type' => 'dropdown',
'value' => array(
us_translate_x( 'Auto', 'auto preload' ) => 'auto',
'10%' => '10',
'20%' => '20',
'30%' => '30',
'40%' => '40',
'50%' => '50',
),
'std' => $config['atts']['controls_size'],
'edit_field_class' => 'vc_col-sm-4',
'group' => us_translate( 'Tabs', 'js_composer' ),
'weight' => 150,
),
array(
'param_name' => 'title_font',
'heading' => __( 'Font', 'us' ),
'type' => 'dropdown',
'value' => array_flip( us_get_fonts( 'without_groups' ) ),
'std' => $config['atts']['title_font'],
'group' => us_translate( 'Tabs', 'js_composer' ),
'weight' => 140,
),
array(
'param_name' => 'title_weight',
'heading' => __( 'Font Weight', 'us' ),
'type' => 'dropdown',
'value' => array(
us_translate( 'Default' ) => '',
'100 ' . __( 'thin', 'us' ) => '100',
'200 ' . __( 'extra-light', 'us' ) => '200',
'300 ' . __( 'light', 'us' ) => '300',
'400 ' . __( 'normal', 'us' ) => '400',
'500 ' . __( 'medium', 'us' ) => '500',
'600 ' . __( 'semi-bold', 'us' ) => '600',
'700 ' . __( 'bold', 'us' ) => '700',
'800 ' . __( 'extra-bold', 'us' ) => '800',
'900 ' . __( 'ultra-bold', 'us' ) => '900',
),
'std' => $config['atts']['title_weight'],
'edit_field_class' => 'vc_col-sm-6',
'group' => us_translate( 'Tabs', 'js_composer' ),
'weight' => 130,
),
array(
'param_name' => 'title_transform',
'heading' => __( 'Text Transform', 'us' ),
'type' => 'dropdown',
'value' => array(
us_translate( 'Default' ) => '',
us_translate( 'None' ) => 'none',
'UPPERCASE' => 'uppercase',
'lowercase' => 'lowercase',
'Capitalize' => 'capitalize',
),
'std' => $config['atts']['title_transform'],
'edit_field_class' => 'vc_col-sm-6',
'group' => us_translate( 'Tabs', 'js_composer' ),
'weight' => 125,
),
array(
'param_name' => 'title_size',
'heading' => __( 'Font Size', 'us' ),
'description' => $misc['desc_font_size'],
'type' => 'textfield',
'std' => $config['atts']['title_size'],
'group' => us_translate( 'Tabs', 'js_composer' ),
'weight' => 120,
),
array(
'param_name' => 'title_tag',
'heading' => __( 'Sections Title HTML tag', 'us' ),
'type' => 'dropdown',
'value' => $misc['html_tag_values'],
'std' => $config['atts']['title_tag'],
'weight' => 110,
),
)
);
}
// Setting proper shortcode order in VC shortcodes listing
vc_map_update( 'vc_tta_tour', array( 'weight' => 300 ) );
@@ -0,0 +1,99 @@
<?php defined( 'ABSPATH' ) OR die( 'This script cannot be accessed directly.' );
/**
* Modifying shortcode: vc_video
*
* @var $shortcode string Current shortcode name
* @var $config array Shortcode's config
*
* @param $config ['atts'] array Shortcode's attributes and default values
*/
$misc = us_config( 'elements_misc' );
vc_remove_param( 'vc_video', 'title' );
vc_remove_param( 'vc_video', 'el_width' );
vc_remove_param( 'vc_video', 'el_aspect' );
vc_remove_param( 'vc_video', 'css_animation' );
vc_update_shortcode_param(
'vc_video', array(
'param_name' => 'el_class',
'description' => '',
'edit_field_class' => 'vc_col-sm-6',
'weight' => 10,
'group' => us_translate( 'Design Options', 'js_composer' ),
)
);
vc_update_shortcode_param(
'vc_video', array(
'param_name' => 'el_id',
'description' => '',
'edit_field_class' => 'vc_col-sm-6',
'group' => us_translate( 'Design Options', 'js_composer' ),
)
);
vc_add_params(
'vc_video', array(
array(
'param_name' => 'link',
'heading' => __( 'Video link', 'us' ),
'description' => sprintf( __( 'Check supported formats on %s', 'us' ), '<a href="http://codex.wordpress.org/Embeds#Okay.2C_So_What_Sites_Can_I_Embed_From.3F" target="_blank">WordPress Codex</a>' ),
'type' => 'textfield',
'std' => $config['atts']['link'],
'admin_label' => TRUE,
'weight' => 60,
),
array(
'param_name' => 'hide_controls',
'type' => 'checkbox',
'value' => array( __( 'Hide YouTube controls while watching', 'us' ) => TRUE ),
( ( $config['atts']['hide_controls'] !== FALSE ) ? 'std' : '_std' ) => $config['atts']['hide_controls'],
'weight' => 52,
),
array(
'param_name' => 'hide_video_title',
'type' => 'checkbox',
'value' => array( __( 'Hide Vimeo video title (only if the owner allows)', 'us' ) => TRUE ),
( ( $config['atts']['hide_video_title'] !== FALSE ) ? 'std' : '_std' ) => $config['atts']['hide_video_title'],
'weight' => 53,
),
array(
'param_name' => 'ratio',
'heading' => __( 'Aspect Ratio', 'us' ),
'type' => 'dropdown',
'value' => array(
'21:9' => '21x9',
'16:9' => '16x9',
'4:3' => '4x3',
'3:2' => '3x2',
'1:1' => '1x1',
),
'std' => $config['atts']['ratio'],
'weight' => 50,
),
array(
'param_name' => 'max_width',
'heading' => __( 'Max Width in pixels', 'us' ),
'description' => $misc['desc_width'],
'type' => 'textfield',
'std' => $config['atts']['max_width'],
'admin_label' => TRUE,
'weight' => 40,
),
array(
'param_name' => 'align',
'heading' => __( 'Video Alignment', 'us' ),
'type' => 'dropdown',
'value' => array(
us_translate( 'Left' ) => 'left',
us_translate( 'Center' ) => 'center',
us_translate( 'Right' ) => 'right',
),
'std' => $config['atts']['align'],
'dependency' => array( 'element' => 'max_width', 'not_empty' => TRUE ),
'weight' => 30,
),
)
);
@@ -0,0 +1,59 @@
<?php defined( 'ABSPATH' ) OR die( 'This script cannot be accessed directly.' );
/**
* Modifying shortcode: vc_wp_custommenu
*
* @var $shortcode string Current shortcode name
* @var $config array Shortcode's config
*
* @param $config ['atts'] array Shortcode's attributes and default values
*/
$misc = us_config( 'elements_misc' );
vc_update_shortcode_param(
'vc_wp_custommenu', array(
'param_name' => 'title',
'weight' => 50,
)
);
vc_add_params(
'vc_wp_custommenu', array(
array(
'param_name' => 'layout',
'heading' => __( 'Layout', 'us' ),
'type' => 'dropdown',
'admin_label' => TRUE,
'value' => array(
__( 'Vertical', 'us' ) => 'ver',
__( 'Horizontal', 'us' ) => 'hor',
),
'std' => $config['atts']['layout'],
'edit_field_class' => 'vc_col-sm-6',
'weight' => 40,
),
array(
'param_name' => 'align',
'heading' => us_translate( 'Alignment' ),
'type' => 'dropdown',
'admin_label' => TRUE,
'value' => array(
us_translate( 'Left' ) => 'left',
us_translate( 'Center' ) => 'center',
us_translate( 'Right' ) => 'right',
),
'std' => $config['atts']['align'],
'edit_field_class' => 'vc_col-sm-6',
'weight' => 30,
),
array(
'param_name' => 'font_size',
'heading' => __( 'Font Size', 'us' ),
'description' => $misc['desc_font_size'],
'type' => 'textfield',
'std' => $config['atts']['font_size'],
'weight' => 20,
),
)
);
@@ -0,0 +1,27 @@
<?php defined( 'ABSPATH' ) OR die( 'This script cannot be accessed directly.' );
return array(
array(
'name' => 'Fullwidth Accordion Sections',
'content' => '[vc_row height="auto" width="full"][vc_column width="1/1"][vc_tta_accordion c_align="center"][vc_tta_section title="Targeted Branding" icon="fa-bullseye"][vc_row_inner][vc_column_inner width="1/3"][us_iconbox icon="fa-globe" color="light" iconpos="left" title="Set Goals" external="" style="circle" link=""]I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet ut elit tellus.[/us_iconbox][/vc_column_inner][vc_column_inner width="1/3"][us_iconbox icon="fa-plane" color="light" iconpos="left" title="Reach" style="circle"]I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet ut elit tellus.[/us_iconbox][/vc_column_inner][vc_column_inner width="1/3"][us_iconbox icon="fa-repeat" color="light" iconpos="left" title="Repeat" style="circle"]I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet ut elit tellus.[/us_iconbox][/vc_column_inner][/vc_row_inner][/vc_tta_section][vc_tta_section title="Geolocating Features" icon="fa-map-marker"][vc_row_inner][vc_column_inner width="1/2"][vc_column_text]Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi non enim suscipit, dignissim diam at, laoreet eros. Aenean vitae orci nisi. Curabitur luctus ligula vel orci bibendum accumsan. Fusce ac tortor quis nisl posuere accumsan ut sit amet nisl. Pellentesque quis ultricies lacus, et lobortis libero. Quisque consectetur euismod egestas. Praesent hendrerit fringilla.
Donec id mattis velit. Vivamus viverra, erat tempus commodo sagittis, nibh arcu varius enim, sit amet congue eros magna dictum nibh. Praesent tristique lectus sed lorem scelerisque, vel vestibulum tortor varius. Vivamus vestibulum nisl mauris, nec bibendum eros vulputate vitae. Donec rutrum sem ut mi tempor suscipit id quam tristique auctor.[/vc_column_text][/vc_column_inner][vc_column_inner width="1/2"][vc_column_text]Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi non enim suscipit, dignissim diam at, laoreet eros. Aenean vitae orci nisi. Curabitur luctus ligula vel orci bibendum accumsan. Fusce ac tortor quis nisl posuere accumsan ut sit amet nisl. Pellentesque quis ultricies lacus, et lobortis libero. Quisque consectetur euismod egestas. Praesent hendrerit fringilla.
Donec id mattis velit. Vivamus viverra, erat tempus commodo sagittis, nibh arcu varius enim, sit amet congue eros magna dictum nibh. Praesent tristique lectus sed lorem scelerisque, vel vestibulum tortor varius. Vivamus vestibulum nisl mauris, nec bibendum eros vulputate vitae. Donec rutrum sem ut mi tempor suscipit id quam tristique auctor.[/vc_column_text][/vc_column_inner][/vc_row_inner][/vc_tta_section][vc_tta_section title="Marketing Strategy" icon="fa-diamond"][vc_row_inner][vc_column_inner width="1/3"][vc_column_text]I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.[/vc_column_text][/vc_column_inner][vc_column_inner width="1/3"][vc_column_text]I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.[/vc_column_text][/vc_column_inner][vc_column_inner width="1/3"][vc_column_text]I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.[/vc_column_text][/vc_column_inner][/vc_row_inner][/vc_tta_section][/vc_tta_accordion][/vc_column][/vc_row]',
),
array(
'name' => '3 Boxes Features Columns',
'content' => '[vc_row columns_type="1" height="auto" width="full"][vc_column width="1/3" css=".vc_custom_1426762592726{background-image: url() !important;background-position: center !important;background-repeat: no-repeat !important;background-size: cover !important;}" text_color="#ffffff"][vc_column_text]
<h3>Fully Featured &amp; Flexible</h3>
I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.[/vc_column_text][us_btn text="Tell me more" color="white" style="outlined" link="url:%23"][/vc_column][vc_column width="1/3" text_color="#ffffff" css=".vc_custom_1426688097558{background-image: url() !important;background-position: center !important;background-repeat: no-repeat !important;background-size: cover !important;}"][vc_column_text]
<h3>Modern Design &amp; Trendy Look</h3>
I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.[/vc_column_text][us_btn text="Tell me more" color="white" style="outlined" link="url:%23"][/vc_column][vc_column width="1/3" text_color="#ffffff" css=".vc_custom_1426688491496{background-image: url() !important;background-position: center !important;background-repeat: no-repeat !important;background-size: cover !important;}"][vc_column_text]
<h3>Wonderful Digital Things</h3>
I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.[/vc_column_text][us_btn text="Tell me more" color="white" style="outlined" link="url:%23"][/vc_column][/vc_row]',
),
array(
'name' => 'Hero Section 1',
'content' => '[vc_row height="huge" color_scheme="secondary" us_bg_image="66" us_bg_parallax="vertical"][vc_column el_class="align_center"][vc_custom_heading text="THINK LIKE A
<strong>CUSTOMER</strong>" font_container="tag:h2|font_size:60|text_align:center" use_theme_fonts="yes"][us_btn text="More Info" color="white"][us_btn text="Purchase"][/vc_column][/vc_row]',
),
);