Changeset 3007602
- Timestamp:
- 12/09/2023 11:19:36 AM (2 years ago)
- Location:
- list-stores-category-dokan
- Files:
-
- 8 added
- 3 edited
-
tags/2.0.0 (added)
-
tags/2.0.0/assets (added)
-
tags/2.0.0/assets/style.css (added)
-
tags/2.0.0/inc (added)
-
tags/2.0.0/inc/class.sc-dependency-checker.php (added)
-
tags/2.0.0/index.php (added)
-
tags/2.0.0/list-stores-category-dokan.php (added)
-
tags/2.0.0/readme.txt (added)
-
trunk/assets/style.css (modified) (3 diffs)
-
trunk/list-stores-category-dokan.php (modified) (8 diffs)
-
trunk/readme.txt (modified) (6 diffs)
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 1 3 .showstore { 2 4 display: flex; … … 4 6 } 5 7 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; 10 13 } 11 14 … … 13 16 color: #dd3b0f; 14 17 } 18 -
list-stores-category-dokan/trunk/list-stores-category-dokan.php
r2544571 r3007602 4 4 Plugin URI: https://wordpress.org/plugins/list-stores-category-dokan/ 5 5 Description: Create stores list of Dokan stores based on store category 6 Version: 1.0.06 Version: 2.0.0 7 7 Author: Jason Herbert 8 8 Author URI: https://www.linkedin.com/in/jason-herbert-8817031a4 … … 33 33 require_once(SC_DOKANSC_PATH . 'inc/class.sc-dependency-checker.php'); 34 34 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 38 function 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 } 43 add_action('wp_enqueue_scripts', 'my_plugin_enqueue_styles'); 44 45 40 46 41 47 class DokanStoreCategoryList … … 45 51 // register shortcode 46 52 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'));52 53 } 53 54 … … 101 102 102 103 foreach ($sellers['users'] as $seller) { 104 103 105 $vendor = dokan()->vendor->get($seller->ID); 104 106 $store_banner_id = $vendor->get_banner_id(); … … 110 112 $store_info = dokan_get_store_info($seller->ID); 111 113 $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'); 114 117 115 118 for ($i = 0; $i < count($store_cat); $i++) { 116 119 if (strtolower($store_cat[$i]->name) == strtolower($args['name'])) : ?> 120 117 121 <li class="dokan-single-seller woocommerce coloum-<?php echo esc_attr($per_row); ?> <?php echo (!$store_banner_id) ? 'no-banner-img' : ''; ?>"> 118 122 <div class="store-wrapper"> … … 136 140 </div> 137 141 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) : ?> 139 149 <?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> 141 151 <?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> 143 153 <?php } ?> 144 154 <?php endif ?> … … 184 194 </div> 185 195 <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> 187 197 <p style="margin-bottom: 0px !important;">Discover <?php echo esc_html($store_name); ?></p> 188 198 </div> 189 190 <?php do_action('dokan_seller_listing_footer_content', $seller, $store_info); ?>191 199 </div> 192 200 </div></a> … … 208 216 if (class_exists('DokanStoreCategoryList')) { 209 217 $dokanCarousel = new DokanStoreCategoryList(); 210 $dokanCarousel->register(); 211 } 212 } 218 } 219 } -
list-stores-category-dokan/trunk/readme.txt
r2544470 r3007602 4 4 Tags: woocommerce, dokan, marketplace, list, shortcode, store, category 5 5 Requires at least: 4.0 6 Tested up to: 5.7.27 Stable tag: 1.0.06 Tested up to: 6.4.2 7 Stable tag: 2.0.0 8 8 Requires PHP: 5.4 9 9 License: GPLv2 or later … … 67 67 2. Activate the plugin through the 'Plugins' screen in WordPress 68 68 69 3. 69 3. Use this shortcode [stores_list_by_category name="your category name"] in any page to generate the list 70 70 71 71 … … 79 79 80 80 Yes, he uses the dokan store template 81 81 82 82 83 … … 98 99 99 100 101 = Can I contact plugin author to ask somes specific development ? = 102 103 104 Yes, you can contact me at [email protected] for any specific development requests. 105 106 100 107 == Screenshots == 101 108 … … 109 116 110 117 118 = 2.0.0 = 119 *Php errors fixed to works with new wordpress release. 111 120 121 = 1.0.0 = 122 * Initial release of the plugin. 112 123 113 124 … … 115 126 116 127 128 = 2.0.0 = 129 Critical update for compatibility with new wordpress release. 117 130 131 = 1.0.0 = 132 Initial release. No update necessary.
Note: See TracChangeset
for help on using the changeset viewer.