Version Description
- Includes additional validations to prevent conflicts with custom post types.
Download this release
Release Info
Developer | codepeople |
Plugin | Music Player for WooCommerce |
Version | 1.0.128 |
Comparing to | |
See all releases |
Code changes from version 1.0.127 to 1.0.128
- readme.txt +5 -1
- wcmp.php +15 -3
readme.txt
CHANGED
@@ -200,6 +200,10 @@ Each time save the data of a product, the files for demo are deleted and generat
|
|
200 |
|
201 |
== Changelog ==
|
202 |
|
|
|
|
|
|
|
|
|
203 |
= 1.0.127 =
|
204 |
|
205 |
* Adds a new attribute in the playlist shortcode to hide the products' prices and add-to-cart icons: hide_purchase_buttons
|
@@ -741,6 +745,6 @@ Each time save the data of a product, the files for demo are deleted and generat
|
|
741 |
|
742 |
== Upgrade Notice ==
|
743 |
|
744 |
-
= 1.0.
|
745 |
|
746 |
Important note: If you are using the Professional version don't update via the WP dashboard but using your personal update link. Contact us if you need further information: http://wordpress.dwbooster.com/support
|
200 |
|
201 |
== Changelog ==
|
202 |
|
203 |
+
= 1.0.128 =
|
204 |
+
|
205 |
+
* Includes additional validations to prevent conflicts with custom post types.
|
206 |
+
|
207 |
= 1.0.127 =
|
208 |
|
209 |
* Adds a new attribute in the playlist shortcode to hide the products' prices and add-to-cart icons: hide_purchase_buttons
|
745 |
|
746 |
== Upgrade Notice ==
|
747 |
|
748 |
+
= 1.0.128 =
|
749 |
|
750 |
Important note: If you are using the Professional version don't update via the WP dashboard but using your personal update link. Contact us if you need further information: http://wordpress.dwbooster.com/support
|
wcmp.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Music Player for WooCommerce
|
4 |
Plugin URI: https://wcmp.dwbooster.com
|
5 |
-
Version: 1.0.
|
6 |
Text Domain: music-player-for-woocommerce
|
7 |
Author: CodePeople
|
8 |
Author URI: https://wcmp.dwbooster.com
|
@@ -417,7 +417,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
417 |
wp_enqueue_style( 'wcmp-style', plugin_dir_url(__FILE__).'css/style.css' );
|
418 |
wp_enqueue_script('jquery');
|
419 |
wp_enqueue_script('wp-mediaelement');
|
420 |
-
wp_enqueue_script('wcmp-script', plugin_dir_url(__FILE__).'js/public.js', array('jquery', 'wp-mediaelement'), '1.0.
|
421 |
|
422 |
$play_all = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr(
|
423 |
'_wcmp_play_all',
|
@@ -1130,10 +1130,20 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
1130 |
|
1131 |
private function _sort_list($product_a, $product_b)
|
1132 |
{
|
|
|
|
|
|
|
|
|
|
|
1133 |
$menu_order_a = $product_a->get_menu_order();
|
1134 |
$menu_order_b = $product_b->get_menu_order();
|
1135 |
if ($menu_order_a == $menu_order_b)
|
1136 |
{
|
|
|
|
|
|
|
|
|
|
|
1137 |
$name_a = $product_a->get_name();
|
1138 |
$name_b = $product_b->get_name();
|
1139 |
if($name_a == $name_b) return 0;
|
@@ -1158,8 +1168,10 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
1158 |
|
1159 |
private function _get_recursive_product_files($product, $files_arr )
|
1160 |
{
|
1161 |
-
$
|
|
|
1162 |
$product_type = $product->get_type();
|
|
|
1163 |
|
1164 |
if( $product_type == 'variation' )
|
1165 |
{
|
2 |
/*
|
3 |
Plugin Name: Music Player for WooCommerce
|
4 |
Plugin URI: https://wcmp.dwbooster.com
|
5 |
+
Version: 1.0.128
|
6 |
Text Domain: music-player-for-woocommerce
|
7 |
Author: CodePeople
|
8 |
Author URI: https://wcmp.dwbooster.com
|
417 |
wp_enqueue_style( 'wcmp-style', plugin_dir_url(__FILE__).'css/style.css' );
|
418 |
wp_enqueue_script('jquery');
|
419 |
wp_enqueue_script('wp-mediaelement');
|
420 |
+
wp_enqueue_script('wcmp-script', plugin_dir_url(__FILE__).'js/public.js', array('jquery', 'wp-mediaelement'), '1.0.128');
|
421 |
|
422 |
$play_all = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr(
|
423 |
'_wcmp_play_all',
|
1130 |
|
1131 |
private function _sort_list($product_a, $product_b)
|
1132 |
{
|
1133 |
+
if(
|
1134 |
+
!is_object($product_a) || !method_exists($product_a, 'get_menu_order') ||
|
1135 |
+
!is_object($product_b) || !method_exists($product_b, 'get_menu_order')
|
1136 |
+
) return 0;
|
1137 |
+
|
1138 |
$menu_order_a = $product_a->get_menu_order();
|
1139 |
$menu_order_b = $product_b->get_menu_order();
|
1140 |
if ($menu_order_a == $menu_order_b)
|
1141 |
{
|
1142 |
+
if(
|
1143 |
+
!method_exists($product_a, 'get_name') ||
|
1144 |
+
!method_exists($product_b, 'get_name')
|
1145 |
+
) return 0;
|
1146 |
+
|
1147 |
$name_a = $product_a->get_name();
|
1148 |
$name_b = $product_b->get_name();
|
1149 |
if($name_a == $name_b) return 0;
|
1168 |
|
1169 |
private function _get_recursive_product_files($product, $files_arr )
|
1170 |
{
|
1171 |
+
if(!is_object($product) || !method_exists($product, 'get_type')) return $files_arr;
|
1172 |
+
|
1173 |
$product_type = $product->get_type();
|
1174 |
+
$id = $product->get_id();
|
1175 |
|
1176 |
if( $product_type == 'variation' )
|
1177 |
{
|