Version Description
- Add two new filters for customizing the Product Description and Additional Information tab titles
- Fix TipTips on Customizer page
Download this release
Release Info
| Developer | maxrice |
| Plugin | |
| Version | 1.0.1 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0 to 1.0.1
- admin/class-wc-customizer-admin.php +39 -53
- readme.txt +7 -3
- woocommerce-customizer.php +2 -2
admin/class-wc-customizer-admin.php
CHANGED
|
@@ -30,43 +30,36 @@ class WC_Customizer_Admin {
|
|
| 30 |
*/
|
| 31 |
public static function init() {
|
| 32 |
|
| 33 |
-
self::$tabs = array( 'shop_loop'
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
);
|
| 38 |
|
| 39 |
-
//
|
| 40 |
-
|
| 41 |
|
| 42 |
// Add 'Customizer' link under WooCommerce menu
|
| 43 |
-
add_action( 'admin_menu', __CLASS__
|
| 44 |
|
| 45 |
}
|
| 46 |
|
|
|
|
| 47 |
/**
|
| 48 |
-
*
|
| 49 |
*
|
| 50 |
-
* @access public
|
| 51 |
* @since 1.0
|
| 52 |
-
* @param $
|
| 53 |
-
* @return
|
| 54 |
*/
|
| 55 |
-
public static function
|
| 56 |
-
global $woocommerce;
|
| 57 |
|
| 58 |
-
|
| 59 |
-
if ( $hook_suffix != self::$page )
|
| 60 |
-
return;
|
| 61 |
-
|
| 62 |
-
// WooCommerce styles
|
| 63 |
-
wp_enqueue_style( 'woocommerce_admin_styles', $woocommerce->plugin_url() . '/assets/css/admin.css' );
|
| 64 |
-
|
| 65 |
-
// WooCommerce Admin JS for tool tips
|
| 66 |
-
wp_enqueue_script( 'woocommerce_admin', $woocommerce->plugin_url() . '/assets/js/admin/woocommerce_admin.min.js', array( 'jquery', 'jquery-ui-widget', 'jquery-ui-core' ), $woocommerce->version );
|
| 67 |
|
|
|
|
| 68 |
}
|
| 69 |
|
|
|
|
| 70 |
/**
|
| 71 |
* Add 'Customizer' menu link under 'WooCommerce' top level menu
|
| 72 |
*
|
|
@@ -176,9 +169,9 @@ class WC_Customizer_Admin {
|
|
| 176 |
if ( ! isset( $field['desc_tip'] ) ) $field['desc_tip'] = false;
|
| 177 |
|
| 178 |
if ( $field['desc_tip'] === true ) {
|
| 179 |
-
$description = '<img class="help_tip" data-tip="' . esc_attr( $field['desc'] ) . '" src="' . $woocommerce->plugin_url() . '/assets/images/help.png" />';
|
| 180 |
} elseif ( $field['desc_tip'] ) {
|
| 181 |
-
$description = '<img class="help_tip" data-tip="' . esc_attr( $field['desc_tip'] ) . '" src="' . $woocommerce->plugin_url() . '/assets/images/help.png" />';
|
| 182 |
} else {
|
| 183 |
$description = '<span class="description">' . $field['desc'] . '</span>';
|
| 184 |
}
|
|
@@ -346,37 +339,30 @@ class WC_Customizer_Admin {
|
|
| 346 |
'product_page' =>
|
| 347 |
|
| 348 |
array(
|
| 349 |
-
// tab title customization coming in wc 1.7
|
| 350 |
-
/*array(
|
| 351 |
-
'name' => __( 'Tab Titles', WC_Customizer::$text_domain ),
|
| 352 |
-
'type' => 'title'
|
| 353 |
-
),
|
| 354 |
-
|
| 355 |
-
array(
|
| 356 |
-
'filter_id' => 'woocommerce_product_description_tab_title',
|
| 357 |
-
'name' => __( 'Product Description', WC_Customizer::$text_domain ),
|
| 358 |
-
'desc_tip' => __( 'Changes the Production Description tab title', WC_Customizer::$text_domain ),
|
| 359 |
-
'type' => 'text'
|
| 360 |
-
),
|
| 361 |
-
|
| 362 |
-
array(
|
| 363 |
-
'filter_id' => 'woocommerce_product_additional_information_tab_title',
|
| 364 |
-
'name' => __( 'Additional Information', WC_Customizer::$text_domain ),
|
| 365 |
-
'desc_tip' => __( 'Changes the Additional Information tab title', WC_Customizer::$text_domain ),
|
| 366 |
-
'type' => 'text'
|
| 367 |
-
),
|
| 368 |
-
|
| 369 |
-
array(
|
| 370 |
-
'filter_id' => 'woocommerce_reviews_tab_title',
|
| 371 |
-
'name' => __( 'Reviews', WC_Customizer::$text_domain ),
|
| 372 |
-
'desc_tip' => __( 'Changes the Reviews tab title', WC_Customizer::$text_domain ),
|
| 373 |
-
'type' => 'text'
|
| 374 |
-
),
|
| 375 |
-
|
| 376 |
-
array( 'type' => 'sectionend' ),*/
|
| 377 |
|
| 378 |
array(
|
| 379 |
-
'name'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 380 |
'type' => 'title'
|
| 381 |
),
|
| 382 |
|
| 30 |
*/
|
| 31 |
public static function init() {
|
| 32 |
|
| 33 |
+
self::$tabs = array( 'shop_loop' => __( 'Shop Loop', WC_Customizer::$text_domain ),
|
| 34 |
+
'product_page' => __( 'Product Page', WC_Customizer::$text_domain ),
|
| 35 |
+
'checkout' => __( 'Checkout', WC_Customizer::$text_domain ),
|
| 36 |
+
'misc' => __( 'Misc', WC_Customizer::$text_domain )
|
| 37 |
);
|
| 38 |
|
| 39 |
+
// Add settings page screen ID to list of pages for WC CSS/JS to load on
|
| 40 |
+
add_filter( 'woocommerce_screen_ids', array( __CLASS__, 'load_woocommerce_styles_scripts' ) );
|
| 41 |
|
| 42 |
// Add 'Customizer' link under WooCommerce menu
|
| 43 |
+
add_action( 'admin_menu', array( __CLASS__, 'add_menu_link' ) );
|
| 44 |
|
| 45 |
}
|
| 46 |
|
| 47 |
+
|
| 48 |
/**
|
| 49 |
+
* Add Customizer settings screen ID to the list of pages for WC to load CSS/JS on
|
| 50 |
*
|
|
|
|
| 51 |
* @since 1.0
|
| 52 |
+
* @param array $screen_ids
|
| 53 |
+
* @return array
|
| 54 |
*/
|
| 55 |
+
public static function load_woocommerce_styles_scripts( $screen_ids ) {
|
|
|
|
| 56 |
|
| 57 |
+
$screen_ids[] = 'woocommerce_page_woocommerce_customizer';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
+
return $screen_ids;
|
| 60 |
}
|
| 61 |
|
| 62 |
+
|
| 63 |
/**
|
| 64 |
* Add 'Customizer' menu link under 'WooCommerce' top level menu
|
| 65 |
*
|
| 169 |
if ( ! isset( $field['desc_tip'] ) ) $field['desc_tip'] = false;
|
| 170 |
|
| 171 |
if ( $field['desc_tip'] === true ) {
|
| 172 |
+
$description = '<img height="16" width="16" class="help_tip" data-tip="' . esc_attr( $field['desc'] ) . '" src="' . $woocommerce->plugin_url() . '/assets/images/help.png" />';
|
| 173 |
} elseif ( $field['desc_tip'] ) {
|
| 174 |
+
$description = '<img height="16" width="16" class="help_tip" data-tip="' . esc_attr( $field['desc_tip'] ) . '" src="' . $woocommerce->plugin_url() . '/assets/images/help.png" />';
|
| 175 |
} else {
|
| 176 |
$description = '<span class="description">' . $field['desc'] . '</span>';
|
| 177 |
}
|
| 339 |
'product_page' =>
|
| 340 |
|
| 341 |
array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 342 |
|
| 343 |
array(
|
| 344 |
+
'name' => __( 'Tab Titles', WC_Customizer::$text_domain ),
|
| 345 |
+
'type' => 'title'
|
| 346 |
+
),
|
| 347 |
+
|
| 348 |
+
array(
|
| 349 |
+
'filter_id' => 'woocommerce_product_description_tab_title',
|
| 350 |
+
'name' => __( 'Product Description', WC_Customizer::$text_domain ),
|
| 351 |
+
'desc_tip' => __( 'Changes the Production Description tab title', WC_Customizer::$text_domain ),
|
| 352 |
+
'type' => 'text'
|
| 353 |
+
),
|
| 354 |
+
|
| 355 |
+
array(
|
| 356 |
+
'filter_id' => 'woocommerce_product_additional_information_tab_title',
|
| 357 |
+
'name' => __( 'Additional Information', WC_Customizer::$text_domain ),
|
| 358 |
+
'desc_tip' => __( 'Changes the Additional Information tab title', WC_Customizer::$text_domain ),
|
| 359 |
+
'type' => 'text'
|
| 360 |
+
),
|
| 361 |
+
|
| 362 |
+
array( 'type' => 'sectionend' ),
|
| 363 |
+
|
| 364 |
+
array(
|
| 365 |
+
'name' => __( 'Tab Content Headings', WC_Customizer::$text_domain ),
|
| 366 |
'type' => 'title'
|
| 367 |
),
|
| 368 |
|
readme.txt
CHANGED
|
@@ -2,9 +2,9 @@
|
|
| 2 |
Contributors: maxrice
|
| 3 |
Donate link: http://www.maxrice.com
|
| 4 |
Tags: woocommerce
|
| 5 |
-
Requires at least: 3.
|
| 6 |
-
Tested up to: 3.
|
| 7 |
-
Stable tag: 1.0
|
| 8 |
License: GPLv3 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
| 10 |
|
|
@@ -53,5 +53,9 @@ Yes! Fork the plugin on [Github](https://github.com/maxrice/woocommerce-customiz
|
|
| 53 |
|
| 54 |
== Changelog ==
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
= 1.0 =
|
| 57 |
* Initial release
|
| 2 |
Contributors: maxrice
|
| 3 |
Donate link: http://www.maxrice.com
|
| 4 |
Tags: woocommerce
|
| 5 |
+
Requires at least: 3.5.1
|
| 6 |
+
Tested up to: 3.5.1
|
| 7 |
+
Stable tag: 1.0.1
|
| 8 |
License: GPLv3 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
| 10 |
|
| 53 |
|
| 54 |
== Changelog ==
|
| 55 |
|
| 56 |
+
= 1.0.1 =
|
| 57 |
+
* Add two new filters for customizing the Product Description and Additional Information tab titles
|
| 58 |
+
* Fix TipTips on Customizer page
|
| 59 |
+
|
| 60 |
= 1.0 =
|
| 61 |
* Initial release
|
woocommerce-customizer.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
* Plugin Name: WooCommerce Customizer
|
| 4 |
* Plugin URI: http://www.maxrice.com/wordpress/woocommerce-customizer/
|
| 5 |
* Description: Helps you customize WooCommerce without writing any code
|
| 6 |
-
* Version: 1.0.
|
| 7 |
* Author: Max Rice
|
| 8 |
* Author URI: http://www.maxrice.com
|
| 9 |
*
|
|
@@ -13,7 +13,7 @@
|
|
| 13 |
* License: GNU General Public License v3.0
|
| 14 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
| 15 |
*
|
| 16 |
-
* @package WooCommerce
|
| 17 |
* @author Max Rice
|
| 18 |
* @since 1.0
|
| 19 |
*/
|
| 3 |
* Plugin Name: WooCommerce Customizer
|
| 4 |
* Plugin URI: http://www.maxrice.com/wordpress/woocommerce-customizer/
|
| 5 |
* Description: Helps you customize WooCommerce without writing any code
|
| 6 |
+
* Version: 1.0.1
|
| 7 |
* Author: Max Rice
|
| 8 |
* Author URI: http://www.maxrice.com
|
| 9 |
*
|
| 13 |
* License: GNU General Public License v3.0
|
| 14 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
| 15 |
*
|
| 16 |
+
* @package WooCommerce-Customizer
|
| 17 |
* @author Max Rice
|
| 18 |
* @since 1.0
|
| 19 |
*/
|
