403Webshell
Server IP : 213.186.33.4  /  Your IP : 216.73.216.222
Web Server : Apache
System : Linux webm005.cluster103.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64
User : karinebmkh ( 644538)
PHP Version : 8.4.22
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/karinebmkh/www2/wp-content/themes/glaza/templates/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/karinebmkh/www2/wp-content/themes/glaza/templates//block.php
<?php

/**
 * @param array $settings
 * @param null  $query_data
 * block open
 */
if ( ! function_exists( 'glaza_block_open' ) ) :
	function glaza_block_open( $settings = array(), $query_data = null ) {

		$inner_class_name = 'block-inner container';
		$class_name       = array();
		$class_name[]     = 'block-wrap';

		if ( ! empty( $settings['class_name'] ) ) {
			$class_name[] = $settings['class_name'];
		}

		if ( ! empty( $settings['wrap_mode'] ) && 'wide' == $settings['wrap_mode'] ) {
			$class_name[]     = 'is-fullwide';
			$inner_class_name = 'block-inner';
		} else {
			$class_name[] = 'is-wrapper';
		}
		$class_name = implode( ' ', $class_name ); ?>

		<div <?php if ( ! empty( $settings['block_id'] ) ) {
			echo 'id="' . esc_attr( $settings['block_id'] ) . '"';
		} ?> class="<?php echo esc_attr( $class_name ); ?>" <?php glaza_ajax_attribute( $settings, $query_data ); ?>>
		<div class="<?php echo esc_attr( $inner_class_name ); ?>">
	<?php
	}
endif;


/**
 * close block
 */
if ( ! function_exists( 'glaza_block_close' ) ) :
	function glaza_block_close() {
		?>
		</div></div>
	<?php
	}
endif;


/**
 * @param array $settings
 * render block header
 */
if ( ! function_exists( 'glaza_block_header' ) ) :
	function glaza_block_header( $settings = array() ) {
		if ( empty( $settings['title'] ) ) {
			return false;
		} ?>
		<header class="block-header">
			<?php if ( empty( $settings['title_url'] ) ) : ?>
				<h3 class="block-title"><?php echo esc_html( $settings['title'] ); ?></h3>
				<?php else : ?>
				<h3 class="block-title is-link"><a href="<?php echo esc_url( $settings['title_url'] ); ?>" title="<?php echo esc_attr( $settings['title'] ); ?>"><?php echo esc_html( $settings['title'] ); ?></a></h3>
				<?php endif; ?>
			<?php glaza_block_quick_filter( $settings ); ?>
		</header>
	<?php
	}
endif;

/**
 * @param array $settings
 * open block content
 */
if ( ! function_exists( 'glaza_block_content_open' ) ) :
	function glaza_block_content_open( $settings = array() ) {
		$class_name = 'content-inner clearfix';
		if ( ! empty( $settings['post_columns'] ) ) {
			$class_name .= ' columns-' . intval( $settings['post_columns'] );
		}
		?>
		<div class="content-wrap"><div class="<?php echo esc_attr( $class_name ); ?>">
	<?php
	}
endif;


/**
 * close block content
 */
if ( ! function_exists( 'glaza_block_content_close' ) ) :
	function glaza_block_content_close() {
		?>
		</div></div>
	<?php
	}
endif;


/**
 * @param $settings
 * render quick filter
 */
if ( ! function_exists( 'glaza_block_quick_filter' ) ) :
	function glaza_block_quick_filter( $settings ) {

		if ( empty( $settings['quick_filter'] ) || empty( $settings['block_id'] ) ) {
			return false;
		}

		if ( empty( $settings['quick_filter_id'] ) ) {
			$settings['quick_filter_id'] = '';
		}

		$data = glaza_ajax_quick_filter_config( $settings['quick_filter'], $settings['quick_filter_id'] );

		if ( ! is_array( $data ) ) {
			return false;
		} ?>
		<div id="<?php echo 'ajax_filter_' . $settings['block_id']; ?>" class="ajax-quick-filter clearfix">
			<div class="ajax-quick-filter-inner">
				<span class="filter-el"><a href="#" class="filter-link ajax-link smart-filter-link is-active" data-ajax_filter_val="0"><?php echo glaza_translate( 'all' ); ?></a></span>
				<?php foreach ( $data as $item ) : ?>
					<span class="filter-el"><a href="#" class="filter-link ajax-link smart-filter-link" data-ajax_filter_val="<?php echo esc_attr( $item['id'] ); ?>"><?php echo esc_html( $item['name'] ); ?></a></span>
				<?php endforeach; ?>
			</div>
		</div>
	<?php
	}
endif;

/**
 * @param array $settings
 * @param null  $query_data
 * ajax attribute
 */
if ( ! function_exists( 'glaza_ajax_attribute' ) ) :
	function glaza_ajax_attribute( $settings = array(), $query_data = null ) {

		if ( empty( $settings['block_id'] ) || ( empty( $settings['pagination'] ) && empty( $settings['quick_filter'] ) ) ) {
			return false;
		}

		if ( ! empty( $query_data->max_num_pages ) && ! isset( $settings['page_max'] ) ) {
			$settings['page_max'] = $query_data->max_num_pages;
		}

		$settings['page_current'] = 1;
		$settings['security']     = wp_create_nonce( 'ruby' );

		$defaults = array(
			'block_id'         => '',
			'block_name'       => '',
			'quick_filter'     => '',
			'page_max'         => '',
			'page_current'     => '',
			'posts_per_page'   => '',
			'category'         => '',
			'categories'       => '',
			'post_format'      => '',
			'tags'             => '',
			'orderby'          => '',
			'author'           => '',
			'offset'           => '',
			'excerpt'          => '',
			'readmore'         => '',
			'summary'          => '',
			'shopthepost'      => '',
			'product_columns'  => '',
			'post_columns'     => '',
			'layout'           => '',
			'sidebar_position' => '',
			'related_post_id'  => '',
			'security'         => '',
		);

		foreach ( $defaults as $key => $val ) {
			if ( ! empty( $settings[ $key ] ) ) {
				echo 'data-' . $key . '="' . esc_attr( $settings[ $key ] ) . '" ';
			}
		}
	}
endif;

Youez - 2016 - github.com/yon3zu
LinuXploit