403Webshell
Server IP : 14.225.204.176  /  Your IP : 216.73.216.6
Web Server : nginx/1.24.0
System : Linux nodejs-ybgk 6.8.0-40-generic #40-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 5 10:34:03 UTC 2024 x86_64
User : root ( 0)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/html/php/zinisoft.net/wp-content/plugins/fusion-builder.bak/shortcodes/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/php/zinisoft.net/wp-content/plugins/fusion-builder.bak/shortcodes/js/fusion-widget.js
/* global FusionPageBuilderApp, fusionAllElements */
( function( $ ) {

	$( document ).ready( function() {

		FusionPageBuilderApp.widgetShortcodeFilter = function( attributes, view ) {
			var newAttributes,
				defaults,
				widgetParams,
				createWidgetFieldName,
				widget; // eslint-disable-line no-unused-vars

			widget = view.settingsView.getWidget();

			// If no widget is selected return default attributes
			if ( ! widget ) {
				return attributes;
			}

			widgetParams = Object.keys( widget.fields );
			defaults = Object.keys( fusionAllElements.fusion_widget.defaults );
			newAttributes = {
				params: {}
			};

			// Creates a formatted widget form field name
			createWidgetFieldName = function ( className, name ) {
				var prefix = className.toLowerCase().replace( /\\/g, '_' ) + '__';

				try {
					prefix += name.match( /\[(.*?)\]/g ).slice( -1 )[ 0 ].replace( /\[|(\])/g, '' );
				} catch ( e ) {
					return prefix;
				}

				return prefix;
			};

			// Check if selected widget has params/input fields
			if ( widgetParams ) {
				// Make sure we're only passing params that correspond to selected widget
				_.each( attributes.params, function( param, key ) {
					if ( widgetParams.includes( key ) || defaults.includes( key ) ) {
						newAttributes.params[ key ] = param;
					}
				} );
			}

			// If widget is invalid find the appended form and retrieve it's values
			if ( widget.isInvalid ) {
				view.$el
				.find( '.fusion-widget-settings-form' )
				.find( 'fieldset, input, select, textarea' )
				.not( '[type="button"]' )
				.each( function() {
					var key = createWidgetFieldName( attributes.params.type, this.name );
					if ( widgetParams.includes( key ) ) {
						newAttributes.params[ key ] = attributes.params[ this.id ];
						if ( 'checkbox' === this.type ) {
							newAttributes.params[ key ] =  this.checked ? this.value : '';
						}
					}
				} );
			}

			// HTML and Text widget especial escape.
			if ( newAttributes.params.wp_widget_custom_html__content ) {
				newAttributes.params.wp_widget_custom_html__content = _.escape( newAttributes.params.wp_widget_custom_html__content );
			} else if ( newAttributes.params.wp_widget_text__text ) {
				newAttributes.params.wp_widget_text__text = _.escape( newAttributes.params.wp_widget_text__text );
			}

			return newAttributes;
		};

	} );

}( jQuery ) );

Youez - 2016 - github.com/yon3zu
LinuXploit