web/app/plugins/wck-custom-fields-and-custom-post-types-creator/wordpress-creation-kit-api/wck-fep/wck-fep.js
/* helper function to store values of targets in an array */
helper function to store values of targets in an array
helper function to store values of targets in an array
function wckGetTargetedValues( target ){
	var values = {};
	jQuery( target ).each(function(){		
		var key = jQuery(this).attr('name');		
		if(jQuery(this).attr('type') == 'checkbox' || jQuery(this).attr('type') == 'radio' ) {
			if( typeof values[key.toString()] === "undefined" )
				values[key.toString()] = '';
			if(jQuery(this).is(':checked')){
				if( values[key.toString()] == '' )
					values[key.toString()] += jQuery(this).val().toString();
				else
					values[key.toString()] += ', ' + jQuery(this).val().toString();
			}			
		}else if( jQuery(this).hasClass('mb-select-multiple') ){
			values[key.toString()] = jQuery(this).val().toString().replace(',', ', ');
		}
		else		
			values[key.toString()] = jQuery(this).val().toString();			
	});	
	return values;
}
function wckGetTargetedValues ( target ) { var values = { } ; jQuery ( target ) . each ( function ( ) { var key = jQuery ( this ) . attr ( 'name' ) ; if ( jQuery ( this ) . attr ( 'type' ) == 'checkbox' || jQuery ( this ) . attr ( 'type' ) == 'radio' ) { if ( typeof values [ key . toString ( ) ] === "undefined" ) values [ key . toString ( ) ] = '' ; if ( jQuery ( this ) . is ( ':checked' ) ) { if ( values [ key . toString ( ) ] == '' ) values [ key . toString ( ) ] += jQuery ( this ) . val ( ) . toString ( ) ; else values [ key . toString ( ) ] += ', ' + jQuery ( this ) . val ( ) . toString ( ) ; } } else if ( jQuery ( this ) . hasClass ( 'mb-select-multiple' ) ) { values [ key . toString ( ) ] = jQuery ( this ) . val ( ) . toString ( ) . replace ( ',' , ', ' ) ; } else values [ key . toString ( ) ] = jQuery ( this ) . val ( ) . toString ( ) ; } ) ; return values ; }
helper function to store values of targets in an array
helper function to store values of targets in an array
/*object to hold the values */