PATH:
home
/
niazsaze
/
public_html
/
wp-content
/
themes
/
flatsome
/
inc
/
shortcodes
<?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' );
[-] ux_video.php
[edit]
[-] ux_stack.php
[edit]
[-] gap.php
[edit]
[-] ux_payment_icons.php
[edit]
[-] row.php
[edit]
[-] page_header.php
[edit]
[-] ux_slider.php
[edit]
[-] buttons.php
[edit]
[-] scroll_to.php
[edit]
[-] product_flip.php
[edit]
[-] messages.php
[edit]
[-] ux_banner_grid.php
[edit]
[-] tabs.php
[edit]
[-] ux_translation.php
[edit]
[-] ux_banner.php
[edit]
[-] price_table.php
[edit]
[-] ux_products.php
[edit]
[-] ux_html.php
[edit]
[-] ux_pages.php
[edit]
[-] ux_menu_title.php
[edit]
[-] search.php
[edit]
[-] custom-product.php
[edit]
[-] ux_products_list.php
[edit]
[-] ux_lottie.php
[edit]
[-] accordion.php
[edit]
[+]
ux_countdown
[-] featured_box.php
[edit]
[-] titles_dividers.php
[edit]
[-] ux_instagram_feed.php
[edit]
[-] ux_image.php
[edit]
[-] ux_menu_link.php
[edit]
[-] ux_gallery.php
[edit]
[-] google_maps.php
[edit]
[-] ux_sidebar.php
[edit]
[-] portfolio.php
[edit]
[-] product_categories.php
[edit]
[-] follow.php
[edit]
[-] lightbox.php
[edit]
[-] team_members.php
[edit]
[-] testimonials.php
[edit]
[-] blog_posts.php
[edit]
[-] ux_image_box.php
[edit]
[-] ux_logo.php
[edit]
[-] ux_text.php
[edit]
[-] sections.php
[edit]
[-] share.php
[edit]
[-] ux_hotspot.php
[edit]
[+]
..
[-] ux_menu.php
[edit]
[-] ux_nav.php
[edit]
[+]
commons
[-] text_box.php
[edit]