Version Description
- Fix: Table collapses in "Admin > Products > Brands" (thanks eljkmw)
- Fix: "pwb-brand" shortcode does not display the brand when it has not a logo assigned
Download this release
Release Info
Developer | titodevera |
Plugin | Perfect Brands for WooCommerce |
Version | 1.4.2 |
Comparing to | |
See all releases |
Code changes from version 1.4.1 to 1.4.2
- assets/css/styles-admin.css +9 -0
- classes/shortcodes/class-pwb-brand-shortcode.php +17 -6
- main.php +3 -3
- readme.txt +4 -1
assets/css/styles-admin.css
CHANGED
@@ -5,4 +5,13 @@
|
|
5 |
.taxonomy-pwb-brand .pwb_brand_cont div{
|
6 |
margin-top: 10px;
|
7 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
/* ----------------------- /Taxonomy pwb-brand ----------------------- */
|
5 |
.taxonomy-pwb-brand .pwb_brand_cont div{
|
6 |
margin-top: 10px;
|
7 |
}
|
8 |
+
@media screen and (max-width: 782px) {
|
9 |
+
.taxonomy-pwb-brand .wp-list-table thead th.column-logo, .taxonomy-pwb-brand .wp-list-table tfoot th.column-logo {
|
10 |
+
display: none;
|
11 |
+
}
|
12 |
+
|
13 |
+
.taxonomy-pwb-brand .wp-list-table td.column-logo:before {
|
14 |
+
content: ""!important;
|
15 |
+
}
|
16 |
+
}
|
17 |
/* ----------------------- /Taxonomy pwb-brand ----------------------- */
|
classes/shortcodes/class-pwb-brand-shortcode.php
CHANGED
@@ -15,14 +15,25 @@
|
|
15 |
|
16 |
$brands = wp_get_post_terms( $atts['product_id'], 'pwb-brand');
|
17 |
|
18 |
-
|
19 |
-
if(is_array($brands) && count($brands)>0){
|
20 |
-
$brand_link = get_term_link ( $brand->term_id, 'pwb-brand' );
|
21 |
-
$attachment_id = get_term_meta( $brand->term_id, 'pwb_brand_image', 1 );
|
22 |
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
echo '<a href="'.$brand_link.'" title="'.__( 'View brand', 'perfect-woocommerce-brands' ).'">'.$attachment_html.'</a>';
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
27 |
|
28 |
return ob_get_clean();
|
15 |
|
16 |
$brands = wp_get_post_terms( $atts['product_id'], 'pwb-brand');
|
17 |
|
18 |
+
if(is_array($brands) && count($brands)>0){
|
|
|
|
|
|
|
19 |
|
20 |
+
echo '<div class="pwb-brand-shortcode">';
|
21 |
+
|
22 |
+
foreach($brands as $brand){
|
23 |
+
$brand_link = get_term_link ( $brand->term_id, 'pwb-brand' );
|
24 |
+
$attachment_id = get_term_meta( $brand->term_id, 'pwb_brand_image', 1 );
|
25 |
+
|
26 |
+
$attachment_html = wp_get_attachment_image($attachment_id,$atts['image_size']);
|
27 |
+
|
28 |
+
if(!empty($attachment_html)){
|
29 |
echo '<a href="'.$brand_link.'" title="'.__( 'View brand', 'perfect-woocommerce-brands' ).'">'.$attachment_html.'</a>';
|
30 |
+
}else{
|
31 |
+
echo '<a href="'.$brand_link.'" title="'.__( 'View brand', 'perfect-woocommerce-brands' ).'">'.$brand->name.'</a>';
|
32 |
+
}
|
33 |
+
}
|
34 |
+
|
35 |
+
echo '</div>';
|
36 |
+
|
37 |
}
|
38 |
|
39 |
return ob_get_clean();
|
main.php
CHANGED
@@ -3,14 +3,14 @@
|
|
3 |
Plugin Name: Perfect WooCommerce Brands
|
4 |
Plugin URI: https://wordpress.org/plugins/perfect-woocommerce-brands/
|
5 |
Description: Perfect WooCommerce Brands allows you to show product brands in your WooCommerce based store.
|
6 |
-
Version: 1.4.
|
7 |
Author: Alberto de Vera Sevilla
|
8 |
Author URI: https://profiles.wordpress.org/titodevera/
|
9 |
Text Domain: perfect-woocommerce-brands
|
10 |
Domain Path: /lang
|
11 |
License: GPL3
|
12 |
|
13 |
-
Perfect WooCommerce Brands version 1.4.
|
14 |
|
15 |
Perfect WooCommerce Brands is free software: you can redistribute it and/or modify
|
16 |
it under the terms of the GNU General Public License as published by
|
@@ -38,7 +38,7 @@ if(is_plugin_active('woocommerce/woocommerce.php')){
|
|
38 |
|
39 |
define('PWB_PLUGIN', plugins_url( '', __FILE__ ));
|
40 |
define('PWB_PLUGIN_PATH', plugin_basename( dirname( __FILE__ ) ));
|
41 |
-
define('PWB_PLUGIN_VERSION', '1.4.
|
42 |
require 'classes/widgets/class-pwb-dropdown-widget.php';
|
43 |
require 'classes/widgets/class-pwb-list-widget.php';
|
44 |
require 'classes/shortcodes/class-pwb-product-carousel-shortcode.php';
|
3 |
Plugin Name: Perfect WooCommerce Brands
|
4 |
Plugin URI: https://wordpress.org/plugins/perfect-woocommerce-brands/
|
5 |
Description: Perfect WooCommerce Brands allows you to show product brands in your WooCommerce based store.
|
6 |
+
Version: 1.4.2
|
7 |
Author: Alberto de Vera Sevilla
|
8 |
Author URI: https://profiles.wordpress.org/titodevera/
|
9 |
Text Domain: perfect-woocommerce-brands
|
10 |
Domain Path: /lang
|
11 |
License: GPL3
|
12 |
|
13 |
+
Perfect WooCommerce Brands version 1.4.2, Copyright (C) 2016 Alberto de Vera Sevilla
|
14 |
|
15 |
Perfect WooCommerce Brands is free software: you can redistribute it and/or modify
|
16 |
it under the terms of the GNU General Public License as published by
|
38 |
|
39 |
define('PWB_PLUGIN', plugins_url( '', __FILE__ ));
|
40 |
define('PWB_PLUGIN_PATH', plugin_basename( dirname( __FILE__ ) ));
|
41 |
+
define('PWB_PLUGIN_VERSION', '1.4.2');
|
42 |
require 'classes/widgets/class-pwb-dropdown-widget.php';
|
43 |
require 'classes/widgets/class-pwb-list-widget.php';
|
44 |
require 'classes/shortcodes/class-pwb-product-carousel-shortcode.php';
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: mailto:albertodeverasevilla@gmail.com
|
|
4 |
Tags: woocommerce, brands, brand taxonomy, product brands, woocommerce manufacturer, woocommerce supplier, e-commerce
|
5 |
Requires at least: 4.4
|
6 |
Tested up to: 4.5.3
|
7 |
-
Stable tag: 1.4.
|
8 |
License: GPL3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.en.html
|
10 |
|
@@ -66,6 +66,9 @@ There are three shortcodes available:
|
|
66 |
|
67 |
|
68 |
== Changelog ==
|
|
|
|
|
|
|
69 |
= 1.4.1 =
|
70 |
* Feature (Option): Hide brand's description in archive page
|
71 |
* Fix: "pwb-all-brands" and "pwb-brand" show the content before they should
|
4 |
Tags: woocommerce, brands, brand taxonomy, product brands, woocommerce manufacturer, woocommerce supplier, e-commerce
|
5 |
Requires at least: 4.4
|
6 |
Tested up to: 4.5.3
|
7 |
+
Stable tag: 1.4.2
|
8 |
License: GPL3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.en.html
|
10 |
|
66 |
|
67 |
|
68 |
== Changelog ==
|
69 |
+
= 1.4.2 =
|
70 |
+
* Fix: Table collapses in "Admin > Products > Brands" (thanks eljkmw)
|
71 |
+
* Fix: "pwb-brand" shortcode does not display the brand when it has not a logo assigned
|
72 |
= 1.4.1 =
|
73 |
* Feature (Option): Hide brand's description in archive page
|
74 |
* Fix: "pwb-all-brands" and "pwb-brand" show the content before they should
|