Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/hessa.corals.io/wp-content/themes/halva/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/hessa.corals.io/wp-content/themes/halva/assets/js/halva-meta-boxes.js
/**
 * Meta boxes with additional options (Admin side)
 * halva-meta-boxes.js v1.0
 */

( function( $ ) {
	'use strict';
	$( document ).ready( function() {

		// meta boxes for different formats
		var	$galleryBox = $( '#halva_mb_gallery_format' ), // gallery format
			$videoBox = $( '#halva_mb_video_format' ), // video format
			$audioBox = $( '#halva_mb_audio_format' ), // audio format
			$linkBox = $( '#halva_mb_link_format' ); // link format


		/**
		 * Hide all meta boxes
		 */
		function hideAllMetaBoxes() {

			// gallery format: hide meta box
			$galleryBox.hide();
			// video format: hide meta box
			$videoBox.hide();
			// audio format: hide meta box
			$audioBox.hide();
			// link format: hide meta box
			$linkBox.hide();

		}

		hideAllMetaBoxes();


		/**
		 * Show/hide meta boxes for classic editor
		 */
		function showHideMetaBoxesClassic() {

			// meta box for gallery format
			if ( $( 'input#post-format-gallery' ).is( ':checked' ) ) {
				$galleryBox.show();
			} else {
				$galleryBox.hide();
			}

			// meta box for video format
			if ( $( 'input#post-format-video' ).is( ':checked' ) ) {
				$videoBox.show();
			} else {
				$videoBox.hide();
			}

			// meta box for audio format
			if ( $( 'input#post-format-audio' ).is( ':checked' ) ) {
				$audioBox.show();
			} else {
				$audioBox.hide();
			}

			// meta box for link format
			if ( $( 'input#post-format-link' ).is( ':checked' ) ) {
				$linkBox.show();
			} else {
				$linkBox.hide();
			}

		}

		showHideMetaBoxesClassic();

		// classic editor: format selection
		$( '#post-formats-select input' ).on( 'click', showHideMetaBoxesClassic );

	} );
} )( jQuery );

Spamworldpro Mini