Plugin Directory

Changeset 3007602


Ignore:
Timestamp:
12/09/2023 11:19:36 AM (2 years ago)
Author:
xiberia
Message:

Updated plugin to version 2.0.0 - Critical update for compatibility with new wordpress release.

Location:
list-stores-category-dokan
Files:
8 added
3 edited

Legend:

Unmodified
Added
Removed
  • list-stores-category-dokan/trunk/assets/style.css

    r2544571 r3007602  
     1@import url('https://unpkg.com/[email protected]/icons/css/arrow-right.css');
     2
    13.showstore {
    24    display: flex;
     
    46  }
    57
    6 
    7   .showstore p {
    8     color: #9B60DE;
    9     margin-bottom: 0px;
     8  .showstore i {
     9    display: flex;
     10    align-items: center;
     11    text-align: center;
     12    justify-content: center;
    1013  }
    1114 
     
    1316    color: #dd3b0f;
    1417  }
     18
  • list-stores-category-dokan/trunk/list-stores-category-dokan.php

    r2544571 r3007602  
    44Plugin URI: https://wordpress.org/plugins/list-stores-category-dokan/
    55Description: Create stores list of Dokan stores based on store category
    6 Version: 1.0.0
     6Version: 2.0.0
    77Author: Jason Herbert
    88Author URI: https://www.linkedin.com/in/jason-herbert-8817031a4
     
    3333require_once(SC_DOKANSC_PATH . 'inc/class.sc-dependency-checker.php');
    3434
    35 add_action('wp_enqueue_scripts', 'callback_for_setting_up_scripts');
    36 function callback_for_setting_up_scripts() {
    37     wp_register_style( 'namespace', plugins_url('assets/style.css', __FILE__) );
    38     wp_enqueue_style( 'namespace' );
    39 }
     35
     36
     37
     38function my_plugin_enqueue_styles()
     39{
     40    wp_enqueue_style('my-plugin-style', plugins_url('/assets/style.css', __FILE__));
     41    wp_enqueue_script('font-awesome-kit', 'https://kit.fontawesome.com/e955595130.js', array(), null, true);
     42}
     43add_action('wp_enqueue_scripts', 'my_plugin_enqueue_styles');
     44
     45
    4046
    4147class DokanStoreCategoryList
     
    4551        // register shortcode
    4652        add_shortcode('stores_list_by_category', array($this, 'create_stores_list_by_category_shortcode'));
    47     }
    48 
    49     function register()
    50     {
    51         add_action('wp_enqueue_scripts', array($this, 'enqueue'));
    5253    }
    5354
     
    101102
    102103                    foreach ($sellers['users'] as $seller) {
     104
    103105                        $vendor            = dokan()->vendor->get($seller->ID);
    104106                        $store_banner_id   = $vendor->get_banner_id();
     
    110112                        $store_info        = dokan_get_store_info($seller->ID);
    111113                        $store_address     = dokan_get_seller_short_address($seller->ID);
    112                         $store_banner_url  = $store_banner_id ? wp_get_attachment_image_src($store_banner_id, $image_size) : DOKAN_PLUGIN_ASSEST . '/images/default-store-banner.png';
    113                         $store_cat = dokan()->vendor->get($seller->id)->get_info_part('categories');
     114                        $image_size = 'full'; // ou toute autre taille d'image que vous souhaitez utiliser, comme 'medium', 'thumbnail', etc.
     115                        $store_banner_url  = $store_banner_id ? wp_get_attachment_image_src($store_banner_id, $image_size ?? 'full') : DOKAN_PLUGIN_ASSEST . '/images/default-store-banner.png';
     116                        $store_cat = dokan()->vendor->get($seller->ID)->get_info_part('categories');
    114117
    115118                        for ($i = 0; $i < count($store_cat); $i++) {
    116119                            if (strtolower($store_cat[$i]->name) == strtolower($args['name'])) : ?>
     120
    117121                                <li class="dokan-single-seller woocommerce coloum-<?php echo esc_attr($per_row); ?> <?php echo (!$store_banner_id) ? 'no-banner-img' : ''; ?>">
    118122                                    <div class="store-wrapper">
     
    136140                                                    </div>
    137141
    138                                                     <?php if ('on' === $show_store_open_close && 'yes' === $dokan_store_time_enabled) : ?>
     142                                                    <?php
     143                                                    $dokan_store_time_enabled = isset($store_info['dokan_store_time_enabled']) ? $store_info['dokan_store_time_enabled'] : '';
     144                                                    $dokan_store_time_enabled = isset($store_info['dokan_store_time_enabled']) ? $store_info['dokan_store_time_enabled'] : '';
     145                                                    $store_open_notice        = isset($store_info['dokan_store_open_notice']) && !empty($store_info['dokan_store_open_notice']) ? $store_info['dokan_store_open_notice'] : __('Store Open', 'dokan-lite');
     146                                                    $store_closed_notice      = isset($store_info['dokan_store_close_notice']) && !empty($store_info['dokan_store_close_notice']) ? $store_info['dokan_store_close_notice'] : __('Store Closed', 'dokan-lite');
     147                                                    $show_store_open_close    = dokan_get_option('store_open_close', 'dokan_appearance', 'on');
     148                                                    if ('on' === $show_store_open_close && 'yes' === $dokan_store_time_enabled) : ?>
    139149                                                        <?php if (dokan_is_store_open($seller->ID)) { ?>
    140                                                             <span class="dokan-store-is-open-close-status dokan-store-is-open-status" title="<?php esc_attr_e('Store is Open', 'dokan-lite'); ?>"><?php esc_html_e('Open', 'dokan-lite'); ?></span>
     150                                                            <span class="dokan-store-is-open-close-status dokan-store-is-open-status" title="<?php esc_attr_e($store_open_notice); ?>"><?php esc_html_e('Open', 'dokan-lite'); ?></span>
    141151                                                        <?php } else { ?>
    142                                                             <span class="dokan-store-is-open-close-status dokan-store-is-closed-status" title="<?php esc_attr_e('Store is Closed', 'dokan-lite'); ?>"><?php esc_html_e('Closed', 'dokan-lite'); ?></span>
     152                                                            <span class="dokan-store-is-open-close-status dokan-store-is-closed-status" title="<?php esc_attr_e($store_closed_notice); ?>"><?php esc_html_e('Closed', 'dokan-lite'); ?></span>
    143153                                                        <?php } ?>
    144154                                                    <?php endif ?>
     
    184194                                                </div>
    185195                                                <div class="showstore">
    186                                                     <span class="dashicons dashicons-arrow-right-alt2 dokan-btn-theme dokan-btn-round" style="/*! display: inline; *//*! block-size: ; */"></span>
     196                                                    <i class="fa-solid fa-arrow-right dokan-btn-theme dokan-btn-round" style="/*! display: inline; *//*! block-size: ; */"></i>
    187197                                                    <p style="margin-bottom: 0px !important;">Discover <?php echo esc_html($store_name); ?></p>
    188198                                                </div>
    189 
    190                                                 <?php do_action('dokan_seller_listing_footer_content', $seller, $store_info); ?>
    191199                                            </div>
    192200                                    </div></a>
     
    208216    if (class_exists('DokanStoreCategoryList')) {
    209217        $dokanCarousel = new DokanStoreCategoryList();
    210         $dokanCarousel->register();
    211     }
    212 }
     218    }
     219}
  • list-stores-category-dokan/trunk/readme.txt

    r2544470 r3007602  
    44Tags: woocommerce, dokan, marketplace, list, shortcode, store, category
    55Requires at least: 4.0
    6 Tested up to: 5.7.2
    7 Stable tag: 1.0.0
     6Tested up to: 6.4.2
     7Stable tag: 2.0.0
    88Requires PHP: 5.4
    99License: GPLv2 or later
     
    67672. Activate the plugin through the 'Plugins' screen in WordPress
    6868
    69 3.
     693. Use this shortcode [stores_list_by_category name="your category name"] in any page to generate the list
    7070
    7171
     
    7979
    8080Yes, he uses the dokan store template
     81
    8182
    8283
     
    9899
    99100
     101= Can I contact plugin author to ask somes specific development ? =
     102
     103
     104Yes, you can contact me at [email protected] for any specific development requests.
     105
     106
    100107== Screenshots ==
    101108
     
    109116
    110117
     118= 2.0.0 =
     119*Php errors fixed to works with new wordpress release.
    111120
     121= 1.0.0 =
     122* Initial release of the plugin.
    112123
    113124
     
    115126
    116127
     128= 2.0.0 =
     129Critical update for compatibility with new wordpress release.
    117130
     131= 1.0.0 =
     132Initial release. No update necessary.
Note: See TracChangeset for help on using the changeset viewer.