403Webshell
Server IP : 31.214.179.3  /  Your IP : 216.73.216.231
Web Server : Apache
System : Linux hostingsrv125.dondominio.com 6.12.96+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.96-1 (2026-07-20) x86_64
User :  ( 1156851)
PHP Version : 8.5.8
Disable Function : system,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,exec,ini_alter,show_source,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,mail,eval
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /hosting/www/thermatron.es/public/wp-content/themes/betheme/visual-builder/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /hosting/www/thermatron.es/public/wp-content/themes/betheme/visual-builder/assets/js//button.js
(function ($) {
	'use strict';

	var MfnGutenberg = {
		init: function () {
			//if( !$('body').hasClass('post-new-php') ){
		      MfnGutenberg.addButton();
			//}
		},

		//PBL
		createFilteredLink: function() {

			/*if( wp.data.select("core/editor") == null ) return;

			var getThemeName = $('#mfn-builder').attr('data-label');
			var getThemeLogo = $('.betheme-custom-logo').attr('src') ? `style="background-image:url('${ $(".betheme-custom-logo").attr("src") }')"` : "";
			var getThemeSlug = $('#mfn-builder').attr('data-slug') ? $('#mfn-builder').attr('data-slug')  : 'mfn';

			if ( 'Be' !== getThemeName ) {
				return '<a href="post.php?post='+wp.data.select("core/editor").getCurrentPostId()+'&action='+ getThemeSlug +'-live-builder" class="mfn-live-edit-page-button mfn-switch-live-editor" '+getThemeLogo+'>Edit with '+ getThemeName +'Builder</a>';
			}

			// basic, original code
			return '<a href="post.php?post='+wp.data.select("core/editor").getCurrentPostId()+'&action='+ getThemeSlug +'-live-builder" class="mfn-live-edit-page-button mfn-switch-live-editor">Edit with BeBuilder</a>';*/

			if( $('.mfn-switch-live-editor').length ) return $('.mfn-switch-live-editor').clone();
		},

		addButton: function() {
			var that = this;
			setTimeout(function() {
				//if( !$('#editor .mfn-live-edit-page-button').length ){
					$('#editor').find('.edit-post-header .edit-post-header__toolbar').append( that.createFilteredLink() );
					MfnGutenberg.buttonAction();
				//}
			}, 2000);
		},

		buttonAction: function() {

			$('.mfn-switch-live-editor').on('click', function(e) {
				if( $('.edit-post-header__settings .editor-post-publish-button__button').hasClass('editor-post-publish-panel__toggle') ){
				e.preventDefault();
				var $btn = $(this);

				if(!$btn.hasClass('loading')){
					$btn.addClass('loading');
					$.ajax({
            url: ajaxurl,
            data: {
              'mfn-builder-nonce': $('input[name="mfn-builder-nonce"]').val(),
              action: 'mfnvbsavedraft',
              posttype: wp.data.select( 'core/editor' ).getCurrentPostType(),
              id: wp.data.select("core/editor").getCurrentPostId()
            },
            type: 'POST',
            success: function(response){
            	window.history.pushState("data", "Edit Page", 'post.php?post='+wp.data.select("core/editor").getCurrentPostId()+'&action=edit');
            	window.location.href = $btn.attr('href');
            }
	        });
				}
			}
			});
		}

	};

	$(function () {

		wp.domReady(function() {
			MfnGutenberg.init();
		});

	});

})(jQuery);

Youez - 2016 - github.com/yon3zu
LinuXploit