Version Description
- Improves the plugin's support for outdated browsers like Internet Explorer.
Download this release
Release Info
Developer | codepeople |
Plugin | Music Player for WooCommerce |
Version | 1.0.122 |
Comparing to | |
See all releases |
Code changes from version 1.0.112 to 1.0.122
- addons/dokan.addon.php +23 -7
- addons/wcfm.addon.php +23 -6
- addons/wcv.addon.php +65 -0
- addons/wcv/style.css +21 -0
- css/style.css +30 -2
- js/public.js +12 -11
- js/public_src.js +13 -9
- languages/music-player-for-woocommerce-en_US.mo +0 -0
- languages/music-player-for-woocommerce-en_US.po +167 -121
- pagebuilders/gutenberg/wcblocks.js +2 -1
- readme.txt +46 -2
- views/global_options.php +19 -0
- views/player_options.php +7 -0
- wcmp.php +64 -31
- widgets/playlist_widget.php +16 -9
- widgets/playlist_widget/css/style.css +2 -2
addons/dokan.addon.php
CHANGED
@@ -8,23 +8,39 @@ if(!class_exists('WCMP_DOKAN_ADDON'))
|
|
8 |
function __construct($wcmp)
|
9 |
{
|
10 |
$this->_wcmp = $wcmp;
|
11 |
-
|
12 |
-
|
|
|
|
|
|
|
|
|
13 |
add_action( 'dokan_product_deleted', array($this, 'delete_product'));
|
|
|
|
|
14 |
} // End __construct
|
15 |
|
16 |
-
public function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
{
|
18 |
wp_enqueue_style('wcmp-dokan', plugin_dir_url(__FILE__).'dokan/style.css');
|
19 |
include_once dirname(__FILE__).'/dokan/player_options.php';
|
20 |
-
|
21 |
-
} // End show_settings
|
22 |
|
23 |
-
public function
|
24 |
{
|
25 |
$post = get_post($post_id);
|
26 |
$this->_wcmp->save_post($post_id, $post, true);
|
27 |
-
} // End
|
28 |
|
29 |
public function delete_product($post_id)
|
30 |
{
|
8 |
function __construct($wcmp)
|
9 |
{
|
10 |
$this->_wcmp = $wcmp;
|
11 |
+
|
12 |
+
if(get_option('wcmp_dokan_enabled', 1))
|
13 |
+
{
|
14 |
+
add_action('dokan_product_edit_after_main',array($this, 'product_settings'));
|
15 |
+
add_action('dokan_process_product_meta',array($this, 'save_product_settings'));
|
16 |
+
}
|
17 |
add_action( 'dokan_product_deleted', array($this, 'delete_product'));
|
18 |
+
add_action('wcmp_addon_general_settings', array($this, 'general_settings'));
|
19 |
+
add_action('wcmp_save_setting', array($this, 'save_general_settings'));
|
20 |
} // End __construct
|
21 |
|
22 |
+
public function general_settings()
|
23 |
+
{
|
24 |
+
$wcmp_dokan_enabled = get_option('wcmp_dokan_enabled', 1);
|
25 |
+
print '<tr><td><input type="checkbox" name="wcmp_dokan_enabled" '.($wcmp_dokan_enabled ? 'CHECKED' : '').'></td><td width="100%"><b>'.__('Activate the Dokan add-on', 'music-player-for-woocommerce').'</b><br><i>'.__('If the "Dokan Multivendor" plugin is installed on the website, check the checkbox to allow vendors to configure their music players.', 'music-player-for-woocommerce').'</i></td></tr>';
|
26 |
+
} // End general_setting
|
27 |
+
|
28 |
+
public function save_general_settings()
|
29 |
+
{
|
30 |
+
update_option('wcmp_dokan_enabled', (!empty($_POST['wcmp_dokan_enabled'])) ? 1 : 0);
|
31 |
+
} // End save_general_settings
|
32 |
+
|
33 |
+
public function product_settings()
|
34 |
{
|
35 |
wp_enqueue_style('wcmp-dokan', plugin_dir_url(__FILE__).'dokan/style.css');
|
36 |
include_once dirname(__FILE__).'/dokan/player_options.php';
|
37 |
+
} // End product_settings
|
|
|
38 |
|
39 |
+
public function save_product_settings($post_id)
|
40 |
{
|
41 |
$post = get_post($post_id);
|
42 |
$this->_wcmp->save_post($post_id, $post, true);
|
43 |
+
} // End save_product_settings
|
44 |
|
45 |
public function delete_product($post_id)
|
46 |
{
|
addons/wcfm.addon.php
CHANGED
@@ -8,12 +8,29 @@ if(!class_exists('WCMP_WCFM_ADDON'))
|
|
8 |
function __construct($wcmp)
|
9 |
{
|
10 |
$this->_wcmp = $wcmp;
|
11 |
-
|
12 |
-
|
|
|
|
|
|
|
|
|
13 |
add_action('wp_ajax_delete_wcfm_product', array($this, 'delete_product'));
|
|
|
|
|
14 |
} // End __construct
|
15 |
|
16 |
-
public function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
{
|
18 |
$post = get_post( $product_id );
|
19 |
wp_enqueue_style('wcmp-wcfm-css', plugin_dir_url(__FILE__).'wcfm/style.css');
|
@@ -31,9 +48,9 @@ if(!class_exists('WCMP_WCFM_ADDON'))
|
|
31 |
<!-- end collapsible -->
|
32 |
<div class="wcfm_clearfix"></div>
|
33 |
<?php
|
34 |
-
} // End
|
35 |
|
36 |
-
public function
|
37 |
{
|
38 |
if(!empty($_POST['wcfm_products_manage_form']))
|
39 |
{
|
@@ -47,7 +64,7 @@ if(!class_exists('WCMP_WCFM_ADDON'))
|
|
47 |
$this->_wcmp->save_post($post_id, $post, true);
|
48 |
}
|
49 |
}
|
50 |
-
} // End
|
51 |
|
52 |
public function delete_product()
|
53 |
{
|
8 |
function __construct($wcmp)
|
9 |
{
|
10 |
$this->_wcmp = $wcmp;
|
11 |
+
|
12 |
+
if(get_option('wcmp_wcfm_enabled', 1))
|
13 |
+
{
|
14 |
+
add_action('after_wcfm_products_downloadable',array($this, 'product_settings'), 10, 2);
|
15 |
+
add_action('save_post_product', array($this, 'save_product_settings'), 10, 3);
|
16 |
+
}
|
17 |
add_action('wp_ajax_delete_wcfm_product', array($this, 'delete_product'));
|
18 |
+
add_action('wcmp_addon_general_settings', array($this, 'general_settings'));
|
19 |
+
add_action('wcmp_save_setting', array($this, 'save_general_settings'));
|
20 |
} // End __construct
|
21 |
|
22 |
+
public function general_settings()
|
23 |
+
{
|
24 |
+
$wcmp_wcfm_enabled = get_option('wcmp_wcfm_enabled', 1);
|
25 |
+
print '<tr><td><input type="checkbox" name="wcmp_wcfm_enabled" '.($wcmp_wcfm_enabled ? 'CHECKED' : '').'></td><td width="100%"><b>'.__('Activate the WCFM add-on', 'music-player-for-woocommerce').'</b><br><i>'.__('If the "WCFM - Marketplace" plugin is installed on the website, check the checkbox to allow vendors to configure their music players.', 'music-player-for-woocommerce').'</i></td></tr>';
|
26 |
+
} // End general_settings
|
27 |
+
|
28 |
+
public function save_general_settings()
|
29 |
+
{
|
30 |
+
update_option('wcmp_wcfm_enabled', (!empty($_POST['wcmp_wcfm_enabled'])) ? 1 : 0);
|
31 |
+
} // End save_general_settings
|
32 |
+
|
33 |
+
public function product_settings($product_id, $product_type)
|
34 |
{
|
35 |
$post = get_post( $product_id );
|
36 |
wp_enqueue_style('wcmp-wcfm-css', plugin_dir_url(__FILE__).'wcfm/style.css');
|
48 |
<!-- end collapsible -->
|
49 |
<div class="wcfm_clearfix"></div>
|
50 |
<?php
|
51 |
+
} // End product_settings
|
52 |
|
53 |
+
public function save_product_settings($post_id, $post, $update)
|
54 |
{
|
55 |
if(!empty($_POST['wcfm_products_manage_form']))
|
56 |
{
|
64 |
$this->_wcmp->save_post($post_id, $post, true);
|
65 |
}
|
66 |
}
|
67 |
+
} // End save_product_settings
|
68 |
|
69 |
public function delete_product()
|
70 |
{
|
addons/wcv.addon.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if(!class_exists('WCMP_WCVENDORS_ADDON'))
|
3 |
+
{
|
4 |
+
class WCMP_WCVENDORS_ADDON
|
5 |
+
{
|
6 |
+
private $_wcmp;
|
7 |
+
|
8 |
+
function __construct($wcmp)
|
9 |
+
{
|
10 |
+
$this->_wcmp = $wcmp;
|
11 |
+
|
12 |
+
if(get_option('wcmp_wcv_enabled', 1))
|
13 |
+
{
|
14 |
+
add_action('wcv-after_seo_tab',array($this, 'product_settings'), 10, 2);
|
15 |
+
add_action('wcv_save_product', array($this, 'save_product_settings'));
|
16 |
+
}
|
17 |
+
add_action('wcv_delete_post', array($this, 'delete_product'));
|
18 |
+
add_action('wcmp_addon_general_settings', array($this, 'general_settings'));
|
19 |
+
add_action('wcmp_save_setting', array($this, 'save_general_settings'));
|
20 |
+
} // End __construct
|
21 |
+
|
22 |
+
public function general_settings()
|
23 |
+
{
|
24 |
+
$wcmp_wcv_enabled = get_option('wcmp_wcv_enabled', 1);
|
25 |
+
print '<tr><td><input type="checkbox" name="wcmp_wcv_enabled" '.($wcmp_wcv_enabled ? 'CHECKED' : '').'></td><td width="100%"><b>'.__('Activate the WC Vendors add-on (Experimental add-on)', 'music-player-for-woocommerce').'</b><br><i>'.__('If the "WC Vendors" plugin is installed on the website, check the checkbox to allow vendors to configure their music players.', 'music-player-for-woocommerce').'</i></td></tr>';
|
26 |
+
} // End general_settings
|
27 |
+
|
28 |
+
public function save_general_settings()
|
29 |
+
{
|
30 |
+
update_option('wcmp_wcv_enabled', (!empty($_POST['wcmp_wcv_enabled'])) ? 1 : 0);
|
31 |
+
} // End save_general_settings
|
32 |
+
|
33 |
+
public function product_settings($product_id)
|
34 |
+
{
|
35 |
+
$post = get_post( $product_id );
|
36 |
+
wp_enqueue_style('wcmp-wcv-css', plugin_dir_url(__FILE__).'wcv/style.css');
|
37 |
+
?>
|
38 |
+
<div class="wcv-container">
|
39 |
+
<h6><?php _e('Music Player', 'music-player-for-woocommerce'); ?></h6>
|
40 |
+
<input type="hidden" name="wcmp_nonce" value="<?php echo wp_create_nonce('wcmp_updating_product'); ?>" />
|
41 |
+
<?php
|
42 |
+
include_once dirname(__FILE__).'/../views/player_options.php';
|
43 |
+
?>
|
44 |
+
</div>
|
45 |
+
<?php
|
46 |
+
} // End product_settings
|
47 |
+
|
48 |
+
public function save_product_settings($post_id)
|
49 |
+
{
|
50 |
+
$post = wc_get_product( $post_id );
|
51 |
+
$this->_wcmp->save_post($post_id, $post, true);
|
52 |
+
} // End save_product_settings
|
53 |
+
|
54 |
+
public function delete_product($post_id)
|
55 |
+
{
|
56 |
+
$this->_wcmp->delete_post($post_id);
|
57 |
+
} // End delete_product
|
58 |
+
|
59 |
+
//******************** PRIVATE METHODS ************************
|
60 |
+
|
61 |
+
|
62 |
+
} // End WCMP_WCVENDORS_ADDON
|
63 |
+
}
|
64 |
+
|
65 |
+
new WCMP_WCVENDORS_ADDON($wcmp);
|
addons/wcv/style.css
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wcv-container{margin-top:20px;}
|
2 |
+
.wcv-container table,
|
3 |
+
.wcv-container tr,
|
4 |
+
.wcv-container td,
|
5 |
+
.wcv-container th{border:0;}
|
6 |
+
|
7 |
+
|
8 |
+
.wcv-container .wcmp-player-demos>tbody>tr>td:first-child{padding-left:30px;}
|
9 |
+
.wcv-container .wcmp-player-demos>tbody>tr>td:last-child{padding-right:30px;}
|
10 |
+
.wcv-container .wcmp-player-demos>tbody>tr:first-child>td{padding-top:30px;}
|
11 |
+
.wcv-container .wcmp-player-demos>tbody>tr:last-child>td{padding-bottom:30px;}
|
12 |
+
|
13 |
+
.wcv-container .wcmp-player-settings tr td:first-child{padding-left:30px;}
|
14 |
+
.wcv-container .wcmp-player-settings tr td:last-child{padding-right:30px;}
|
15 |
+
.wcv-container .wcmp-player-settings tr:first-child td{padding-top:30px;}
|
16 |
+
.wcv-container .wcmp-player-settings tr:last-child td{padding-bottom:30px;}
|
17 |
+
|
18 |
+
.wcmp-demo-files td{padding-top:10px;}
|
19 |
+
|
20 |
+
.wcv-container .button.wcmp-select-file{white-space: nowrap;margin-right: 10px !important;margin-left: 10px !important;}
|
21 |
+
.wcv-container .button.wcmp-add{margin-top:10px !important;display:inline-block}
|
css/style.css
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
.wcmp-player.mejs-wmp:not(.track),
|
5 |
.wcmp-player.mejs-ted:not(.track){min-height:65px !important;}
|
6 |
.wcmp-player.mejs-container{background: transparent !important;}
|
7 |
-
.wcmp-player.track{width:25px !important;height:
|
8 |
.wcmp-player.track.mejs-ted{width:49px !important;height:28px !important;border-radius:16%;}
|
9 |
.wcmp-player.track.mejs-ted .mejs-controls{height:28px !important; background:transparent !important;}
|
10 |
.wcmp-player.track.mejs-wmp .mejs-playpause-button,
|
@@ -28,4 +28,32 @@
|
|
28 |
.wcmp-message{font-style:italic;}
|
29 |
.mejs-controls{/* overflow:hidden !important; */}
|
30 |
.wcmp-player .mejs-controls .mejs-time-rail .mejs-time-float{border:0;}
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
.wcmp-player.mejs-wmp:not(.track),
|
5 |
.wcmp-player.mejs-ted:not(.track){min-height:65px !important;}
|
6 |
.wcmp-player.mejs-container{background: transparent !important;}
|
7 |
+
.wcmp-player.track{width:25px !important;height:26px !important;position:relative;float:left;margin-right:5px;overflow:hidden;}
|
8 |
.wcmp-player.track.mejs-ted{width:49px !important;height:28px !important;border-radius:16%;}
|
9 |
.wcmp-player.track.mejs-ted .mejs-controls{height:28px !important; background:transparent !important;}
|
10 |
.wcmp-player.track.mejs-wmp .mejs-playpause-button,
|
28 |
.wcmp-message{font-style:italic;}
|
29 |
.mejs-controls{/* overflow:hidden !important; */}
|
30 |
.wcmp-player .mejs-controls .mejs-time-rail .mejs-time-float{border:0;}
|
31 |
+
|
32 |
+
.wcmp-player .mejs-time-hovered,
|
33 |
+
.wcmp-player .mejs-time-handle-content{display:none !important;}
|
34 |
+
|
35 |
+
.wcmp-player .mejs-controls .mejs-time-rail .mejs-time-buffering,
|
36 |
+
.wcmp-player .mejs-controls .mejs-time-rail .mejs-time-current,
|
37 |
+
.wcmp-player .mejs-controls .mejs-time-rail .mejs-time-hovered,
|
38 |
+
.wcmp-player .mejs-controls .mejs-time-rail .mejs-time-loaded{width:100%;}
|
39 |
+
|
40 |
+
.wcmp-player.mejs-wmp .mejs-time-rail{height:26px; padding-top:0;}
|
41 |
+
.wcmp-player.mejs-ted .mejs-time-rail{height:26px; padding:5px 0;margin:0;}
|
42 |
+
.wcmp-player.mejs-wmp .mejs-time{padding:10px 3px 0;}
|
43 |
+
.wcmp-player.mejs-ted .mejs-time{padding:2px 3px 0;height:17px;}
|
44 |
+
.wcmp-player.mejs-wmp .mejs-controls .mejs-time-rail .mejs-time-total {
|
45 |
+
background: #333;
|
46 |
+
background: rgba(50,50,50,.8);
|
47 |
+
background: -webkit-gradient(linear,0 0,0 100%,from(rgba(30,30,30,.8)),to(rgba(60,60,60,.8)));
|
48 |
+
background: -webkit-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));
|
49 |
+
background: -moz-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));
|
50 |
+
background: -o-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));
|
51 |
+
background: -ms-linear-gradient(top,rgba(30,30,30,.8),rgba(60,60,60,.8));
|
52 |
+
background: linear-gradient(rgba(30,30,30,.8),rgba(60,60,60,.8));
|
53 |
+
}
|
54 |
+
|
55 |
+
.wcmp-player.mejs-ted .mejs-controls .mejs-time-rail .mejs-time-current{background:rgba(203,0,3,.3) !important;}
|
56 |
+
.wcmp-player.mejs-ted .mejs-controls .mejs-volume-button .mejs-volume-current{left:0;}
|
57 |
+
|
58 |
+
.wcmp-player.track.mejs-classic .mejs-controls{padding:0 !important; height:26px;}
|
59 |
+
.wcmp-player.track.mejs-classic .mejs-playpause-button button{position: absolute;top: 50%;left: 50%;margin:0;transform: translate(-50%, -50%);}
|
js/public.js
CHANGED
@@ -1,11 +1,12 @@
|
|
1 |
-
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,c
|
2 |
-
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,c
|
3 |
-
$jscomp.polyfill=function(a,c,
|
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&&"ios_controls"in wcmp_global_settings&&1*wcmp_global_settings.ios_controls?!0:!1;
|
7 |
-
a.addEventListener("timeupdate",function(a){
|
8 |
-
(this.bkVolume=this.volume)});a.addEventListener("ended",function(a){1*m&&(a=1*
|
9 |
-
["playpause"];try{a[
|
10 |
-
b.closest("form").length&&b.closest(".wcmp-player-list").prependTo(a.closest("form")),c.append(a.closest("tr").prepend("<td>"+b.html()+"</td>")),b.html("").append(c))})}};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,
|
11 |
-
c.match(/iPhone/i))if("undefined"!=typeof wcmp_global_settings?wcmp_global_settings.play_all:1)a(".wcmp-player .mejs-play button").one("click",function(){if("undefined"==typeof wcmp_preprocessed_players){wcmp_preprocessed_players=!0;var
|
|
1 |
+
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,f,c){a instanceof String&&(a=String(a));for(var g=a.length,h=0;h<g;h++){var e=a[h];if(f.call(c,e,h,a))return{i:h,v:e}}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,f,c){a!=Array.prototype&&a!=Object.prototype&&(a[f]=c.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,f,c,g){if(f){c=$jscomp.global;a=a.split(".");for(g=0;g<a.length-1;g++){var h=a[g];h in c||(c[h]={});c=c[h]}a=a[a.length-1];g=c[a];f=f(g);f!=g&&null!=f&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:f})}};$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6","es3");
|
4 |
+
(function(){var a=[],f=0;window.generate_the_wcmp=function(c){function g(d){if(d+1<f){var b=d+1;a[b]instanceof e&&a[b].is("a")?a[b].is(":visible")?a[b].click():g(d+1):e(a[b].container).is(":visible")?a[b].play():g(d+1)}}function h(a){var b=a.data("product"),d=e("img.product-"+b);d.length&&1==e('[data-product="'+b+'"]').length&&(b=d.offset(),a=a.closest("div.wcmp-player"),a.css({position:"absolute","z-index":999999}).offset({left:b.left+(d.width()-a.width())/2,top:b.top+(d.height()-a.height())/2}))}
|
5 |
+
if(!("boolean"!==typeof c&&"undefined"!=typeof wcmp_global_settings&&1*wcmp_global_settings.onload)&&"undefined"===typeof generated_the_wcmp){generated_the_wcmp=!0;var e=jQuery;e(document).on("click",".wcmp-player-container",function(a){a.preventDefault();a.stopPropagation()});e.expr[":"].regex=function(a,b,c){b=c[3].split(",");var d=/^(data|css):/;c=b[0].match(d)?b[0].split(":")[0]:"attr";d=b.shift().replace(d,"");return(new RegExp(b.join("").replace(/^\s+|\s+$/g,""),"ig")).test(e(a)[c](d))};var m=
|
6 |
+
"undefined"!=typeof wcmp_global_settings?wcmp_global_settings.play_all:!0,k="undefined"!=typeof wcmp_global_settings&&"ios_controls"in wcmp_global_settings&&1*wcmp_global_settings.ios_controls?!0:!1;c=e("audio.wcmp-player:not(.track):not([playernumber])");var n=e("audio.wcmp-player.track:not([playernumber])"),l={iPadUseNativeControls:k,iPhoneUseNativeControls:k,success:function(a,b){e(b).attr("volume")&&a.setVolume(parseFloat(e(b).attr("volume")));var d=function(a){a=e(a.target);var b=a.data("duration");
|
7 |
+
"undefined"!=typeof b&&a.closest(".wcmp-player-container").find(".mejs-duration").html(b)};a.addEventListener("timeupdate",function(a){d(a);isNaN(this.currentTime)||isNaN(this.duration)||-1==this.src.indexOf("ms-action=secure")||(4>this.duration-this.currentTime?this.setVolume(this.volume-this.volume/3):("undefined"==typeof this.bkVolume&&(this.bkVolume=this.volume),this.setVolume(this.bkVolume)))});a.addEventListener("volumechange",function(a){!isNaN(this.currentTime)&&!isNaN(this.duration)&&-1!=
|
8 |
+
this.src.indexOf("ms-action=secure")&&4<this.duration-this.currentTime&&this.currentTime&&(this.bkVolume=this.volume)});a.addEventListener("ended",function(a){1*m&&(a=1*e(this).attr("playernumber"),g(a))});a.addEventListener("loadedmetadata",function(a){d(a)})}};k=".product-type-grouped :regex(name,quantity\\[\\d+\\])";c.each(function(){var d=e(this);d.find("source").attr("src");d.attr("playernumber",f);f++;l.audioVolume="vertical";try{a[f]=new MediaElementPlayer(d[0],l)}catch(b){"console"in window&&
|
9 |
+
console.log(b)}});n.each(function(){var d=e(this);d.find("source").attr("src");d.attr("playernumber",f);f++;l.features=["playpause"];try{a[f]=new MediaElementPlayer(d[0],l)}catch(b){"console"in window&&console.log(b)}h(d);e(window).resize(function(){h(d)})});e(k).length||(k=".product-type-grouped [data-product_id]");e(k).each(function(){var a=e(this),b=a.data("product_id")||a.attr("name").replace(/[^\d]/g,"");b=e(".wcmp-player-list.merge_in_grouped_products .product-"+b+":first .wcmp-player-title");
|
10 |
+
var c=e("<table></table>");b.length&&!b.closest(".wcmp-first-in-product").length&&(b.closest("tr").addClass("wcmp-first-in-product"),0==b.closest("form").length&&b.closest(".wcmp-player-list").prependTo(a.closest("form")),c.append(a.closest("tr").prepend("<td>"+b.html()+"</td>")),b.html("").append(c))})}};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,f=window.navigator.userAgent;
|
11 |
+
a("[data-lazyloading]").each(function(){var c=a(this);c.attr("preload",c.data("lazyloading"))});if(f.match(/iPad/i)||f.match(/iPhone/i))if("undefined"!=typeof wcmp_global_settings?wcmp_global_settings.play_all:1)a(".wcmp-player .mejs-play button").one("click",function(){if("undefined"==typeof wcmp_preprocessed_players){wcmp_preprocessed_players=!0;var c=a(this);a(".wcmp-player audio").each(function(){this.play();this.pause()});setTimeout(function(){c.click()},500)}})}).on("popstate",function(){jQuery("audio[data-product]:not([playernumber])").length&&
|
12 |
+
wcmp_force_init()});jQuery(document).on("scroll",wcmp_force_init)})();
|
js/public_src.js
CHANGED
@@ -77,6 +77,7 @@
|
|
77 |
iPadUseNativeControls: ios_controls,
|
78 |
iPhoneUseNativeControls: ios_controls,
|
79 |
success: function( media, dom ){
|
|
|
80 |
var update_duration = function(e){
|
81 |
var t = $(e.target),
|
82 |
duration = t.data('duration');
|
@@ -130,16 +131,17 @@
|
|
130 |
var e = $(this),
|
131 |
src = e.find( 'source' ).attr( 'src' );
|
132 |
|
|
|
|
|
|
|
133 |
c['audioVolume'] = 'vertical';
|
134 |
try{
|
135 |
-
wcmp_players[ wcmp_player_counter ] = new MediaElementPlayer(e, c);
|
136 |
}
|
137 |
catch(err)
|
138 |
{
|
139 |
-
|
140 |
}
|
141 |
-
e.attr('playernumber', wcmp_player_counter);
|
142 |
-
wcmp_player_counter++;
|
143 |
|
144 |
/* _setOverImage(e); */
|
145 |
});
|
@@ -149,16 +151,17 @@
|
|
149 |
var e = $(this),
|
150 |
src = e.find( 'source' ).attr( 'src' );
|
151 |
|
|
|
|
|
|
|
152 |
c['features'] = ['playpause'];
|
153 |
try{
|
154 |
-
wcmp_players[ wcmp_player_counter ] = new MediaElementPlayer(e, c);
|
155 |
}
|
156 |
catch(err)
|
157 |
{
|
158 |
-
|
159 |
}
|
160 |
-
e.attr('playernumber', wcmp_player_counter);
|
161 |
-
wcmp_player_counter++;
|
162 |
|
163 |
_setOverImage(e);
|
164 |
$(window).resize(function(){_setOverImage(e);});
|
@@ -171,7 +174,7 @@
|
|
171 |
c = $( '.wcmp-player-list.merge_in_grouped_products .product-'+i+':first .wcmp-player-title' ), /* Replaced :last with :first 2018.06.12 */
|
172 |
t = $('<table></table>');
|
173 |
|
174 |
-
if(c.length)
|
175 |
{
|
176 |
c.closest('tr').addClass('wcmp-first-in-product'); /* To identify the firs element in the product */
|
177 |
if(c.closest('form').length == 0)
|
@@ -220,4 +223,5 @@
|
|
220 |
if(jQuery('audio[data-product]:not([playernumber])').length) wcmp_force_init();
|
221 |
});
|
222 |
|
|
|
223 |
})()
|
77 |
iPadUseNativeControls: ios_controls,
|
78 |
iPhoneUseNativeControls: ios_controls,
|
79 |
success: function( media, dom ){
|
80 |
+
if($(dom).attr('volume')) media.setVolume(parseFloat($(dom).attr('volume')));
|
81 |
var update_duration = function(e){
|
82 |
var t = $(e.target),
|
83 |
duration = t.data('duration');
|
131 |
var e = $(this),
|
132 |
src = e.find( 'source' ).attr( 'src' );
|
133 |
|
134 |
+
e.attr('playernumber', wcmp_player_counter);
|
135 |
+
wcmp_player_counter++;
|
136 |
+
|
137 |
c['audioVolume'] = 'vertical';
|
138 |
try{
|
139 |
+
wcmp_players[ wcmp_player_counter ] = new MediaElementPlayer(e[0], c);
|
140 |
}
|
141 |
catch(err)
|
142 |
{
|
143 |
+
if('console' in window) console.log(err);
|
144 |
}
|
|
|
|
|
145 |
|
146 |
/* _setOverImage(e); */
|
147 |
});
|
151 |
var e = $(this),
|
152 |
src = e.find( 'source' ).attr( 'src' );
|
153 |
|
154 |
+
e.attr('playernumber', wcmp_player_counter);
|
155 |
+
wcmp_player_counter++;
|
156 |
+
|
157 |
c['features'] = ['playpause'];
|
158 |
try{
|
159 |
+
wcmp_players[ wcmp_player_counter ] = new MediaElementPlayer(e[0], c);
|
160 |
}
|
161 |
catch(err)
|
162 |
{
|
163 |
+
if('console' in window) console.log(err);
|
164 |
}
|
|
|
|
|
165 |
|
166 |
_setOverImage(e);
|
167 |
$(window).resize(function(){_setOverImage(e);});
|
174 |
c = $( '.wcmp-player-list.merge_in_grouped_products .product-'+i+':first .wcmp-player-title' ), /* Replaced :last with :first 2018.06.12 */
|
175 |
t = $('<table></table>');
|
176 |
|
177 |
+
if(c.length && !c.closest('.wcmp-first-in-product').length)
|
178 |
{
|
179 |
c.closest('tr').addClass('wcmp-first-in-product'); /* To identify the firs element in the product */
|
180 |
if(c.closest('form').length == 0)
|
223 |
if(jQuery('audio[data-product]:not([playernumber])').length) wcmp_force_init();
|
224 |
});
|
225 |
|
226 |
+
jQuery(document).on('scroll', wcmp_force_init);
|
227 |
})()
|
languages/music-player-for-woocommerce-en_US.mo
CHANGED
Binary file
|
languages/music-player-for-woocommerce-en_US.po
CHANGED
@@ -1,29 +1,39 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: music-player-for-woocommerce\n"
|
4 |
-
"POT-Creation-Date: 2020-
|
5 |
-
"PO-Revision-Date: 2020-
|
6 |
"Last-Translator: CodePeople\n"
|
7 |
"Language-Team: CodePeople\n"
|
8 |
"Language: en_US\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit 2.
|
13 |
"X-Poedit-Basepath: ..\n"
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
"X-Poedit-KeywordsList: __;_e;esc_attr__;esc_attr_e\n"
|
16 |
"X-Poedit-SearchPath-0: .\n"
|
17 |
|
18 |
-
#: addons/dokan
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
msgid "File Name"
|
20 |
msgstr ""
|
21 |
|
22 |
-
#: addons/dokan/player_options.php:10 views/player_options.php:
|
23 |
msgid "Choose file"
|
24 |
msgstr ""
|
25 |
|
26 |
-
#: addons/dokan/player_options.php:11 views/player_options.php:
|
27 |
msgid "Delete"
|
28 |
msgstr ""
|
29 |
|
@@ -43,176 +53,200 @@ msgstr ""
|
|
43 |
msgid "<p>The player uses the audio files associated to the product.</b></p>"
|
44 |
msgstr ""
|
45 |
|
46 |
-
#: addons/dokan/player_options.php:61 views/player_options.php:
|
47 |
msgid "[+|-] Tips"
|
48 |
msgstr ""
|
49 |
|
50 |
-
#: addons/dokan/player_options.php:67 views/player_options.php:
|
51 |
msgid "[+|-] Using the audio files stored on Google Drive"
|
52 |
msgstr ""
|
53 |
|
54 |
-
#: addons/dokan/player_options.php:75 views/player_options.php:
|
55 |
msgid ""
|
56 |
"Go to Drive, press the right click on the file to use, and select the "
|
57 |
"option: <b>\"Get Shareable Link\"</b>"
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: addons/dokan/player_options.php:83 views/player_options.php:
|
61 |
msgid ""
|
62 |
"The previous action will generate an url with the structure: <b>https://"
|
63 |
"drive.google.com/open?id=FILE_ID</b>"
|
64 |
msgstr ""
|
65 |
|
66 |
-
#: addons/dokan/player_options.php:93 views/player_options.php:
|
67 |
msgid ""
|
68 |
"Knowing the FILE_ID, extracted from the previous URL, enter the URL below, "
|
69 |
"into the WooCommerce product, to allow the Music Player accessing to it:"
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: addons/dokan/player_options.php:104 views/player_options.php:
|
73 |
msgid ""
|
74 |
"<b>Note:</b> Pay attention to the use of the fake parameter: <b>&.mp3</b> as "
|
75 |
"the last one in the URL"
|
76 |
msgstr ""
|
77 |
|
78 |
-
#: addons/dokan/player_options.php:114 views/player_options.php:
|
79 |
msgid "[+|-] Using the audio files stored on DropBox"
|
80 |
msgstr ""
|
81 |
|
82 |
-
#: addons/dokan/player_options.php:122 views/player_options.php:
|
83 |
msgid ""
|
84 |
"Sign in to <a href=\"https://www.dropbox.com/login\" target=\"_blank"
|
85 |
"\">dropbox.com </a>"
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: addons/dokan/player_options.php:132 views/player_options.php:
|
89 |
msgid ""
|
90 |
"Hover your cursor over the file or folder you'd like to share and click "
|
91 |
"<b>Share</b> when it appears."
|
92 |
msgstr ""
|
93 |
|
94 |
-
#: addons/dokan/player_options.php:142 views/player_options.php:
|
95 |
msgid ""
|
96 |
"If a link hasn't been created, click Create a link. (If a link was already "
|
97 |
"created, click Copy link."
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: addons/dokan/player_options.php:150 views/player_options.php:
|
101 |
msgid ""
|
102 |
"The link structure would be similar to:<br> https://www.dropbox.com/s/"
|
103 |
"rycvgn8iokfedmo/file.mp3?dl=0"
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: addons/dokan/player_options.php:160 views/player_options.php:
|
107 |
msgid ""
|
108 |
"Enter the URL into the WooCommerce product with the following structure:<br> "
|
109 |
"https://www.dropbox.com/s/rycvgn8iokfedmo/file.mp3?dl=1&.mp3"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#: addons/dokan/player_options.php:168 views/player_options.php:
|
113 |
msgid ""
|
114 |
"<b>Note:</b> Pay attention to the use of the fake parameter: <b>&.mp3</b> as "
|
115 |
"the last one in the URL. Furthermore, the parameter <b>dl=0</b>, has been "
|
116 |
"modified as <b>dl=1</b>"
|
117 |
msgstr ""
|
118 |
|
119 |
-
#: addons/dokan/player_options.php:181 views/global_options.php:
|
120 |
msgid ""
|
121 |
"The player is shown only if the product is \"downloadable\" with at least an "
|
122 |
"audio file between the \"Downloadable files\", or you have selected your own "
|
123 |
"audio files"
|
124 |
msgstr ""
|
125 |
|
126 |
-
#: addons/dokan/player_options.php:181 views/player_options.php:
|
127 |
msgid "Include music player"
|
128 |
msgstr ""
|
129 |
|
130 |
-
#: addons/dokan/player_options.php:185 views/global_options.php:
|
131 |
-
#: views/player_options.php:
|
132 |
msgid "Include in"
|
133 |
msgstr ""
|
134 |
|
135 |
-
#: addons/dokan/player_options.php:188 views/global_options.php:
|
136 |
-
#: views/player_options.php:
|
137 |
msgid "single-entry pages <i>(Product's page only)</i>"
|
138 |
msgstr ""
|
139 |
|
140 |
-
#: addons/dokan/player_options.php:191 views/global_options.php:
|
141 |
-
#: views/player_options.php:
|
142 |
msgid ""
|
143 |
"multiple entries pages <i>(Shop pages, archive pages, but not in the "
|
144 |
"product's page)</i>"
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: addons/dokan/player_options.php:194 views/global_options.php:
|
148 |
-
#: views/player_options.php:
|
149 |
msgid "all pages <i>(with single or multiple-entries)</i>"
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: addons/dokan/player_options.php:198 views/global_options.php:
|
153 |
-
#: views/player_options.php:
|
154 |
msgid "Merge in grouped products"
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: addons/dokan/player_options.php:200 views/global_options.php:
|
158 |
-
#: views/player_options.php:
|
159 |
msgid ""
|
160 |
"In grouped products, display the \"Add to cart\" buttons and quantity fields "
|
161 |
"in the players rows"
|
162 |
msgstr ""
|
163 |
|
164 |
-
#: addons/dokan/player_options.php:203 views/global_options.php:
|
165 |
-
#: views/player_options.php:
|
166 |
msgid "Player layout"
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: addons/dokan/player_options.php:222 views/global_options.php:
|
170 |
-
#: views/player_options.php:
|
171 |
msgid "Preload"
|
172 |
msgstr ""
|
173 |
|
174 |
-
#: addons/dokan/player_options.php:230 views/global_options.php:
|
175 |
-
#: views/player_options.php:
|
176 |
msgid "Play all"
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: addons/dokan/player_options.php:233 views/global_options.php:
|
180 |
-
#: views/player_options.php:
|
181 |
msgid "Player controls"
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: addons/dokan/player_options.php:235 views/global_options.php:
|
185 |
-
#: views/player_options.php:
|
186 |
msgid "the play/pause button only"
|
187 |
msgstr ""
|
188 |
|
189 |
-
#: addons/dokan/player_options.php:236 views/global_options.php:
|
190 |
-
#: views/player_options.php:
|
191 |
msgid "all controls"
|
192 |
msgstr ""
|
193 |
|
194 |
-
#: addons/dokan/player_options.php:237 views/global_options.php:
|
195 |
-
#: views/player_options.php:
|
196 |
msgid "the play/pause button only, or all controls depending on context"
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: addons/dokan/player_options.php:241 views/global_options.php:
|
200 |
-
#: views/player_options.php:
|
201 |
msgid "for play/pause button players display them on cover images."
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: addons/dokan/player_options.php:242 views/global_options.php:
|
205 |
-
#: views/player_options.php:
|
206 |
msgid ""
|
207 |
"(This feature is experimental, and will depend on the theme active on the "
|
208 |
"website.)"
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: addons/dokan/player_options.php:247 views/global_options.php:
|
212 |
-
#: views/player_options.php:
|
213 |
msgid "Display the player's title"
|
214 |
msgstr ""
|
215 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
#: pagebuilders/beaverbuilder/wcmp.inc.php:8
|
217 |
msgid "Enter the products ids and the rest of shortcode attributes"
|
218 |
msgstr ""
|
@@ -232,7 +266,7 @@ msgstr ""
|
|
232 |
#: pagebuilders/beaverbuilder/wcmp/wcmp.pb.php:9
|
233 |
#: pagebuilders/beaverbuilder/wcmp/wcmp.pb.php:11
|
234 |
#: pagebuilders/beaverbuilder/wcmp/wcmp.pb.php:12 pagebuilders/builders.php:130
|
235 |
-
#: pagebuilders/siteorigin/siteorigin-wcmp/siteorigin-wcmp.php:17 wcmp.php:
|
236 |
msgid "Music Player for WooCommerce"
|
237 |
msgstr ""
|
238 |
|
@@ -264,11 +298,11 @@ msgstr ""
|
|
264 |
msgid "Insert a playlist with the products players"
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: views/global_options.php:
|
268 |
msgid "Music Player for WooCommerce - Global Settings"
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: views/global_options.php:
|
272 |
msgid ""
|
273 |
"For reporting any issue or to request a customization, <a href=\"https://"
|
274 |
"wordpress.dwbooster.com/contact-us\" target=\"_blank\">CLICK HERE</a><br />\n"
|
@@ -280,19 +314,19 @@ msgid ""
|
|
280 |
"target=\"_blank\">Public page: Click to visit the WooCommerce Store</a>"
|
281 |
msgstr ""
|
282 |
|
283 |
-
#: views/global_options.php:
|
284 |
msgid "Registering of Plugin"
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: views/global_options.php:
|
288 |
msgid "Enter the email address of buyer"
|
289 |
msgstr ""
|
290 |
|
291 |
-
#: views/global_options.php:
|
292 |
msgid "Register"
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: views/global_options.php:
|
296 |
msgid ""
|
297 |
"<p>The player uses the audio files associated to the product. If you want "
|
298 |
"protecting the audio files for selling, tick the checkbox: <b>\"Protect the "
|
@@ -304,111 +338,111 @@ msgid ""
|
|
304 |
"pay for them.</b></p>"
|
305 |
msgstr ""
|
306 |
|
307 |
-
#: views/global_options.php:
|
308 |
msgid "General Settings"
|
309 |
msgstr ""
|
310 |
|
311 |
-
#: views/global_options.php:
|
312 |
msgid "Include the players only for registered users"
|
313 |
msgstr ""
|
314 |
|
315 |
-
#: views/global_options.php:
|
316 |
msgid "The general settings affect only the PRO version of the plugin"
|
317 |
msgstr ""
|
318 |
|
319 |
-
#: views/global_options.php:
|
320 |
-
#: views/player_options.php:
|
321 |
msgid "CLICK HERE TO GET THE PRO VERSION OF THE PLUGIN"
|
322 |
msgstr ""
|
323 |
|
324 |
-
#: views/global_options.php:
|
325 |
msgid ""
|
326 |
"For buyers, play the purchased audio files instead the truncated files for "
|
327 |
"demo"
|
328 |
msgstr ""
|
329 |
|
330 |
-
#: views/global_options.php:
|
331 |
msgid "Truncate the audio files for demo with ffmpeg"
|
332 |
msgstr ""
|
333 |
|
334 |
-
#: views/global_options.php:
|
335 |
msgid "ffmpeg path"
|
336 |
msgstr ""
|
337 |
|
338 |
-
#: views/global_options.php:
|
339 |
msgid "Delete the demo files generated previously"
|
340 |
msgstr ""
|
341 |
|
342 |
-
#: views/global_options.php:
|
343 |
msgid "Store demo files on Google Drive"
|
344 |
msgstr ""
|
345 |
|
346 |
-
#: views/global_options.php:
|
347 |
msgid "Import a JSON Key file"
|
348 |
msgstr ""
|
349 |
|
350 |
-
#: views/global_options.php:
|
351 |
msgid "Troubleshoot Area"
|
352 |
msgstr ""
|
353 |
|
354 |
-
#: views/global_options.php:
|
355 |
msgid "On iPads and iPhones, use native controls"
|
356 |
msgstr ""
|
357 |
|
358 |
-
#: views/global_options.php:
|
359 |
msgid ""
|
360 |
"tick the checkbox if the players do not work properly on iPads or iPhones"
|
361 |
msgstr ""
|
362 |
|
363 |
-
#: views/global_options.php:
|
364 |
msgid "Loading players in the onload event"
|
365 |
msgstr ""
|
366 |
|
367 |
-
#: views/global_options.php:
|
368 |
msgid "tick the checkbox if the players are not being loaded properly"
|
369 |
msgstr ""
|
370 |
|
371 |
-
#: views/global_options.php:
|
372 |
msgid "For files whose extensions cannot be determined"
|
373 |
msgstr ""
|
374 |
|
375 |
-
#: views/global_options.php:
|
376 |
msgid "handle them as mp3 files"
|
377 |
msgstr ""
|
378 |
|
379 |
-
#: views/global_options.php:
|
380 |
msgid ""
|
381 |
"For the WooCommerce Gutenberg Blocks, include the main player in the "
|
382 |
"products titles"
|
383 |
msgstr ""
|
384 |
|
385 |
-
#: views/global_options.php:
|
386 |
msgid "Includes the main player in front of products titles"
|
387 |
msgstr ""
|
388 |
|
389 |
-
#: views/global_options.php:
|
390 |
msgid "WooCommerce hook used to display the players in the shop pages"
|
391 |
msgstr ""
|
392 |
|
393 |
-
#: views/global_options.php:
|
394 |
msgid ""
|
395 |
"The plugin uses by default the <b>woocommerce_shop_loop_item_title</b> hook. "
|
396 |
"If the player is not being displayed, enter the hook used by the theme "
|
397 |
"active on your website."
|
398 |
msgstr ""
|
399 |
|
400 |
-
#: views/global_options.php:
|
401 |
msgid "WooCommerce hook used to display the players in the products pages"
|
402 |
msgstr ""
|
403 |
|
404 |
-
#: views/global_options.php:
|
405 |
msgid ""
|
406 |
"The plugin uses by default the <b>woocommerce_single_product_summary</b> "
|
407 |
"hook. If the player is not being displayed, enter the hook used by the theme "
|
408 |
"active on your website."
|
409 |
msgstr ""
|
410 |
|
411 |
-
#: views/global_options.php:
|
412 |
msgid ""
|
413 |
"Click on the <a href=\"https://docs.woocommerce.com/wc-apidocs/hook-docs.html"
|
414 |
"\" target=\"_blank\">THIS LINK</a> for the list of available <a href="
|
@@ -416,89 +450,97 @@ msgid ""
|
|
416 |
"style=\"font-weight:bold;font-size:1.3em;\">WooCommerce Hooks</a>"
|
417 |
msgstr ""
|
418 |
|
419 |
-
#: views/global_options.php:
|
420 |
msgid "Include music player in all products"
|
421 |
msgstr ""
|
422 |
|
423 |
-
#: views/global_options.php:
|
424 |
msgid "Include players in cart"
|
425 |
msgstr ""
|
426 |
|
427 |
-
#: views/global_options.php:
|
|
|
|
|
|
|
|
|
428 |
msgid "The security feature is only available in the PRO version of the plugin"
|
429 |
msgstr ""
|
430 |
|
431 |
-
#: views/global_options.php:
|
432 |
msgid "Protect the file"
|
433 |
msgstr ""
|
434 |
|
435 |
-
#: views/global_options.php:
|
436 |
msgid "Percent of audio used for protected playbacks"
|
437 |
msgstr ""
|
438 |
|
439 |
-
#: views/global_options.php:
|
440 |
msgid ""
|
441 |
"To prevent unauthorized copying of audio files, the files will be partially "
|
442 |
"accessible"
|
443 |
msgstr ""
|
444 |
|
445 |
-
#: views/global_options.php:
|
446 |
msgid ""
|
447 |
"Text to display beside the player explaining that demos are partial versions "
|
448 |
"of the original files"
|
449 |
msgstr ""
|
450 |
|
451 |
-
#: views/global_options.php:
|
452 |
msgid "Scope"
|
453 |
msgstr ""
|
454 |
|
455 |
-
#: views/global_options.php:
|
456 |
msgid ""
|
457 |
"Ticking the checkbox the previous settings are applied to all products, even "
|
458 |
"if they have a player enabled."
|
459 |
msgstr ""
|
460 |
|
461 |
-
#: views/global_options.php:
|
462 |
msgid "Apply the previous settings to all products pages in the website."
|
463 |
msgstr ""
|
464 |
|
465 |
-
#: views/global_options.php:
|
466 |
msgid "Analytics"
|
467 |
msgstr ""
|
468 |
|
469 |
-
#: views/global_options.php:
|
470 |
msgid ""
|
471 |
"Allows the integration with Google Analytics for registering new events when "
|
472 |
"the songs are played. The event information would include: the URL to the "
|
473 |
"audio file as the event label and the product's id as its value."
|
474 |
msgstr ""
|
475 |
|
476 |
-
#: views/global_options.php:
|
477 |
msgid "Note"
|
478 |
msgstr ""
|
479 |
|
480 |
-
#: views/global_options.php:
|
481 |
msgid ""
|
482 |
"If the preload option is configured as Metadata or Auto in the players "
|
483 |
"settings, the event would be registered when the audio file is loaded by the "
|
484 |
"player and not exactly when they are playing."
|
485 |
msgstr ""
|
486 |
|
487 |
-
#: views/global_options.php:
|
488 |
msgid "Tracking Id"
|
489 |
msgstr ""
|
490 |
|
491 |
-
#: views/global_options.php:
|
|
|
|
|
|
|
|
|
492 |
msgid "Save settings"
|
493 |
msgstr ""
|
494 |
|
495 |
-
#: views/player_options.php:
|
496 |
msgid ""
|
497 |
"The security feature and particular files for demo are only available in the "
|
498 |
"PRO version of the plugin"
|
499 |
msgstr ""
|
500 |
|
501 |
-
#: views/player_options.php:
|
502 |
msgid ""
|
503 |
"For testing the premium version of the plugin, visit the online demo:<br/> "
|
504 |
"<a href=\"https://demos.dwbooster.com/music-player-for-woocommerce/wp-login."
|
@@ -508,79 +550,83 @@ msgid ""
|
|
508 |
"WooCommerce Store</a>"
|
509 |
msgstr ""
|
510 |
|
511 |
-
#: views/player_options.php:
|
512 |
msgid ""
|
513 |
"The player is shown only if the product is \"downloadable\", and there is at "
|
514 |
"least an audio file between the \"Downloadable files\""
|
515 |
msgstr ""
|
516 |
|
517 |
-
#: views/player_options.php:
|
518 |
msgid "Select my own demo files"
|
519 |
msgstr ""
|
520 |
|
521 |
-
#: views/player_options.php:
|
522 |
msgid "Demo files"
|
523 |
msgstr ""
|
524 |
|
525 |
-
#: views/player_options.php:
|
526 |
msgid "Name"
|
527 |
msgstr ""
|
528 |
|
529 |
-
#: views/player_options.php:
|
530 |
msgid "File URL"
|
531 |
msgstr ""
|
532 |
|
533 |
-
#: views/player_options.php:
|
534 |
msgid "Add File"
|
535 |
msgstr ""
|
536 |
|
537 |
-
#: wcmp.php:
|
538 |
msgid "Help"
|
539 |
msgstr ""
|
540 |
|
541 |
-
#: wcmp.php:
|
542 |
msgid "There are no products that satisfy the block's settings"
|
543 |
msgstr ""
|
544 |
|
545 |
-
#: widgets/playlist_widget.php:
|
546 |
msgid "Title"
|
547 |
msgstr ""
|
548 |
|
549 |
-
#: widgets/playlist_widget.php:
|
550 |
msgid "Products IDs"
|
551 |
msgstr ""
|
552 |
|
553 |
-
#: widgets/playlist_widget.php:
|
554 |
msgid "Products IDs separated by comma, or a * for all"
|
555 |
msgstr ""
|
556 |
|
557 |
-
#: widgets/playlist_widget.php:
|
558 |
msgid ""
|
559 |
"Enter the ID of products separated by comma, or a * symbol to includes all "
|
560 |
"products in the playlist."
|
561 |
msgstr ""
|
562 |
|
563 |
-
#: widgets/playlist_widget.php:
|
|
|
|
|
|
|
|
|
564 |
msgid "Playlist layout"
|
565 |
msgstr ""
|
566 |
|
567 |
-
#: widgets/playlist_widget.php:
|
568 |
msgid "New layout"
|
569 |
msgstr ""
|
570 |
|
571 |
-
#: widgets/playlist_widget.php:
|
572 |
msgid "Original layout"
|
573 |
msgstr ""
|
574 |
|
575 |
-
#: widgets/playlist_widget.php:
|
576 |
msgid "Highlight the current product"
|
577 |
msgstr ""
|
578 |
|
579 |
-
#: widgets/playlist_widget.php:
|
580 |
msgid "Continue playing after navigate"
|
581 |
msgstr ""
|
582 |
|
583 |
-
#: widgets/playlist_widget.php:
|
584 |
msgid ""
|
585 |
"Continue playing the same song at same position after navigate. You can "
|
586 |
"experiment some delay because the music player should to load the audio file "
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: music-player-for-woocommerce\n"
|
4 |
+
"POT-Creation-Date: 2020-09-18 22:59+0200\n"
|
5 |
+
"PO-Revision-Date: 2020-09-18 22:59+0200\n"
|
6 |
"Last-Translator: CodePeople\n"
|
7 |
"Language-Team: CodePeople\n"
|
8 |
"Language: en_US\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 2.4.1\n"
|
13 |
"X-Poedit-Basepath: ..\n"
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
"X-Poedit-KeywordsList: __;_e;esc_attr__;esc_attr_e\n"
|
16 |
"X-Poedit-SearchPath-0: .\n"
|
17 |
|
18 |
+
#: addons/dokan.addon.php:25
|
19 |
+
msgid "Activate the Dokan add-on"
|
20 |
+
msgstr ""
|
21 |
+
|
22 |
+
#: addons/dokan.addon.php:25
|
23 |
+
msgid ""
|
24 |
+
"If the \"Dokan Multivendor\" plugin is installed on the website, check the "
|
25 |
+
"checkbox to allow vendors to configure their music players."
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
#: addons/dokan/player_options.php:9 views/player_options.php:307
|
29 |
msgid "File Name"
|
30 |
msgstr ""
|
31 |
|
32 |
+
#: addons/dokan/player_options.php:10 views/player_options.php:313
|
33 |
msgid "Choose file"
|
34 |
msgstr ""
|
35 |
|
36 |
+
#: addons/dokan/player_options.php:11 views/player_options.php:316
|
37 |
msgid "Delete"
|
38 |
msgstr ""
|
39 |
|
53 |
msgid "<p>The player uses the audio files associated to the product.</b></p>"
|
54 |
msgstr ""
|
55 |
|
56 |
+
#: addons/dokan/player_options.php:61 views/player_options.php:55
|
57 |
msgid "[+|-] Tips"
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: addons/dokan/player_options.php:67 views/player_options.php:61
|
61 |
msgid "[+|-] Using the audio files stored on Google Drive"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: addons/dokan/player_options.php:75 views/player_options.php:69
|
65 |
msgid ""
|
66 |
"Go to Drive, press the right click on the file to use, and select the "
|
67 |
"option: <b>\"Get Shareable Link\"</b>"
|
68 |
msgstr ""
|
69 |
|
70 |
+
#: addons/dokan/player_options.php:83 views/player_options.php:77
|
71 |
msgid ""
|
72 |
"The previous action will generate an url with the structure: <b>https://"
|
73 |
"drive.google.com/open?id=FILE_ID</b>"
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: addons/dokan/player_options.php:93 views/player_options.php:87
|
77 |
msgid ""
|
78 |
"Knowing the FILE_ID, extracted from the previous URL, enter the URL below, "
|
79 |
"into the WooCommerce product, to allow the Music Player accessing to it:"
|
80 |
msgstr ""
|
81 |
|
82 |
+
#: addons/dokan/player_options.php:104 views/player_options.php:98
|
83 |
msgid ""
|
84 |
"<b>Note:</b> Pay attention to the use of the fake parameter: <b>&.mp3</b> as "
|
85 |
"the last one in the URL"
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: addons/dokan/player_options.php:114 views/player_options.php:108
|
89 |
msgid "[+|-] Using the audio files stored on DropBox"
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: addons/dokan/player_options.php:122 views/player_options.php:116
|
93 |
msgid ""
|
94 |
"Sign in to <a href=\"https://www.dropbox.com/login\" target=\"_blank"
|
95 |
"\">dropbox.com </a>"
|
96 |
msgstr ""
|
97 |
|
98 |
+
#: addons/dokan/player_options.php:132 views/player_options.php:126
|
99 |
msgid ""
|
100 |
"Hover your cursor over the file or folder you'd like to share and click "
|
101 |
"<b>Share</b> when it appears."
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: addons/dokan/player_options.php:142 views/player_options.php:136
|
105 |
msgid ""
|
106 |
"If a link hasn't been created, click Create a link. (If a link was already "
|
107 |
"created, click Copy link."
|
108 |
msgstr ""
|
109 |
|
110 |
+
#: addons/dokan/player_options.php:150 views/player_options.php:144
|
111 |
msgid ""
|
112 |
"The link structure would be similar to:<br> https://www.dropbox.com/s/"
|
113 |
"rycvgn8iokfedmo/file.mp3?dl=0"
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: addons/dokan/player_options.php:160 views/player_options.php:154
|
117 |
msgid ""
|
118 |
"Enter the URL into the WooCommerce product with the following structure:<br> "
|
119 |
"https://www.dropbox.com/s/rycvgn8iokfedmo/file.mp3?dl=1&.mp3"
|
120 |
msgstr ""
|
121 |
|
122 |
+
#: addons/dokan/player_options.php:168 views/player_options.php:162
|
123 |
msgid ""
|
124 |
"<b>Note:</b> Pay attention to the use of the fake parameter: <b>&.mp3</b> as "
|
125 |
"the last one in the URL. Furthermore, the parameter <b>dl=0</b>, has been "
|
126 |
"modified as <b>dl=1</b>"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: addons/dokan/player_options.php:181 views/global_options.php:224
|
130 |
msgid ""
|
131 |
"The player is shown only if the product is \"downloadable\" with at least an "
|
132 |
"audio file between the \"Downloadable files\", or you have selected your own "
|
133 |
"audio files"
|
134 |
msgstr ""
|
135 |
|
136 |
+
#: addons/dokan/player_options.php:181 views/player_options.php:178
|
137 |
msgid "Include music player"
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: addons/dokan/player_options.php:185 views/global_options.php:227
|
141 |
+
#: views/player_options.php:182
|
142 |
msgid "Include in"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: addons/dokan/player_options.php:188 views/global_options.php:230
|
146 |
+
#: views/player_options.php:185
|
147 |
msgid "single-entry pages <i>(Product's page only)</i>"
|
148 |
msgstr ""
|
149 |
|
150 |
+
#: addons/dokan/player_options.php:191 views/global_options.php:233
|
151 |
+
#: views/player_options.php:188
|
152 |
msgid ""
|
153 |
"multiple entries pages <i>(Shop pages, archive pages, but not in the "
|
154 |
"product's page)</i>"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: addons/dokan/player_options.php:194 views/global_options.php:236
|
158 |
+
#: views/player_options.php:191
|
159 |
msgid "all pages <i>(with single or multiple-entries)</i>"
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: addons/dokan/player_options.php:198 views/global_options.php:246
|
163 |
+
#: views/player_options.php:195
|
164 |
msgid "Merge in grouped products"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: addons/dokan/player_options.php:200 views/global_options.php:247
|
168 |
+
#: views/player_options.php:196
|
169 |
msgid ""
|
170 |
"In grouped products, display the \"Add to cart\" buttons and quantity fields "
|
171 |
"in the players rows"
|
172 |
msgstr ""
|
173 |
|
174 |
+
#: addons/dokan/player_options.php:203 views/global_options.php:250
|
175 |
+
#: views/player_options.php:199 widgets/playlist_widget.php:75
|
176 |
msgid "Player layout"
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: addons/dokan/player_options.php:222 views/global_options.php:272
|
180 |
+
#: views/player_options.php:221 widgets/playlist_widget.php:91
|
181 |
msgid "Preload"
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: addons/dokan/player_options.php:230 views/global_options.php:282
|
185 |
+
#: views/player_options.php:231 widgets/playlist_widget.php:87
|
186 |
msgid "Play all"
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: addons/dokan/player_options.php:233 views/global_options.php:295
|
190 |
+
#: views/player_options.php:244
|
191 |
msgid "Player controls"
|
192 |
msgstr ""
|
193 |
|
194 |
+
#: addons/dokan/player_options.php:235 views/global_options.php:297
|
195 |
+
#: views/player_options.php:246
|
196 |
msgid "the play/pause button only"
|
197 |
msgstr ""
|
198 |
|
199 |
+
#: addons/dokan/player_options.php:236 views/global_options.php:298
|
200 |
+
#: views/player_options.php:247
|
201 |
msgid "all controls"
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: addons/dokan/player_options.php:237 views/global_options.php:299
|
205 |
+
#: views/player_options.php:248
|
206 |
msgid "the play/pause button only, or all controls depending on context"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: addons/dokan/player_options.php:241 views/global_options.php:304
|
210 |
+
#: views/player_options.php:253
|
211 |
msgid "for play/pause button players display them on cover images."
|
212 |
msgstr ""
|
213 |
|
214 |
+
#: addons/dokan/player_options.php:242 views/global_options.php:307
|
215 |
+
#: views/player_options.php:256
|
216 |
msgid ""
|
217 |
"(This feature is experimental, and will depend on the theme active on the "
|
218 |
"website.)"
|
219 |
msgstr ""
|
220 |
|
221 |
+
#: addons/dokan/player_options.php:247 views/global_options.php:314
|
222 |
+
#: views/player_options.php:263
|
223 |
msgid "Display the player's title"
|
224 |
msgstr ""
|
225 |
|
226 |
+
#: addons/wcfm.addon.php:25
|
227 |
+
msgid "Activate the WCFM add-on"
|
228 |
+
msgstr ""
|
229 |
+
|
230 |
+
#: addons/wcfm.addon.php:25
|
231 |
+
msgid ""
|
232 |
+
"If the \"WCFM - Marketplace\" plugin is installed on the website, check the "
|
233 |
+
"checkbox to allow vendors to configure their music players."
|
234 |
+
msgstr ""
|
235 |
+
|
236 |
+
#: addons/wcfm.addon.php:39 addons/wcv.addon.php:39
|
237 |
+
msgid "Music Player"
|
238 |
+
msgstr ""
|
239 |
+
|
240 |
+
#: addons/wcv.addon.php:25
|
241 |
+
msgid "Activate the WC Vendors add-on (Experimental add-on)"
|
242 |
+
msgstr ""
|
243 |
+
|
244 |
+
#: addons/wcv.addon.php:25
|
245 |
+
msgid ""
|
246 |
+
"If the \"WC Vendors\" plugin is installed on the website, check the checkbox "
|
247 |
+
"to allow vendors to configure their music players."
|
248 |
+
msgstr ""
|
249 |
+
|
250 |
#: pagebuilders/beaverbuilder/wcmp.inc.php:8
|
251 |
msgid "Enter the products ids and the rest of shortcode attributes"
|
252 |
msgstr ""
|
266 |
#: pagebuilders/beaverbuilder/wcmp/wcmp.pb.php:9
|
267 |
#: pagebuilders/beaverbuilder/wcmp/wcmp.pb.php:11
|
268 |
#: pagebuilders/beaverbuilder/wcmp/wcmp.pb.php:12 pagebuilders/builders.php:130
|
269 |
+
#: pagebuilders/siteorigin/siteorigin-wcmp/siteorigin-wcmp.php:17 wcmp.php:215
|
270 |
msgid "Music Player for WooCommerce"
|
271 |
msgstr ""
|
272 |
|
298 |
msgid "Insert a playlist with the products players"
|
299 |
msgstr ""
|
300 |
|
301 |
+
#: views/global_options.php:36
|
302 |
msgid "Music Player for WooCommerce - Global Settings"
|
303 |
msgstr ""
|
304 |
|
305 |
+
#: views/global_options.php:40
|
306 |
msgid ""
|
307 |
"For reporting any issue or to request a customization, <a href=\"https://"
|
308 |
"wordpress.dwbooster.com/contact-us\" target=\"_blank\">CLICK HERE</a><br />\n"
|
314 |
"target=\"_blank\">Public page: Click to visit the WooCommerce Store</a>"
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: views/global_options.php:49
|
318 |
msgid "Registering of Plugin"
|
319 |
msgstr ""
|
320 |
|
321 |
+
#: views/global_options.php:51
|
322 |
msgid "Enter the email address of buyer"
|
323 |
msgstr ""
|
324 |
|
325 |
+
#: views/global_options.php:52
|
326 |
msgid "Register"
|
327 |
msgstr ""
|
328 |
|
329 |
+
#: views/global_options.php:64 views/player_options.php:45
|
330 |
msgid ""
|
331 |
"<p>The player uses the audio files associated to the product. If you want "
|
332 |
"protecting the audio files for selling, tick the checkbox: <b>\"Protect the "
|
338 |
"pay for them.</b></p>"
|
339 |
msgstr ""
|
340 |
|
341 |
+
#: views/global_options.php:75
|
342 |
msgid "General Settings"
|
343 |
msgstr ""
|
344 |
|
345 |
+
#: views/global_options.php:78
|
346 |
msgid "Include the players only for registered users"
|
347 |
msgstr ""
|
348 |
|
349 |
+
#: views/global_options.php:82
|
350 |
msgid "The general settings affect only the PRO version of the plugin"
|
351 |
msgstr ""
|
352 |
|
353 |
+
#: views/global_options.php:82 views/global_options.php:320
|
354 |
+
#: views/player_options.php:49 views/player_options.php:269
|
355 |
msgid "CLICK HERE TO GET THE PRO VERSION OF THE PLUGIN"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: views/global_options.php:85
|
359 |
msgid ""
|
360 |
"For buyers, play the purchased audio files instead the truncated files for "
|
361 |
"demo"
|
362 |
msgstr ""
|
363 |
|
364 |
+
#: views/global_options.php:92
|
365 |
msgid "Truncate the audio files for demo with ffmpeg"
|
366 |
msgstr ""
|
367 |
|
368 |
+
#: views/global_options.php:96
|
369 |
msgid "ffmpeg path"
|
370 |
msgstr ""
|
371 |
|
372 |
+
#: views/global_options.php:103
|
373 |
msgid "Delete the demo files generated previously"
|
374 |
msgstr ""
|
375 |
|
376 |
+
#: views/global_options.php:110
|
377 |
msgid "Store demo files on Google Drive"
|
378 |
msgstr ""
|
379 |
|
380 |
+
#: views/global_options.php:114
|
381 |
msgid "Import a JSON Key file"
|
382 |
msgstr ""
|
383 |
|
384 |
+
#: views/global_options.php:160
|
385 |
msgid "Troubleshoot Area"
|
386 |
msgstr ""
|
387 |
|
388 |
+
#: views/global_options.php:164
|
389 |
msgid "On iPads and iPhones, use native controls"
|
390 |
msgstr ""
|
391 |
|
392 |
+
#: views/global_options.php:168
|
393 |
msgid ""
|
394 |
"tick the checkbox if the players do not work properly on iPads or iPhones"
|
395 |
msgstr ""
|
396 |
|
397 |
+
#: views/global_options.php:173
|
398 |
msgid "Loading players in the onload event"
|
399 |
msgstr ""
|
400 |
|
401 |
+
#: views/global_options.php:177
|
402 |
msgid "tick the checkbox if the players are not being loaded properly"
|
403 |
msgstr ""
|
404 |
|
405 |
+
#: views/global_options.php:182
|
406 |
msgid "For files whose extensions cannot be determined"
|
407 |
msgstr ""
|
408 |
|
409 |
+
#: views/global_options.php:186
|
410 |
msgid "handle them as mp3 files"
|
411 |
msgstr ""
|
412 |
|
413 |
+
#: views/global_options.php:191
|
414 |
msgid ""
|
415 |
"For the WooCommerce Gutenberg Blocks, include the main player in the "
|
416 |
"products titles"
|
417 |
msgstr ""
|
418 |
|
419 |
+
#: views/global_options.php:195
|
420 |
msgid "Includes the main player in front of products titles"
|
421 |
msgstr ""
|
422 |
|
423 |
+
#: views/global_options.php:200
|
424 |
msgid "WooCommerce hook used to display the players in the shop pages"
|
425 |
msgstr ""
|
426 |
|
427 |
+
#: views/global_options.php:204
|
428 |
msgid ""
|
429 |
"The plugin uses by default the <b>woocommerce_shop_loop_item_title</b> hook. "
|
430 |
"If the player is not being displayed, enter the hook used by the theme "
|
431 |
"active on your website."
|
432 |
msgstr ""
|
433 |
|
434 |
+
#: views/global_options.php:209
|
435 |
msgid "WooCommerce hook used to display the players in the products pages"
|
436 |
msgstr ""
|
437 |
|
438 |
+
#: views/global_options.php:213
|
439 |
msgid ""
|
440 |
"The plugin uses by default the <b>woocommerce_single_product_summary</b> "
|
441 |
"hook. If the player is not being displayed, enter the hook used by the theme "
|
442 |
"active on your website."
|
443 |
msgstr ""
|
444 |
|
445 |
+
#: views/global_options.php:218
|
446 |
msgid ""
|
447 |
"Click on the <a href=\"https://docs.woocommerce.com/wc-apidocs/hook-docs.html"
|
448 |
"\" target=\"_blank\">THIS LINK</a> for the list of available <a href="
|
450 |
"style=\"font-weight:bold;font-size:1.3em;\">WooCommerce Hooks</a>"
|
451 |
msgstr ""
|
452 |
|
453 |
+
#: views/global_options.php:223
|
454 |
msgid "Include music player in all products"
|
455 |
msgstr ""
|
456 |
|
457 |
+
#: views/global_options.php:240
|
458 |
msgid "Include players in cart"
|
459 |
msgstr ""
|
460 |
|
461 |
+
#: views/global_options.php:289 views/player_options.php:238
|
462 |
+
msgid "Player volume (from 0 to 1)"
|
463 |
+
msgstr ""
|
464 |
+
|
465 |
+
#: views/global_options.php:320 views/player_options.php:269
|
466 |
msgid "The security feature is only available in the PRO version of the plugin"
|
467 |
msgstr ""
|
468 |
|
469 |
+
#: views/global_options.php:323 views/player_options.php:272
|
470 |
msgid "Protect the file"
|
471 |
msgstr ""
|
472 |
|
473 |
+
#: views/global_options.php:327 views/player_options.php:276
|
474 |
msgid "Percent of audio used for protected playbacks"
|
475 |
msgstr ""
|
476 |
|
477 |
+
#: views/global_options.php:330 views/player_options.php:279
|
478 |
msgid ""
|
479 |
"To prevent unauthorized copying of audio files, the files will be partially "
|
480 |
"accessible"
|
481 |
msgstr ""
|
482 |
|
483 |
+
#: views/global_options.php:335
|
484 |
msgid ""
|
485 |
"Text to display beside the player explaining that demos are partial versions "
|
486 |
"of the original files"
|
487 |
msgstr ""
|
488 |
|
489 |
+
#: views/global_options.php:351
|
490 |
msgid "Scope"
|
491 |
msgstr ""
|
492 |
|
493 |
+
#: views/global_options.php:352
|
494 |
msgid ""
|
495 |
"Ticking the checkbox the previous settings are applied to all products, even "
|
496 |
"if they have a player enabled."
|
497 |
msgstr ""
|
498 |
|
499 |
+
#: views/global_options.php:352
|
500 |
msgid "Apply the previous settings to all products pages in the website."
|
501 |
msgstr ""
|
502 |
|
503 |
+
#: views/global_options.php:364
|
504 |
msgid "Analytics"
|
505 |
msgstr ""
|
506 |
|
507 |
+
#: views/global_options.php:368
|
508 |
msgid ""
|
509 |
"Allows the integration with Google Analytics for registering new events when "
|
510 |
"the songs are played. The event information would include: the URL to the "
|
511 |
"audio file as the event label and the product's id as its value."
|
512 |
msgstr ""
|
513 |
|
514 |
+
#: views/global_options.php:369
|
515 |
msgid "Note"
|
516 |
msgstr ""
|
517 |
|
518 |
+
#: views/global_options.php:369
|
519 |
msgid ""
|
520 |
"If the preload option is configured as Metadata or Auto in the players "
|
521 |
"settings, the event would be registered when the audio file is loaded by the "
|
522 |
"player and not exactly when they are playing."
|
523 |
msgstr ""
|
524 |
|
525 |
+
#: views/global_options.php:374
|
526 |
msgid "Tracking Id"
|
527 |
msgstr ""
|
528 |
|
529 |
+
#: views/global_options.php:387
|
530 |
+
msgid "Add ons"
|
531 |
+
msgstr ""
|
532 |
+
|
533 |
+
#: views/global_options.php:394
|
534 |
msgid "Save settings"
|
535 |
msgstr ""
|
536 |
|
537 |
+
#: views/player_options.php:49
|
538 |
msgid ""
|
539 |
"The security feature and particular files for demo are only available in the "
|
540 |
"PRO version of the plugin"
|
541 |
msgstr ""
|
542 |
|
543 |
+
#: views/player_options.php:50
|
544 |
msgid ""
|
545 |
"For testing the premium version of the plugin, visit the online demo:<br/> "
|
546 |
"<a href=\"https://demos.dwbooster.com/music-player-for-woocommerce/wp-login."
|
550 |
"WooCommerce Store</a>"
|
551 |
msgstr ""
|
552 |
|
553 |
+
#: views/player_options.php:179
|
554 |
msgid ""
|
555 |
"The player is shown only if the product is \"downloadable\", and there is at "
|
556 |
"least an audio file between the \"Downloadable files\""
|
557 |
msgstr ""
|
558 |
|
559 |
+
#: views/player_options.php:291
|
560 |
msgid "Select my own demo files"
|
561 |
msgstr ""
|
562 |
|
563 |
+
#: views/player_options.php:295
|
564 |
msgid "Demo files"
|
565 |
msgstr ""
|
566 |
|
567 |
+
#: views/player_options.php:299
|
568 |
msgid "Name"
|
569 |
msgstr ""
|
570 |
|
571 |
+
#: views/player_options.php:300
|
572 |
msgid "File URL"
|
573 |
msgstr ""
|
574 |
|
575 |
+
#: views/player_options.php:323
|
576 |
msgid "Add File"
|
577 |
msgstr ""
|
578 |
|
579 |
+
#: wcmp.php:225
|
580 |
msgid "Help"
|
581 |
msgstr ""
|
582 |
|
583 |
+
#: wcmp.php:968
|
584 |
msgid "There are no products that satisfy the block's settings"
|
585 |
msgstr ""
|
586 |
|
587 |
+
#: widgets/playlist_widget.php:52
|
588 |
msgid "Title"
|
589 |
msgstr ""
|
590 |
|
591 |
+
#: widgets/playlist_widget.php:55
|
592 |
msgid "Products IDs"
|
593 |
msgstr ""
|
594 |
|
595 |
+
#: widgets/playlist_widget.php:55
|
596 |
msgid "Products IDs separated by comma, or a * for all"
|
597 |
msgstr ""
|
598 |
|
599 |
+
#: widgets/playlist_widget.php:59
|
600 |
msgid ""
|
601 |
"Enter the ID of products separated by comma, or a * symbol to includes all "
|
602 |
"products in the playlist."
|
603 |
msgstr ""
|
604 |
|
605 |
+
#: widgets/playlist_widget.php:63
|
606 |
+
msgid "Volume (enter a number between 0 and 1)"
|
607 |
+
msgstr ""
|
608 |
+
|
609 |
+
#: widgets/playlist_widget.php:66
|
610 |
msgid "Playlist layout"
|
611 |
msgstr ""
|
612 |
|
613 |
+
#: widgets/playlist_widget.php:69
|
614 |
msgid "New layout"
|
615 |
msgstr ""
|
616 |
|
617 |
+
#: widgets/playlist_widget.php:72
|
618 |
msgid "Original layout"
|
619 |
msgstr ""
|
620 |
|
621 |
+
#: widgets/playlist_widget.php:97
|
622 |
msgid "Highlight the current product"
|
623 |
msgstr ""
|
624 |
|
625 |
+
#: widgets/playlist_widget.php:100
|
626 |
msgid "Continue playing after navigate"
|
627 |
msgstr ""
|
628 |
|
629 |
+
#: widgets/playlist_widget.php:104
|
630 |
msgid ""
|
631 |
"Continue playing the same song at same position after navigate. You can "
|
632 |
"experiment some delay because the music player should to load the audio file "
|
pagebuilders/gutenberg/wcblocks.js
CHANGED
@@ -5,8 +5,9 @@ jQuery(function(){
|
|
5 |
(new MutationObserver(
|
6 |
function(mutationsList, observer)
|
7 |
{
|
8 |
-
for(let
|
9 |
{
|
|
|
10 |
if (mutation.type === 'childList')
|
11 |
{
|
12 |
if(mutation.addedNodes.length)
|
5 |
(new MutationObserver(
|
6 |
function(mutationsList, observer)
|
7 |
{
|
8 |
+
for(let k in mutationsList)
|
9 |
{
|
10 |
+
let mutation = mutationsList[k];
|
11 |
if (mutation.type === 'childList')
|
12 |
{
|
13 |
if(mutation.addedNodes.length)
|
readme.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
=== Music Player for WooCommerce ===
|
2 |
Contributors: codepeople
|
3 |
Donate link: https://wcmp.dwbooster.com
|
4 |
-
Tags:WooCommerce,music player,audio,music,song,player,audio player,media player,mp3,wav,oga,ogg,dokan,wcfm
|
5 |
Requires at least: 3.5.0
|
6 |
Tested up to: 5.5
|
7 |
Stable tag: trunk
|
@@ -16,6 +16,7 @@ Features of the Music Player for WooCommerce, Dokan, and WCFM Marketplace:
|
|
16 |
|
17 |
♪ Integrate a music player into the WooCommerce products, Dokan and WCFM Marketplace
|
18 |
♪ Includes an audio player that supports formats: OGA, MP3, WAV, WMA
|
|
|
19 |
♪ Includes multiple skins for the Music Player
|
20 |
♪ Supports all most popular web browsers and mobile devices
|
21 |
♪ Includes a widget to insert a playlist on sidebars
|
@@ -199,6 +200,49 @@ Each time save the data of a product, the files for demo are deleted and generat
|
|
199 |
|
200 |
== Changelog ==
|
201 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
= 1.0.112 =
|
203 |
|
204 |
* Hides the download control of players, when are used the default players of devices.
|
@@ -677,6 +721,6 @@ Each time save the data of a product, the files for demo are deleted and generat
|
|
677 |
|
678 |
== Upgrade Notice ==
|
679 |
|
680 |
-
= 1.0.
|
681 |
|
682 |
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
|
1 |
=== Music Player for WooCommerce ===
|
2 |
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.5
|
7 |
Stable tag: trunk
|
16 |
|
17 |
♪ Integrate a music player into the WooCommerce products, Dokan and WCFM Marketplace
|
18 |
♪ Includes an audio player that supports formats: OGA, MP3, WAV, WMA
|
19 |
+
♪ Supports M3U, M3U8 playlists
|
20 |
♪ Includes multiple skins for the Music Player
|
21 |
♪ Supports all most popular web browsers and mobile devices
|
22 |
♪ Includes a widget to insert a playlist on sidebars
|
200 |
|
201 |
== Changelog ==
|
202 |
|
203 |
+
= 1.0.122 =
|
204 |
+
|
205 |
+
* Improves the plugin's support for outdated browsers like Internet Explorer.
|
206 |
+
|
207 |
+
= 1.0.121 =
|
208 |
+
|
209 |
+
* Fixes an issue with the m4a files.
|
210 |
+
|
211 |
+
= 1.0.120 =
|
212 |
+
|
213 |
+
* Upgrades the version of MediaElement JS library as its core.
|
214 |
+
* Includes minor changes in the skins designs (caused by the upgrade of MediaElement JS).
|
215 |
+
* Includes support for M3U and M3U8 playlists.
|
216 |
+
|
217 |
+
= 1.0.119 =
|
218 |
+
|
219 |
+
* Includes the integration with WC Vendors Pro plugin.
|
220 |
+
* Fixes an issue in the WCFM Marketplace add-on.
|
221 |
+
|
222 |
+
= 1.0.118 =
|
223 |
+
|
224 |
+
* The plugin checks the existence of the global variable: $GLOBALS['wcmp_post_types'] to identify those post types where the music players would be integrated. This new variable allows the developers of plugins related to WooCommerce to include the music players with their custom post types.
|
225 |
+
|
226 |
+
= 1.0.117 =
|
227 |
+
|
228 |
+
* Fixes an issue scrolling the grouped products.
|
229 |
+
|
230 |
+
= 1.0.116 =
|
231 |
+
|
232 |
+
* Loads music players in scrolling events making the music player for WooCommerce compatible with infinite scrolling themes and plugins.
|
233 |
+
|
234 |
+
= 1.0.115 =
|
235 |
+
|
236 |
+
* Includes the volume attribute in the widget settings.
|
237 |
+
|
238 |
+
= 1.0.114 =
|
239 |
+
|
240 |
+
* Includes a new attribute in the player's settings for entering the default volume, a decimal number between 0 and 1.
|
241 |
+
|
242 |
+
= 1.0.113 =
|
243 |
+
|
244 |
+
* Includes a new section in the plugin's settings to enable/disable the section for the players' settings from WCFM and Dokan products.
|
245 |
+
|
246 |
= 1.0.112 =
|
247 |
|
248 |
* Hides the download control of players, when are used the default players of devices.
|
721 |
|
722 |
== Upgrade Notice ==
|
723 |
|
724 |
+
= 1.0.122 =
|
725 |
|
726 |
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
@@ -15,6 +15,7 @@ $enable_player = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( '_wcmp_
|
|
15 |
$show_in = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( '_wcmp_show_in', 'all' );
|
16 |
$players_in_cart = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( '_wcmp_players_in_cart', false );
|
17 |
$player_style = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( '_wcmp_player_layout', WCMP_DEFAULT_PLAYER_LAYOUT );
|
|
|
18 |
$player_controls= $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( '_wcmp_player_controls', WCMP_DEFAULT_PLAYER_CONTROLS );
|
19 |
$player_title = intval( $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( '_wcmp_player_title',1 ) );
|
20 |
$merge_grouped = intval( $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( '_wcmp_merge_in_grouped',0 ) );
|
@@ -284,6 +285,12 @@ _e(
|
|
284 |
<input type="checkbox" name="_wcmp_play_all" <?php if($play_all) echo 'CHECKED'; ?> />
|
285 |
</td>
|
286 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
<tr>
|
288 |
<td width="30%"><?php _e( 'Player controls', 'music-player-for-woocommerce' ); ?></td>
|
289 |
<td>
|
@@ -372,6 +379,18 @@ _e(
|
|
372 |
</td>
|
373 |
</tr>
|
374 |
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
375 |
<div style="margin-top:20px;"><input type="submit" value="<?php _e('Save settings', 'music-player-for-woocommerce'); ?>" class="button-primary" /></div>
|
376 |
</form>
|
377 |
<script>jQuery(window).on('load', function(){
|
15 |
$show_in = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( '_wcmp_show_in', 'all' );
|
16 |
$players_in_cart = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( '_wcmp_players_in_cart', false );
|
17 |
$player_style = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( '_wcmp_player_layout', WCMP_DEFAULT_PLAYER_LAYOUT );
|
18 |
+
$volume = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( '_wcmp_player_volume', WCMP_DEFAULT_PLAYER_VOLUME );
|
19 |
$player_controls= $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( '_wcmp_player_controls', WCMP_DEFAULT_PLAYER_CONTROLS );
|
20 |
$player_title = intval( $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( '_wcmp_player_title',1 ) );
|
21 |
$merge_grouped = intval( $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( '_wcmp_merge_in_grouped',0 ) );
|
285 |
<input type="checkbox" name="_wcmp_play_all" <?php if($play_all) echo 'CHECKED'; ?> />
|
286 |
</td>
|
287 |
</tr>
|
288 |
+
<tr>
|
289 |
+
<td><?php _e( 'Player volume (from 0 to 1)', 'music-player-for-woocommerce' ); ?></td>
|
290 |
+
<td>
|
291 |
+
<input type="number" name="_wcmp_player_volume" min="0" max="1" step="0.01" value="<?php echo esc_attr($volume); ?>" />
|
292 |
+
</td>
|
293 |
+
</tr>
|
294 |
<tr>
|
295 |
<td width="30%"><?php _e( 'Player controls', 'music-player-for-woocommerce' ); ?></td>
|
296 |
<td>
|
379 |
</td>
|
380 |
</tr>
|
381 |
</table>
|
382 |
+
<table class="widefat" style="border:0;">
|
383 |
+
<tr>
|
384 |
+
<td>
|
385 |
+
<table class="widefat" style="border:1px solid #e1e1e1;">
|
386 |
+
<tr>
|
387 |
+
<td colspan="2"><h2><?php _e('Add ons', 'music-player-for-woocommerce'); ?></h2></td>
|
388 |
+
</tr>
|
389 |
+
<?php do_action('wcmp_addon_general_settings'); ?>
|
390 |
+
</table>
|
391 |
+
</td>
|
392 |
+
</tr>
|
393 |
+
</table>
|
394 |
<div style="margin-top:20px;"><input type="submit" value="<?php _e('Save settings', 'music-player-for-woocommerce'); ?>" class="button-primary" /></div>
|
395 |
</form>
|
396 |
<script>jQuery(window).on('load', function(){
|
views/player_options.php
CHANGED
@@ -9,6 +9,7 @@ if(empty($post)) global $post;
|
|
9 |
$enable_player = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_product_attr( $post->ID, '_wcmp_enable_player', false );
|
10 |
$show_in = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_product_attr( $post->ID, '_wcmp_show_in', 'all' );
|
11 |
$player_style = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_product_attr( $post->ID, '_wcmp_player_layout', WCMP_DEFAULT_PLAYER_LAYOUT );
|
|
|
12 |
$player_controls= $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_product_attr( $post->ID, '_wcmp_player_controls', WCMP_DEFAULT_PLAYER_CONTROLS );
|
13 |
$player_title= intval( $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_product_attr( $post->ID, '_wcmp_player_title', 1 ) );
|
14 |
$merge_grouped = intval( $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_product_attr( $post->ID, '_wcmp_merge_in_grouped',0 ) );
|
@@ -233,6 +234,12 @@ $on_cover = intval( $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_product_attr( $p
|
|
233 |
<input type="checkbox" name="_wcmp_play_all" <?php if(!empty($play_all)) echo 'CHECKED'; ?> />
|
234 |
</td>
|
235 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
<tr>
|
237 |
<td><?php _e( 'Player controls', 'music-player-for-woocommerce' ); ?></td>
|
238 |
<td>
|
9 |
$enable_player = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_product_attr( $post->ID, '_wcmp_enable_player', false );
|
10 |
$show_in = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_product_attr( $post->ID, '_wcmp_show_in', 'all' );
|
11 |
$player_style = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_product_attr( $post->ID, '_wcmp_player_layout', WCMP_DEFAULT_PLAYER_LAYOUT );
|
12 |
+
$volume = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_product_attr( $post->ID, '_wcmp_player_volume', WCMP_DEFAULT_PLAYER_VOLUME );
|
13 |
$player_controls= $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_product_attr( $post->ID, '_wcmp_player_controls', WCMP_DEFAULT_PLAYER_CONTROLS );
|
14 |
$player_title= intval( $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_product_attr( $post->ID, '_wcmp_player_title', 1 ) );
|
15 |
$merge_grouped = intval( $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_product_attr( $post->ID, '_wcmp_merge_in_grouped',0 ) );
|
234 |
<input type="checkbox" name="_wcmp_play_all" <?php if(!empty($play_all)) echo 'CHECKED'; ?> />
|
235 |
</td>
|
236 |
</tr>
|
237 |
+
<tr>
|
238 |
+
<td><?php _e( 'Player volume (from 0 to 1)', 'music-player-for-woocommerce' ); ?></td>
|
239 |
+
<td>
|
240 |
+
<input type="number" name="_wcmp_player_volume" min="0" max="1" step="0.01" value="<?php echo esc_attr($volume); ?>" />
|
241 |
+
</td>
|
242 |
+
</tr>
|
243 |
<tr>
|
244 |
<td><?php _e( 'Player controls', 'music-player-for-woocommerce' ); ?></td>
|
245 |
<td>
|
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
|
@@ -22,6 +22,7 @@ $codepeople_promote_banner_plugins[ 'codepeople-music-player-for-woocommerce' ]
|
|
22 |
define( 'WCMP_WEBSITE_URL', get_home_url(get_current_blog_id(), '', is_ssl() ? 'https' : 'http') );
|
23 |
define( 'WCMP_PLUGIN_URL', plugins_url( '', __FILE__ ) );
|
24 |
define( 'WCMP_DEFAULT_PLAYER_LAYOUT', 'mejs-classic' );
|
|
|
25 |
define( 'WCMP_DEFAULT_PLAYER_CONTROLS', 'default' );
|
26 |
define( 'WCMP_DEFAULT_PlAYER_TITLE', 1 );
|
27 |
define( 'WCMP_REMOTE_TIMEOUT', 120);
|
@@ -211,7 +212,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
211 |
// Check if WooCommerce is installed or not
|
212 |
if(!class_exists('woocommerce')) return;
|
213 |
|
214 |
-
add_meta_box('wcmp_woocommerce_metabox', __("Music Player for WooCommerce", 'music-player-for-woocommerce'), array(&$this, 'woocommerce_player_settings'),
|
215 |
add_action('save_post', array(&$this, 'save_post'), 10, 3);
|
216 |
add_action('delete_post', array(&$this, 'delete_post'));
|
217 |
add_filter("plugin_action_links_".plugin_basename(__FILE__), array(&$this, 'help_link'));
|
@@ -265,6 +266,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
265 |
$player_title = ( isset( $_REQUEST[ '_wcmp_player_title' ] ) ) ? 1 : 0;
|
266 |
$merge_grouped = ( isset( $_REQUEST[ '_wcmp_merge_in_grouped' ] ) ) ? 1 : 0;
|
267 |
$play_all = (isset($_REQUEST['_wcmp_play_all'])) ? 1 : 0;
|
|
|
268 |
$preload = (
|
269 |
isset($_REQUEST['_wcmp_preload']) &&
|
270 |
in_array($_REQUEST['_wcmp_preload'], array('none', 'metadata', 'auto'))
|
@@ -276,6 +278,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
276 |
'_wcmp_show_in' => $show_in,
|
277 |
'_wcmp_players_in_cart' => $players_in_cart,
|
278 |
'_wcmp_player_layout' => $player_style,
|
|
|
279 |
'_wcmp_player_controls' => $player_controls,
|
280 |
'_wcmp_player_title'=> $player_title,
|
281 |
'_wcmp_merge_in_grouped' => $merge_grouped,
|
@@ -297,7 +300,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
297 |
$this->_deleteDir( $this->_files_directory_path );
|
298 |
|
299 |
$products_ids = array(
|
300 |
-
'post_type' =>
|
301 |
'numberposts' => -1,
|
302 |
'post_status' => array('publish', 'pending', 'draft', 'future'),
|
303 |
'fields' => 'ids',
|
@@ -311,6 +314,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
311 |
update_post_meta($product_id, '_wcmp_show_in', $show_in);
|
312 |
update_post_meta($product_id, '_wcmp_player_layout', $player_style);
|
313 |
update_post_meta($product_id, '_wcmp_player_controls', $player_controls);
|
|
|
314 |
update_post_meta($product_id, '_wcmp_player_title', $player_title);
|
315 |
update_post_meta($product_id, '_wcmp_merge_in_grouped', $merge_grouped);
|
316 |
update_post_meta($product_id, '_wcmp_play_all', $play_all);
|
@@ -321,6 +325,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
321 |
|
322 |
update_option('wcmp_global_settings', $global_settings);
|
323 |
$this->_global_attrs = $global_settings;
|
|
|
324 |
} // Save settings
|
325 |
|
326 |
print '<div class="wrap">'; // Open Wrap
|
@@ -332,7 +337,8 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
332 |
{
|
333 |
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;
|
334 |
if ( empty( $_POST['wcmp_nonce'] ) || !wp_verify_nonce( $_POST['wcmp_nonce'], 'wcmp_updating_product' ) ) return;
|
335 |
-
|
|
|
336 |
|
337 |
$this->delete_post($post_id);
|
338 |
|
@@ -352,6 +358,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
352 |
$player_title = ( isset( $_REQUEST[ '_wcmp_player_title' ] ) ) ? 1 : 0;
|
353 |
$merge_grouped = ( isset( $_REQUEST[ '_wcmp_merge_in_grouped' ] ) ) ? 1 : 0;
|
354 |
$play_all = (isset($_REQUEST['_wcmp_play_all'])) ? 1 : 0;
|
|
|
355 |
$preload = (
|
356 |
isset($_REQUEST['_wcmp_preload']) &&
|
357 |
in_array($_REQUEST['_wcmp_preload'], array('none', 'metadata', 'auto'))
|
@@ -362,6 +369,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
362 |
add_post_meta( $post_id, '_wcmp_enable_player', $enable_player, true );
|
363 |
add_post_meta( $post_id, '_wcmp_show_in', $show_in, true );
|
364 |
add_post_meta( $post_id, '_wcmp_player_layout', $player_style, true );
|
|
|
365 |
add_post_meta( $post_id, '_wcmp_player_controls', $player_controls, true );
|
366 |
add_post_meta( $post_id, '_wcmp_player_title', $player_title, true );
|
367 |
add_post_meta( $post_id, '_wcmp_merge_in_grouped', $merge_grouped, true );
|
@@ -373,7 +381,8 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
373 |
public function delete_post($post_id)
|
374 |
{
|
375 |
$post = get_post($post_id);
|
376 |
-
|
|
|
377 |
|
378 |
// Delete truncated version of the audio file
|
379 |
$this->_delete_truncated_files( $post_id );
|
@@ -382,6 +391,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
382 |
delete_post_meta( $post_id, '_wcmp_show_in' );
|
383 |
delete_post_meta( $post_id, '_wcmp_merge_in_grouped' );
|
384 |
delete_post_meta( $post_id, '_wcmp_player_layout' );
|
|
|
385 |
delete_post_meta( $post_id, '_wcmp_player_controls' );
|
386 |
delete_post_meta( $post_id, '_wcmp_player_title' );
|
387 |
delete_post_meta( $post_id, '_wcmp_preload' );
|
@@ -400,21 +410,12 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
400 |
}
|
401 |
|
402 |
// Registering resources
|
403 |
-
|
404 |
-
'wp-mediaelement_22212',
|
405 |
-
'https://cdnjs.cloudflare.com/ajax/libs/mediaelement/2.23.5/mediaelementplayer.min.css'
|
406 |
-
);
|
407 |
-
wp_register_script(
|
408 |
-
'wp-mediaelement_22212',
|
409 |
-
'https://cdnjs.cloudflare.com/ajax/libs/mediaelement/2.23.5/mediaelement-and-player.min.js'
|
410 |
-
);
|
411 |
-
|
412 |
-
wp_enqueue_style( 'wp-mediaelement_22212' );
|
413 |
wp_enqueue_style( 'wp-mediaelement-skins', 'https://cdnjs.cloudflare.com/ajax/libs/mediaelement/2.23.5/mejs-skins.min.css' );
|
414 |
wp_enqueue_style( 'wcmp-style', plugin_dir_url(__FILE__).'css/style.css' );
|
415 |
wp_enqueue_script('jquery');
|
416 |
-
wp_enqueue_script('wp-
|
417 |
-
wp_enqueue_script('wcmp-script', plugin_dir_url(__FILE__).'js/public.js', array('jquery', 'wp-
|
418 |
|
419 |
$play_all = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr(
|
420 |
'_wcmp_play_all',
|
@@ -425,7 +426,8 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
425 |
if(is_product())
|
426 |
{
|
427 |
global $post;
|
428 |
-
|
|
|
429 |
{
|
430 |
$play_all = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_product_attr(
|
431 |
$post->ID,
|
@@ -462,7 +464,8 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
462 |
if(!$this->_insert_player) return $output;
|
463 |
|
464 |
if(!is_array($atts)) $atts = array();
|
465 |
-
|
|
|
466 |
$atts['products_ids'] = $post->ID;
|
467 |
|
468 |
extract(
|
@@ -474,7 +477,8 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
474 |
'player_style' => WCMP_DEFAULT_PLAYER_LAYOUT,
|
475 |
'controls' => 'track',
|
476 |
'layout' => 'new',
|
477 |
-
'cover' => 0
|
|
|
478 |
),
|
479 |
$atts
|
480 |
)
|
@@ -482,6 +486,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
482 |
|
483 |
// Typecasting variables.
|
484 |
$cover = @intval($cover);
|
|
|
485 |
|
486 |
// get the produts ids
|
487 |
$products_ids = preg_replace( '/[^\d\,\*]/', '', $products_ids);
|
@@ -495,7 +500,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
495 |
|
496 |
$current_post_id = !empty( $post ) ? (is_int($post) ? $post : $post->ID) : -1;
|
497 |
|
498 |
-
$query = 'SELECT posts.ID FROM '.$wpdb->posts.' AS posts, '.$wpdb->postmeta.' as postmeta WHERE posts.post_status="publish" AND posts.post_type
|
499 |
|
500 |
if( strpos( '*', $products_ids ) === false )
|
501 |
{
|
@@ -575,7 +580,8 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
575 |
'media_type' => $file[ 'media_type' ],
|
576 |
'id' => $index,
|
577 |
'duration' => $duration,
|
578 |
-
'preload' => $preload
|
|
|
579 |
)
|
580 |
),
|
581 |
$product->ID,
|
@@ -620,7 +626,8 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
620 |
'media_type' => $file[ 'media_type' ],
|
621 |
'id' => $index,
|
622 |
'duration' => $duration,
|
623 |
-
'preload' => $preload
|
|
|
624 |
)
|
625 |
),
|
626 |
$product->ID,
|
@@ -683,7 +690,8 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
683 |
'media_type' => 'mp3',
|
684 |
'player_style' => WCMP_DEFAULT_PLAYER_LAYOUT,
|
685 |
'player_controls' => WCMP_DEFAULT_PLAYER_CONTROLS,
|
686 |
-
'duration' => false
|
|
|
687 |
);
|
688 |
|
689 |
$args = array_merge( $default_args, $args );
|
@@ -695,7 +703,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
695 |
$GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( 'preload', 'none' )
|
696 |
);
|
697 |
|
698 |
-
return '<audio '.$id.' preload="none" data-lazyloading="'.esc_attr($preload).'" class="wcmp-player '.esc_attr($args[ 'player_controls' ]).' '.esc_attr($args[ 'player_style' ]).'" '.((!empty($args['duration']))? 'data-duration="'.esc_attr($args['duration']).'"': '').'><source src="'.esc_url($audio_url).'" type="audio/'.esc_attr($args['media_type']).'" /></audio>';
|
699 |
|
700 |
} // End get_player
|
701 |
|
@@ -731,6 +739,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
731 |
|
732 |
$player_style = $this->get_product_attr( $id, '_wcmp_player_layout', WCMP_DEFAULT_PLAYER_LAYOUT );
|
733 |
$player_controls = ( $this->get_product_attr( $id, '_wcmp_player_controls', WCMP_DEFAULT_PLAYER_CONTROLS ) != 'all' ) ? 'track' : '';
|
|
|
734 |
|
735 |
$file = reset($files);
|
736 |
$index = key($files);
|
@@ -745,7 +754,8 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
745 |
'player_style' => $player_style,
|
746 |
'media_type' => $file[ 'media_type' ],
|
747 |
'duration' => $duration,
|
748 |
-
'preload' => $preload
|
|
|
749 |
)
|
750 |
),
|
751 |
$id,
|
@@ -775,6 +785,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
775 |
$preload = $this->get_product_attr($id, '_wcmp_preload', '');
|
776 |
$this->enqueue_resources();
|
777 |
$player_style = $this->get_product_attr( $id, '_wcmp_player_layout', WCMP_DEFAULT_PLAYER_LAYOUT );
|
|
|
778 |
$player_controls = $this->get_product_attr( $id, '_wcmp_player_controls', WCMP_DEFAULT_PLAYER_CONTROLS );
|
779 |
$player_title = intval( $this->get_product_attr( $id, '_wcmp_player_title', WCMP_DEFAULT_PlAYER_TITLE ) );
|
780 |
$merge_grouped = intval( $this->get_product_attr( $id, '_wcmp_merge_in_grouped', 0 ) );
|
@@ -798,7 +809,8 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
798 |
'player_style' => $player_style,
|
799 |
'media_type' => $file[ 'media_type' ],
|
800 |
'duration' => $duration,
|
801 |
-
'preload' => $preload
|
|
|
802 |
)
|
803 |
),
|
804 |
$id,
|
@@ -826,7 +838,8 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
826 |
'player_controls' => ($player_controls != 'all' ) ? 'track' : '',
|
827 |
'media_type' => $file[ 'media_type' ],
|
828 |
'duration' => $duration,
|
829 |
-
'preload' => $preload
|
|
|
830 |
)
|
831 |
),
|
832 |
$id,
|
@@ -894,6 +907,17 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
894 |
} // add_class_single_product_image
|
895 |
|
896 |
//******************** PRIVATE METHODS ************************
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
897 |
private function _load_addons()
|
898 |
{
|
899 |
$path = __DIR__.'/addons';
|
@@ -1022,7 +1046,7 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
1022 |
if(!empty($file_data['file']))
|
1023 |
{
|
1024 |
$file_url = $file_data['file'];
|
1025 |
-
if(!empty($file_data['play_src'])) return $file_url; // Play src audio file, without copying or truncate it.
|
1026 |
|
1027 |
// If the playback of music are tracked with Google Analytics, should not be loaded directly the audio files.
|
1028 |
$_wcmp_analytics_property = trim($this->get_global_attr('_wcmp_analytics_property', ''));
|
@@ -1061,13 +1085,22 @@ if ( !class_exists( 'WooCommerceMusicPlayer' ) ) {
|
|
1061 |
|
1062 |
} // End _delete_truncated_files
|
1063 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1064 |
/**
|
1065 |
* Check if the file is an audio file and return its type or false
|
1066 |
*/
|
1067 |
private function _is_audio( $file_path )
|
1068 |
{
|
1069 |
-
if( preg_match( '/\.(mp3|ogg|oga|wav|wma|mp4
|
1070 |
-
|
|
|
1071 |
|
1072 |
// From troubleshoot
|
1073 |
$extension = pathinfo($file_path,PATHINFO_EXTENSION);
|
2 |
/*
|
3 |
Plugin Name: Music Player for WooCommerce
|
4 |
Plugin URI: https://wcmp.dwbooster.com
|
5 |
+
Version: 1.0.122
|
6 |
Text Domain: music-player-for-woocommerce
|
7 |
Author: CodePeople
|
8 |
Author URI: https://wcmp.dwbooster.com
|
22 |
define( 'WCMP_WEBSITE_URL', get_home_url(get_current_blog_id(), '', is_ssl() ? 'https' : 'http') );
|
23 |
define( 'WCMP_PLUGIN_URL', plugins_url( '', __FILE__ ) );
|
24 |
define( 'WCMP_DEFAULT_PLAYER_LAYOUT', 'mejs-classic' );
|
25 |
+
define( 'WCMP_DEFAULT_PLAYER_VOLUME', 1 );
|
26 |
define( 'WCMP_DEFAULT_PLAYER_CONTROLS', 'default' );
|
27 |
define( 'WCMP_DEFAULT_PlAYER_TITLE', 1 );
|
28 |
define( 'WCMP_REMOTE_TIMEOUT', 120);
|
212 |
// Check if WooCommerce is installed or not
|
213 |
if(!class_exists('woocommerce')) return;
|
214 |
|
215 |
+
add_meta_box('wcmp_woocommerce_metabox', __("Music Player for WooCommerce", 'music-player-for-woocommerce'), array(&$this, 'woocommerce_player_settings'), $this->_get_post_types(), 'normal');
|
216 |
add_action('save_post', array(&$this, 'save_post'), 10, 3);
|
217 |
add_action('delete_post', array(&$this, 'delete_post'));
|
218 |
add_filter("plugin_action_links_".plugin_basename(__FILE__), array(&$this, 'help_link'));
|
266 |
$player_title = ( isset( $_REQUEST[ '_wcmp_player_title' ] ) ) ? 1 : 0;
|
267 |
$merge_grouped = ( isset( $_REQUEST[ '_wcmp_merge_in_grouped' ] ) ) ? 1 : 0;
|
268 |
$play_all = (isset($_REQUEST['_wcmp_play_all'])) ? 1 : 0;
|
269 |
+
$volume = (isset($_REQUEST['_wcmp_player_volume'])) ? @floatval($_REQUEST['_wcmp_player_volume']) : 1;
|
270 |
$preload = (
|
271 |
isset($_REQUEST['_wcmp_preload']) &&
|
272 |
in_array($_REQUEST['_wcmp_preload'], array('none', 'metadata', 'auto'))
|
278 |
'_wcmp_show_in' => $show_in,
|
279 |
'_wcmp_players_in_cart' => $players_in_cart,
|
280 |
'_wcmp_player_layout' => $player_style,
|
281 |
+
'_wcmp_player_volume' => $volume,
|
282 |
'_wcmp_player_controls' => $player_controls,
|
283 |
'_wcmp_player_title'=> $player_title,
|
284 |
'_wcmp_merge_in_grouped' => $merge_grouped,
|
300 |
$this->_deleteDir( $this->_files_directory_path );
|
301 |
|
302 |
$products_ids = array(
|
303 |
+
'post_type' => $this->_get_post_types(),
|
304 |
'numberposts' => -1,
|
305 |
'post_status' => array('publish', 'pending', 'draft', 'future'),
|
306 |
'fields' => 'ids',
|
314 |
update_post_meta($product_id, '_wcmp_show_in', $show_in);
|
315 |
update_post_meta($product_id, '_wcmp_player_layout', $player_style);
|
316 |
update_post_meta($product_id, '_wcmp_player_controls', $player_controls);
|
317 |
+
update_post_meta($product_id, '_wcmp_player_volume', $volume);
|
318 |
update_post_meta($product_id, '_wcmp_player_title', $player_title);
|
319 |
update_post_meta($product_id, '_wcmp_merge_in_grouped', $merge_grouped);
|
320 |
update_post_meta($product_id, '_wcmp_play_all', $play_all);
|
325 |
|
326 |
update_option('wcmp_global_settings', $global_settings);
|
327 |
$this->_global_attrs = $global_settings;
|
328 |
+
do_action('wcmp_save_setting');
|
329 |
} // Save settings
|
330 |
|
331 |
print '<div class="wrap">'; // Open Wrap
|
337 |
{
|
338 |
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;
|
339 |
if ( empty( $_POST['wcmp_nonce'] ) || !wp_verify_nonce( $_POST['wcmp_nonce'], 'wcmp_updating_product' ) ) return;
|
340 |
+
$post_types = $this->_get_post_types();
|
341 |
+
if ( !isset($post) || !in_array($post->post_type, $post_types) || !current_user_can( 'edit_post', $post_id ) ) return;
|
342 |
|
343 |
$this->delete_post($post_id);
|
344 |
|
358 |
$player_title = ( isset( $_REQUEST[ '_wcmp_player_title' ] ) ) ? 1 : 0;
|
359 |
$merge_grouped = ( isset( $_REQUEST[ '_wcmp_merge_in_grouped' ] ) ) ? 1 : 0;
|
360 |
$play_all = (isset($_REQUEST['_wcmp_play_all'])) ? 1 : 0;
|
361 |
+
$volume = (isset($_REQUEST['_wcmp_player_volume'])) ? @floatval($_REQUEST['_wcmp_player_volume']) : 1;
|
362 |
$preload = (
|
363 |
isset($_REQUEST['_wcmp_preload']) &&
|
364 |
in_array($_REQUEST['_wcmp_preload'], array('none', 'metadata', 'auto'))
|
369 |
add_post_meta( $post_id, '_wcmp_enable_player', $enable_player, true );
|
370 |
add_post_meta( $post_id, '_wcmp_show_in', $show_in, true );
|
371 |
add_post_meta( $post_id, '_wcmp_player_layout', $player_style, true );
|
372 |
+
add_post_meta( $post_id, '_wcmp_player_volume', $volume, true );
|
373 |
add_post_meta( $post_id, '_wcmp_player_controls', $player_controls, true );
|
374 |
add_post_meta( $post_id, '_wcmp_player_title', $player_title, true );
|
375 |
add_post_meta( $post_id, '_wcmp_merge_in_grouped', $merge_grouped, true );
|
381 |
public function delete_post($post_id)
|
382 |
{
|
383 |
$post = get_post($post_id);
|
384 |
+
$post_types = $this->_get_post_types();
|
385 |
+
if ( !isset($post) || !in_array($post->post_type, $post_types) || !current_user_can( 'edit_post', $post_id ) ) return;
|
386 |
|
387 |
// Delete truncated version of the audio file
|
388 |
$this->_delete_truncated_files( $post_id );
|
391 |
delete_post_meta( $post_id, '_wcmp_show_in' );
|
392 |
delete_post_meta( $post_id, '_wcmp_merge_in_grouped' );
|
393 |
delete_post_meta( $post_id, '_wcmp_player_layout' );
|
394 |
+
delete_post_meta( $post_id, '_wcmp_player_volume' );
|
395 |
delete_post_meta( $post_id, '_wcmp_player_controls' );
|
396 |
delete_post_meta( $post_id, '_wcmp_player_title' );
|
397 |
delete_post_meta( $post_id, '_wcmp_preload' );
|
410 |
}
|
411 |
|
412 |
// Registering resources
|
413 |
+
wp_enqueue_style( 'wp-mediaelement' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
414 |
wp_enqueue_style( 'wp-mediaelement-skins', 'https://cdnjs.cloudflare.com/ajax/libs/mediaelement/2.23.5/mejs-skins.min.css' );
|
415 |
wp_enqueue_style( 'wcmp-style', plugin_dir_url(__FILE__).'css/style.css' );
|
416 |
wp_enqueue_script('jquery');
|
417 |
+
wp_enqueue_script('wp-mediaelement');
|
418 |
+
wp_enqueue_script('wcmp-script', plugin_dir_url(__FILE__).'js/public.js', array('jquery', 'wp-mediaelement'), '1.0.122');
|
419 |
|
420 |
$play_all = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr(
|
421 |
'_wcmp_play_all',
|
426 |
if(is_product())
|
427 |
{
|
428 |
global $post;
|
429 |
+
$post_types = $this->_get_post_types();
|
430 |
+
if(!empty($post) && in_array($post->post_type, $post_types))
|
431 |
{
|
432 |
$play_all = $GLOBALS[ 'WooCommerceMusicPlayer' ]->get_product_attr(
|
433 |
$post->ID,
|
464 |
if(!$this->_insert_player) return $output;
|
465 |
|
466 |
if(!is_array($atts)) $atts = array();
|
467 |
+
$post_types = $this->_get_post_types();
|
468 |
+
if(empty($atts['products_ids']) && !empty($post) && in_array($post->post_type, $post_types))
|
469 |
$atts['products_ids'] = $post->ID;
|
470 |
|
471 |
extract(
|
477 |
'player_style' => WCMP_DEFAULT_PLAYER_LAYOUT,
|
478 |
'controls' => 'track',
|
479 |
'layout' => 'new',
|
480 |
+
'cover' => 0,
|
481 |
+
'volume' => 1
|
482 |
),
|
483 |
$atts
|
484 |
)
|
486 |
|
487 |
// Typecasting variables.
|
488 |
$cover = @intval($cover);
|
489 |
+
$volume = @floatval($volume);
|
490 |
|
491 |
// get the produts ids
|
492 |
$products_ids = preg_replace( '/[^\d\,\*]/', '', $products_ids);
|
500 |
|
501 |
$current_post_id = !empty( $post ) ? (is_int($post) ? $post : $post->ID) : -1;
|
502 |
|
503 |
+
$query = 'SELECT posts.ID FROM '.$wpdb->posts.' AS posts, '.$wpdb->postmeta.' as postmeta WHERE posts.post_status="publish" AND posts.post_type IN ('.$this->_get_post_types(true).') AND posts.ID = postmeta.post_id AND postmeta.meta_key="_wcmp_enable_player" AND (postmeta.meta_value="yes" OR postmeta.meta_value="1")';
|
504 |
|
505 |
if( strpos( '*', $products_ids ) === false )
|
506 |
{
|
580 |
'media_type' => $file[ 'media_type' ],
|
581 |
'id' => $index,
|
582 |
'duration' => $duration,
|
583 |
+
'preload' => $preload,
|
584 |
+
'volume' => $volume
|
585 |
)
|
586 |
),
|
587 |
$product->ID,
|
626 |
'media_type' => $file[ 'media_type' ],
|
627 |
'id' => $index,
|
628 |
'duration' => $duration,
|
629 |
+
'preload' => $preload,
|
630 |
+
'volume' => $volume
|
631 |
)
|
632 |
),
|
633 |
$product->ID,
|
690 |
'media_type' => 'mp3',
|
691 |
'player_style' => WCMP_DEFAULT_PLAYER_LAYOUT,
|
692 |
'player_controls' => WCMP_DEFAULT_PLAYER_CONTROLS,
|
693 |
+
'duration' => false,
|
694 |
+
'volume' => 1
|
695 |
);
|
696 |
|
697 |
$args = array_merge( $default_args, $args );
|
703 |
$GLOBALS[ 'WooCommerceMusicPlayer' ]->get_global_attr( 'preload', 'none' )
|
704 |
);
|
705 |
|
706 |
+
return '<audio '.((!empty($args['volume'])) ? 'volume="'.esc_attr($args['volume']).'"': '').' '.$id.' preload="none" data-lazyloading="'.esc_attr($preload).'" class="wcmp-player '.esc_attr($args[ 'player_controls' ]).' '.esc_attr($args[ 'player_style' ]).'" '.((!empty($args['duration']))? 'data-duration="'.esc_attr($args['duration']).'"': '').'><source src="'.esc_url($audio_url).'" type="audio/'.esc_attr($args['media_type']).'" /></audio>';
|
707 |
|
708 |
} // End get_player
|
709 |
|
739 |
|
740 |
$player_style = $this->get_product_attr( $id, '_wcmp_player_layout', WCMP_DEFAULT_PLAYER_LAYOUT );
|
741 |
$player_controls = ( $this->get_product_attr( $id, '_wcmp_player_controls', WCMP_DEFAULT_PLAYER_CONTROLS ) != 'all' ) ? 'track' : '';
|
742 |
+
$volume = @floatval($this->get_product_attr( $id, '_wcmp_player_volume', WCMP_DEFAULT_PLAYER_VOLUME ));
|
743 |
|
744 |
$file = reset($files);
|
745 |
$index = key($files);
|
754 |
'player_style' => $player_style,
|
755 |
'media_type' => $file[ 'media_type' ],
|
756 |
'duration' => $duration,
|
757 |
+
'preload' => $preload,
|
758 |
+
'volume' => $volume
|
759 |
)
|
760 |
),
|
761 |
$id,
|
785 |
$preload = $this->get_product_attr($id, '_wcmp_preload', '');
|
786 |
$this->enqueue_resources();
|
787 |
$player_style = $this->get_product_attr( $id, '_wcmp_player_layout', WCMP_DEFAULT_PLAYER_LAYOUT );
|
788 |
+
$volume = @floatval($this->get_product_attr( $id, '_wcmp_player_volume', WCMP_DEFAULT_PLAYER_VOLUME ));
|
789 |
$player_controls = $this->get_product_attr( $id, '_wcmp_player_controls', WCMP_DEFAULT_PLAYER_CONTROLS );
|
790 |
$player_title = intval( $this->get_product_attr( $id, '_wcmp_player_title', WCMP_DEFAULT_PlAYER_TITLE ) );
|
791 |
$merge_grouped = intval( $this->get_product_attr( $id, '_wcmp_merge_in_grouped', 0 ) );
|
809 |
'player_style' => $player_style,
|
810 |
'media_type' => $file[ 'media_type' ],
|
811 |
'duration' => $duration,
|
812 |
+
'preload' => $preload,
|
813 |
+
'volume' => $volume
|
814 |
)
|
815 |
),
|
816 |
$id,
|
838 |
'player_controls' => ($player_controls != 'all' ) ? 'track' : '',
|
839 |
'media_type' => $file[ 'media_type' ],
|
840 |
'duration' => $duration,
|
841 |
+
'preload' => $preload,
|
842 |
+
'volume' => $volume
|
843 |
)
|
844 |
),
|
845 |
$id,
|
907 |
} // add_class_single_product_image
|
908 |
|
909 |
//******************** PRIVATE METHODS ************************
|
910 |
+
private function _get_post_types($mysql_in = false)
|
911 |
+
{
|
912 |
+
$post_types = array('product');
|
913 |
+
if(!empty($GLOBALS['wcmp_post_types']) && is_array($GLOBALS['wcmp_post_types']))
|
914 |
+
{
|
915 |
+
$post_types = $GLOBALS['wcmp_post_types'];
|
916 |
+
}
|
917 |
+
if($mysql_in) return '"'.implode('","', $post_types).'"';
|
918 |
+
return $post_types;
|
919 |
+
} // End _get_post_types
|
920 |
+
|
921 |
private function _load_addons()
|
922 |
{
|
923 |
$path = __DIR__.'/addons';
|
1046 |
if(!empty($file_data['file']))
|
1047 |
{
|
1048 |
$file_url = $file_data['file'];
|
1049 |
+
if(!empty($file_data['play_src']) || $this->_is_playlist($file_url)) return $file_url; // Play src audio file, without copying or truncate it.
|
1050 |
|
1051 |
// If the playback of music are tracked with Google Analytics, should not be loaded directly the audio files.
|
1052 |
$_wcmp_analytics_property = trim($this->get_global_attr('_wcmp_analytics_property', ''));
|
1085 |
|
1086 |
} // End _delete_truncated_files
|
1087 |
|
1088 |
+
/**
|
1089 |
+
* Check if the file is an m3u or m3u8 playlist
|
1090 |
+
*/
|
1091 |
+
private function _is_playlist( $file_path )
|
1092 |
+
{
|
1093 |
+
return preg_match('/\.(m3u|m3u8)$/i', $file_path);
|
1094 |
+
} // End _is_playlist
|
1095 |
+
|
1096 |
/**
|
1097 |
* Check if the file is an audio file and return its type or false
|
1098 |
*/
|
1099 |
private function _is_audio( $file_path )
|
1100 |
{
|
1101 |
+
if( preg_match( '/\.(mp3|ogg|oga|wav|wma|mp4)$/i', $file_path, $match ) ) return $match[ 1 ];
|
1102 |
+
if( preg_match( '/\.m4a$/i', $file_path) ) return 'mp4';
|
1103 |
+
if( $this->_is_playlist($file_path)) return 'hls';
|
1104 |
|
1105 |
// From troubleshoot
|
1106 |
$extension = pathinfo($file_path,PATHINFO_EXTENSION);
|
widgets/playlist_widget.php
CHANGED
@@ -21,10 +21,11 @@ if( !class_exists( 'WCMP_PLAYLIST_WIDGET' ) )
|
|
21 |
|
22 |
function form($instance)
|
23 |
{
|
24 |
-
$instance = wp_parse_args( (array) $instance, array( 'title' => '', 'products_ids' => '', 'highlight_current_product' => 0, 'continue_playing' => 0, 'player_style' => WCMP_DEFAULT_PLAYER_LAYOUT ) );
|
25 |
|
26 |
$title = sanitize_text_field($instance['title']);
|
27 |
$products_ids = sanitize_text_field($instance['products_ids']);
|
|
|
28 |
$highlight_current_product = sanitize_text_field($instance['highlight_current_product']);
|
29 |
$continue_playing = sanitize_text_field($instance['continue_playing']);
|
30 |
$player_style = sanitize_text_field($instance['player_style']);
|
@@ -58,6 +59,9 @@ if( !class_exists( 'WCMP_PLAYLIST_WIDGET' ) )
|
|
58 |
_e( 'Enter the ID of products separated by comma, or a * symbol to includes all products in the playlist.', 'music-player-for-woocommerce' );
|
59 |
?>
|
60 |
</p>
|
|
|
|
|
|
|
61 |
<p>
|
62 |
<label for="<?php echo $this->get_field_id('playlist_layout'); ?>"><?php _e( 'Playlist layout', 'music-player-for-woocommerce' ); ?>: </label>
|
63 |
</p>
|
@@ -108,6 +112,7 @@ if( !class_exists( 'WCMP_PLAYLIST_WIDGET' ) )
|
|
108 |
$instance = $old_instance;
|
109 |
$instance['title'] = sanitize_text_field($new_instance['title']);
|
110 |
$instance['products_ids'] = sanitize_text_field($new_instance['products_ids']);
|
|
|
111 |
$instance['highlight_current_product'] = sanitize_text_field($new_instance['highlight_current_product']);
|
112 |
$instance['continue_playing'] = sanitize_text_field($new_instance['continue_playing']);
|
113 |
$instance['player_style'] = sanitize_text_field($new_instance['player_style']);
|
@@ -132,16 +137,18 @@ if( !class_exists( 'WCMP_PLAYLIST_WIDGET' ) )
|
|
132 |
|
133 |
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
134 |
|
135 |
-
$
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
'layout' => (!empty($instance['playlist_layout'])) ? $instance['playlist_layout'] : 'new'
|
142 |
-
)
|
143 |
);
|
144 |
|
|
|
|
|
|
|
|
|
145 |
if( strlen( $output ) == 0 ) return;
|
146 |
|
147 |
print $before_widget;
|
21 |
|
22 |
function form($instance)
|
23 |
{
|
24 |
+
$instance = wp_parse_args( (array) $instance, array( 'title' => '', 'products_ids' => '', 'volume' => '', 'highlight_current_product' => 0, 'continue_playing' => 0, 'player_style' => WCMP_DEFAULT_PLAYER_LAYOUT ) );
|
25 |
|
26 |
$title = sanitize_text_field($instance['title']);
|
27 |
$products_ids = sanitize_text_field($instance['products_ids']);
|
28 |
+
$volume = sanitize_text_field($instance['volume']);
|
29 |
$highlight_current_product = sanitize_text_field($instance['highlight_current_product']);
|
30 |
$continue_playing = sanitize_text_field($instance['continue_playing']);
|
31 |
$player_style = sanitize_text_field($instance['player_style']);
|
59 |
_e( 'Enter the ID of products separated by comma, or a * symbol to includes all products in the playlist.', 'music-player-for-woocommerce' );
|
60 |
?>
|
61 |
</p>
|
62 |
+
<p>
|
63 |
+
<label><?php _e('Volume (enter a number between 0 and 1)', 'music-player-for-woocommerce'); ?>: <input class="widefat" name="<?php echo $this->get_field_name('volume'); ?>" type="number" min="0" max="1" step="0.01" value="<?php echo esc_attr($volume); ?>" /></label>
|
64 |
+
</p>
|
65 |
<p>
|
66 |
<label for="<?php echo $this->get_field_id('playlist_layout'); ?>"><?php _e( 'Playlist layout', 'music-player-for-woocommerce' ); ?>: </label>
|
67 |
</p>
|
112 |
$instance = $old_instance;
|
113 |
$instance['title'] = sanitize_text_field($new_instance['title']);
|
114 |
$instance['products_ids'] = sanitize_text_field($new_instance['products_ids']);
|
115 |
+
$instance['volume'] = sanitize_text_field($new_instance['volume']);
|
116 |
$instance['highlight_current_product'] = sanitize_text_field($new_instance['highlight_current_product']);
|
117 |
$instance['continue_playing'] = sanitize_text_field($new_instance['continue_playing']);
|
118 |
$instance['player_style'] = sanitize_text_field($new_instance['player_style']);
|
137 |
|
138 |
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
139 |
|
140 |
+
$attrs = array(
|
141 |
+
'products_ids' => $instance['products_ids'],
|
142 |
+
'highlight_current_product' => $instance['highlight_current_product'],
|
143 |
+
'continue_playing' => $instance['continue_playing'],
|
144 |
+
'player_style' => $instance['player_style'],
|
145 |
+
'layout' => (!empty($instance['playlist_layout'])) ? $instance['playlist_layout'] : 'new'
|
|
|
|
|
146 |
);
|
147 |
|
148 |
+
if(!empty($instance['volume']) && ($volume = @floatval($instance['volume'])) != 0) $attrs['volume'] = min(1,$volume);
|
149 |
+
|
150 |
+
$output = $GLOBALS[ 'WooCommerceMusicPlayer' ]->replace_playlist_shortcode($attrs);
|
151 |
+
|
152 |
if( strlen( $output ) == 0 ) return;
|
153 |
|
154 |
print $before_widget;
|
widgets/playlist_widget/css/style.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
.wcmp-widget-playlist{list-style: none; margin:0 !important; padding:0 !important;}
|
2 |
.wcmp-widget-playlist ul{margin: 0; padding: 0;}
|
3 |
.wcmp-widget-playlist *{word-break:normal !important;}
|
4 |
-
.controls-track .wcmp-widget-playlist-item{display:
|
5 |
.wcmp-widget-playlist-item .mejs-controls{top: 0;}
|
6 |
.wcmp-odd-product{background-color:#FAFAFA; border-top: 1px solid #DADADA; border-bottom: 1px solid #DADADA;}
|
7 |
.wcmp-current-product{background-color:#FFFFD7;}
|
@@ -21,7 +21,7 @@
|
|
21 |
.wcmp-widget-product-purchase a{background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
|
22 |
display:inline-block; width:24px; height:24px;
|
23 |
}
|
24 |
-
.wcmp-widget-product .wcmp-widget-product-file{display:
|
25 |
|
26 |
.wcmp-widget-product-files{display: table;width:100%;}
|
27 |
.wcmp-widget-feature-image{display:table-cell;max-width:80px;margin-right:10px;}
|
1 |
.wcmp-widget-playlist{list-style: none; margin:0 !important; padding:0 !important;}
|
2 |
.wcmp-widget-playlist ul{margin: 0; padding: 0;}
|
3 |
.wcmp-widget-playlist *{word-break:normal !important;}
|
4 |
+
.controls-track .wcmp-widget-playlist-item{display: flex; align-items:center; line-height:normal;padding: 5px 0 !important;clear:both;}
|
5 |
.wcmp-widget-playlist-item .mejs-controls{top: 0;}
|
6 |
.wcmp-odd-product{background-color:#FAFAFA; border-top: 1px solid #DADADA; border-bottom: 1px solid #DADADA;}
|
7 |
.wcmp-current-product{background-color:#FFFFD7;}
|
21 |
.wcmp-widget-product-purchase a{background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
|
22 |
display:inline-block; width:24px; height:24px;
|
23 |
}
|
24 |
+
.wcmp-widget-product .wcmp-widget-product-file{display:flex;align-items:center;margin-bottom:5px;}
|
25 |
|
26 |
.wcmp-widget-product-files{display: table;width:100%;}
|
27 |
.wcmp-widget-feature-image{display:table-cell;max-width:80px;margin-right:10px;}
|