• szypd

    (@szypd)


    Buenas tardes, les presento mi inconveniente…
    Mi Page Builder dejó de funcionar en Google Chrome a partir del último update de WordPress.

    Probé como posible solución desactivar todos los plugin pero no hubo solución, por otra parte uso el Theme «Forte», creo que el tema se debe a eso, pero no sé si es un tema del update de wordpress (ya que antes me funcionaba) o de compatibilidad con el tema en cuestión.

    Sin más que edcir, les dejo los errores que me muestra la consola de Chrome.

    Ni bien entro a Editar Página, la consola muestra lo siguiente:

    7
    Consider using 'dppx' units instead of 'dpi', as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: print, not all, (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi)
    Consider using 'dppx' units instead of 'dpi', as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: print, not all, (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi)
    Consider using 'dppx' units instead of 'dpi', as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: print, not all, (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi)
    Uncaught TypeError: Cannot read property 'dom' of null pix_page_builder.js?ver=3.9:256
    Deprecated TinyMCE API call: <target>.onPostRender.add(..) wp-tinymce.php?c=1&ver=4021-20140412:17
    2
    Consider using 'dppx' units instead of 'dpi', as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: print, not all, (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) wp-tinymce.php?c=1&ver=4021-20140412:9
    8
    Uncaught TypeError: Cannot read property 'hasClass' of undefined

    Expandiendo el error de «dom», me muestra lo siguiente:

    Uncaught TypeError: Cannot read property 'dom' of null pix_page_builder.js?ver=3.9:256
    setBuilderContent pix_page_builder.js?ver=3.9:256
    switchBuilder pix_page_builder.js?ver=3.9:617
    (anonymous function) pix_page_builder.js?ver=3.9:637
    n.Callbacks.j load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jq…:2
    n.Callbacks.k.fireWith load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jq…:2
    n.extend.ready load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jq…:2
    K load-scripts.php?c=1&load%5B%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jq…:2

    Las primeras cuatro lineas apuntan a un archivo del tema Forte (wp-content/themes/forte/functions/scripts/pix_page_builder.js) , y el contenido es el siguiente:

    jQuery(function(){
    
    	if ( pagenow == 'post' || pagenow == 'page' || pagenow == 'portfolio' ) {
    
    		jQuery('input[name="pix_editor_field"]').click(function(){
    			var textCant,
    				t = jQuery(this),
    				check;
    
    			if ( t.is(':checked') ) {
    				textCant= '<p>This change can generate some problems to the layout. You must pay attention to the HTML of this entry and a backup is always recommended before saving the new settings</p>';
    				check = true;
    			} else {
    				textCant= '<p>This change can generate some problems to the layout. A backup is always recommended before saving the new settings</p>';
    				check = false;
    			}
    			jQuery('body').append('<div id="pix_builder_cant" /></div>');
    			jQuery('#pix_builder_cant').html(textCant).dialog({
    				buttons: {
    					"Confirm": function() {
    						t.attr('checked',check);
    						jQuery( this ).dialog( "close" );
    					},
    					"Cancel": function() {
    						jQuery( this ).dialog( "close" );
    					}
    				},
    				width: 200,
    				modal: true,
    				dialogClass: 'wp-dialog pix-dialog',
    				title: 'Sorry, you can\'t',
    				zIndex: 100,
    				close: function(){
    					jQuery('#pix_builder_cant').remove();
    				}
    			});
    			return false;
    		});
    
    		if ( !jQuery('input[name="pix_editor_field"]').is(':checked') ) {
    			var defaults = {
    
    				sectionClose: '</div></section>',
    
    				oneColumnClass: 'pix_column_210',
    
    				twoColumnClass: 'pix_column_470',
    
    				threeColumnClass: 'pix_column_730',
    
    				fourColumnClass: 'pix_column_990'
    
    			};
    
    			var opts = jQuery.extend({}, defaults, opts);
    
    			jQuery('#wp-content-editor-tools').prepend(
    				'<a id="pix-content-builder" class="hide-if-no-js wp-switch-editor switch-builder" onclick="switchEditors.switchto(this);">Builder</a>'
    			);
    
    			var forte_editor_tab = localStorage.getItem("forte_editor_tab"),
    				page_template,
    				max_columns,
    				class_wrap;
    
    			jQuery('select#page_template, select#pix_page_template_select').each(function(){
    				var t = jQuery(this),
    					sel = jQuery('option:selected',t).val();
    				page_template = sel;
    
    				switch (page_template) {
    					case 'widepage.php' :
    						max_columns = 4;
    						class_wrap = 'pix_column_990';
    						break;
    					default :
    						max_columns = 3;
    						class_wrap = 'pix_column_730';
    						break;
    				}
    
    				jQuery('#pix_builder_canvas .wrap').each(function(){
    					jQuery(this).attr('data-maxcolumns', max_columns);
    				});
    
    				t.bind('change',function(){
    					sel = jQuery('option:selected',t).val();
    					page_template = sel;
    					switch (page_template) {
    						case 'widepage.php' :
    							max_columns = 4;
    							class_wrap = 'pix_column_990';
    							break;
    						default :
    							max_columns = 3;
    							class_wrap = 'pix_column_730';
    							break;
    					}
    
    					jQuery('#pix_builder_canvas .wrap').each(function(){
    						jQuery(this).attr('data-maxcolumns', max_columns);
    					});
    				});
    			});
    
    			function setVisualContent() {			
    
    				tinyMCE.execCommand('mceRemoveControl',true,'content');
    				tinyMCE.execCommand('mceAddControl',true,'content');
    				var content = '';
    
    				jQuery('#pix_builder_canvas .pix_builded_grid').each(function(){
    
    					if ( jQuery(this).attr('data-full') == 'true' && jQuery(this).attr('data-slideshow') == 'true' ) {
    
    						var firstSlide,
    							fullClass;
    
    						if ( jQuery(this).index() == 0 ) {
    							firstSlide = ' firstSlideShow'
    						} else {
    							firstSlide = ''
    						}
    
    						if ( jQuery('li',this).attr('class').indexOf('pix_fullheight') != -1 ) {
    							fullClass = ' pix_fullheight'
    						} else {
    							fullClass = ''
    						}
    
    						content = content + '<section class="pix_slideshow_wrap'+firstSlide+fullClass+'"><div class="pix_column">';
    						jQuery('> span > li',this).each(function(){
    							var attrClass = jQuery(this).attr('class'),
    								dataClass = jQuery(this).attr('data-class'),
    								attrID = typeof jQuery(this).attr('id') !== "undefined" ? ' id="'+jQuery(this).attr('id')+'"' : '',
    								alignment = jQuery(this).attr('data-last')=='true' ? ' alignright' : ' alignleft',
    								fullDivider = jQuery(this).attr('data-full')=='true' ? ' data-full=\'true\'' : '';
    								slideshow = jQuery(this).attr('data-slideshow')=='true' ? ' data-slideshow=\'true\'' : '';
    							content = content+'<div class=\'pix_column\' data-class=\''+attrClass+'\''+fullDivider+attrID+slideshow+'>'+jQuery('> .liContent',this).text()+'</div>';
    						});			
    
    					} else if ( jQuery(this).attr('data-full') == 'true' && jQuery(this).attr('data-slideshow') != 'true' ) {
    
    						var bgImg = (jQuery('li',this).css('background-image') != 'none' && jQuery('li',this).css('background-image') != '') ? 'style="background-image:'+jQuery('li',this).css('background-image').replace(/[\'"]/g,'')+'"' : '',
    							bgClass;
    
    						if ( jQuery('li',this).attr('class').indexOf('pix_cover') != -1 ) {
    							bgClass = ' pix_cover'
    						} else if ( jQuery('li',this).attr('class').indexOf('pix_norepeat') != -1 ) {
    							bgClass = ' pix_norepeat'
    						} else {
    							bgClass = ''
    						}
    
    						content = content + '<section class="pix_divider'+bgClass+'" '+bgImg+'><div class="pix_column pix_column_990">';
    						jQuery('> span > li',this).each(function(){
    							var attrClass = jQuery(this).attr('class'),
    								dataClass = jQuery(this).attr('data-class'),
    								attrID = typeof jQuery(this).attr('id') !== "undefined" ? ' id="'+jQuery(this).attr('id')+'"' : '',
    								alignment = jQuery(this).attr('data-last')=='true' ? ' alignright' : ' alignleft',
    								fullDivider = jQuery(this).attr('data-full')=='true' ? ' data-full=\'true\'' : '';
    							content = content+'<div class=\''+dataClass+alignment+'\' data-class=\''+attrClass+'\''+fullDivider+attrID+'>'+jQuery('> .liContent',this).text()+'</div>';
    						});			
    
    					} else {
    
    						content = content + '<section><div class="pix_column '+class_wrap+'">';
    						jQuery('> span > li',this).each(function(){
    							var attrClass = jQuery(this).attr('class'),
    								dataClass = jQuery(this).attr('data-class'),
    								attrID = typeof jQuery(this).attr('id') !== "undefined" ? ' id="'+jQuery(this).attr('id')+'"' : '',
    								alignment = jQuery(this).attr('data-last')=='true' ? ' alignright' : ' alignleft',
    								fullDivider = jQuery(this).attr('data-full')=='true' ? ' data-full=\'true\'' : '';
    							content = content+'<div class=\''+dataClass+alignment+'\' data-class=\''+attrClass+'\''+fullDivider+attrID+'>'+jQuery('> .liContent',this).text()+'</div>';
    						});			
    
    					}
    
    					content = content + opts.sectionClose;
    
    				});
    
    				tinyMCE.get('content').setContent(content);
    
    				var allImg = tinyMCE.get('content').dom.select('img');
    				var allA = tinyMCE.get('content').dom.select('a');
    
    				if ( !jQuery('input[name="pix_editor_field"]').is(':checked') ) {
    					jQuery(allImg).bind('click dblclick',function(event){
    						return false;
    					});
    
    					jQuery(allA).bind('click dblclick',function(event){
    						return false;
    					});
    
    					tinyMCE.get('content').getBody().setAttribute('contenteditable', false);
    
    					var tinyMCEbody = tinyMCE.get('content').dom.select('body');
    
    					jQuery(tinyMCEbody).bind('click mousedown keypress',function(event){
    						var textCant = '<p>Sorry, you can\'t modify the visual editor directly from here. Switch to "Builder" mode and edit each section</p>';
    						jQuery('body').append('<div id="pix_builder_cant" /></div>');
    						jQuery('#pix_builder_cant').html(textCant).dialog({
    							buttons: false,
    							width: 300,
    							modal: true,
    							dialogClass: 'wp-dialog pix-dialog',
    							title: 'Select some text',
    							zIndex: 100
    						});
    					});
    				}
    
    				jQuery('textarea#content').val(content);
    
    				/******************************************************
    				*
    				*	iFrame height
    				*
    				******************************************************/
    				var allImgIframe = tinyMCE.get('content').dom.select('img.mceItemIframe');
    				jQuery(allImgIframe).each(function () {
    					var t = jQuery(this),
    						h = t.attr('height'),
    						w = t.width();
    
    					if ( typeof h !== 'undefined' && h !== false && h.indexOf('%')!=-1 && !jQuery(this).parents('div').eq(0).hasClass('letmebe') ) {
    						ratio = Math.round(parseInt(h));
    						t.height( (w*(ratio*0.01)) );
    						jQuery(window).bind('resize',function(){
    							w = t.width();
    							t.height( (w*(ratio*0.01)) );
    						});
    					}
    				});
    
    			}
    
    			function setBuilderContent() {
    
    				if ( typeof tinyMCE !== "undefined" ) {
    
    					var tnmce = tinyMCE.get('content'),
    						theDom,
    						theBody,
    						content = '',
    						bgImg,
    						bgClass;
    
    					if ( typeof tnmce === "undefined" ) {
    						theBody = jQuery('textarea#content').val();
    					} else {
    						theDom = tinyMCE.get('content').dom.select('body');
    						theBody = jQuery(theDom).html();
    					}
    
    					theBody = theBody.replace(/<img[^>]+>/g, function(im) {
    						if (im.indexOf('class="mceWPclear') !== -1) {
    							im = '[clear]';
    						}
    						if (im.indexOf('class="mceWPhr') !== -1) {
    							im = '[hr]';
    						}
    						if (im.indexOf('class="mceWPslideshow') !== -1) {
    							var m, theBody = (m = im.match(/data-slideshow=[\'"](.*?)[\'"]/)) ? m[1] : '';
    							im = '[pix_slideshow data_slideshow=\''+theBody+'\']';
    						}
    						if (im.indexOf('class="mceWPpricetable') !== -1) {
    							var m, theBody = (m = im.match(/data-table=[\'"](.*?)[\'"]/)) ? m[1] : '';
    							im = '[pix_price_table data_table=\''+theBody+'\']';
    						}
    						if (im.indexOf('class="mceWPtestimonials') !== -1) {
    							var m, ids = (m = im.match(/data-ids=[\'"](.*?)[\'"]/)) ? m[1] : '',
    								m2, layout = (m2 = im.match(/data-layout=[\'"](.*?)[\'"]/)) ? m2[1] : '';
    							im = '[pix_testimonials data_ids=\''+ids+'\' data_layout=\''+layout+'\']';
    						}
    						if (im.indexOf('class="mceWPcontactform') !== -1) {
    							var m, theBody = (m = im.match(/data-form=[\'"](.*?)[\'"]/)) ? m[1] : '';
    							im = '[pix_contact_form data_form=\''+theBody+'\']';
    						}
    						if (im.indexOf('class="mceWPvideo') !== -1) {
    							var m, mp4 = (m = im.match(/data-mp4=[\'"](.*?)[\'"]/)) ? m[1] : '',
    								m2, ogv = (m2 = im.match(/data-ogv=[\'"](.*?)[\'"]/)) ? m2[1] : '',
    								m3, poster = (m3 = im.match(/data-poster=[\'"](.*?)[\'"]/)) ? m3[1] : '',
    								m4, width = (m4 = im.match(/data-width=[\'"](.*?)[\'"]/)) ? m4[1] : '',
    								m5, height = (m5 = im.match(/data-height=[\'"](.*?)[\'"]/)) ? m5[1] : '';
    							im = '[pix_video data_mp4=\''+mp4+'\' data_ogv=\''+ogv+'\' data_poster=\''+poster+'\' data_width=\''+width+'\' data_height=\''+height+'\']';
    						}
    						if (im.indexOf('class="mceWPaudio') !== -1) {
    							var m, src = (m = im.match(/data-src=[\'"](.*?)[\'"]/)) ? m[1] : '';
    							im = '[pix_audio src="'+src+'"]';
    						}
    						if (im.indexOf('class="mceWPaccordion') !== -1) {
    							var m, active = (m = im.match(/data-active=[\'"](.*?)[\'"]/)) ? m[1] : '',
    								m2, content = (m2 = im.match(/data-content=[\'"](.*?)[\'"]/)) ? m2[1] : '';
    							content = content.replace(/pix_quotes/g,'"').replace(/\[br\]/g, '\n\r');
    							im = '[pix_accordion data_active=\''+active+'\']'+content+'[/pix_accordion]';
    						}
    						if (im.indexOf('class="mceWPtabs') !== -1) {
    							var m, active = (m = im.match(/data-active=[\'"](.*?)[\'"]/)) ? m[1] : '',
    								m2, content = (m2 = im.match(/data-content=[\'"](.*?)[\'"]/)) ? m2[1] : '';
    							content = content.replace(/pix_quotes/g,'"').replace(/\[br\]/g, '\n\r');
    							im = '[pix_tabs data_active=\''+active+'\']'+content+'[/pix_tabs]';
    						}
    						im = im.replace(/data-/g, 'data_');
    						return im;
    					});
    
    					if ( !jQuery('#tempContent').length ) {
    						jQuery('body').append('<div id="tempContent" />');
    					}
    
    					jQuery('#tempContent').html(theBody);
    
    					if ( !jQuery('#tempContent > section > div').length ) {
    
    						content = '<ul class="pix_builded_grid"><span><li class=\'pix_column '+class_wrap+'\' data-size=\''+max_columns+'\'><span class="liContent">'+theBody+'</span></li></span></ul>';
    
    					} else {
    
    						jQuery('#tempContent > section > div').each(function(){
    
    							if ( jQuery(this).parents('section').eq(0).hasClass('pix_divider') ) {
    								bgImg = ' style="background-image:'+jQuery(this).parents('section').eq(0).css('background-image').replace(/[\'"]/g,'')+'"';
    								if ( !jQuery('> div',this).length ) { jQuery(this).append('<div class="pix_column pix_column_990 alignleft" data-class="pix_column pix_column_990 pix_cover" data-full="true" />'); }
    								if ( jQuery(this).parents('section').eq(0).hasClass('pix_cover') ) {
    									bgClass = ' pix_cover';
    								} else if ( jQuery(this).parents('section').eq(0).hasClass('pix_norepeat') ) {
    									bgClass = ' pix_norepeat';
    								}
    							} else if ( jQuery(this).parents('section').eq(0).hasClass('pix_slideshow_wrap') ) {
    								bgImg = '';
    								if ( jQuery(this).parents('section').eq(0).hasClass('pix_fullheight') ) {
    									bgClass = ' pix_fullheight';
    								} else {
    									bgClass = '';
    								}
    							} else {
    								bgImg = '';
    								bgClass = '';
    							}
    
    							content = content + '<ul class="pix_builded_grid"><span>';
    
    							jQuery('> div.pix_column',this).each(function(){
    								var attrClass = jQuery(this).attr('data-class'),
    									dataClass = jQuery(this).attr('class'),
    									attrID = typeof jQuery(this).attr('id') !== "undefined" ? ' id="'+jQuery(this).attr('id')+'"' : '',
    									fullDivider = jQuery(this).attr('data-full')=='true' ? ' data-full=\'true\'' : '',
    									slideshow = jQuery(this).attr('data-slideshow')=='true' ? ' data-slideshow=\'true\'' : '',
    									dataSize;
    								if ( typeof attrClass !== 'undefined' && attrClass !== false ) {
    									if ( attrClass.indexOf(opts.oneColumnClass)!=-1 ) {
    										dataSize = 1;
    									} else if ( attrClass.indexOf(opts.twoColumnClass)!=-1 ) {
    										dataSize = 2;
    									} else if ( attrClass.indexOf(opts.threeColumnClass)!=-1 ) {
    										dataSize = 3;
    									} else if ( attrClass.indexOf(opts.fourColumnClass)!=-1 ) {
    										dataSize = 4;
    									}
    								} else {
    									dataSize = parseFloat(jQuery('#pix_builder_canvas .wrap').attr('data-maxcolumns'));
    								}
    								content = content+'<li class=\''+dataClass+bgClass+'\' data-class=\''+attrClass+'\' data-size=\''+dataSize+'\''+fullDivider+bgImg+attrID+slideshow+'><span class="liContent">'+jQuery(this).html()+'</span></li>';
    							});
    
    							content = content + '</span></ul>';
    
    						});
    
    					}
    
    					jQuery('#pix_builder_canvas > .wrap').html(content);
    
    					jQuery('#pix_builder_canvas > .wrap .liContent').each(function(){
    						var html = jQuery(this).html();
    						jQuery(this).text(html);
    					});
    
    					clearTimeout(set);
    					var set = setTimeout(function(){ dataSizeToClass(); },1); //to prevent that the dyna-generated <li> elements have width=0
    
    				}
    			}
    
    			function dataSizeToClass(){
    				jQuery("ul.pix_builded_grid").each(function(){
    					var t = jQuery(this),
    						sizeT = 0,
    						set;
    					t.attr('data-full','');
    					jQuery(" > span > li", t).not('.ui-state-highlight').not('.ui-sortable-helper').each(function(){
    						var size = parseFloat(jQuery(this).attr('data-size')),
    							classLi;
    						switch (size) {
    							case 4:
    								classLi = 'pix_column ' + opts.fourColumnClass;
    								break;
    							case 3:
    								classLi = 'pix_column ' + opts.threeColumnClass;
    								break;
    							case 2:
    								classLi = 'pix_column ' + opts.twoColumnClass;
    								break;
    							default:
    								classLi = 'pix_column ' + opts.oneColumnClass;
    						}
    						jQuery(this).removeClass(opts.oneColumnClass).removeClass(opts.twoColumnClass).removeClass(opts.threeColumnClass).removeClass(opts.fourColumnClass);
    						jQuery(this).addClass(classLi).attr('data-class',classLi);
    						sizeT = (sizeT+size);
    						var thisUl = jQuery(this);
    						clearTimeout(set);
    						set = setTimeout(function() {
    							var thisW = thisUl.width(),
    								parentW = t.width(),
    								thisL = thisUl.position().left;
    							if ( ( thisW+thisL ) > ( parentW * 0.8 ) && t.find('> span > li').length > 1 ) {
    								thisUl.attr('data-last','true');
    							} else {
    								thisUl.attr('data-last','false');
    							}
    							jQuery(this).addClass('transitioning');
    
    							if ( thisUl.attr('data-full')=='true' ) {
    								t.attr('data-full','true');
    							} else {
    								t.attr('data-full','');
    							}
    
    							if ( thisUl.attr('data-slideshow')=='true' ) {
    								t.attr('data-slideshow','true');
    							} else {
    								t.attr('data-slideshow','');
    							}
    						}, 200);
    					});
    					t.attr('data-size',sizeT);
    					jQuery('input[name="pix_hidden_field"]').val(sizeT);
    				});
    			}
    			dataSizeToClass();
    
    			jQuery('#content-tmce').bind('click',function(){
    				var wrap = jQuery(this).parents('#wp-content-wrap').eq(0);
    				wrap.addClass('tmce-active').removeClass('builder-active');
    				jQuery('#pix-builder-editor-container').hide();
    				jQuery('#wp-content-editor-container, #post-status-info').show();
    
    				var set;
    				clearTimeout(set);
    				set = setTimeout(function(){ setVisualContent(); },200);
    
    				localStorage.setItem('forte_editor_tab', 'forte_visual')
    
    			});
    
    			var after = jQuery('#pix-builder-editor-container');
    
    			jQuery('#wp-content-editor-container').after(after);
    
    			function builderSortable(){
    				jQuery('#pix_builder_canvas > .wrap').sortable({
    					items: '> ul.pix_builded_grid',
    					cursor: 'move',
    					handle: '.pix_builder_move',
    					placeholder: "ui-state-highlight",
    					revert: 100,
    					tolerance: 'pointer',
    					stop: function(event,ui) {
    						var set;
    						clearTimeout(set);
    						set = setTimeout(function(){ setVisualContent(); },200);
    					}
    				});
    
    				jQuery("ul.pix_builded_grid > span").each(function(){
    					var t = jQuery(this);
    					t.sortable({
    						connectWith: jQuery('ul.pix_builded_grid > span'),
    						cursor: 'move',
    						handle: '.pix_builder_move',
    						placeholder: "ui-state-highlight",
    						revert: 100,
    						tolerance: 'pointer',
    						sort: function(event,ui){
    							jQuery("ul.pix_builded_grid > span > li").removeClass('transitioning');
    							var itemClass = ui.item.attr('class');
    							jQuery('.ui-state-highlight').attr('class','ui-state-highlight '+itemClass);
    							var setSizeclass;
    							clearTimeout(setSizeclass);
    							setSizeclass = setTimeout(function(){ dataSizeToClass(); },100);
    						},
    						stop: function(event,ui){
    							var setStopSort;
    							clearTimeout(setStopSort);
    							setStopSort = setTimeout(function(){
    								jQuery("ul.pix_builded_grid > span > li").addClass('transitioning');
    								var sizeT = parseFloat(ui.item.closest('ul.pix_builded_grid').attr('data-size')),
    									sizeItem = parseFloat(ui.item.attr('data-size'));
    								if ( (sizeT+sizeItem) > max_columns ) {
    									var textCant = '<p>Sorry, this movement is not possible. This doesn\'t fit here</p><p>You need to change the width of the column. Your column will now go back to it\'s last position but errors are possible so please <strong>double check that your column is where it should be before saving</strong></p>';
    									jQuery('body').append('<div id="pix_builder_cant" /></div>');
    									jQuery('#pix_builder_cant').html(textCant).dialog({
    										buttons: false,
    										width: 200,
    										modal: true,
    										dialogClass: 'wp-dialog pix-dialog',
    										title: 'Sorry, you can\'t',
    										zIndex: 100,
    										close: function(){
    											jQuery('#pix_builder_cant').remove();
    										}
    									});
    									t.sortable('cancel');
    								}
    								dataSizeToClass();
    							});
    							var set;
    							clearTimeout(set);
    							set = setTimeout(function(){ setVisualContent(); },200);
    						}
    					});
    				});
    			}
    
    			function addRowIcons(){
    				jQuery("ul.pix_builded_grid").each(function(){
    					if ( !jQuery('> .pix_builder_move', this).length ) {
    						jQuery(this).append('<div class="pix_row_icons pix_builder_move" />');
    					}
    					if ( !jQuery('> .pix_builder_remove', this).length ) {
    						jQuery(this).append('<div class="pix_row_icons pix_builder_remove" data-tip="Remove this section" />');
    					}
    					if ( !jQuery('> .pix_builder_add', this).length ) {
    						jQuery(this).append('<div class="pix_row_icons pix_builder_add" data-tip="Add a new column<br>to this section" />');
    					}
    					if ( !jQuery('> .pix_builder_clone', this).length ) {
    						jQuery(this).append('<div class="pix_row_icons pix_builder_clone" data-tip="Clone this section" />');
    					}
    				});
    			}
    
    			function addItemIcons(){
    				jQuery("ul.pix_builded_grid > span > li").each(function(){
    					if ( !jQuery('.pix_builder_move', this).length ) {
    						jQuery(this).append('<div class="pix_items_icons pix_builder_move" />');
    					}
    					if ( !jQuery('.pix_builder_remove', this).length ) {
    						jQuery(this).append('<div class="pix_items_icons pix_builder_remove" data-tip="Remove this column" />');
    					}
    					if ( !jQuery('.pix_builder_edit', this).length && jQuery(this).attr('data-slideshow')!='true' ) {
    						jQuery(this).append('<div class="pix_items_icons pix_builder_edit" data-tip="Edit this column" />');
    					}
    					if ( !jQuery('.pix_builder_bg', this).length && jQuery(this).attr('data-full')=='true' && jQuery(this).attr('data-slideshow')!='true' ) {
    						jQuery(this).append('<div class="pix_items_icons pix_builder_bg" data-tip="Add a bg image" />');
    					}
    					if ( !jQuery('.pix_builder_cancelbg', this).length && jQuery(this).attr('data-full')=='true' && jQuery(this).attr('data-slideshow')!='true' ) {
    						jQuery(this).append('<div class="pix_items_icons pix_builder_cancelbg" data-tip="Remove the bg image" />');
    					}
    					if ( !jQuery('.pix_builder_repeat', this).length && jQuery(this).attr('data-full')=='true' && jQuery(this).attr('data-slideshow')!='true' ) {
    						var bgClass,
    							tipText;
    						if ( jQuery(this).attr('class').indexOf('pix_cover') != -1 ) {
    							bgClass = ' pix_cover';
    							tipText = 'Fullscreen bg (click to change)';
    						} else if ( jQuery(this).attr('class').indexOf('pix_norepeat') != -1 ) {
    							bgClass = ' pix_norepeat';
    							tipText = 'Portrait bg (click to change)';
    						} else {
    							bgClass = '';
    							tipText = 'Repeated bg (click to change)';
    						}
    						jQuery(this).append('<div class="pix_items_icons pix_builder_repeat'+bgClass+'" data-tip="'+tipText+'" />');
    					}
    					if ( !jQuery('.pix_builder_slideshow', this).length && jQuery(this).attr('data-full')=='true' && jQuery(this).attr('data-slideshow')=='true' ) {
    						jQuery(this).append('<div class="pix_items_icons pix_builder_slideshow" data-tip="Add a slideshow" />');
    					}
    					if ( !jQuery('.pix_builder_slideheight', this).length && jQuery(this).attr('data-full')=='true' && jQuery(this).attr('data-slideshow')=='true' ) {
    						var bgClass,
    							tipText;
    						if ( jQuery(this).attr('class').indexOf('pix_fullheight') != -1 ) {
    							bgClass = ' pix_fullheight';
    							tipText = '100% height (click to change)';
    						} else {
    							bgClass = '';
    							tipText = 'Auto height (click to change)';
    						}
    						jQuery(this).append('<div class="pix_items_icons pix_builder_slideheight'+bgClass+'" data-tip="'+tipText+'" />');
    					}
    					if ( !jQuery('.pix_builder_id', this).length ) {
    						jQuery(this).append('<div class="pix_items_icons pix_builder_id" data-tip="Add an ID to this column" />');
    					}
    					if ( !jQuery('.pix_builder_expand', this).length && jQuery(this).attr('data-full')!='true' ) {
    						jQuery(this).append('<div class="pix_items_icons pix_builder_expand" data-tip="Expand the column width" />');
    					}
    					if ( !jQuery('.pix_builder_contract', this).length && jQuery(this).attr('data-full')!='true' ) {
    						jQuery(this).append('<div class="pix_items_icons pix_builder_contract" data-tip="Contract the column width" />');
    					}
    					if ( !jQuery('.pix_builder_clone', this).length && jQuery(this).attr('data-full')!='true' ) {
    						jQuery(this).append('<div class="pix_items_icons pix_builder_clone" data-tip="Clone this column" />');
    					}
    					if ( !jQuery('.gradient_end', this).length ) {
    						jQuery(this).append('<div class="gradient_end" />');
    					}
    				});
    				pix_tooltips();
    			}
    
    			function switchBuilder(){
    				setBuilderContent();
    				addItemIcons();
    				addRowIcons();
    				builderSortable();
    				pix_tooltips();
    
    				jQuery('#wp-content-editor-container, #post-status-info').hide();
    				jQuery('#pix-builder-editor-container').show();
    				var wrap = jQuery('#wp-content-wrap');
    				wrap.removeClass('tmce-active').addClass('builder-active');
    				localStorage.setItem('forte_editor_tab', 'forte_builder');
    
    			}
    
    			jQuery(document).off('click','#pix-content-builder');
    			jQuery(document).on('click','#pix-content-builder',function(){
    				switchBuilder();
    			});
    
    			if ( forte_editor_tab == 'forte_builder' ) {
    				switchBuilder();
    			}
    
    			jQuery(document).on('click','ul.pix_builded_grid .pix_builder_add',function(){
    				var parent = jQuery(this).parents('ul.pix_builded_grid').eq(0),
    					sizeT = parseFloat(parent.attr('data-size'));
    				if ( sizeT < max_columns ) {
    					if ( sizeT == 0 && max_columns==4 ) {
    						var textCant = 'You can select between:<form><fieldset><select name="pix_section_select" id="pix_section_select"><option value="simple">Simple column</option><option value="divider">Full screen divider</option><option value="slideshow">Full screen slideshow</option></select></fieldset></form>';
    						jQuery('body').append('<div id="pix_builder_cant" /></div>');
    						jQuery('#pix_builder_cant').html(textCant).dialog({
    							width: 200,
    							modal: true,
    							dialogClass: 'wp-dialog pix-dialog',
    							title: 'Please, select',
    							buttons: {
    								"Select": function() {
    									if ( jQuery('#pix_section_select option:selected').val() == 'simple' ) {
    										jQuery('> span',parent).append('<li data-size="1"><span class="liContent"></span><span class="gradient_end"></span></li>');
    										dataSizeToClass();
    										addItemIcons();
    									} else if ( jQuery('#pix_section_select option:selected').val() == 'divider' ) {
    										jQuery('> span',parent).append('<li data-size="'+max_columns+'" data-full="true"><span class="liContent"></span><span class="gradient_end"></span></li>');
    										dataSizeToClass();
    										addItemIcons();
    									} else {
    										jQuery('> span',parent).append('<li data-size="'+max_columns+'" data-full="true" data-slideshow="true"><span class="liContent"></span><span class="gradient_end"></span></li>');
    										dataSizeToClass();
    										addItemIcons();
    									}
    									jQuery( this ).dialog( "close" );
    									var set;
    									clearTimeout(set);
    									set = setTimeout(function(){ setVisualContent(); },200);
    								},
    								"Cancel": function() {
    									jQuery( this ).dialog( "close" );
    								}
    							},
    							zIndex: 100,
    							close: function(){
    								jQuery('#pix_builder_cant').remove();
    							}
    						});
    					} else {
    						jQuery('> span',parent).append('<li data-size="1"><span class="liContent"></span><span class="gradient_end"></span></li>');
    						dataSizeToClass();
    						addItemIcons();
    						var set;
    						clearTimeout(set);
    						set = setTimeout(function(){ setVisualContent(); },200);
    					}
    				} else {
    					var textCant = 'Sorry, this movement is not possible. This doesn\'t fit here';
    					jQuery('body').append('<div id="pix_builder_cant" /></div>');
    					jQuery('#pix_builder_cant').text(textCant).dialog({
    						buttons: false,
    						width: 200,
    						modal: true,
    						dialogClass: 'wp-dialog pix-dialog',
    						title: 'Sorry, you can\'t',
    						zIndex: 100,
    						close: function(){
    							jQuery('#pix_builder_cant').remove();
    						}
    					});
    				}
    			});
    
    			jQuery(document).on('click','ul.pix_builded_grid > span > li .pix_builder_remove',function(){
    				var parentLi = jQuery(this).parents('li[data-size]').eq(0),
    					textCant = 'Are you sure you want to delete this item?';
    				jQuery('body').append('<div id="pix_builder_cant" /></div>');
    				jQuery('#pix_builder_cant').text(textCant).dialog({
    					width: 200,
    					modal: true,
    					dialogClass: 'wp-dialog pix-dialog',
    					title: 'Are you sure?',
    					buttons: {
    						"Yes, I'm sure": function() {
    							jQuery( this ).dialog( "close" );
    							parentLi.removeClass('transitioning').fadeTo(350, 0,function(){
    								jQuery(this).hide(150,function(){
    									jQuery(this).remove();
    									dataSizeToClass();
    									var set;
    									clearTimeout(set);
    									set = setTimeout(function(){ setVisualContent(); },200);
    								});
    							});
    
    						},
    						"No, cancel": function() {
    							jQuery( this ).dialog( "close" );
    						}
    					},
    					zIndex: 100,
    					close: function(){
    						jQuery('#pix_builder_cant').remove();
    					}
    				});
    			});
    
    			jQuery(document).on('click','ul.pix_builded_grid > span > li .pix_builder_expand',function(){
    				var parent = jQuery(this).parents('ul.pix_builded_grid').eq(0),
    					parentLi = jQuery(this).parents('li[data-size]').eq(0),
    					sizeT = parseFloat(parent.attr('data-size')),
    					size = (parseFloat(parentLi.attr('data-size')));
    				if ( size <= max_columns ) {
    					if ( sizeT<max_columns ) {
    						parentLi.attr('data-size',(size+1));
    						dataSizeToClass();
    						var set;
    						clearTimeout(set);
    						set = setTimeout(function() { setVisualContent(); }, 200);
    					} else {
    						var textCant = 'Sorry, this movement is not possible. This doesn\'t fit here';
    						jQuery('body').append('<div id="pix_builder_cant" /></div>');
    						jQuery('#pix_builder_cant').text(textCant).dialog({
    							buttons: false,
    							width: 200,
    							modal: true,
    							dialogClass: 'wp-dialog pix-dialog',
    							title: 'Sorry, you can\'t',
    							zIndex: 100,
    							close: function(){
    								jQuery('#pix_builder_cant').remove();
    							}
    						});
    					}
    				} else {
    					var textCant = 'Sorry, you reached the maximum width';
    					jQuery('body').append('<div id="pix_builder_cant" /></div>');
    					jQuery('#pix_builder_cant').text(textCant).dialog({
    						buttons: false,
    						width: 200,
    						modal: true,
    						dialogClass: 'wp-dialog pix-dialog',
    						title: 'Sorry, you can\'t',
    						zIndex: 100,
    						close: function(){
    							jQuery('#pix_builder_cant').remove();
    						}
    					});
    				}
    			});
    
    			jQuery(document).on('click','ul.pix_builded_grid > span > li .pix_builder_contract',function(){
    				var parent = jQuery(this).parents('ul.pix_builded_grid').eq(0),
    					parentLi = jQuery(this).parents('li[data-size]').eq(0)
    					size = parseFloat(parentLi.attr('data-size'));
    				if ( size > 1 ) {
    					parentLi.attr('data-size',(size-1));
    					dataSizeToClass();
    					var set;
    					clearTimeout(set);
    					set = setTimeout(function() { setVisualContent(); }, 200);
    				} else {
    					var textCant = 'Sorry, you reached the minimum width';
    					jQuery('body').append('<div id="pix_builder_cant" /></div>');
    					jQuery('#pix_builder_cant').text(textCant).dialog({
    						buttons: false,
    						width: 200,
    						modal: true,
    						dialogClass: 'wp-dialog pix-dialog',
    						title: 'Sorry, you can\'t',
    						zIndex: 100,
    						close: function(){
    							jQuery('#pix_builder_cant').remove();
    						}
    					});
    				}
    			});
    
    			jQuery(document).on('click','ul.pix_builded_grid > span > li .pix_builder_clone',function(){
    				var parent = jQuery(this).parents('ul.pix_builded_grid').eq(0),
    					parentLi = jQuery(this).parents('li[data-size]').eq(0)
    					sizeT = parseFloat(parent.attr('data-size')),
    					size = parseFloat(parentLi.attr('data-size')),
    					clone = parentLi.clone();
    				if ( (sizeT+size) <= max_columns ) {
    					parentLi.after(clone);
    				} else {
    					var textCant = 'Sorry, this movement is not possible. This doesn\'t fit here';
    					jQuery('body').append('<div id="pix_builder_cant" /></div>');
    					jQuery('#pix_builder_cant').text(textCant).dialog({
    						buttons: false,
    						width: 200,
    						modal: true,
    						dialogClass: 'wp-dialog pix-dialog',
    						title: 'Sorry, you can\'t',
    						zIndex: 100,
    						close: function(){
    							jQuery('#pix_builder_cant').remove();
    						}
    					});
    				}
    				dataSizeToClass();
    				addItemIcons();
    				builderSortable();
    				var set;
    				clearTimeout(set);
    				set = setTimeout(function(){ setVisualContent(); },200);
    			});
    
    			jQuery(document).on('click','ul.pix_builded_grid > .pix_builder_clone',function(){
    				var parent = jQuery(this).parents('ul.pix_builded_grid').eq(0),
    					clone = parent.clone();
    				parent.after(clone);
    				dataSizeToClass();
    				addItemIcons();
    				builderSortable();
    				var set;
    				clearTimeout(set);
    				set = setTimeout(function(){ setVisualContent(); },200);
    			});
    
    			jQuery(document).on('click','ul.pix_builded_grid > .pix_builder_remove',function(){
    				var parent = jQuery(this).parents('ul.pix_builded_grid').eq(0),
    					textCant = 'Are you sure you want to delete this section?';
    				jQuery('body').append('<div id="pix_builder_cant" /></div>');
    				jQuery('#pix_builder_cant').text(textCant).dialog({
    					width: 200,
    					modal: true,
    					dialogClass: 'wp-dialog pix-dialog',
    					title: 'Are you sure?',
    					buttons: {
    						"Yes, I'm sure": function() {
    							jQuery( this ).dialog( "close" );
    							parent.removeClass('transitioning').fadeTo(350, 0,function(){
    								jQuery(this).hide(150,function(){
    									jQuery(this).remove();
    									dataSizeToClass();
    									var set;
    									clearTimeout(set);
    									set = setTimeout(function(){ setVisualContent(); },200);
    								});
    							});
    
    						},
    						"No, cancel": function() {
    							jQuery( this ).dialog( "close" );
    						}
    					},
    					zIndex: 100,
    					close: function(){
    						jQuery('#pix_builder_cant').remove();
    					}
    				});
    			});
    
    			jQuery(document).on('click',"ul.pix_builded_grid > span > li .pix_builder_edit",function(){
    				tinyMCE.execCommand('mceRemoveControl',false,'textArea');
    				var t = jQuery(this).parents('li').eq(0),
    					htmlThis = jQuery('.liContent',t).text(),
    					h = jQuery(window).height(),
    					div = jQuery('#textarea_builder'),
    					dataClass = t.attr('data-class');
    				jQuery(div).dialog({
    					width: '80%',
    					modal: false,
    					dialogClass: 'wp-dialog pix-dialog pix-page-builder',
    					title: 'Add some content',
    					zIndex: 50,
    					open: function(){
    						forteTinyMCEinit();
    						jQuery('body').append('<div id="pix-modal-overlay" />');
    						jQuery('#pix-modal-overlay').css({
    							background: '#000000',
    							bottom: 0,
    							height: '100%',
    							left: 0,
    							opacity: 0.6,
    							position: 'fixed',
    							right: 0,
    							top: 0,
    							width: '100%',
    							zIndex: 99
    						});
    						tinyMCE.execCommand('mceAddControl',false,'textArea');
    						tinyMCE.execCommand('mceFocus',false,'textArea');
    						tinyMCE.get('textArea').setContent(htmlThis);
    						var bodyTMCE = tinyMCE.get('textArea').dom.select('body');
    						jQuery(bodyTMCE).addClass(dataClass);
    						jQuery('#wp-textArea-wrap').removeClass('html-active').addClass('tmce-active');
    						/******************************************************
    						*
    						*	iFrame height
    						*
    						******************************************************/
    						var allImgIframe = tinyMCE.get('textArea').dom.select('img.mceItemIframe');
    						jQuery(function() {
    							jQuery(allImgIframe).each(function () {
    								var t = jQuery(this),
    									h = t.attr('height'),
    									w = t.width();
    
    								if ( typeof h !== 'undefined' && h !== false && h.indexOf('%')!=-1 && !jQuery(this).parents('div').eq(0).hasClass('letmebe') ) {
    									ratio = Math.round(parseInt(h));
    									t.height( (w*(ratio*0.01)) );
    									jQuery(window).bind('resize',function(){
    										w = t.width();
    										t.height( (w*(ratio*0.01)) );
    									});
    								}
    							});
    
    						});
    					},
    					buttons: {
    						'Edit': function() {
    							var cont;
    							if ( jQuery('#wp-textArea-wrap').hasClass('html-active') && tinyMCE.activeEditor.getParam('wpautop', true) ) {
    								cont = switchEditors.wpautop(jQuery('textarea#textArea').val());
    							} else {
    								cont = tinyMCE.activeEditor.getContent();
    							}
    							jQuery('.liContent',t).text(cont);
    
    							var set;
    							clearTimeout(set);
    							set = setTimeout(function(){ setVisualContent(); },200);
    
    							var bodyTMCE = tinyMCE.get('textArea').dom.select('body');
    							jQuery( this ).dialog( "close" );
    						},
    						'Cancel': function() {
    							jQuery( this ).dialog( "close" );
    						}
    					},
    					close: function(){
    						var bodyTMCE = tinyMCE.get('textArea').dom.select('body');
    						jQuery(bodyTMCE).removeClass(dataClass);
    						jQuery('#pix-modal-overlay').remove();
    					}
    				});
    			});
    
    			jQuery(document).on('click',"ul.pix_builded_grid > span > li .pix_builder_bg",function(){
    
    				var el = jQuery(this).parents('li').eq(0);
    
    				tb_show('', 'media-upload.php?type=image&height=800&width=600&TB_iframe=true');
    
    				window.image_send_to_editor = window.send_to_editor;
    				window.send_to_editor = function(html, f) {
    
    					var imgurl = jQuery('img',html).attr('src');
    
    					el.css({
    						backgroundImage : 'url('+imgurl+')'
    					});
    
    					var set;
    					clearTimeout(set);
    					set = setTimeout(function(){ setVisualContent(); },200);
    
    					tb_remove();
    
    				}
    			});
    
    			jQuery(document).on('click',"ul.pix_builded_grid > span > li .pix_builder_cancelbg",function(){
    
    				var el = jQuery(this).parents('li').eq(0);
    
    				el.css({
    					backgroundImage : ''
    				});
    
    				var set;
    				clearTimeout(set);
    				set = setTimeout(function(){ setVisualContent(); },200);
    
    				tb_remove();
    
    			});
    
    			jQuery(document).on('click',"ul.pix_builded_grid > span > li .pix_builder_repeat",function(){
    
    				var parent = jQuery(this).parents('li').eq(0);
    
    				if ( jQuery(this).hasClass('pix_cover') ) {
    					jQuery(this).removeClass('pix_cover').addClass('pix_norepeat').attr('data-tip','Portrait bg (click to change)').trigger('retooltip');
    					jQuery('#pix_tooltip').html('Portrait bg (click to change)');
    					parent.removeClass('pix_cover').addClass('pix_norepeat');
    				} else if( jQuery(this).hasClass('pix_norepeat') ) {
    					jQuery(this).removeClass('pix_norepeat').attr('data-tip','Repeated bg (click to change)').trigger('retooltip');
    					jQuery('#pix_tooltip').html('Repeated bg (click to change)');
    					parent.removeClass('pix_norepeat');
    				} else {
    					jQuery(this).addClass('pix_cover').attr('data-tip','Fullscreen bg (click to change)').trigger('retooltip');
    					jQuery('#pix_tooltip').html('Fullscreen bg (click to change)');
    					parent.addClass('pix_cover');
    				}
    
    				var set;
    				clearTimeout(set);
    				set = setTimeout(function(){ setVisualContent(); },200);
    
    			});
    
    			jQuery(document).on('click',"ul.pix_builded_grid > span > li .pix_builder_slideheight",function(){
    
    				var parent = jQuery(this).parents('li').eq(0);
    
    				if ( jQuery(this).hasClass('pix_fullheight') ) {
    					jQuery(this).removeClass('pix_fullheight').attr('data-tip','Auto height (click to change)').trigger('retooltip');
    					jQuery('#pix_tooltip').html('Auto height (click to change)');
    					parent.removeClass('pix_fullheight');
    				} else {
    					jQuery(this).addClass('pix_fullheight').attr('data-tip','100% height (click to change)').trigger('retooltip');
    					jQuery('#pix_tooltip').html('100% height (click to change)');
    					parent.addClass('pix_fullheight');
    				}
    
    				var set;
    				clearTimeout(set);
    				set = setTimeout(function(){ setVisualContent(); },200);
    
    			});
    
    			jQuery(document).on('click',"ul.pix_builded_grid > span > li .pix_builder_slideshow",function(){
    
    				var parent = jQuery(this).parents('li').eq(0);
    
    				var t = jQuery("#slideshow_generator").clone();
    				t.dialog({
    					height: 'auto',
    					maxHeight: '800',
    					width: 'auto',
    					modal: true,
    					dialogClass: 'wp-dialog pix-dialog',
    					title: 'Slideshow shortcode generator',
    					zIndex: 100
    				});
    				jQuery('.button',t).one('click',function(){
    					var set;
    					clearTimeout(set);
    					set = setTimeout(function(){ setVisualContent(); },200);
    					var form = jQuery('select option:selected',t).val();
    					t.dialog('close').remove();
    					jQuery('> span.liContent', parent).html('<p>[pix_slideshow data-slideshow=\''+form+'\']</p>' );
    				});
    
    				var set;
    				clearTimeout(set);
    				set = setTimeout(function(){ setVisualContent(); },200);
    
    			});
    
    			jQuery(document).on('click',"ul.pix_builded_grid > span > li .pix_builder_id",function(){
    				var t = jQuery(this).parents('li').eq(0),
    					idThis = typeof t.attr('id') === "undefined" ? '' : t.attr('id'),
    					textCant = '<form><fieldset><label>Add an ID (latin characters only and no empty space allowed):</label><input type="text" name="idThis" id="idThis" value="'+idThis+'"></fieldset></form>';
    				jQuery('body').append('<div id="pix_builder_cant" class="pix_builder_form" /></div>');
    				jQuery('#pix_builder_cant').html(textCant).dialog({
    					width: 300,
    					modal: true,
    					dialogClass: 'wp-dialog pix-dialog',
    					title: 'Add an ID',
    					zIndex: 50,
    					buttons: {
    						'Add': function() {
    							var value = jQuery( 'input#idThis',this ).val();
    							t.attr('id',value);
    							jQuery( this ).dialog( "close" );
    							var set;
    							clearTimeout(set);
    							set = setTimeout(function(){ setVisualContent(); },200);
    						},
    						Cancel: function() {
    							jQuery( this ).dialog( "close" );
    						}
    					},
    					close: function(){
    						jQuery('#pix_builder_cant').remove();
    					}
    				});
    			});
    
    			jQuery(document).on('click','#pix_builder_tools .pix_builder_addrow',function(){
    				jQuery('#pix_builder_canvas > .wrap').append('<ul class="pix_builded_grid" data-size="0"><span></span></ul>');
    				addRowIcons();
    				addItemIcons();
    				builderSortable();
    				var set;
    				clearTimeout(set);
    				set = setTimeout(function(){ setVisualContent(); },200);
    			});
    		}
    	}
    
    });
    
    /********************************
    *
    *	Tooltips
    *
    ********************************/
    function pix_tooltips() {
    	var setOut,
    		setIn;
    	jQuery('*[data-tip]').bind('mouseenter retooltip',function(){
    		var t = jQuery(this);
    		setOut = setTimeout(function(){
    			var off,
    				cont = t.attr('data-tip'),
    				position = t.attr('data-position'),
    				ttW,
    				left,
    				arrowClass,
    				arrowTop,
    				arrowLeft,
    				top;
    			if ( position == 'bottom' ) {
    				arrowClass = 'totop_arrow';
    			} else {
    				arrowClass = 'tobottom_arrow';
    			}
    			off = t.offset();
    			tW = parseFloat(t.outerWidth()*0.5);
    			tH = parseFloat(t.outerHeight());
    			jQuery('html').append('<div id="pix_tooltip">'+cont+'</div><div id="pix_tooltip_arrow" class="'+arrowClass+'"></div>');
    			jQuery('#pix_tooltip').css({
    				top: 0,
    				left: 0,
    				display: 'block',
    				opacity: 0,
    				width: t.attr('data-width')+'px'
    			});
    			ttW = parseFloat(jQuery('#pix_tooltip').outerWidth()) * 0.5;
    			ttH = parseFloat(jQuery('#pix_tooltip').outerHeight());
    			if ( position == 'bottom' ) {
    				arrowTop = ( off.top + tH );
    				top = (( off.top + tH ) + 4);
    			} else {
    				arrowTop = ( off.top );
    				top = ( off.top - ttH ) - 4;
    			}
    			arrowLeft = (off.left+tW);
    			left = ( off.left + tW ) - ttW;
    			if ( left < 0 ) {
    				left = 5;
    			} else if ( (off.left+ttW) > jQuery(window).width() ) {
    				left = ( ( jQuery(window).width() - (ttW*2) ) -5 );
    			}
    			jQuery('#pix_tooltip_arrow').css({
    				top: arrowTop,
    				left: arrowLeft
    			}).fadeIn(100);
    			jQuery('#pix_tooltip').css({
    				top: top,
    				left: left
    			}).animate({opacity:1},100);
    
    		},70);
    	});
    	jQuery('*[data-tip]').bind('mouseleave',function(){
    		clearTimeout(setOut);
    		jQuery('#pix_tooltip, #pix_tooltip_arrow').fadeOut(30,function(){
    			jQuery(this).remove();
    		});
    	});
    
    }

    Las otras cuatro lineas apuntan a un loadscripts de wp-admin

    /*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
    !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof
Viendo 1 respuesta (de un total de 1)
  • Peter Olle

    (@peterolle)

    Pide al autor del tema que lo actualice apra ser compatible con las ultimas versiones de WordPress. Si arreglas partes de los errores, te seguirán saliendo más y más si no se actualiza el tema por completo y de forma correcta, cosa que solo el autor puede hacer.

Viendo 1 respuesta (de un total de 1)
  • El debate ‘Page Builder dejo de funcionar con ultimo update WP’ está cerrado a nuevas respuestas.