Title: Customization
Last modified: February 6, 2020

---

# Customization

 *  [pirasmarketing](https://wordpress.org/support/users/pirasmarketing/)
 * (@pirasmarketing)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/customization-108/)
 * Hi, I am using your plugin to listen to small pieces of the CDs that my client
   sells. I customized the css to show only the play and download button.
 * My client asked me to inhibit the downloading of songs from unregistered users,
   like this:
 * users must see the download button, but clicking on it must open a popup with
   a login form.
 * I used popup builder to create the pop-up (which triggers onclick on some classes)
   and I added the following code to the functions.php file
 *     ```
       add_action('wp_footer','redirect_link_table');
       function redirect_link_table() {
       if ( !is_user_logged_in() ) {
         ?>
         <script type="text/javascript">
           jQuery(window).load(function(){
       jQuery('.nodownload a, a.map_download, a.mb_map_master').removeAttr('href').removeAttr('download');
       		console.log('user is' + ' not logged');
           })
         </script>
         <?php
       } else {
         ?>
         <script type="text/javascript">
           jQuery(window).load(function(){
             console.log('user is' + ' logged');
           })
         </script>
         <?php
       }
       }
       ```
   
 * the system works for all links and classes except .map_download, or better, in
   some pages it works and in others it doesn’t.
 * for example:
    try clicking the download button in the tables on these pages:
 * [https://www.novalis.it/test/negozio/andrea-montanari-cuori-rubati/](https://www.novalis.it/test/negozio/andrea-montanari-cuori-rubati/)
   (
   here the table is static html and everything works) [https://www.novalis.it/test/negozio/daniela-cavanna-popcorn/](https://www.novalis.it/test/negozio/daniela-cavanna-popcorn/)(
   dynamic table but it works) [https://www.novalis.it/test/negozio/voglio-stare-con-te-daniela-cavanna/](https://www.novalis.it/test/negozio/voglio-stare-con-te-daniela-cavanna/)(
   dynamic table: it doesn’t work)
 * above each table there are red buttons that allow the download of pdf or zip 
   with other materials, everything works on these buttons
 * Can you help me modify your plugin code to include these two functions for map_download?
 * Thanks in advance
 * P.S. sono italiano, se vuoi proseguire la conversazione in italiano dimmelo! 
   Ciao!

The topic ‘Customization’ is closed to new replies.

 * ![](https://ps.w.org/wp-miniaudioplayer/assets/icon.svg?rev=983692)
 * [mb.miniAudioPlayer - an HTML5 audio player for your mp3 files](https://wordpress.org/plugins/wp-miniaudioplayer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-miniaudioplayer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-miniaudioplayer/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-miniaudioplayer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-miniaudioplayer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-miniaudioplayer/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [pirasmarketing](https://wordpress.org/support/users/pirasmarketing/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/customization-108/)
 * Status: not resolved