Plugin Directory

Changeset 2990637


Ignore:
Timestamp:
11/07/2023 10:55:37 AM (2 years ago)
Author:
tplugins
Message:

Astra theme Fixed issue #actions

Location:
tp-product-description-in-loop-for-woocommerce
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • tp-product-description-in-loop-for-woocommerce/tags/1.0.6/README.txt

    r2990588 r2990637  
    2828* Responsive Layout.
    2929* Disabel / Show on mobile device.
    30 * Compatible with HPOS (High-Performance Order Storage).
    3130* Disabel / Show from all.
    3231* Show product full / short description.
     
    112111= 1.0.6 - Update =
    113112* Compatible with HPOS (High-Performance Order Storage)
     113* Astra theme fix
    114114
    115115= 1.0.5 - Update =
  • tp-product-description-in-loop-for-woocommerce/tags/1.0.6/admin/partials/tp-product-description-in-loop-for-woocommerce-admin-display.php

    r2990588 r2990637  
    9898
    9999        <h1><?php echo TPPDIL_PLUGIN_NAME; ?></h1>
    100        
     100        <?php
     101            // $current_theme = wp_get_theme();
     102            // wp_dbug($current_theme->get('Name'));
     103        ?>
    101104        <form method="post" action="options.php">
    102105            <?php settings_fields( 'tppdil-plugin-settings-group' ); ?>
     
    340343    $data = array(
    341344        array(
    342             'name'     => 'Befor Title',
     345            'name'     => 'Before Title',
    343346            'position' => 'woocommerce_shop_loop_item_title',
    344347            'priority' => 5
  • tp-product-description-in-loop-for-woocommerce/tags/1.0.6/includes/class-tp-product-description-in-loop-for-woocommerce.php

    r2990588 r2990637  
    177177    private function define_public_hooks() {
    178178
     179        $current_theme = wp_get_theme();
     180
    179181        $description_position = get_option('tppdil_description_position');
    180182        $description_priority = get_option('tppdil_description_priority');
    181183
     184        if ('Astra' === $current_theme->get('Name')) {
     185           
     186            if($description_position == 'woocommerce_shop_loop_item_title' && $description_priority == 5) {
     187                //woocommerce_shop_loop_item_title 5 -> Befor Title
     188                //astra_woo_shop_title_before
     189                $description_position = 'astra_woo_shop_title_before';
     190            }
     191            elseif($description_position == 'woocommerce_after_shop_loop_item_title' && $description_priority == 10) {
     192                //woocommerce_after_shop_loop_item_title 10 -> After Title
     193                //astra_woo_shop_title_after
     194                $description_position = 'astra_woo_shop_title_after';
     195            }
     196            elseif($description_position == 'woocommerce_after_shop_loop_item_title' && $description_priority == 20) {
     197                //woocommerce_after_shop_loop_item_title 20 -> After Price
     198                //astra_woo_shop_price_after
     199                $description_position = 'astra_woo_shop_price_after';
     200            }
     201            else {
     202                //woocommerce_after_shop_loop_item 15 -> After "Add to cart" Button
     203                //astra_woo_shop_add_to_cart_after
     204                $description_position = 'astra_woo_shop_add_to_cart_after';
     205            }
     206
     207        }
     208
    182209        $plugin_public = new Tp_Product_Description_In_Loop_For_Woocommerce_Public( $this->get_plugin_name(), $this->get_version() );
    183210
  • tp-product-description-in-loop-for-woocommerce/trunk/README.txt

    r2990588 r2990637  
    2727### Free Plugin Features
    2828* Responsive Layout.
    29 * Compatible with HPOS (High-Performance Order Storage).
    3029* Disabel / Show on mobile device.
    3130* Disabel / Show from all.
     
    112111= 1.0.6 - Update =
    113112* Compatible with HPOS (High-Performance Order Storage)
     113* Astra theme fix
    114114
    115115= 1.0.5 - Update =
  • tp-product-description-in-loop-for-woocommerce/trunk/admin/partials/tp-product-description-in-loop-for-woocommerce-admin-display.php

    r2560933 r2990637  
    9898
    9999        <h1><?php echo TPPDIL_PLUGIN_NAME; ?></h1>
    100        
     100        <?php
     101            // $current_theme = wp_get_theme();
     102            // wp_dbug($current_theme->get('Name'));
     103        ?>
    101104        <form method="post" action="options.php">
    102105            <?php settings_fields( 'tppdil-plugin-settings-group' ); ?>
     
    340343    $data = array(
    341344        array(
    342             'name'     => 'Befor Title',
     345            'name'     => 'Before Title',
    343346            'position' => 'woocommerce_shop_loop_item_title',
    344347            'priority' => 5
  • tp-product-description-in-loop-for-woocommerce/trunk/includes/class-tp-product-description-in-loop-for-woocommerce.php

    r2560933 r2990637  
    177177    private function define_public_hooks() {
    178178
     179        $current_theme = wp_get_theme();
     180
    179181        $description_position = get_option('tppdil_description_position');
    180182        $description_priority = get_option('tppdil_description_priority');
    181183
     184        if ('Astra' === $current_theme->get('Name')) {
     185           
     186            if($description_position == 'woocommerce_shop_loop_item_title' && $description_priority == 5) {
     187                //woocommerce_shop_loop_item_title 5 -> Befor Title
     188                //astra_woo_shop_title_before
     189                $description_position = 'astra_woo_shop_title_before';
     190            }
     191            elseif($description_position == 'woocommerce_after_shop_loop_item_title' && $description_priority == 10) {
     192                //woocommerce_after_shop_loop_item_title 10 -> After Title
     193                //astra_woo_shop_title_after
     194                $description_position = 'astra_woo_shop_title_after';
     195            }
     196            elseif($description_position == 'woocommerce_after_shop_loop_item_title' && $description_priority == 20) {
     197                //woocommerce_after_shop_loop_item_title 20 -> After Price
     198                //astra_woo_shop_price_after
     199                $description_position = 'astra_woo_shop_price_after';
     200            }
     201            else {
     202                //woocommerce_after_shop_loop_item 15 -> After "Add to cart" Button
     203                //astra_woo_shop_add_to_cart_after
     204                $description_position = 'astra_woo_shop_add_to_cart_after';
     205            }
     206
     207        }
     208
    182209        $plugin_public = new Tp_Product_Description_In_Loop_For_Woocommerce_Public( $this->get_plugin_name(), $this->get_version() );
    183210
Note: See TracChangeset for help on using the changeset viewer.