Plugin Directory


Ignore:
Timestamp:
04/15/2024 11:43:31 AM (12 months ago)
Author:
mohammaadfarid
Message:

readme.txt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bdthemes-element-pack-lite/trunk/modules/price-list/widgets/price-list.php

    r3066178 r3070672  
    11<?php
     2
    23namespace ElementPack\Modules\PriceList\Widgets;
    34
     
    17271728        if ( $item['link']['url'] ) {
    17281729            $target = $item['link']['is_external'] ? '_blank' : '_self';
    1729             $this->add_render_attribute( $unique_link_id, 'onclick', "window.open('" . $item['link']['url'] . "', '$target')" );
     1730            $this->add_render_attribute( $unique_link_id, 'onclick', "window.open('" . esc_url( $item['link']['url'] ) . "', '$target')" );
    17301731        }
    17311732
    1732         return '<li class="bdt-price-list-item">' . $bdt_has_counter . $bdt_has_badge . '<div ' . $this->get_render_attribute_string( $unique_link_id ) . 'bdt-grid>';
     1733        ?>
     1734        <li class="bdt-price-list-item">
     1735            <?php echo wp_kses_post( $bdt_has_counter ); ?>
     1736            <?php echo wp_kses_post( $bdt_has_badge ); ?>
     1737            <div <?php $this->print_render_attribute_string( $unique_link_id ); ?> bdt-grid>
     1738
     1739                <?php
    17331740    }
    17341741
     
    17421749        $image_hide_on_setup = '';
    17431750
    1744         if ( ! empty ( $settings['image_hide_on'] ) ) {
     1751        if ( ! empty( $settings['image_hide_on'] ) ) {
    17451752            foreach ( $settings['image_hide_on'] as $element ) {
    17461753
     
    17581765
    17591766        ?>
    1760         <ul class="bdt-price-list">
    1761 
    1762             <?php foreach ( $settings['price_list'] as $item ) :
    1763                 echo wp_kses_post( $this->render_item_header( $item ) );
    1764 
    1765                 if ( ! empty ( $item['image']['url'] ) ) : ?>
    1766                     <div class="bdt-price-list-image bdt-width-auto <?php echo esc_attr( $image_hide_on_setup ); ?>">
    1767                         <?php $this->render_image( $item, $settings ); ?>
    1768                     </div>
    1769                 <?php endif; ?>
    1770 
    1771                 <div class="bdt-price-list-text bdt-width-expand">
    1772                     <div>
    1773                         <div class="bdt-price-list-header bdt-grid bdt-grid-small bdt-flex-middle" bdt-grid>
    1774                             <span class="bdt-price-list-title">
    1775                                 <?php echo esc_html( $item['title'] ); ?>
     1767                <ul class="bdt-price-list">
     1768
     1769                    <?php foreach ( $settings['price_list'] as $item ) :
     1770                        $this->render_item_header( $item );
     1771
     1772                        if ( ! empty( $item['image']['url'] ) ) : ?>
     1773                            <div class="bdt-price-list-image bdt-width-auto <?php echo esc_attr( $image_hide_on_setup ); ?>">
     1774                                <?php $this->render_image( $item, $settings ); ?>
     1775                            </div>
     1776                        <?php endif; ?>
     1777
     1778                        <div class="bdt-price-list-text bdt-width-expand">
     1779                            <div>
     1780                                <div class="bdt-price-list-header bdt-grid bdt-grid-small bdt-flex-middle" bdt-grid>
     1781                                    <span class="bdt-price-list-title">
     1782                                        <?php echo esc_html( $item['title'] ); ?>
     1783                                    </span>
     1784
     1785                                    <?php if ( 'none' != $settings['separator_style'] ) : ?>
     1786                                        <span class="bdt-price-list-separator bdt-width-expand"></span>
     1787                                    <?php endif; ?>
     1788
     1789                                </div>
     1790
     1791                                <?php if ( $item['item_description'] ) : ?>
     1792                                    <p class="bdt-price-list-description">
     1793                                        <?php echo wp_kses_post( $this->parse_text_editor( $item['item_description'] ) ); ?>
     1794                                    </p>
     1795                                <?php endif; ?>
     1796                            </div>
     1797                        </div>
     1798                        <div class="bdt-width-auto bdt-flex-inline bdt-flex-middle">
     1799                            <?php if ( $item['old_price'] and $settings['show_old_price'] ) : ?>
     1800                                <span class="bdt-price-list-old-price bdt-flex bdt-flex-middle bdt-flex-center"><del>
     1801                                        <?php echo esc_html( $item['old_price'] ); ?>
     1802                                    </del></span>
     1803                            <?php endif; ?>
     1804                            <span class="bdt-price-list-price bdt-flex bdt-flex-middle bdt-flex-center">
     1805                                <?php echo esc_html( $item['price'] ); ?>
    17761806                            </span>
    1777 
    1778                             <?php if ( 'none' != $settings['separator_style'] ) : ?>
    1779                                 <span class="bdt-price-list-separator bdt-width-expand"></span>
    1780                             <?php endif; ?>
    1781 
    17821807                        </div>
    17831808
    1784                         <?php if ( $item['item_description'] ) : ?>
    1785                             <p class="bdt-price-list-description">
    1786                                 <?php echo wp_kses_post( $this->parse_text_editor( $item['item_description'] ) ); ?>
    1787                             </p>
     1809                        <?php if ( ! empty( $settings['cart_icon']['value'] ) ) : ?>
     1810                            <div class="bdt-width-auto bdt-flex-inline">
     1811                                <span class="bdt-price-list-cart-icon">
     1812                                    <?php Icons_Manager::render_icon( $settings['cart_icon'], [ 'aria-hidden' => 'true' ] ); ?>
     1813                                </span>
     1814                            </div>
    17881815                        <?php endif; ?>
    1789                     </div>
    1790                 </div>
    1791                 <div class="bdt-width-auto bdt-flex-inline bdt-flex-middle">
    1792                     <?php if ( $item['old_price'] and $settings['show_old_price'] ) : ?>
    1793                         <span class="bdt-price-list-old-price bdt-flex bdt-flex-middle bdt-flex-center"><del>
    1794                                 <?php echo esc_html( $item['old_price'] ); ?>
    1795                             </del></span>
    1796                     <?php endif; ?>
    1797                     <span class="bdt-price-list-price bdt-flex bdt-flex-middle bdt-flex-center">
    1798                         <?php echo esc_html( $item['price'] ); ?>
    1799                     </span>
    1800                 </div>
    1801 
    1802                 <?php if ( ! empty ( $settings['cart_icon']['value'] ) ) : ?>
    1803                     <div class="bdt-width-auto bdt-flex-inline">
    1804                         <span class="bdt-price-list-cart-icon">
    1805                             <?php Icons_Manager::render_icon( $settings['cart_icon'], [ 'aria-hidden' => 'true' ] ); ?>
    1806                         </span>
    1807                     </div>
    1808                 <?php endif; ?>
    1809 
    1810                 <?php echo wp_kses_post( $this->render_item_footer() ); ?>
    1811 
    1812             <?php endforeach; ?>
    1813 
    1814         </ul>
    1815         <?php
     1816
     1817                        <?php echo wp_kses_post( $this->render_item_footer() ); ?>
     1818
     1819                    <?php endforeach; ?>
     1820
     1821                </ul>
     1822                <?php
    18161823    }
    1817 
    18181824}
Note: See TracChangeset for help on using the changeset viewer.