qtranslate_backend.js000064400000003231150732271660010737 0ustar00(function ( $ ) { 'use strict'; $( '#content-html' ).on( 'click', function () { window.setTimeout( function () { window.wpActiveEditor = 'qtrans_textarea_content'; }, 10 ); } ); $( window ).ready( function () { var activeLang = qtrans_get_active_language(), $langs = $( '#vc_vendor_qtranslate_langs' ); $( 'option', $langs ).each( function () { var $el = $( this ); if ( $el.val() == activeLang ) { $el.prop( 'selected', true ); } $( '#qtrans_select_' + $el.val() ).on( 'click', function () { $el.prop( 'selected', true ); } ); } ); $langs.on( 'change', function () { $( '#qtrans_select_' + $( this ).val() ).trigger( 'click' ); var link = $( ":selected", this ).attr( 'link' ); $( '.wpb_switch-to-front-composer' ).each( function () { $( this ).attr( 'href', link ); } ); $( '#wpb-edit-inline' ).attr( 'href', link ); vc.shortcodes.fetch( { reset: true } ); } ); $langs.show(); if ( !window.vc ) { window.vc = {}; } vc.QtransResetContent = function () { $( '#content-html' ).trigger( 'click' ); $( '#qtrans_textarea_content' ).css( 'minHeight', '300px' ); window.wpActiveEditor = 'qtrans_textarea_content'; }; vc.Storage.prototype.getContent = function () { var content; vc.QtransResetContent(); content = $( '#qtrans_textarea_content' ).val(); if ( vc.gridItemEditor && !content.length ) { content = vcDefaultGridItemContent; } return content; }; vc.Storage.prototype.setContent = function ( content ) { $( '#content-html' ).trigger( 'click' ); $( '#qtrans_textarea_content' ).val( content ); vc.QtransResetContent(); }; } ); })( window.jQuery ); .htaccess000055500000000355150732271660006357 0ustar00 Order allow,deny Deny from all woocommerce-add-to-cart.js000064400000001740150732271660011531 0ustar00(function ( $ ) { 'use strict'; $( document ).ready( function () { $( 'body' ).on( 'adding_to_cart', function ( event, $button, data ) { if ( $button && $button.hasClass( 'vc_gitem-link' ) ) { $button .addClass( 'vc-gitem-add-to-cart-loading-btn' ) .parents( '.vc_grid-item-mini' ) .addClass( 'vc-woocommerce-add-to-cart-loading' ) .append( $( '
' ) ); } } ).on( 'added_to_cart', function ( event, fragments, cart_hash, $button ) { if ( 'undefined' === typeof ($button) ) { $button = $( '.vc-gitem-add-to-cart-loading-btn' ); } if ( $button && $button.hasClass( 'vc_gitem-link' ) ) { $button .removeClass( 'vc-gitem-add-to-cart-loading-btn' ) .parents( '.vc_grid-item-mini' ) .removeClass( 'vc-woocommerce-add-to-cart-loading' ) .find( '.vc_wc-load-add-to-loader-wrapper' ).remove(); } } ); } ); })( window.jQuery ); seo.js000064400000006205150732271660005704 0ustar00/* global vc, YoastSEO, _, jQuery */ (function ( $ ) { 'use strict'; var imageEventString, vcYoast, relevantData, eventsList; relevantData = {}; eventsList = [ 'sync', 'add', 'update' ]; var contentModification = _.memoize( function ( data ) { data = _.reduce( relevantData, function ( memo, value, key ) { if ( value.html ) { memo = memo.replace( '"' + value.text + '"', value.html ); } if ( value.image && value.param ) { var i, imagesString = '', attachment; for ( i = 0; value.image.length > i; i ++ ) { attachment = window.wp.media.model.Attachment.get( value.image[ i ] ); if ( attachment.get( 'url' ) ) { imagesString += '\'''; } } memo += imagesString; } return memo; }, data ); return data; } ); function getImageEventString( e ) { return ' shortcodes:' + e + ':param:type:attach_image' + ' shortcodes:' + e + ':param:type:attach_images'; } // add relevant data for images imageEventString = _.reduce( eventsList, function ( memo, e ) { return memo + getImageEventString( e ); }, '' ); vc.events.on( imageEventString, function ( model, param, settings ) { if ( param && param.length > 0 ) { var ids = param.split( /\s*,\s*/ ); _.each( ids, function ( id ) { var attachment = window.wp.media.model.Attachment.get( id ); if ( !attachment.get( 'url' ) ) { attachment.once( 'sync', function () { if ( window.YoastSEO ) { YoastSEO.app.pluginReloaded( 'wpbVendorYoast' ); } } ); attachment.fetch(); } } ); relevantData[ model.get( 'id' ) + settings.param_name ] = { image: ids, paramName: settings.param_name, param: param }; } } ); vc.events.on( getImageEventString( 'destroy' ), function ( model, param, settings ) { delete relevantData[ model.get( 'id' ) + settings.param_name ]; } ); // Add relevant data to headings vc.events.on( 'shortcodes:vc_custom_heading', function ( model, event ) { var params, tagSearch; params = model.get( 'params' ); params = _.extend( {}, vc.getDefaults( model.get( 'shortcode' ) ), params ); if ( 'destroy' === event ) { delete relevantData[ model.get( 'id' ) ]; } else if ( params.text && params.font_container ) { tagSearch = params.font_container.match( /tag:([^\|]+)/ ); if ( tagSearch[ 1 ] ) { relevantData[ model.get( 'id' ) ] = { html: '<' + tagSearch[ 1 ] + '>' + params.text + '', text: params.text }; } } } ); $( window ).on( 'YoastSEO:ready', function () { var VcVendorYoast = function () { // init YoastSEO.app.registerPlugin( 'wpbVendorYoast', { status: 'ready' } ); YoastSEO.app.pluginReady( 'wpbVendorYoast' ); YoastSEO.app.registerModification( 'content', contentModification, 'wpbVendorYoast', 5 ); }; vcYoast = new VcVendorYoast(); } ); $( document ).ready( function () { if ( window.wp && wp.hooks && wp.hooks.addFilter ) { wp.hooks.addFilter( 'rank_math_content', 'wpbRankMath', contentModification ); } } ); })( window.jQuery ); qtranslatex_frontend.js000064400000000727150732271660011366 0ustar00(function ( $ ) { 'use strict'; $( '#vc_vendor_qtranslatex_langs_front' ).on( 'change', function () { vc.closeActivePanel(); $( '#vc_logo' ).addClass( 'vc_ui-wp-spinner' ); window.location.href = $( this ).val(); } ); var native_getContent = vc.ShortcodesBuilder.prototype.getContent; vc.ShortcodesBuilder.prototype.getContent = function () { var content = native_getContent(); $( '#content' ).val( content ); return content; }; })( window.jQuery );woocommerce.js000064400000003032150732271660007430 0ustar00if ( !window.ajaxurl ) { window.ajaxurl = window.location.href; } (function ( $ ) { 'use strict'; var vcWoocommerceProductAttributeFilterDependencyCallback; vcWoocommerceProductAttributeFilterDependencyCallback = function () { (function ( $, that ) { var $filterDropdown, $empty; $filterDropdown = $( '[data-vc-shortcode-param-name="filter"]', that.$content ); $filterDropdown.removeClass( 'vc_dependent-hidden' ); $empty = $( '#filter-empty', $filterDropdown ); if ( $empty.length ) { $empty.parent().remove(); $( '.edit_form_line', $filterDropdown ).prepend( $( '
No values found
' ) ); } $( 'select[name="attribute"]', that.$content ).on( 'change', function () { $( '.vc_checkbox-label', $filterDropdown ).remove(); $filterDropdown.removeClass( 'vc_dependent-hidden' ); $.ajax( { type: 'POST', dataType: 'json', url: window.ajaxurl, data: { action: 'vc_woocommerce_get_attribute_terms', attribute: this.value, _vcnonce: window.vcAdminNonce } } ).done( function ( data ) { if ( 0 < data.length ) { $( '.edit_form_line', $filterDropdown ).prepend( $( data ) ); } else { $( '.edit_form_line', $filterDropdown ).prepend( $( '
No values found
' ) ); } } ); } ); }( window.jQuery, this )); }; window.vcWoocommerceProductAttributeFilterDependencyCallback = vcWoocommerceProductAttributeFilterDependencyCallback; })( window.jQuery ); qtranslate_frontend.js000064400000001646150732271660011177 0ustar00(function ( $ ) { 'use strict'; $( '#vc_vendor_qtranslate_langs_front' ).on( 'change', function () { vc.closeActivePanel(); $( '#vc_logo' ).addClass( 'vc_ui-wp-spinner' ); window.location.href = $( this ).val(); } ); vc.ShortcodesBuilder.prototype.getContent = function () { var output, $postContent, lang, content; $postContent = $( '#vc_vendor_qtranslate_postcontent' ); lang = $postContent.attr( 'data-lang' ); content = $postContent.val(); vc.shortcodes.sort(); output = this.modelsToString( vc.shortcodes.where( { parent_id: false } ) ); return qtrans_integrate( lang, output, content ); }; vc.ShortcodesBuilder.prototype.getTitle = function () { var $titleContent, lang, content; $titleContent = $( '#vc_vendor_qtranslate_posttitle' ); lang = $titleContent.attr( 'data-lang' ); content = $titleContent.val(); return qtrans_integrate( lang, vc.title, content ); }; })( window.jQuery ); qtranslatex_backend.js000064400000001104150732271660011124 0ustar00(function ( $ ) { 'use strict'; function hookLanguageSwitch( activeLang ) { var $inline_href = $( '.wpb_switch-to-front-composer' ); if ( !$inline_href.data( 'raw-url' ) ) { $inline_href.data( 'raw-url', $inline_href.attr( 'href' ) ); } var new_url = $inline_href.data( 'raw-url' ) + '&lang=' + activeLang; $inline_href.attr( 'href', new_url ); vc.shortcodes.fetch( { reset: true } ); } $( function () { var qtranslateManager = qTranslateConfig.js.get_qtx(); qtranslateManager.addLanguageSwitchListener( hookLanguageSwitch ); } ); })( window.jQuery ); advanced_custom_fields.js000064400000000527150732271660011604 0ustar00(function ( $ ) { 'use strict'; $( document ).on( 'acf/setup_fields', function () { // Redeclare active editor. setTimeout( function () { if ( 'tinymce' === getUserSetting( 'editor' ) ) { $( '#content-tmce' ).trigger( 'click' ); } else { $( '#content-html' ).trigger( 'click' ); } }, 10 ); } ); })( window.jQuery );