Skip to content

Commit 25aed58

Browse files
committed
* 1.0.13 - Added CSS classes for proper alignment and spacing. // updated changelog location
1 parent 18dfeba commit 25aed58

File tree

4 files changed

+23
-22
lines changed

4 files changed

+23
-22
lines changed

changelog.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Changelog
2+
* 1.0.1 - Initial testing and functionality. Integration of flickity JS and shortcode.
3+
* 1.0.2 - Added autoupdate functionality, reorganisation of folder structure.
4+
* 1.0.3 - Reassign flickity file location
5+
* 1.0.4 - Update display styles and default options
6+
* 1.0.5 - Remove private key for updates (push to public repo)
7+
* 1.0.6 - Responsive CSS update, enable draggable
8+
* 1.0.7 - shortcode url link correction, link to slug instead of brand name.
9+
* 1.0.8 - Bug Fix - class WooCommerce_Product_Brand does not have a method "save_product_brand_meta_data"
10+
* 1.0.9 - Updated CSS rules to isolate styling to product brands only.
11+
* 1.0.10 - Added shortcode attributes for limit and scroll. Scroll=0 disables flickity functionality & scripts. Limit=12 sets the number of brands to display (default 12).
12+
* 1.0.11 - Introduce 'width' atts, default 200px. Accepts any valid CSS width value.
13+
* 1.0.12 - Introduce 'image_class' atts, default 'brand-image'. Accepts any valid CSS class name.
14+
* 1.0.13 - Added CSS classes for proper alignment and spacing.

includes/class-product-brand-shortcode.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ public function product_brand_list_shortcode($atts)
3636
$output = '';
3737

3838
if (!empty($brands)) {
39-
$output .= '<div class="fd-product-brand brand-gallery main-carousel row">';
39+
$output .= '<div class="fd-product-brand brand-gallery main-carousel ">';
40+
41+
if ($atts['scroll'] === 'false') {
42+
$output .= '<div class="row align-items-center row-cols-2 row-cols-md-4 row-cols-lg-5">';
43+
}
4044

4145
foreach ($brands as $brand) {
4246
$brand_id = $brand->term_id;
@@ -65,6 +69,8 @@ public function product_brand_list_shortcode($atts)
6569
$output .= '<link rel="stylesheet" href="' . plugin_dir_url(__DIR__) . 'public/css/flickity.css" />';
6670
$output .= '<link rel="stylesheet" href="' . plugin_dir_url(__DIR__) . 'public/css/product-brands.css" />';
6771
$output .= '<script>jQuery(".brand-gallery").flickity(' . json_encode($flickityOptions) . ');</script>';
72+
} else {
73+
$output .= '</div>';
6874
}
6975
}
7076

product-brands.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: WooCommerce Product Brand
44
Plugin URI: https://frydigital.com/plugins/fd-product-brands/
55
Description: A WooCommerce plugin that adds a custom taxonomy 'product_brand' to products and allows the attachment of images to the product_brand. Each image links to a search result for that taxonomy.
6-
Version: 1.0.12
6+
Version: 1.0.13
77
Author: Fry Digital
88
Author URI: https://frydigital.com/
99
License: GPLv3
@@ -50,7 +50,7 @@ function my_product_brand_plugin() {
5050
use YahnisElsts\PluginUpdateChecker\v5\PucFactory;
5151

5252
$myUpdateChecker = PucFactory::buildUpdateChecker(
53-
'https://github.com/fryshaun/fd-product-brands/',
53+
'https://github.com/arbutusroutes/fd-product-brands/',
5454
__FILE__,
5555
'fd-product-brands'
5656
);

readme.md

-19
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,3 @@ A WooCommerce plugin that adds a custom taxonomy 'product_brand' to products and
66

77
## Shortcode Usage
88
To use this shortcode, you can simply add `[product_brand_list]` to any post or page. You can also pass the `orderby` and `order` attributes to sort the list by weight, total quantity, or total retail value. For example, `[product_brand_list orderby="product_brand_weight" order="desc"]` would display the list of product brands sorted by weight in descending order.
9-
10-
## Changelog
11-
* 1.0.1 - Initial testing and functionality. Integration of flickity JS and shortcode.
12-
* 1.0.2 - Added autoupdate functionality, reorganisation of folder structure.
13-
* 1.0.3 - Reassign flickity file location
14-
* 1.0.4 - Update display styles and default options
15-
* 1.0.5 - Remove private key for updates (push to public repo)
16-
* 1.0.6 - Responsive CSS update, enable draggable
17-
* 1.0.7 - shortcode url link correction, link to slug instead of brand name.
18-
* 1.0.8 - Bug Fix - class WooCommerce_Product_Brand does not have a method "save_product_brand_meta_data"
19-
* 1.0.9 - Updated CSS rules to isolate styling to product brands only.
20-
* 1.0.10 - Added shortcode attributes for limit and scroll. Scroll=0 disables flickity functionality & scripts. Limit=12 sets the number of brands to display (default 12).
21-
* 1.0.11 - Introduce 'width' atts, default 200px. Accepts any valid CSS width value.
22-
* 1.0.12 - Introduce 'image_class' atts, default 'brand-image'. Accepts any valid CSS class name.
23-
24-
25-
# Future Development
26-
* Admin options page to set sort order and flickity display options.
27-
* Auto attach to footer location.

0 commit comments

Comments
 (0)