403Webshell
Server IP : 37.27.51.148  /  Your IP : 216.73.216.164
Web Server : nginx/1.14.1
System : Linux libra 4.18.0-553.51.1.el8_10.x86_64 #1 SMP Wed Apr 30 20:24:04 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.3.31
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/html/wp-content/plugins/thrive-visual-editor/editor/js/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/wp-content/plugins/thrive-visual-editor/editor/js/admin//edit-post.js
( $ => {
	const TCBYoastPlugin = require( './classes/tcb-yoast-plugin' ),
		TCBRankMathPlugin = require( './classes/tcb-rankmath-plugin' ),
		RankMathInstance = new TCBRankMathPlugin(),
		YoastInstance = new TCBYoastPlugin();

	window.TCBYoastPlugin = TCBYoastPlugin;

	/**
	 * YoastSEO content analysis integration
	 */
	$( window ).on( 'YoastSEO:ready', () => {
		YoastInstance.init();
	} );

	/**
	 * RankMath content analysis integration
	 */
	$( document ).ready( function () {
		if ( typeof window.rankMath !== 'undefined' ) {
			RankMathInstance.init();
		}
	} );

	/**
	 */
	function show_loader() {
		$( '#tcb-admin-page-loader' ).show();
	}

	$( function () {
		const $document = $( document );

		$document.on( 'click.tcb', '#tcb2-migrate-post', ( index, element ) => {
			show_loader();

			$.ajax( {
				type: 'post',
				url: ajaxurl,
				dataType: 'json',
				data: {
					_nonce: TCB_Post_Edit_Data.admin_nonce,
					post_id: TCB_Post_Edit_Data.post_id,
					action: 'tcb_admin_ajax_controller',
					route: 'migrate_post_content'
				}
			} ).done( function () {
				location.href = element.getAttribute( 'data-edit' );
			} ).fail( function ( jqXHR ) {
				alert( 'ERROR: ' + jqXHR.responseText );
			} );
		} )
		         .on( 'click', '#tcb2-show-wp-editor', function () {
			         /**
												 * Enable the hidden input that will disable TCB editor when saving the post
												 */
			         const $editlink = $document.find( '.tcb-enable-editor' ),
				         $postbox = $editlink.closest( '.postbox' );

			         $postbox.next( '.tcb-flags' ).find( 'input' ).prop( 'disabled', false );
			         $postbox.before( $editlink );
			         $postbox.remove();
			         $( 'body' ).removeClass( 'tcb-hide-wp-editor' );
		         } )
		         .on( 'click', '.tcb-enable-editor', function () {
			         $( 'body' ).addClass( 'tcb-hide-wp-editor' );

			         $.ajax( {
				         type: 'post',
				         url: ajaxurl,
				         dataType: 'json',
				         data: {
					         _nonce: TCB_Post_Edit_Data.admin_nonce,
					         post_id: this.getAttribute( 'data-id' ),
					         action: 'tcb_admin_ajax_controller',
					         route: 'enable_tcb'
				         }
			         } ).done( function () {
				         $( window ).off( 'beforeunload.edit-post' );
				         $( 'input#save-post' ).trigger( 'click' );
			         } );
		         } );
	} );
} )( jQuery );

Youez - 2016 - github.com/yon3zu
LinuXploit