player_options.php
391 lines
| 1 | <?php |
| 2 | if ( ! defined( 'WCMP_PLUGIN_URL' ) ) { |
| 3 | echo 'Direct access not allowed.'; |
| 4 | exit; } |
| 5 | |
| 6 | // include resources |
| 7 | wp_enqueue_style( 'wcmp-admin-style', plugin_dir_url( __FILE__ ) . '../css/style.admin.css', array(), '1.0.175' ); |
| 8 | |
| 9 | if ( |
| 10 | isset( $_REQUEST['post'] ) && |
| 11 | is_numeric( $_REQUEST['post'] ) && |
| 12 | ( $post_id = intval( $_REQUEST['post'] ) ) && |
| 13 | ( $check_post = get_post( $post_id ) ) |
| 14 | ) { |
| 15 | $post = $check_post; |
| 16 | } |
| 17 | |
| 18 | if ( empty( $post ) ) { |
| 19 | global $post; |
| 20 | } |
| 21 | |
| 22 | $enable_player = $GLOBALS['WooCommerceMusicPlayer']->get_product_attr( $post->ID, '_wcmp_enable_player', true ); |
| 23 | $show_in = $GLOBALS['WooCommerceMusicPlayer']->get_product_attr( $post->ID, '_wcmp_show_in', 'all' ); |
| 24 | $player_style = $GLOBALS['WooCommerceMusicPlayer']->get_product_attr( $post->ID, '_wcmp_player_layout', WCMP_DEFAULT_PLAYER_LAYOUT ); |
| 25 | $single_player = $GLOBALS['WooCommerceMusicPlayer']->get_product_attr( $post->ID, '_wcmp_single_player', WCMP_DEFAULT_SINGLE_PLAYER ); |
| 26 | $volume = $GLOBALS['WooCommerceMusicPlayer']->get_product_attr( $post->ID, '_wcmp_player_volume', WCMP_DEFAULT_PLAYER_VOLUME ); |
| 27 | $player_controls = $GLOBALS['WooCommerceMusicPlayer']->get_product_attr( $post->ID, '_wcmp_player_controls', WCMP_DEFAULT_PLAYER_CONTROLS ); |
| 28 | $player_title = intval( $GLOBALS['WooCommerceMusicPlayer']->get_product_attr( $post->ID, '_wcmp_player_title', 1 ) ); |
| 29 | $merge_grouped = intval( $GLOBALS['WooCommerceMusicPlayer']->get_product_attr( $post->ID, '_wcmp_merge_in_grouped', 0 ) ); |
| 30 | $play_all = intval( |
| 31 | $GLOBALS['WooCommerceMusicPlayer']->get_product_attr( |
| 32 | $post->ID, |
| 33 | '_wcmp_play_all', |
| 34 | // This option is only for compatibility with versions previous to 1.0.28 |
| 35 | $GLOBALS['WooCommerceMusicPlayer']->get_product_attr( |
| 36 | $post->ID, |
| 37 | 'play_all', |
| 38 | 0 |
| 39 | ) |
| 40 | ) |
| 41 | ); |
| 42 | $loop = intval( $GLOBALS['WooCommerceMusicPlayer']->get_product_attr( $post->ID, '_wcmp_loop', 0 ) ); |
| 43 | $preload = $GLOBALS['WooCommerceMusicPlayer']->get_product_attr( |
| 44 | $post->ID, |
| 45 | '_wcmp_preload', |
| 46 | $GLOBALS['WooCommerceMusicPlayer']->get_product_attr( |
| 47 | $post->ID, |
| 48 | 'preload', |
| 49 | 'none' |
| 50 | ) |
| 51 | ); |
| 52 | $on_cover = intval( $GLOBALS['WooCommerceMusicPlayer']->get_product_attr( $post->ID, '_wcmp_on_cover', 0 ) ); |
| 53 | $visualizer = intval( $GLOBALS['WooCommerceMusicPlayer']->get_product_attr( $post->ID, '_wcmp_visualizer', 0 ) ); |
| 54 | ?> |
| 55 | <input type="hidden" name="wcmp_nonce" value="<?php echo esc_attr( wp_create_nonce( 'wcmp_updating_product' ) ); ?>" /> |
| 56 | <table class="widefat" style="border-left:0;border-right:0;border-bottom:0;padding-bottom:0;"> |
| 57 | <tr> |
| 58 | <td> |
| 59 | <?php if ( current_user_can( 'manage_options' ) ) : ?> |
| 60 | <div class="wcmp-highlight-box"> |
| 61 | <?php |
| 62 | _e( '<p>The player uses the audio files associated with the product.</p>', 'music-player-for-woocommerce' ); // phpcs:ignore WordPress.Security.EscapeOutput |
| 63 | _e( '<hr style="border: 0;border-top: 1px solid #E6DB55;"><p style="font-size:1.2em;"><i>The free distribution of the "Music Player for WooCommerce" plugin requires configuring the product as downloadable and including an audio file in the list of files to download.</i></p><hr style="border: 0;border-top: 1px solid #E6DB55;">', 'music-player-for-woocommerce' ); // phpcs:ignore WordPress.Security.EscapeOutput |
| 64 | |
| 65 | if ( defined( 'ELEMENTOR_VERSION' ) ) { |
| 66 | _e( '<p style="font-size:1.1em;"><i>If you designed the products template with <b>Elementor</b>, insert the playlist shortcode in the template without the <i>products_ids</i> attribute:<br><b>[wcmp-playlist player_style="mejs-classic"]</b>.</i></p><hr style="border: 0;border-top: 1px solid #E6DB55;">', 'music-player-for-woocommerce' ); // phpcs:ignore WordPress.Security.EscapeOutput |
| 67 | } |
| 68 | |
| 69 | _e( '<p>If you want to protect the audio files, tick the "Protect file" checkbox. In this case, the plugin will generate a shortened version of the audio files for demo purposes. The plugin determines the size of the demo audio files based on the value entered in the <b>"Percentage of audio used for protected playbacks"</b> attribute.</p>', 'music-player-for-woocommerce' ); // phpcs:ignore WordPress.Security.EscapeOutput |
| 70 | ?> |
| 71 | <p><?php esc_html_e( 'The security feature and particular files for demo are only available in the PRO version of the plugin', 'music-player-for-woocommerce' ); ?>. <a target="_blank" href="https://wcmp.dwbooster.com/download"><?php esc_html_e( 'CLICK HERE TO GET THE PRO VERSION OF THE PLUGIN', 'music-player-for-woocommerce' ); ?></a></p> |
| 72 | <p><?php _e( 'For testing the premium version of the plugin, visit the online demo:<br/> <a href="https://demos.dwbooster.com/music-player-for-woocommerce/wp-login.php" target="_blank">Administration area: Click to access the administration area demo</a><br/><a href="https://demos.dwbooster.com/music-player-for-woocommerce/" target="_blank">Public page: Click to visit the WooCommerce Store</a>', 'music-player-for-woocommerce' ); // phpcs:ignore WordPress.Security.EscapeOutput ?></p> |
| 73 | </div> |
| 74 | <?php endif; ?> |
| 75 | <div class="wcmp-highlight-box"> |
| 76 | <div id="wcmp_tips_header"> |
| 77 | <h3 style="margin-top:2px;margin-bottom:5px;cursor:pointer;" onclick="jQuery('#wcmp_tips_body').toggle();"> |
| 78 | <?php esc_html_e( '[+|-] Tips', 'music-player-for-woocommerce' ); ?> |
| 79 | </h3> |
| 80 | </div> |
| 81 | <div id="wcmp_tips_body"> |
| 82 | <div class="wcmp-highlight-box"> |
| 83 | <a class="wcmp-tip"href="javascript:void(0);" onclick="jQuery(this).next('.wcmp-tip-text').toggle();"> |
| 84 | <?php esc_html_e( '[+|-] Using the audio files stored on Google Drive', 'music-player-for-woocommerce' ); ?> |
| 85 | </a> |
| 86 | <div class="wcmp-tip-text"> |
| 87 | <ul> |
| 88 | <li> |
| 89 | <p> - |
| 90 | <?php |
| 91 | esc_html_e( |
| 92 | 'Go to Drive, press the right click on the file to use, and select the option: ', |
| 93 | 'music-player-for-woocommerce' |
| 94 | ); |
| 95 | ?><b>"Get Shareable Link"</b> |
| 96 | </p> |
| 97 | <p> |
| 98 | <?php |
| 99 | esc_html_e( |
| 100 | 'The previous action will generate an url with the structure: ', |
| 101 | 'music-player-for-woocommerce' |
| 102 | ); |
| 103 | ?><b>https://drive.google.com/open?id=FILE_ID</b> |
| 104 | </p> |
| 105 | </li> |
| 106 | <li> |
| 107 | <p> - |
| 108 | <?php |
| 109 | esc_html_e( |
| 110 | 'Knowing the FILE_ID, extracted from the previous URL, enter the URL below, into the WooCommerce product, to allow the Music Player accessing to it:', |
| 111 | 'music-player-for-woocommerce' |
| 112 | ); |
| 113 | ?> |
| 114 | </p> |
| 115 | <p> |
| 116 | <b>https://drive.google.com/uc?export=download&id=FILE_ID&.mp3</b> |
| 117 | </p> |
| 118 | <p> |
| 119 | <?php |
| 120 | _e( '<b>Note:</b> Pay attention to the use of the fake parameter: <b>&.mp3</b> as the last one in the URL', 'music-player-for-woocommerce' ); // phpcs:ignore WordPress.Security.EscapeOutput |
| 121 | ?> |
| 122 | </p> |
| 123 | </li> |
| 124 | </div> |
| 125 | </div> |
| 126 | <div class="wcmp-highlight-box"> |
| 127 | <a class="wcmp-tip"href="javascript:void(0);" onclick="jQuery(this).next('.wcmp-tip-text').toggle();"> |
| 128 | <?php esc_html_e( '[+|-] Using the audio files stored on DropBox', 'music-player-for-woocommerce' ); ?> |
| 129 | </a> |
| 130 | <div class="wcmp-tip-text"> |
| 131 | <ul> |
| 132 | <li> |
| 133 | <p> - |
| 134 | <?php |
| 135 | esc_html_e( |
| 136 | 'Sign in to ', |
| 137 | 'music-player-for-woocommerce' |
| 138 | ); |
| 139 | ?><a href="https://www.dropbox.com/login" target="_blank">dropbox.com </a> |
| 140 | </p> |
| 141 | </li> |
| 142 | <li> |
| 143 | <p> - |
| 144 | <?php |
| 145 | _e( "Hover your cursor over the file or folder you'd like to share and click <b>Share</b> when it appears.", 'music-player-for-woocommerce' ); // phpcs:ignore WordPress.Security.EscapeOutput |
| 146 | ?> |
| 147 | </p> |
| 148 | </li> |
| 149 | <li> |
| 150 | <p> - |
| 151 | <?php |
| 152 | esc_html_e( |
| 153 | "If a link hasn't been created, click Create a link. (If a link was already created, click Copy link)", |
| 154 | 'music-player-for-woocommerce' |
| 155 | ); |
| 156 | ?> |
| 157 | </p> |
| 158 | <p> |
| 159 | <?php |
| 160 | esc_html_e( |
| 161 | 'The link structure would be similar to:', |
| 162 | 'music-player-for-woocommerce' |
| 163 | ); |
| 164 | ?><br> https://www.dropbox.com/s/rycvgn8iokfedmo/file.mp3?dl=0 |
| 165 | </p> |
| 166 | </li> |
| 167 | <li> |
| 168 | <p> - |
| 169 | <?php |
| 170 | esc_html_e( 'Enter the URL into the WooCommerce product with the following structure:', 'music-player-for-woocommerce' ); |
| 171 | ?><br> https://www.dropbox.com/s/rycvgn8iokfedmo/file.mp3?dl=1&.mp3 |
| 172 | </p> |
| 173 | <p> |
| 174 | <?php |
| 175 | _e( '<b>Note:</b> Pay attention to the use of the fake parameter: <b>&.mp3</b> as the last one in the URL. Furthermore, the parameter <b>dl=0</b>, has been modified as <b>dl=1</b>', 'music-player-for-woocommerce' ); // phpcs:ignore WordPress.Security.EscapeOutput |
| 176 | ?> |
| 177 | </p> |
| 178 | </li> |
| 179 | </div> |
| 180 | </div> |
| 181 | </div> |
| 182 | </div> |
| 183 | </td> |
| 184 | </tr> |
| 185 | <tr> |
| 186 | <td> |
| 187 | <table class="widefat wcmp-player-settings" style="border:1px solid #e1e1e1;"> |
| 188 | <tr> |
| 189 | <td><label for="_wcmp_enable_player"><?php esc_html_e( 'Include music player', 'music-player-for-woocommerce' ); ?></label></td> |
| 190 | <td><div class="wcmp-tooltip"><span class="wcmp-tooltiptext"><?php esc_html_e( 'The player is shown only if the product is "downloadable", and there is at least an audio file between the "Downloadable files"', 'music-player-for-woocommerce' ); ?></span><input aria-label="<?php esc_attr_e( 'Enable player', 'music-player-for-woocommerce' ); ?>" type="checkbox" id="_wcmp_enable_player" name="_wcmp_enable_player" <?php echo ( ( $enable_player ) ? 'checked' : '' ); ?> /></div></td> |
| 191 | </tr> |
| 192 | <tr> |
| 193 | <td><?php esc_html_e( 'Include in', 'music-player-for-woocommerce' ); ?></td> |
| 194 | <td> |
| 195 | <label><input aria-label="<?php esc_attr_e( 'Include on products pages', 'music-player-for-woocommerce' ); ?>" type="radio" name="_wcmp_show_in" value="single" <?php echo ( ( 'single' == $show_in ) ? 'checked' : '' ); ?> /> |
| 196 | <?php _e( 'single-entry pages <i>(Product\'s page only)</i>', 'music-player-for-woocommerce' ); // phpcs:ignore WordPress.Security.EscapeOutput ?></label><br /> |
| 197 | |
| 198 | <label><input aria-label="<?php esc_attr_e( 'Include on multiple-entry pages', 'music-player-for-woocommerce' ); ?>" type="radio" name="_wcmp_show_in" value="multiple" <?php echo ( ( 'multiple' == $show_in ) ? 'checked' : '' ); ?> /> |
| 199 | <?php _e( 'multiple entries pages <i>(Shop pages, archive pages, but not in the product\'s page)</i>', 'music-player-for-woocommerce' ); // phpcs:ignore WordPress.Security.EscapeOutput ?></label><br /> |
| 200 | |
| 201 | <label><input aria-label="<?php esc_attr_e( 'Include on product and multiple-entry pages', 'music-player-for-woocommerce' ); ?>" type="radio" name="_wcmp_show_in" value="all" <?php echo ( ( 'all' == $show_in ) ? 'checked' : '' ); ?> /> |
| 202 | <?php _e( 'all pages <i>(with single or multiple-entries)</i>', 'music-player-for-woocommerce' ); // phpcs:ignore WordPress.Security.EscapeOutput ?></label> |
| 203 | </td> |
| 204 | </tr> |
| 205 | <tr> |
| 206 | <td><label for="_wcmp_merge_in_grouped"><?php esc_html_e( 'Merge in grouped products', 'music-player-for-woocommerce' ); ?></label></td> |
| 207 | <td><input aria-label="<?php esc_attr_e( 'Merge in grouped products', 'music-player-for-woocommerce' ); ?>" type="checkbox" id="_wcmp_merge_in_grouped" name="_wcmp_merge_in_grouped" <?php echo ( ( $merge_grouped ) ? 'checked' : '' ); ?> /><br /><em><?php esc_html_e( 'In grouped products, display the "Add to cart" buttons and quantity fields in the players rows', 'music-player-for-woocommerce' ); ?></em></td> |
| 208 | </tr> |
| 209 | <tr> |
| 210 | <td valign="top"><?php esc_html_e( 'Player layout', 'music-player-for-woocommerce' ); ?></td> |
| 211 | <td> |
| 212 | <table> |
| 213 | <tr> |
| 214 | <td><input aria-label="<?php esc_attr_e( 'Skin 1', 'music-player-for-woocommerce' ); ?>" id="_wcmp_player_layout_01" name="_wcmp_player_layout" type="radio" value="mejs-classic" <?php echo ( ( 'mejs-classic' == $player_style ) ? 'checked' : '' ); ?> /></td> |
| 215 | <td style="width:100%;padding-left:20px;"><label for="_wcmp_player_layout_01"><img alt="<?php esc_attr_e( 'Skin 1', 'music-player-for-woocommerce' ); ?>" src="<?php print esc_url( WCMP_PLUGIN_URL ); ?>/views/assets/skin1.png" /></label></td> |
| 216 | </tr> |
| 217 | |
| 218 | <tr> |
| 219 | <td><input aria-label="<?php esc_attr_e( 'Skin 2', 'music-player-for-woocommerce' ); ?>" id="_wcmp_player_layout_02" name="_wcmp_player_layout" type="radio" value="mejs-ted" <?php echo ( ( 'mejs-ted' == $player_style ) ? 'checked' : '' ); ?> /></td> |
| 220 | <td style="width:100%;padding-left:20px;"><label for="_wcmp_player_layout_02"><img alt="<?php esc_attr_e( 'Skin 2', 'music-player-for-woocommerce' ); ?>" src="<?php print esc_url( WCMP_PLUGIN_URL ); ?>/views/assets/skin2.png" /></label></td> |
| 221 | </tr> |
| 222 | |
| 223 | <tr> |
| 224 | <td><input aria-label="<?php esc_attr_e( 'Skin 3', 'music-player-for-woocommerce' ); ?>" id="_wcmp_player_layout_03" name="_wcmp_player_layout" type="radio" value="mejs-wmp" <?php echo ( ( 'mejs-wmp' == $player_style ) ? 'checked' : '' ); ?> /></td> |
| 225 | <td style="width:100%;padding-left:20px;"><label for="_wcmp_player_layout_03"><img alt="<?php esc_attr_e( 'Skin 3', 'music-player-for-woocommerce' ); ?>" src="<?php print esc_url( WCMP_PLUGIN_URL ); ?>/views/assets/skin3.png" /></label></td> |
| 226 | </tr> |
| 227 | |
| 228 | <tr> |
| 229 | <td><input aria-label="<?php esc_attr_e( 'Custom Skin', 'music-player-for-woocommerce' ); ?>" id="_wcmp_player_layout_04" name="_wcmp_player_layout" type="radio" value="wcmp-custom-skin" <?php echo ( ( 'wcmp-custom-skin' == $player_style ) ? 'checked' : '' ); ?> /></td> |
| 230 | <td style="width:100%;padding-left:20px;"><label for="_wcmp_player_layout_04"><b><?php esc_attr_e( 'Custom Skin', 'music-player-for-woocommerce' ); ?></b> (<a href="<?php print esc_attr( admin_url( 'options-general.php?page=music-player-for-woocommerce-settings#wcmp-custom-skin-settings' ) ); ?>" target="_blank"><?php esc_html_e( 'Configure custom skin', 'music-player-for-woocommerce' ); ?></a>)</label></td> |
| 231 | </tr> |
| 232 | |
| 233 | <tr> |
| 234 | <td colspan="2" style="border-top: 1px solid #DADADA;border-bottom: 1px solid #DADADA;"><label><input aria-label="<?php esc_attr_e( 'Show a single player instead of one player per audio file.', 'music-player-for-woocommerce' ); ?>" name="_wcmp_single_player" type="checkbox" <?php echo ( ( $single_player ) ? 'checked' : '' ); ?> /> |
| 235 | <span style="padding-left:20px;"><?php esc_html_e( 'Show a single player instead of one player per audio file.', 'music-player-for-woocommerce' ); ?></span></label> |
| 236 | </td> |
| 237 | </tr> |
| 238 | </table> |
| 239 | </td> |
| 240 | </tr> |
| 241 | <tr> |
| 242 | <td> |
| 243 | <?php esc_html_e( 'Preload', 'music-player-for-woocommerce' ); ?> |
| 244 | </td> |
| 245 | <td> |
| 246 | <label><input aria-label="<?php esc_attr_e( 'Preload - none', 'music-player-for-woocommerce' ); ?>" type="radio" name="_wcmp_preload" value="none" <?php if ( 'none' == $preload ) { |
| 247 | echo 'CHECKED';} ?> /> None</label><br /> |
| 248 | <label><input aria-label="<?php esc_attr_e( 'Preload - metadata', 'music-player-for-woocommerce' ); ?>" type="radio" name="_wcmp_preload" value="metadata" <?php if ( 'metadata' == $preload ) { |
| 249 | echo 'CHECKED';} ?> /> Metadata</label><br /> |
| 250 | <label><input aria-label="<?php esc_attr_e( 'Preload - auto', 'music-player-for-woocommerce' ); ?>" type="radio" name="_wcmp_preload" value="auto" <?php if ( 'auto' == $preload ) { |
| 251 | echo 'CHECKED';} ?> /> Auto</label><br /> |
| 252 | </td> |
| 253 | </tr> |
| 254 | <tr> |
| 255 | <td> |
| 256 | <label for="_wcmp_play_all"><?php esc_html_e( 'Play all', 'music-player-for-woocommerce' ); ?></label> |
| 257 | </td> |
| 258 | <td> |
| 259 | <input aria-label="<?php esc_attr_e( 'Play all', 'music-player-for-woocommerce' ); ?>" type="checkbox" id="_wcmp_play_all" name="_wcmp_play_all" <?php if ( ! empty( $play_all ) ) { |
| 260 | echo 'CHECKED';} ?> /> |
| 261 | </td> |
| 262 | </tr> |
| 263 | <tr> |
| 264 | <td> |
| 265 | <label for="_wcmp_loop"><?php esc_html_e( 'Loop', 'music-player-for-woocommerce' ); ?></label> |
| 266 | </td> |
| 267 | <td> |
| 268 | <input aria-label="<?php esc_attr_e( 'Loop', 'music-player-for-woocommerce' ); ?>" type="checkbox" id="_wcmp_loop" name="_wcmp_loop" <?php if ( ! empty( $loop ) ) { |
| 269 | echo 'CHECKED';} ?> /> |
| 270 | </td> |
| 271 | </tr> |
| 272 | <tr> |
| 273 | <td><?php esc_html_e( 'Player volume (from 0 to 1)', 'music-player-for-woocommerce' ); ?></td> |
| 274 | <td> |
| 275 | <input aria-label="<?php esc_attr_e( 'Player volume', 'music-player-for-woocommerce' ); ?>" type="number" name="_wcmp_player_volume" min="0" max="1" step="0.01" value="<?php echo esc_attr( $volume ); ?>" /> |
| 276 | </td> |
| 277 | </tr> |
| 278 | <tr> |
| 279 | <td><?php esc_html_e( 'Player controls', 'music-player-for-woocommerce' ); ?></td> |
| 280 | <td> |
| 281 | <hr> |
| 282 | <label><input aria-label="<?php esc_attr_e( 'Play/pause button', 'music-player-for-woocommerce' ); ?>" type="radio" name="_wcmp_player_controls" value="button" <?php echo ( ( 'button' == $player_controls ) ? 'checked' : '' ); ?> /> <?php esc_html_e( 'the play/pause button only', 'music-player-for-woocommerce' ); ?></label><br /> |
| 283 | <label><input aria-label="<?php esc_attr_e( 'All controls', 'music-player-for-woocommerce' ); ?>" type="radio" name="_wcmp_player_controls" value="all" <?php echo ( ( 'all' == $player_controls ) ? 'checked' : '' ); ?> /> <?php esc_html_e( 'all controls', 'music-player-for-woocommerce' ); ?></label><br /> |
| 284 | <label><input aria-label="<?php esc_attr_e( 'Depending on context', 'music-player-for-woocommerce' ); ?>" type="radio" name="_wcmp_player_controls" value="default" <?php echo ( ( 'default' == $player_controls ) ? 'checked' : '' ); ?> /> <?php esc_html_e( 'the play/pause button only, or all controls depending on context', 'music-player-for-woocommerce' ); ?></label> |
| 285 | <div class="wcmp-on-cover" style="margin-top:10px;"> |
| 286 | <label><input aria-label="<?php esc_attr_e( 'On cover', 'music-player-for-woocommerce' ); ?>" type="checkbox" name="_wcmp_player_on_cover" value="default" <?php |
| 287 | echo ( ( ! empty( $on_cover ) && ( 'button' == $player_controls || 'default' == $player_controls ) ) ? 'checked' : '' ); |
| 288 | ?> /> |
| 289 | <?php esc_html_e( 'for play/pause button players display them on cover images.', 'music-player-for-woocommerce' ); ?> |
| 290 | <i> |
| 291 | <?php |
| 292 | esc_html_e( '(This feature is experimental, and will depend on the theme active on the website.)', 'music-player-for-woocommerce' ); |
| 293 | ?> |
| 294 | </i></label> |
| 295 | </div> |
| 296 | <div class="wcmp-visualizer" style="margin-top:10px;"> |
| 297 | <label><input aria-label="<?php esc_attr_e( 'Visualizer control', 'music-player-for-woocommerce' ); ?>" type="checkbox" name="_wcmp_visualizer" value="ok" <?php echo ! empty( $visualizer ) ? 'checked' : ''; ?> /> |
| 298 | <?php esc_html_e( 'For "all controls" mode, display the visualizer component over the player.', 'music-player-for-woocommerce' ); ?> |
| 299 | </label> |
| 300 | </div> |
| 301 | <hr> |
| 302 | </td> |
| 303 | </tr> |
| 304 | <tr> |
| 305 | <td><label for="_wcmp_player_title"><?php esc_html_e( 'Display the player\'s title', 'music-player-for-woocommerce' ); ?></label></td> |
| 306 | <td> |
| 307 | <input aria-label="<?php esc_attr_e( 'Display the player title', 'music-player-for-woocommerce' ); ?>" type="checkbox" id="_wcmp_player_title" name="_wcmp_player_title" <?php echo ( ( ! empty( $player_title ) ) ? 'checked' : '' ); ?> /> |
| 308 | </td> |
| 309 | </tr> |
| 310 | <tr> |
| 311 | <td colspan="2" style="color:red;"><?php esc_html_e( 'The security feature is only available in the PRO version of the plugin', 'music-player-for-woocommerce' ); ?>. <a target="_blank" href="https://wcmp.dwbooster.com"><?php esc_html_e( 'CLICK HERE TO GET THE PRO VERSION OF THE PLUGIN', 'music-player-for-woocommerce' ); ?></a></td> |
| 312 | </tr> |
| 313 | <tr> |
| 314 | <td style="color:#DDDDDD;"><?php esc_html_e( 'Protect the file', 'music-player-for-woocommerce' ); ?></td> |
| 315 | <td><input aria-label="<?php esc_attr_e( 'Protect the file', 'music-player-for-woocommerce' ); ?>" type="checkbox" DISABLED /></td> |
| 316 | </tr> |
| 317 | <tr valign="top"> |
| 318 | <td style="color:#DDDDDD;"><?php esc_html_e( 'Percent of audio used for protected playbacks', 'music-player-for-woocommerce' ); ?></td> |
| 319 | <td style="color:#DDDDDD;"> |
| 320 | <input aria-label="<?php esc_attr_e( 'Percent of audio used for protected playbacks', 'music-player-for-woocommerce' ); ?>" type="number" DISABLED /> % <br /><br /> |
| 321 | <em><?php esc_html_e( 'To prevent unauthorized copying of audio files, the files will be partially accessible', 'music-player-for-woocommerce' ); ?></em> |
| 322 | </td> |
| 323 | </tr> |
| 324 | </table> |
| 325 | </td> |
| 326 | </tr> |
| 327 | </table> |
| 328 | <table class="widefat" style="border:0;padding-bottom:20px;"> |
| 329 | <tr valign="top"> |
| 330 | <td style="color:#DDDDDD;"> |
| 331 | <table class="widefat wcmp-player-demos" style="border:1px solid #e1e1e1;"> |
| 332 | <tr valign="top"> |
| 333 | <td style="color:#DDDDDD;"><input aria-label="<?php esc_attr_e( 'Own demo files', 'music-player-for-woocommerce' ); ?>" type="checkbox" disabled /> <?php esc_html_e( 'Select my own demo files', 'music-player-for-woocommerce' ); ?></td> |
| 334 | </tr> |
| 335 | <tr valign="top" class="wcmp-demo-files"> |
| 336 | <td> |
| 337 | <div style="color:#DDDDDD;margin-bottom:15px;"><b><?php esc_html_e( 'Demo files', 'music-player-for-woocommerce' ); ?></b></div> |
| 338 | <table class="widefat"> |
| 339 | <thead> |
| 340 | <tr> |
| 341 | <th style="color:#DDDDDD;"><?php esc_html_e( 'Name', 'music-player-for-woocommerce' ); ?></th> |
| 342 | <th colspan="2" style="color:#DDDDDD;"><?php esc_html_e( 'File URL', 'music-player-for-woocommerce' ); ?></th> |
| 343 | <th> </th> |
| 344 | </tr> |
| 345 | </thead> |
| 346 | <tbody> |
| 347 | <tr> |
| 348 | <td> |
| 349 | <input aria-label="<?php esc_attr_e( 'File name', 'music-player-for-woocommerce' ); ?>" type="text" class="wcmp-file-name" placeholder="<?php esc_attr_e( 'File Name', 'music-player-for-woocommerce' ); ?>" disabled style="color:#DDDDDD;" /> |
| 350 | </td> |
| 351 | <td> |
| 352 | <input aria-label="<?php esc_attr_e( 'File URL', 'music-player-for-woocommerce' ); ?>" type="text" class="wcmp-file-url" placeholder="http://" disabled style="color:#DDDDDD;" /> |
| 353 | </td> |
| 354 | <td width="1%" style="color:#DDDDDD;"> |
| 355 | <a href="javascript:void(0);" class="btn btn-default button wcmp-select-file" style="color:#DDDDDD;"><?php esc_html_e( 'Choose file', 'music-player-for-woocommerce' ); ?></a> |
| 356 | </td> |
| 357 | <td width="1%" style="color:#DDDDDD;"> |
| 358 | <a href="javascript:void(0);" class="wcmp-delete" style="color:#DDDDDD;"><?php esc_html_e( 'Delete', 'music-player-for-woocommerce' ); ?></a> |
| 359 | </td> |
| 360 | </tr> |
| 361 | </tbody> |
| 362 | <tfoot> |
| 363 | <tr> |
| 364 | <th colspan="4" style="color:#DDDDDD;"> |
| 365 | <a href="javascript:void(0);" class="button wcmp-add" style="color:#DDDDDD;"><?php esc_html_e( 'Add File', 'music-player-for-woocommerce' ); ?></a> |
| 366 | </th> |
| 367 | </tr> |
| 368 | </tfoot> |
| 369 | </table> |
| 370 | </td> |
| 371 | </tr> |
| 372 | </table> |
| 373 | </td> |
| 374 | </tr> |
| 375 | </table> |
| 376 | <script>jQuery(window).on('load', function(){ |
| 377 | var $ = jQuery; |
| 378 | function coverSection() |
| 379 | { |
| 380 | var v = $('[name="_wcmp_player_controls"]:checked').val(), |
| 381 | c = $('.wcmp-on-cover'); |
| 382 | if('default' == v || 'button' == v) c.show(); |
| 383 | else c.hide(); |
| 384 | }; |
| 385 | $(document).on('change', '[name="_wcmp_player_controls"]', function(){ |
| 386 | coverSection(); |
| 387 | }); |
| 388 | coverSection(); |
| 389 | });</script> |
| 390 | <style>.wcmp-player-settings tr td:first-child{width:225px;}</style> |
| 391 |