Version Description
- Enhancement: Update documentation
Download this release
Release Info
Developer | quadlayers |
Plugin | Perfect Brands for WooCommerce |
Version | 1.8.2 |
Comparing to | |
See all releases |
Code changes from version 1.8.1 to 1.8.2
classes/admin/class-pwb-admin-tab.php
CHANGED
@@ -26,14 +26,37 @@ function pwb_admin_tab() {
|
|
26 |
|
27 |
$sections = array(
|
28 |
'' => __('General', 'perfect-woocommerce-brands'),
|
29 |
-
'brand-pages' => __('
|
30 |
-
'single-product' => __('
|
31 |
-
'tools' => __('
|
32 |
);
|
33 |
|
34 |
return apply_filters('woocommerce_get_sections_' . $this->id, $sections);
|
35 |
}
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
public function get_settings($current_section = '') {
|
38 |
|
39 |
$available_image_sizes_adapted = array();
|
@@ -51,13 +74,13 @@ function pwb_admin_tab() {
|
|
51 |
|
52 |
$settings = apply_filters('wc_pwb_admin_tab_settings', array(
|
53 |
'section_title' => array(
|
54 |
-
'name' => __('
|
55 |
'type' => 'title',
|
56 |
'desc' => '',
|
57 |
'id' => 'wc_pwb_admin_tab_section_title'
|
58 |
),
|
59 |
'brand_single_product_tab' => array(
|
60 |
-
'name' => __('
|
61 |
'type' => 'checkbox',
|
62 |
'default' => 'yes',
|
63 |
'desc' => __('Show brand tab in single product page', 'perfect-woocommerce-brands'),
|
@@ -97,12 +120,12 @@ function pwb_admin_tab() {
|
|
97 |
'type' => 'sectionend',
|
98 |
'id' => 'wc_pwb_admin_tab_section_end'
|
99 |
)
|
100 |
-
|
101 |
} elseif ('brand-pages' == $current_section) {
|
102 |
|
103 |
$settings = apply_filters('wc_pwb_admin_tab_brand_pages_settings', array(
|
104 |
'section_title' => array(
|
105 |
-
'name' => __('
|
106 |
'type' => 'title',
|
107 |
'desc' => '',
|
108 |
'id' => 'wc_pwb_admin_tab_section_title'
|
@@ -149,12 +172,12 @@ function pwb_admin_tab() {
|
|
149 |
'type' => 'sectionend',
|
150 |
'id' => 'wc_pwb_admin_tab_section_end'
|
151 |
)
|
152 |
-
|
153 |
} elseif ('tools' == $current_section) {
|
154 |
|
155 |
$settings = apply_filters('wc_pwb_admin_tab_tools_settings', array(
|
156 |
'section_title' => array(
|
157 |
-
'name' => __('
|
158 |
'type' => 'title',
|
159 |
'desc' => '',
|
160 |
'id' => 'wc_pwb_admin_tab_section_tools_title'
|
@@ -164,7 +187,7 @@ function pwb_admin_tab() {
|
|
164 |
'type' => 'select',
|
165 |
'class' => 'pwb-admin-tab-field',
|
166 |
'desc' => sprintf(
|
167 |
-
__('Import brands from other brand plugin. <a href="%s" target="_blank">Click here for more details</a>', 'perfect-woocommerce-brands'), str_replace('/?','/brands/?',PWB_DOCUMENTATION_URL)
|
168 |
),
|
169 |
'id' => 'wc_pwb_admin_tab_tools_migrate',
|
170 |
'options' => array(
|
@@ -195,7 +218,7 @@ function pwb_admin_tab() {
|
|
195 |
'type' => 'sectionend',
|
196 |
'id' => 'wc_pwb_admin_tab_section_tools_end'
|
197 |
)
|
198 |
-
|
199 |
} else {
|
200 |
|
201 |
$brands_url = get_option('wc_pwb_admin_tab_slug', __('brands', 'perfect-woocommerce-brands')) . '/' . __('brand-name', 'perfect-woocommerce-brands') . '/';
|
@@ -240,7 +263,7 @@ function pwb_admin_tab() {
|
|
240 |
'type' => 'sectionend',
|
241 |
'id' => 'wc_pwb_admin_tab_section_end'
|
242 |
)
|
243 |
-
|
244 |
}
|
245 |
|
246 |
return apply_filters('woocommerce_get_settings_' . $this->id, $settings, $current_section);
|
26 |
|
27 |
$sections = array(
|
28 |
'' => __('General', 'perfect-woocommerce-brands'),
|
29 |
+
'brand-pages' => __('Archives', 'perfect-woocommerce-brands'),
|
30 |
+
'single-product' => __('Products', 'perfect-woocommerce-brands'),
|
31 |
+
'tools' => __('Tools', 'perfect-woocommerce-brands'),
|
32 |
);
|
33 |
|
34 |
return apply_filters('woocommerce_get_sections_' . $this->id, $sections);
|
35 |
}
|
36 |
|
37 |
+
public function output_sections() {
|
38 |
+
global $current_section;
|
39 |
+
|
40 |
+
$sections = $this->get_sections();
|
41 |
+
|
42 |
+
if (empty($sections) || 1 === sizeof($sections)) {
|
43 |
+
return;
|
44 |
+
}
|
45 |
+
|
46 |
+
echo '<ul class="subsubsub">';
|
47 |
+
|
48 |
+
$array_keys = array_keys($sections);
|
49 |
+
|
50 |
+
foreach ($sections as $id => $label) {
|
51 |
+
echo '<li><a href="' . admin_url('admin.php?page=wc-settings&tab=' . $this->id . '§ion=' . sanitize_title($id)) . '" class="' . ( $current_section == $id ? 'current' : '' ) . '">' . $label . '</a> ' . ( end($array_keys) == $id ? '' : '|' ) . ' </li>';
|
52 |
+
}
|
53 |
+
|
54 |
+
echo ' | <li><a target="_blank" href="' . admin_url('edit-tags.php?taxonomy=pwb-brand&post_type=product') . '">' . __('Brands', 'perfect-woocommerce-brands') . '</a></li>';
|
55 |
+
echo ' | <li><a target="_blank" href="' . PWB_DOCUMENTATION_URL . '">' . __('Documentation', 'perfect-woocommerce-brands') . '</a></li>';
|
56 |
+
|
57 |
+
echo '</ul><br class="clear" />';
|
58 |
+
}
|
59 |
+
|
60 |
public function get_settings($current_section = '') {
|
61 |
|
62 |
$available_image_sizes_adapted = array();
|
74 |
|
75 |
$settings = apply_filters('wc_pwb_admin_tab_settings', array(
|
76 |
'section_title' => array(
|
77 |
+
'name' => __('Products', 'perfect-woocommerce-brands'),
|
78 |
'type' => 'title',
|
79 |
'desc' => '',
|
80 |
'id' => 'wc_pwb_admin_tab_section_title'
|
81 |
),
|
82 |
'brand_single_product_tab' => array(
|
83 |
+
'name' => __('Products tab', 'perfect-woocommerce-brands'),
|
84 |
'type' => 'checkbox',
|
85 |
'default' => 'yes',
|
86 |
'desc' => __('Show brand tab in single product page', 'perfect-woocommerce-brands'),
|
120 |
'type' => 'sectionend',
|
121 |
'id' => 'wc_pwb_admin_tab_section_end'
|
122 |
)
|
123 |
+
));
|
124 |
} elseif ('brand-pages' == $current_section) {
|
125 |
|
126 |
$settings = apply_filters('wc_pwb_admin_tab_brand_pages_settings', array(
|
127 |
'section_title' => array(
|
128 |
+
'name' => __('Archives', 'perfect-woocommerce-brands'),
|
129 |
'type' => 'title',
|
130 |
'desc' => '',
|
131 |
'id' => 'wc_pwb_admin_tab_section_title'
|
172 |
'type' => 'sectionend',
|
173 |
'id' => 'wc_pwb_admin_tab_section_end'
|
174 |
)
|
175 |
+
));
|
176 |
} elseif ('tools' == $current_section) {
|
177 |
|
178 |
$settings = apply_filters('wc_pwb_admin_tab_tools_settings', array(
|
179 |
'section_title' => array(
|
180 |
+
'name' => __('Tools', 'perfect-woocommerce-brands'),
|
181 |
'type' => 'title',
|
182 |
'desc' => '',
|
183 |
'id' => 'wc_pwb_admin_tab_section_tools_title'
|
187 |
'type' => 'select',
|
188 |
'class' => 'pwb-admin-tab-field',
|
189 |
'desc' => sprintf(
|
190 |
+
__('Import brands from other brand plugin. <a href="%s" target="_blank">Click here for more details</a>', 'perfect-woocommerce-brands'), str_replace('/?', '/brands/?', PWB_DOCUMENTATION_URL)
|
191 |
),
|
192 |
'id' => 'wc_pwb_admin_tab_tools_migrate',
|
193 |
'options' => array(
|
218 |
'type' => 'sectionend',
|
219 |
'id' => 'wc_pwb_admin_tab_section_tools_end'
|
220 |
)
|
221 |
+
));
|
222 |
} else {
|
223 |
|
224 |
$brands_url = get_option('wc_pwb_admin_tab_slug', __('brands', 'perfect-woocommerce-brands')) . '/' . __('brand-name', 'perfect-woocommerce-brands') . '/';
|
263 |
'type' => 'sectionend',
|
264 |
'id' => 'wc_pwb_admin_tab_section_end'
|
265 |
)
|
266 |
+
));
|
267 |
}
|
268 |
|
269 |
return apply_filters('woocommerce_get_settings_' . $this->id, $settings, $current_section);
|
classes/class-perfect-woocommerce-brands.php
CHANGED
@@ -70,7 +70,7 @@ class Perfect_Woocommerce_Brands {
|
|
70 |
public static function plugin_row_meta($links, $file) {
|
71 |
if (PWB_PLUGIN_BASENAME === $file) {
|
72 |
$row_meta = array(
|
73 |
-
'docs' => '<a target="_blank" rel="noopener noferrer" href="' . PWB_DOCUMENTATION_URL . '">' . esc_html__('
|
74 |
);
|
75 |
return array_merge($links, $row_meta);
|
76 |
}
|
70 |
public static function plugin_row_meta($links, $file) {
|
71 |
if (PWB_PLUGIN_BASENAME === $file) {
|
72 |
$row_meta = array(
|
73 |
+
'docs' => '<a target="_blank" rel="noopener noferrer" href="' . PWB_DOCUMENTATION_URL . '">' . esc_html__('Documentation', 'perfect-woocommerce-brands') . '</a>',
|
74 |
);
|
75 |
return array_merge($links, $row_meta);
|
76 |
}
|
perfect-woocommerce-brands.php
CHANGED
@@ -4,13 +4,13 @@
|
|
4 |
* Plugin Name: Perfect WooCommerce Brands
|
5 |
* Plugin URI: https://wordpress.org/plugins/perfect-woocommerce-brands/
|
6 |
* Description: Perfect WooCommerce Brands allows you to show product brands in your WooCommerce based store.
|
7 |
-
* Version: 1.8.
|
8 |
* Author: QuadLayers
|
9 |
* Author URI: https://quadlayers.com
|
10 |
* Text Domain: perfect-woocommerce-brands
|
11 |
* Domain Path: /lang
|
12 |
* License: GPL3
|
13 |
-
* Perfect WooCommerce Brands version 1.8.
|
14 |
* Perfect WooCommerce Brands is free software: you can redistribute it and/or modify
|
15 |
* it under the terms of the GNU General Public License as published by
|
16 |
* the Free Software Foundation, either version 3 of the License, or
|
@@ -35,7 +35,7 @@ defined('ABSPATH') or die('No script kiddies please!');
|
|
35 |
define('PWB_PLUGIN_URL', plugins_url('', __FILE__));
|
36 |
define('PWB_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR);
|
37 |
define('PWB_PLUGIN_BASENAME', plugin_basename(__FILE__));
|
38 |
-
define('PWB_PLUGIN_VERSION', '1.8.
|
39 |
define('PWB_PLUGIN_NAME', 'Perfect WooCommerce Brands');
|
40 |
define('PWB_REVIEW_URL', 'https://wordpress.org/support/plugin/perfect-woocommerce-brands/reviews/?filter=5#new-post');
|
41 |
define('PWB_DEMO_URL', 'https://quadlayers.com/portfolio/perfect-woocommerce-brands/?utm_source=pwb_admin');
|
4 |
* Plugin Name: Perfect WooCommerce Brands
|
5 |
* Plugin URI: https://wordpress.org/plugins/perfect-woocommerce-brands/
|
6 |
* Description: Perfect WooCommerce Brands allows you to show product brands in your WooCommerce based store.
|
7 |
+
* Version: 1.8.2
|
8 |
* Author: QuadLayers
|
9 |
* Author URI: https://quadlayers.com
|
10 |
* Text Domain: perfect-woocommerce-brands
|
11 |
* Domain Path: /lang
|
12 |
* License: GPL3
|
13 |
+
* Perfect WooCommerce Brands version 1.8.2, Copyright (C) 2019 QuadLayers
|
14 |
* Perfect WooCommerce Brands is free software: you can redistribute it and/or modify
|
15 |
* it under the terms of the GNU General Public License as published by
|
16 |
* the Free Software Foundation, either version 3 of the License, or
|
35 |
define('PWB_PLUGIN_URL', plugins_url('', __FILE__));
|
36 |
define('PWB_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR);
|
37 |
define('PWB_PLUGIN_BASENAME', plugin_basename(__FILE__));
|
38 |
+
define('PWB_PLUGIN_VERSION', '1.8.2');
|
39 |
define('PWB_PLUGIN_NAME', 'Perfect WooCommerce Brands');
|
40 |
define('PWB_REVIEW_URL', 'https://wordpress.org/support/plugin/perfect-woocommerce-brands/reviews/?filter=5#new-post');
|
41 |
define('PWB_DEMO_URL', 'https://quadlayers.com/portfolio/perfect-woocommerce-brands/?utm_source=pwb_admin');
|
readme.txt
CHANGED
@@ -1,11 +1,13 @@
|
|
1 |
=== Perfect WooCommerce Brands ===
|
2 |
-
Contributors: titodevera
|
3 |
Donate link: https://quadlayers.com
|
4 |
Tags: woocommerce, woocommerce brands, woocommerce product, woocommerce manufacturer, woocommerce supplier, e-commerce
|
5 |
Requires at least: 4.7
|
6 |
Tested up to: 5.4.0
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 1.8.
|
|
|
|
|
9 |
License: GPL3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.en.html
|
11 |
|
@@ -88,6 +90,8 @@ You can also contribute [translating the plugin](https://translate.wordpress.org
|
|
88 |
|
89 |
|
90 |
== Changelog ==
|
|
|
|
|
91 |
= 1.8.1 =
|
92 |
* Enhancement: Update documentation link
|
93 |
= 1.8.0 =
|
1 |
=== Perfect WooCommerce Brands ===
|
2 |
+
Contributors: quadlayers, titodevera
|
3 |
Donate link: https://quadlayers.com
|
4 |
Tags: woocommerce, woocommerce brands, woocommerce product, woocommerce manufacturer, woocommerce supplier, e-commerce
|
5 |
Requires at least: 4.7
|
6 |
Tested up to: 5.4.0
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 1.8.2
|
9 |
+
WC requires at least: 3.0
|
10 |
+
WC tested up to: 4.0
|
11 |
License: GPL3
|
12 |
License URI: http://www.gnu.org/licenses/gpl-3.0.en.html
|
13 |
|
90 |
|
91 |
|
92 |
== Changelog ==
|
93 |
+
= 1.8.2 =
|
94 |
+
* Enhancement: Update documentation
|
95 |
= 1.8.1 =
|
96 |
* Enhancement: Update documentation link
|
97 |
= 1.8.0 =
|