%PDF- %PDF-
| Direktori : /dom645759/wp-content/themes/Avada/templates/ |
| Current File : //dom645759/wp-content/themes/Avada/templates/to-top.php |
<?php
/**
* ToTop template.
*
* @author ThemeFusion
* @copyright (c) Copyright by ThemeFusion
* @link https://classic.avada.com
* @package Avada
* @subpackage Core
*/
// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
exit( 'Direct script access denied.' );
}
$is_builder = ( function_exists( 'fusion_is_preview_frame' ) && fusion_is_preview_frame() ) || ( function_exists( 'fusion_is_builder_frame' ) && fusion_is_builder_frame() );
if ( 'off' !== Avada()->settings->get( 'status_totop' ) || $is_builder ) {
$to_top_position = explode( '_', Avada()->settings->get( 'totop_position' ) );
$to_top_position = isset( $to_top_position[1] ) ? 'to-top-' . $to_top_position[0] . ' to-top-' . $to_top_position[1] : 'to-top-' . $to_top_position[0];
$totop_scroll_progress = Avada()->settings->get( 'totop_scroll_progress' ) && false !== strpos( Avada()->settings->get( 'totop_position' ), 'floating' ) ? ' awb-to-top-scroll-progress' : '';
$totop_text = trim( (string) Avada()->settings->get( 'totop_text' ) );
$totop_text_classes = ' awb-to-top-text-' . Avada()->settings->get( 'totop_text_layout' );
if ( '' !== $totop_text ) {
$totop_text_classes .= ' awb-to-top-has-text';
$totop_text_classes .= Avada()->settings->get( 'totop_text_mobile' ) ? ' awb-to-top-text-mobile' : '';
}
?>
<section class="to-top-container <?php echo esc_attr( $to_top_position ); ?><?php echo esc_attr( $totop_scroll_progress ); ?><?php echo esc_attr( $totop_text_classes ); ?>" aria-labelledby="awb-to-top-label">
<a href="#" id="toTop" class="fusion-top-top-link">
<?php if ( '' === $totop_text ) : ?>
<span id="awb-to-top-label" class="screen-reader-text"><?php esc_html_e( 'Go to Top', 'Avada' ); ?></span>
<?php endif; ?>
<?php if ( '' !== $totop_text || $is_builder ) : ?>
<span<?php echo '' !== $totop_text ? ' id="awb-to-top-label"' : ''; ?> class="awb-to-top-text"><?php echo esc_html( $totop_text ); ?></span>
<?php endif; ?>
<?php if ( ( Avada()->settings->get( 'totop_scroll_progress' ) && false !== strpos( Avada()->settings->get( 'totop_position' ), 'floating' ) ) || $is_builder ) : ?>
<svg class="awb-to-top-progress" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">
<rect class="awb-scale" style="stroke:<?php echo esc_attr( Fusion_Helper::fusion_auto_calculate_accent_color( Avada()->settings->get( 'totop_background' ) ) ); ?>;" width="100%" height="100%" x="0" y="0"></rect>
<rect class="awb-progress" width="100%" height="100%" x="0" y="0" pathLength="166"></rect>
</svg>
<?php endif; ?>
</a>
</section>
<?php
}