Version Description
- Includes a new attribute in the plugin's settings for controlling the fade out effect in the demos.
- Improves the Elementor widget.
- Fixes an issue in the Google Drive add-on (Professional version of the plugin).
Download this release
Release Info
Developer | codepeople |
Plugin | Music Player for WooCommerce |
Version | 1.0.135 |
Comparing to | |
See all releases |
Code changes from version 1.0.129 to 1.0.135
- addons/dokan.addon.php +1 -1
- js/public.js +12 -12
- js/public_src.js +37 -26
- pagebuilders/elementor/elementor.pb.php +8 -1
- readme.txt +28 -2
- views/global_options.php +5 -0
- wcmp.php +5 -2
addons/dokan.addon.php
CHANGED
@@ -33,7 +33,7 @@ if(!class_exists('WCMP_DOKAN_ADDON'))
|
|
33 |
public function product_settings()
|
34 |
{
|
35 |
wp_enqueue_style('wcmp-dokan', plugin_dir_url(__FILE__).'dokan/style.css');
|
36 |
-
|
37 |
} // End product_settings
|
38 |
|
39 |
public function save_product_settings($post_id)
|
33 |
public function product_settings()
|
34 |
{
|
35 |
wp_enqueue_style('wcmp-dokan', plugin_dir_url(__FILE__).'dokan/style.css');
|
36 |
+
include dirname(__FILE__).'/dokan/player_options.php';
|
37 |
} // End product_settings
|
38 |
|
39 |
public function save_product_settings($post_id)
|
js/public.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,
|
2 |
-
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,
|
3 |
-
$jscomp.polyfill=function(a,
|
4 |
-
(function(){var a=[],
|
5 |
-
if(!("boolean"!==typeof
|
6 |
-
"undefined"!=typeof wcmp_global_settings?wcmp_global_settings.play_all:!0,k="undefined"!=typeof wcmp_global_settings?!(1*wcmp_global_settings.play_simultaneously):!0,
|
7 |
-
a.setVolume(parseFloat(
|
8 |
-
a.addEventListener("volumechange",function(a){
|
9 |
-
|
10 |
-
"");b=
|
11 |
-
jQuery(window).on("load",function(){generate_the_wcmp(!0);var a=jQuery,
|
12 |
-
this.pause()});setTimeout(function(){
|
1 |
+
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,c,b){a instanceof String&&(a=String(a));for(var f=a.length,e=0;e<f;e++){var d=a[e];if(c.call(b,d,e,a))return{i:e,v:d}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;
|
2 |
+
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,c,b){a!=Array.prototype&&a!=Object.prototype&&(a[c]=b.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);
|
3 |
+
$jscomp.polyfill=function(a,c,b,f){if(c){b=$jscomp.global;a=a.split(".");for(f=0;f<a.length-1;f++){var e=a[f];e in b||(b[e]={});b=b[e]}a=a[a.length-1];f=b[a];c=c(f);c!=f&&null!=c&&$jscomp.defineProperty(b,a,{configurable:!0,writable:!0,value:c})}};$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,b){return $jscomp.findInternal(this,a,b).v}},"es6","es3");
|
4 |
+
(function(){var a=[],c=0;window.generate_the_wcmp=function(b){function f(g){if(g+1<c){var h=g+1;a[h]instanceof d&&a[h].is("a")?a[h].is(":visible")?a[h].click():f(g+1):d(a[h].container).is(":visible")?a[h].play():f(g+1)}}function e(a){var g=a.data("product"),b=d("img.product-"+g);b.length&&1==d('[data-product="'+g+'"]').length&&(g=b.offset(),a=a.closest("div.wcmp-player"),a.css({position:"absolute","z-index":999999}).offset({left:g.left+(b.width()-a.width())/2,top:g.top+(b.height()-a.height())/2}))}
|
5 |
+
if(!("boolean"!==typeof b&&"undefined"!=typeof wcmp_global_settings&&1*wcmp_global_settings.onload)&&"undefined"===typeof generated_the_wcmp){generated_the_wcmp=!0;var d=jQuery;d(document).on("click",".wcmp-player-container",function(a){a.preventDefault();a.stopPropagation()});d.expr[":"].regex=function(a,b,c){b=c[3].split(",");var l=/^(data|css):/;c=b[0].match(l)?b[0].split(":")[0]:"attr";l=b.shift().replace(l,"");return(new RegExp(b.join("").replace(/^\s+|\s+$/g,""),"ig")).test(d(a)[c](l))};var q=
|
6 |
+
"undefined"!=typeof wcmp_global_settings?wcmp_global_settings.play_all:!0,k="undefined"!=typeof wcmp_global_settings?!(1*wcmp_global_settings.play_simultaneously):!0,n="undefined"!=typeof wcmp_global_settings?1*wcmp_global_settings.fade_out:!0,p="undefined"!=typeof wcmp_global_settings&&"ios_controls"in wcmp_global_settings&&1*wcmp_global_settings.ios_controls?!0:!1;b=d("audio.wcmp-player:not(.track):not([playernumber])");var r=d("audio.wcmp-player.track:not([playernumber])"),m={pauseOtherPlayers:k,
|
7 |
+
iPadUseNativeControls:p,iPhoneUseNativeControls:p,success:function(a,b){d(b).attr("volume")&&a.setVolume(parseFloat(d(b).attr("volume")));var g=function(a){a=d(a.target||a.detail.target);var l=a.data("duration");"undefined"!=typeof l&&a.closest(".wcmp-player-container").find(".mejs-duration").html(l)};a.addEventListener("timeupdate",function(a){g(a);a=a.target||a.detail.target;isNaN(a.currentTime)||isNaN(a.duration)||(n&&4>a.duration-a.currentTime?a.setVolume(a.volume-a.volume/3):("undefined"==typeof a.bkVolume&&
|
8 |
+
(a.bkVolume=a.volume),a.setVolume(a.bkVolume)))});a.addEventListener("volumechange",function(a){a=a.target||a.detail.target;isNaN(a.currentTime)||isNaN(a.duration)||!(4<a.duration-a.currentTime)&&n||!a.currentTime||(a.bkVolume=a.volume)});a.addEventListener("ended",function(a){a=a.target||a.detail.target;1*q&&(a=1*d(a).attr("playernumber"),f(a))});a.addEventListener("loadedmetadata",function(a){g(a)})}};k=".product-type-grouped :regex(name,quantity\\[\\d+\\])";b.each(function(){var b=d(this);b.find("source").attr("src");
|
9 |
+
b.attr("playernumber",c);m.audioVolume="vertical";try{a[c]=new MediaElementPlayer(b[0],m)}catch(h){"console"in window&&console.log(h)}c++});r.each(function(){var b=d(this);b.find("source").attr("src");b.attr("playernumber",c);m.features=["playpause"];try{a[c]=new MediaElementPlayer(b[0],m)}catch(h){"console"in window&&console.log(h)}c++;e(b);d(window).resize(function(){e(b)})});d(k).length||(k=".product-type-grouped [data-product_id]");d(k).length||(k=".woocommerce-grouped-product-list [data-product_id]");
|
10 |
+
d(k).length||(k='.woocommerce-grouped-product-list [id*="product-"]');d(k).each(function(){try{var a=d(this),b=(a.data("product_id")||a.attr("name")||a.attr("id")).replace(/[^\d]/g,""),c=d(".wcmp-player-list.merge_in_grouped_products .product-"+b+":first .wcmp-player-title"),e=d("<table></table>");c.length&&!c.closest(".wcmp-first-in-product").length&&(c.closest("tr").addClass("wcmp-first-in-product"),0==c.closest("form").length&&c.closest(".wcmp-player-list").prependTo(a.closest("form")),e.append(a.closest("tr").prepend("<td>"+
|
11 |
+
c.html()+"</td>")),c.html("").append(e))}catch(t){}})}};window.wcmp_force_init=function(){delete window.generated_the_wcmp;generate_the_wcmp(!0)};jQuery(generate_the_wcmp);jQuery(window).on("load",function(){generate_the_wcmp(!0);var a=jQuery,c=window.navigator.userAgent;a("[data-lazyloading]").each(function(){var b=a(this);b.attr("preload",b.data("lazyloading"))});if(c.match(/iPad/i)||c.match(/iPhone/i))if("undefined"!=typeof wcmp_global_settings?wcmp_global_settings.play_all:1)a(".wcmp-player .mejs-play button").one("click",
|
12 |
+
function(){if("undefined"==typeof wcmp_preprocessed_players){wcmp_preprocessed_players=!0;var b=a(this);a(".wcmp-player audio").each(function(){this.play();this.pause()});setTimeout(function(){b.click()},500)}})}).on("popstate",function(){jQuery("audio[data-product]:not([playernumber])").length&&wcmp_force_init()});jQuery(document).on("scroll",wcmp_force_init)})();
|
js/public_src.js
CHANGED
@@ -67,6 +67,7 @@
|
|
67 |
//------------------------ MAIN CODE ------------------------
|
68 |
var play_all = (typeof wcmp_global_settings != 'undefined') ? wcmp_global_settings[ 'play_all' ] : true, // Play all songs
|
69 |
pause_others = (typeof wcmp_global_settings != 'undefined') ? !(wcmp_global_settings['play_simultaneously']*1) : true,
|
|
|
70 |
ios_controls = (
|
71 |
typeof wcmp_global_settings != 'undefined' &&
|
72 |
('ios_controls' in wcmp_global_settings) &&
|
@@ -81,7 +82,7 @@
|
|
81 |
success: function( media, dom ){
|
82 |
if($(dom).attr('volume')) media.setVolume(parseFloat($(dom).attr('volume')));
|
83 |
var update_duration = function(e){
|
84 |
-
var t = $(e.target),
|
85 |
duration = t.data('duration');
|
86 |
if(typeof duration != 'undefined')
|
87 |
{
|
@@ -91,34 +92,37 @@
|
|
91 |
}
|
92 |
};
|
93 |
|
94 |
-
media.addEventListener( 'timeupdate', function(
|
95 |
-
update_duration(
|
96 |
-
|
|
|
97 |
{
|
98 |
-
if(
|
99 |
{
|
100 |
-
|
101 |
}
|
102 |
else
|
103 |
{
|
104 |
-
if( typeof
|
105 |
-
|
106 |
}
|
107 |
|
108 |
}
|
109 |
});
|
110 |
|
111 |
-
media.addEventListener( 'volumechange', function(
|
112 |
-
|
|
|
113 |
{
|
114 |
-
if( (
|
115 |
}
|
116 |
});
|
117 |
|
118 |
-
media.addEventListener( 'ended', function(
|
|
|
119 |
if( play_all*1 )
|
120 |
{
|
121 |
-
var playernumber = $(
|
122 |
_playNext( playernumber );
|
123 |
}
|
124 |
});
|
@@ -134,7 +138,6 @@
|
|
134 |
src = e.find( 'source' ).attr( 'src' );
|
135 |
|
136 |
e.attr('playernumber', wcmp_player_counter);
|
137 |
-
wcmp_player_counter++;
|
138 |
|
139 |
c['audioVolume'] = 'vertical';
|
140 |
try{
|
@@ -145,6 +148,7 @@
|
|
145 |
if('console' in window) console.log(err);
|
146 |
}
|
147 |
|
|
|
148 |
/* _setOverImage(e); */
|
149 |
});
|
150 |
|
@@ -154,7 +158,6 @@
|
|
154 |
src = e.find( 'source' ).attr( 'src' );
|
155 |
|
156 |
e.attr('playernumber', wcmp_player_counter);
|
157 |
-
wcmp_player_counter++;
|
158 |
|
159 |
c['features'] = ['playpause'];
|
160 |
try{
|
@@ -165,27 +168,35 @@
|
|
165 |
if('console' in window) console.log(err);
|
166 |
}
|
167 |
|
|
|
168 |
_setOverImage(e);
|
169 |
$(window).resize(function(){_setOverImage(e);});
|
170 |
});
|
171 |
|
172 |
if(!$(selector).length) selector = '.product-type-grouped [data-product_id]';
|
173 |
-
|
174 |
-
|
175 |
-
i = e.data( 'product_id' )||e.attr('name').replace(/[^\d]/g,''),
|
176 |
-
c = $( '.wcmp-player-list.merge_in_grouped_products .product-'+i+':first .wcmp-player-title' ), /* Replaced :last with :first 2018.06.12 */
|
177 |
-
t = $('<table></table>');
|
178 |
|
179 |
-
|
|
|
180 |
{
|
181 |
-
|
182 |
-
|
|
|
|
|
|
|
|
|
183 |
{
|
184 |
-
c.closest('
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
}
|
186 |
-
t.append(e.closest('tr').prepend('<td>'+c.html()+'</td>'));
|
187 |
-
c.html('').append(t);
|
188 |
}
|
|
|
189 |
});
|
190 |
}
|
191 |
|
67 |
//------------------------ MAIN CODE ------------------------
|
68 |
var play_all = (typeof wcmp_global_settings != 'undefined') ? wcmp_global_settings[ 'play_all' ] : true, // Play all songs
|
69 |
pause_others = (typeof wcmp_global_settings != 'undefined') ? !(wcmp_global_settings['play_simultaneously']*1) : true,
|
70 |
+
fade_out = (typeof wcmp_global_settings != 'undefined') ? wcmp_global_settings['fade_out']*1 : true,
|
71 |
ios_controls = (
|
72 |
typeof wcmp_global_settings != 'undefined' &&
|
73 |
('ios_controls' in wcmp_global_settings) &&
|
82 |
success: function( media, dom ){
|
83 |
if($(dom).attr('volume')) media.setVolume(parseFloat($(dom).attr('volume')));
|
84 |
var update_duration = function(e){
|
85 |
+
var t = $(e.target || e.detail.target),
|
86 |
duration = t.data('duration');
|
87 |
if(typeof duration != 'undefined')
|
88 |
{
|
92 |
}
|
93 |
};
|
94 |
|
95 |
+
media.addEventListener( 'timeupdate', function( evt ){
|
96 |
+
update_duration(evt);
|
97 |
+
var e = evt.target || evt.detail.target;
|
98 |
+
if(!isNaN( e.currentTime ) && !isNaN( e.duration ))
|
99 |
{
|
100 |
+
if( fade_out && e.duration - e.currentTime < 4 )
|
101 |
{
|
102 |
+
e.setVolume( e.volume - e.volume / 3 );
|
103 |
}
|
104 |
else
|
105 |
{
|
106 |
+
if( typeof e[ 'bkVolume' ] == 'undefined' ) e[ 'bkVolume' ] = e.volume;
|
107 |
+
e.setVolume( e.bkVolume );
|
108 |
}
|
109 |
|
110 |
}
|
111 |
});
|
112 |
|
113 |
+
media.addEventListener( 'volumechange', function( evt ){
|
114 |
+
var e = evt.target || evt.detail.target;
|
115 |
+
if(!isNaN( e.currentTime ) && !isNaN( e.duration ))
|
116 |
{
|
117 |
+
if( ( e.duration - e.currentTime > 4 || !fade_out) && e.currentTime ) e[ 'bkVolume' ] = e.volume;
|
118 |
}
|
119 |
});
|
120 |
|
121 |
+
media.addEventListener( 'ended', function( evt ){
|
122 |
+
var e = evt.target || evt.detail.target;
|
123 |
if( play_all*1 )
|
124 |
{
|
125 |
+
var playernumber = $(e).attr('playernumber')*1;
|
126 |
_playNext( playernumber );
|
127 |
}
|
128 |
});
|
138 |
src = e.find( 'source' ).attr( 'src' );
|
139 |
|
140 |
e.attr('playernumber', wcmp_player_counter);
|
|
|
141 |
|
142 |
c['audioVolume'] = 'vertical';
|
143 |
try{
|
148 |
if('console' in window) console.log(err);
|
149 |
}
|
150 |
|
151 |
+
wcmp_player_counter++;
|
152 |
/* _setOverImage(e); */
|
153 |
});
|
154 |
|
158 |
src = e.find( 'source' ).attr( 'src' );
|
159 |
|
160 |
e.attr('playernumber', wcmp_player_counter);
|
|
|
161 |
|
162 |
c['features'] = ['playpause'];
|
163 |
try{
|
168 |
if('console' in window) console.log(err);
|
169 |
}
|
170 |
|
171 |
+
wcmp_player_counter++;
|
172 |
_setOverImage(e);
|
173 |
$(window).resize(function(){_setOverImage(e);});
|
174 |
});
|
175 |
|
176 |
if(!$(selector).length) selector = '.product-type-grouped [data-product_id]';
|
177 |
+
if(!$(selector).length) selector = '.woocommerce-grouped-product-list [data-product_id]';
|
178 |
+
if(!$(selector).length) selector = '.woocommerce-grouped-product-list [id*="product-"]';
|
|
|
|
|
|
|
179 |
|
180 |
+
$(selector).each(function(){
|
181 |
+
try
|
182 |
{
|
183 |
+
var e = $(this),
|
184 |
+
i = (e.data( 'product_id' )||e.attr('name')||e.attr('id')).replace(/[^\d]/g,''),
|
185 |
+
c = $( '.wcmp-player-list.merge_in_grouped_products .product-'+i+':first .wcmp-player-title' ), /* Replaced :last with :first 2018.06.12 */
|
186 |
+
t = $('<table></table>');
|
187 |
+
|
188 |
+
if(c.length && !c.closest('.wcmp-first-in-product').length)
|
189 |
{
|
190 |
+
c.closest('tr').addClass('wcmp-first-in-product'); /* To identify the firs element in the product */
|
191 |
+
if(c.closest('form').length == 0)
|
192 |
+
{
|
193 |
+
c.closest('.wcmp-player-list').prependTo(e.closest('form'));
|
194 |
+
}
|
195 |
+
t.append(e.closest('tr').prepend('<td>'+c.html()+'</td>'));
|
196 |
+
c.html('').append(t);
|
197 |
}
|
|
|
|
|
198 |
}
|
199 |
+
catch(err){}
|
200 |
});
|
201 |
}
|
202 |
|
pagebuilders/elementor/elementor.pb.php
CHANGED
@@ -49,7 +49,7 @@ class Elementor_WCMP_Widget extends Widget_Base
|
|
49 |
'label' => __('Music Player For WooCommerce', 'music-player-for-woocommerce'),
|
50 |
'type' => Controls_Manager::TEXTAREA,
|
51 |
'default' => '[wcmp-playlist products_ids="*" controls="track"]',
|
52 |
-
'description' => '<p>'.__('To include specific products in the playlist enter their IDs in the products_ids attributes, separated by comma symbols (,)', 'music-player-for-woocommerce').'</p><p>'.__('More information visiting the follwing link: ', 'music-player-for-woocommerce').'<br><a href="https://wcmp.dwbooster.com/documentation#playlist-shortcode" target="_blank">'.__('CLICK HERE', 'music-player-for-woocommerce').'</a></p>'
|
53 |
)
|
54 |
);
|
55 |
|
@@ -75,6 +75,13 @@ class Elementor_WCMP_Widget extends Widget_Base
|
|
75 |
)
|
76 |
)
|
77 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
$url = WCMP_WEBSITE_URL;
|
80 |
$url .= ((strpos($url, '?') === false) ? '?' : '&').'wcmp-preview='.urlencode($shortcode);
|
49 |
'label' => __('Music Player For WooCommerce', 'music-player-for-woocommerce'),
|
50 |
'type' => Controls_Manager::TEXTAREA,
|
51 |
'default' => '[wcmp-playlist products_ids="*" controls="track"]',
|
52 |
+
'description' => '<p>'.__('To include specific products in the playlist enter their IDs in the products_ids attributes, separated by comma symbols (,)', 'music-player-for-woocommerce').'</p><p style="color:red;padding:10px 0;">'.__('If you are editing the products template, to load the player of the current product, delete the products_ids attribute from the shortcode', 'music-player-for-woocommerce').'</p><p>'.__('More information visiting the follwing link: ', 'music-player-for-woocommerce').'<br><a href="https://wcmp.dwbooster.com/documentation#playlist-shortcode" target="_blank">'.__('CLICK HERE', 'music-player-for-woocommerce').'</a></p>'
|
53 |
)
|
54 |
);
|
55 |
|
75 |
)
|
76 |
)
|
77 |
{
|
78 |
+
try
|
79 |
+
{
|
80 |
+
if(stripos($shortcode, 'products_ids') === false)
|
81 |
+
if(!empty($GLOBALS['post']) && is_object($GLOBALS['post']))
|
82 |
+
$shortcode = preg_replace('/\]/', ' products_ids="'.$GLOBALS['post']->ID.'"]', $shortcode, 1);
|
83 |
+
}
|
84 |
+
catch(Exception $err){}
|
85 |
|
86 |
$url = WCMP_WEBSITE_URL;
|
87 |
$url .= ((strpos($url, '?') === false) ? '?' : '&').'wcmp-preview='.urlencode($shortcode);
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: codepeople
|
|
3 |
Donate link: https://wcmp.dwbooster.com
|
4 |
Tags:WooCommerce,music player,audio,music,song,player,audio player,media player,mp3,m3u,m3u8,wav,oga,ogg,dokan,wcfm
|
5 |
Requires at least: 3.5.0
|
6 |
-
Tested up to: 5.7
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -200,6 +200,32 @@ Each time save the data of a product, the files for demo are deleted and generat
|
|
200 |
|
201 |
== Changelog ==
|
202 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
= 1.0.129 =
|
204 |
|
205 |
* Includes the new attribute: 'Forces the audio player to be displayed in the product title.' in the plugin's settings page to prevent conflicts with plugins and themes with Ajax Infinite Scroll behavior.
|
@@ -749,6 +775,6 @@ Each time save the data of a product, the files for demo are deleted and generat
|
|
749 |
|
750 |
== Upgrade Notice ==
|
751 |
|
752 |
-
= 1.0.
|
753 |
|
754 |
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
|
3 |
Donate link: https://wcmp.dwbooster.com
|
4 |
Tags:WooCommerce,music player,audio,music,song,player,audio player,media player,mp3,m3u,m3u8,wav,oga,ogg,dokan,wcfm
|
5 |
Requires at least: 3.5.0
|
6 |
+
Tested up to: 5.7.1
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
200 |
|
201 |
== Changelog ==
|
202 |
|
203 |
+
= 1.0.135 =
|
204 |
+
|
205 |
+
* Includes a new attribute in the plugin's settings for controlling the fade out effect in the demos.
|
206 |
+
* Improves the Elementor widget.
|
207 |
+
* Fixes an issue in the Google Drive add-on (Professional version of the plugin).
|
208 |
+
|
209 |
+
= 1.0.134 =
|
210 |
+
|
211 |
+
* Applies a fade out to the audio files for demo.
|
212 |
+
|
213 |
+
= 1.0.133 =
|
214 |
+
|
215 |
+
* Extends the support to some custom themes.
|
216 |
+
|
217 |
+
= 1.0.132 =
|
218 |
+
|
219 |
+
* Fixes an issue with some Dokan integrations.
|
220 |
+
|
221 |
+
= 1.0.131 =
|
222 |
+
|
223 |
+
* Modifies the integration with the grouping products for accepting additional themes.
|
224 |
+
|
225 |
+
= 1.0.130 =
|
226 |
+
|
227 |
+
* Fixes a conflict between the play all feature and the last version of the MediaElementJS library.
|
228 |
+
|
229 |
= 1.0.129 =
|
230 |
|
231 |
* Includes the new attribute: 'Forces the audio player to be displayed in the product title.' in the plugin's settings page to prevent conflicts with plugins and themes with Ajax Infinite Scroll behavior.
|
775 |
|
776 |
== Upgrade Notice ==
|
777 |
|
778 |
+
= 1.0.135 =
|
779 |
|
780 |
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
|
views/global_options.php
CHANGED
@@ -34,6 +34,7 @@ $play_all = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr(
|
|
34 |
$on_cover = intval( $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( '_wcmp_on_cover', 0 ) );
|
35 |
$analytics_property = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( '_wcmp_analytics_property', '' );
|
36 |
$registered_only = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( '_wcmp_registered_only', 0 );
|
|
|
37 |
?>
|
38 |
<h1><?php _e('Music Player for WooCommerce - Global Settings', 'music-player-for-woocommerce'); ?></h1>
|
39 |
<div style="border:1px solid #E6DB55;margin-bottom:10px;padding:5px;background-color: #FFFFE0;">
|
@@ -80,6 +81,10 @@ _e(
|
|
80 |
<td width="30%"><?php _e( 'Include the players only for registered users', 'music-player-for-woocommerce' ); ?></td>
|
81 |
<td><input aria-label="<?php print esc_attr(__('Include the players only for registered users','music-player-for-woocommerce')); ?>" type="checkbox" name="_wcmp_registered_only" <?php print(($registered_only) ? 'CHECKED' : '' ); ?> /></td>
|
82 |
</tr>
|
|
|
|
|
|
|
|
|
83 |
<tr>
|
84 |
<td colspan="2" style="color:red;"><?php _e( 'The general settings affect only the PRO version of the plugin', 'music-player-for-woocommerce'); ?>. <a target="_blank" href="https://wcmp.dwbooster.com"><?php _e('CLICK HERE TO GET THE PRO VERSION OF THE PLUGIN', 'music-player-for-woocommerce'); ?></a></td>
|
85 |
</tr>
|
34 |
$on_cover = intval( $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( '_wcmp_on_cover', 0 ) );
|
35 |
$analytics_property = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( '_wcmp_analytics_property', '' );
|
36 |
$registered_only = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( '_wcmp_registered_only', 0 );
|
37 |
+
$fade_out = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( '_wcmp_fade_out', 1 );
|
38 |
?>
|
39 |
<h1><?php _e('Music Player for WooCommerce - Global Settings', 'music-player-for-woocommerce'); ?></h1>
|
40 |
<div style="border:1px solid #E6DB55;margin-bottom:10px;padding:5px;background-color: #FFFFE0;">
|
81 |
<td width="30%"><?php _e( 'Include the players only for registered users', 'music-player-for-woocommerce' ); ?></td>
|
82 |
<td><input aria-label="<?php print esc_attr(__('Include the players only for registered users','music-player-for-woocommerce')); ?>" type="checkbox" name="_wcmp_registered_only" <?php print(($registered_only) ? 'CHECKED' : '' ); ?> /></td>
|
83 |
</tr>
|
84 |
+
<tr>
|
85 |
+
<td width="30%"><?php _e( 'Apply fade out to playing audio when possible', 'music-player-for-woocommerce' ); ?></td>
|
86 |
+
<td><input aria-label="<?php print esc_attr(__('Apply fade out to playing audio when possible', 'music-player-for-woocommerce')); ?>" type="checkbox" name="_wcmp_fade_out" <?php print(($fade_out) ? 'CHECKED' : '' ); ?> /></td>
|
87 |
+
</tr>
|
88 |
<tr>
|
89 |
<td colspan="2" style="color:red;"><?php _e( 'The general settings affect only the PRO version of the plugin', 'music-player-for-woocommerce'); ?>. <a target="_blank" href="https://wcmp.dwbooster.com"><?php _e('CLICK HERE TO GET THE PRO VERSION OF THE PLUGIN', 'music-player-for-woocommerce'); ?></a></td>
|
90 |
</tr>
|
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
|
@@ -247,6 +247,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
247 |
$_REQUEST = stripslashes_deep($_REQUEST);
|
248 |
// Save the player settings
|
249 |
$registered_only = (isset($_REQUEST['_wcmp_registered_only'])) ? 1 : 0;
|
|
|
250 |
$troubleshoot_default_extension = (isset($_REQUEST['_wcmp_default_extension'])) ? true : false;
|
251 |
$force_main_player_in_title = (isset($_REQUEST['_wcmp_force_main_player_in_title'])) ? 1 : 0;
|
252 |
$ios_controls = (isset($_REQUEST['_wcmp_ios_controls'])) ? true : false;
|
@@ -281,6 +282,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
281 |
|
282 |
$global_settings = array(
|
283 |
'_wcmp_registered_only' => $registered_only,
|
|
|
284 |
'_wcmp_enable_player' => $enable_player,
|
285 |
'_wcmp_show_in' => $show_in,
|
286 |
'_wcmp_players_in_cart' => $players_in_cart,
|
@@ -424,7 +426,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
424 |
wp_enqueue_style( 'wcmp-style', plugin_dir_url(__FILE__).'css/style.css' );
|
425 |
wp_enqueue_script('jquery');
|
426 |
wp_enqueue_script('wp-mediaelement');
|
427 |
-
wp_enqueue_script('wcmp-script', plugin_dir_url(__FILE__).'js/public.js', array('jquery', 'wp-mediaelement'), '1.0.
|
428 |
|
429 |
$play_all = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr(
|
430 |
'_wcmp_play_all',
|
@@ -457,6 +459,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
457 |
'wcmp-script',
|
458 |
'wcmp_global_settings',
|
459 |
array(
|
|
|
460 |
'play_all'=>intval($play_all),
|
461 |
'play_simultaneously'=>intval($play_simultaneously),
|
462 |
'ios_controls' => $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr('_wcmp_ios_controls', false),
|
2 |
/*
|
3 |
Plugin Name: Music Player for WooCommerce
|
4 |
Plugin URI: https://wcmp.dwbooster.com
|
5 |
+
Version: 1.0.135
|
6 |
Text Domain: music-player-for-woocommerce
|
7 |
Author: CodePeople
|
8 |
Author URI: https://wcmp.dwbooster.com
|
247 |
$_REQUEST = stripslashes_deep($_REQUEST);
|
248 |
// Save the player settings
|
249 |
$registered_only = (isset($_REQUEST['_wcmp_registered_only'])) ? 1 : 0;
|
250 |
+
$fade_out = (isset($_REQUEST['_wcmp_fade_out'])) ? 1 : 0;
|
251 |
$troubleshoot_default_extension = (isset($_REQUEST['_wcmp_default_extension'])) ? true : false;
|
252 |
$force_main_player_in_title = (isset($_REQUEST['_wcmp_force_main_player_in_title'])) ? 1 : 0;
|
253 |
$ios_controls = (isset($_REQUEST['_wcmp_ios_controls'])) ? true : false;
|
282 |
|
283 |
$global_settings = array(
|
284 |
'_wcmp_registered_only' => $registered_only,
|
285 |
+
'_wcmp_fade_out' => $fade_out,
|
286 |
'_wcmp_enable_player' => $enable_player,
|
287 |
'_wcmp_show_in' => $show_in,
|
288 |
'_wcmp_players_in_cart' => $players_in_cart,
|
426 |
wp_enqueue_style( 'wcmp-style', plugin_dir_url(__FILE__).'css/style.css' );
|
427 |
wp_enqueue_script('jquery');
|
428 |
wp_enqueue_script('wp-mediaelement');
|
429 |
+
wp_enqueue_script('wcmp-script', plugin_dir_url(__FILE__).'js/public.js', array('jquery', 'wp-mediaelement'), '1.0.135');
|
430 |
|
431 |
$play_all = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr(
|
432 |
'_wcmp_play_all',
|
459 |
'wcmp-script',
|
460 |
'wcmp_global_settings',
|
461 |
array(
|
462 |
+
'fade_out' => $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr('_wcmp_fade_out', 1),
|
463 |
'play_all'=>intval($play_all),
|
464 |
'play_simultaneously'=>intval($play_simultaneously),
|
465 |
'ios_controls' => $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr('_wcmp_ios_controls', false),
|