Soundy Background Music - Version 2.1

Version Description

   -    April 26th, 2014 = * Corrected major bug introduced in 2.0: when Soundy was installed for the first time: the default audio file URL and the default four play/pause button image URLs were undefined. Sorry for the inconvenience.

Download this release

Release Info

Developer bducouedic
Plugin Icon 128x128 Soundy Background Music
Version 2.1
Comparing to
See all releases

Code changes from version 2.0 to 2.1

Files changed (2) hide show
  1. readme.txt +24 -23
  2. soundy.php +72 -52
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: bducouedic
3
  Tags: audio, sound, music, background, soundtrack, background sound, background audio, background music, posts, pages
4
  Requires at least: 3.6
5
  Tested up to: 3.9
6
- Stable tag: 2.0
7
  License: GPL2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Donate link: http://www.webartisan.ch/en/products/soundy-free/#wa_donate
@@ -88,7 +88,7 @@ You can find [Tutorial](http://www.webartisan.ch/en/products/soundy-free/#wa_tut
88
 
89
  == Frequently Asked Questions ==
90
 
91
- = Frequently Asked Questions =
92
 
93
  1. **Why is Soundy Background Music a Must on my WordPress Website ?**
94
  Having a home page or any other page playing a background music greatly improves your website visitor's experience. By choosing a music in adequacy with your content, Soundy will help making your visitors immersed in your pages. Pages with a slideshow are excellent candidates for Soundy. But a lot of other page types too.
@@ -114,12 +114,24 @@ Yes, you can upload and set up your own button images.
114
  1. **Can I really put my audio files anywhere on the web ?**
115
  Yes, you can put your audio files anywhere on any cloud or website, except one place: you should not put your audio files in the soundy-background-music plugin directory (or below). If you do, you will loose your files the next time you will install a new version of Soundy. The update process deletes this folder and replaces it with a new one. If you want to store the audio files on your WordPress site, the best place to do so is the media library (/wp-content/uploads/...).
116
 
117
- 1. **After an update of Soundy, my soundtracks are not played anymore and my custom Play/Pause button images are broken. What happened ?**
118
- As mentioned in the previous paragraph, the reason might be that you had uploaded your audio files and button images under the soundy-background-music plugin directory. This directory is erased and replaced at each update. Do not add any file in it. Again, the prefered location for such files is the WordPress media library.
 
 
 
 
 
 
 
 
 
119
 
120
  1. **How should I proceed to enable Soundy Background Music only for a few pages or posts ?**
121
  Go into Soundy's settings page (Settings > Soundy) and uncheck the checkbox “Enable Background Sound”. It actually is unchecked per default. This way Soundy won’t be enabled per default on your site. Then for each page or post in which you want to enable Soundy, go into the Edit Page admin tool and set the “Enable Background Sound” option to “Yes” by checking the corresponding radio button.
122
 
 
 
 
123
  1. **I've changed the default soundtrack in the Soundy administration (Settings > Soundy) with a new sountrack but a page carries on playing the old soundtrack. What's happening ?**
124
  While the old soundtrack was active an author did change the Soundtrack option to *Custom* in the Edit Page Soundy meta box.
125
  To correct the problem, reset the Soundtrack option of the Soundy meta box back to *Default* and update the page.
@@ -128,23 +140,9 @@ In *Custom* mode a page retains the soundtrack defined when the *Custom* option
128
  1. **Is it advised to put my audio files on a separate storage cloud ?**
129
  Yes it is, especially if you have a lot of traffic on your website. Putting your audio files on a separate storage cloud will release the load on your website and improve page load response time in your visitor's browsers. There is a lot of Cloud Storage Providers out there like Dropbox, Google Drive, SkyDrive and many others. Your hosting provider might also offer cloud storage.
130
 
131
- 1. **Does Soundy allow having a continuous uninterrupted audio stream playing while navigating on my site ?**
132
- Because most of the WP themes create and download a new HTML document in your browser each time you navigate to another WP post or page, the answer is NO for such themes.
133
- However there could be themes which don't download a new HTML document when you switch to another WP post or page. They would rather use Ajax to download the WP post/page in the content area of the downloaded unique main site HTML document.
134
- If such themes exist, then, YES, by using such a theme you could have a continuous uninterrupted audio stream playing while navigating on your site.
135
- A Soundy's user is using the [Premium Crea WP theme](http://themeforest.net/item/crea-wp/424783) on his site: http://www.hanstylewedding.com/
136
- While navigating in the bottom menu of this site, the audio stream is not interrupted and remain continuous as the theme doesn't download any new HTML document while navigating in this menu.
137
- Having a continuous uninterrupted audio stream playing while navigating on a WP site with Soundy plugin might be possible with some themes but on most themes, it is impossible.
138
- Here, at [WebArtisan.ch](http://www.webartisan.ch/), we are considering developing a theme which will allow this valuable feature. This will be the Soundy Theme.
139
- If you know of other themes like the Crea WP theme which don't download new HTML documents while navigating on the site, please, let us know !
140
-
141
  1. **On WP front-end, Soundy's Play/Pause button does not respond correctly. What's the problem ?**
142
  Soundy needs jQuery 1.10.2 which is the default jQuery library of the last versions of WordPress. However some themes load their own jQuery library. If this library is not up-to-date, Soundy's Play/Pause button gets into troubles.
143
- Using WordPress Default jQuery library is actually what Soundy does with the following statement in soundy.php:
144
- `wp_register_script( 'soundy-front-end', $this->plugin_url . '/js/front-end.js', array( 'jquery' ) );
145
- wp_enqueue_script( 'soundy-front-end' );`
146
- array( ‘jquery’) is an argument to wp_register_script saying that front-end.js depends on WordPress default jQuery library.
147
- And this is what your theme also should do instead of loading its own old jQuery version.
148
 
149
  == Screenshots ==
150
 
@@ -160,7 +158,10 @@ And this is what your theme also should do instead of loading its own old jQuery
160
 
161
  = Changelog =
162
 
163
- = 2.0   -   April 23rd, 2014 =
 
 
 
164
  * Object Oriented Redesign of the whole plugin.
165
  * Added Play/Pause Button Preview in Context of any Page or Post in Settings > Soundy > Play/Pause Button Tab.
166
  * Added Play/Pause Button Preview in Context of any Page or Post in Settings > Soundy > Play/Pause Corner Position Tab.
@@ -168,17 +169,17 @@ And this is what your theme also should do instead of loading its own old jQuery
168
  * Fixed minor bug in New Page and New Post Soundy metabox.
169
  * [**Soundy PRO**](http://www.webartisan.ch/en/products/soundy-pro/) and its HTML5 **Play/Pause Button Designer** application is now available.
170
 
171
- = 1.2   -    March 17th, 2014 =
172
  * Added Audio Volume Control for administrators in Settings > Soundy.
173
  * Added Audio Volume Control for authors in Edit Page and Edit Post Soundy meta box.
174
  * Made Admin User Interface more responsive and user friendlier.
175
 
176
- = 1.1   -    March 12th, 2014 =
177
  * Corrected a few minor bugs
178
  * Made Soundy forms of the back-end admin section more responsive
179
  * Added possibility to disable Soundy for mobile devices. Set variable **$disable_soundy_for_mobile** to **true** in soundy.php file to disable Soundy for mobile devices.
180
 
181
- = 1.0   -    March 4th, 2014 =
182
  * First Release
183
 
184
  == Upgrade Notice ==
3
  Tags: audio, sound, music, background, soundtrack, background sound, background audio, background music, posts, pages
4
  Requires at least: 3.6
5
  Tested up to: 3.9
6
+ Stable tag: 2.1
7
  License: GPL2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Donate link: http://www.webartisan.ch/en/products/soundy-free/#wa_donate
88
 
89
  == Frequently Asked Questions ==
90
 
91
+ = General Questions =
92
 
93
  1. **Why is Soundy Background Music a Must on my WordPress Website ?**
94
  Having a home page or any other page playing a background music greatly improves your website visitor's experience. By choosing a music in adequacy with your content, Soundy will help making your visitors immersed in your pages. Pages with a slideshow are excellent candidates for Soundy. But a lot of other page types too.
114
  1. **Can I really put my audio files anywhere on the web ?**
115
  Yes, you can put your audio files anywhere on any cloud or website, except one place: you should not put your audio files in the soundy-background-music plugin directory (or below). If you do, you will loose your files the next time you will install a new version of Soundy. The update process deletes this folder and replaces it with a new one. If you want to store the audio files on your WordPress site, the best place to do so is the media library (/wp-content/uploads/...).
116
 
117
+ 1. **Does Soundy allow having a continuous uninterrupted audio stream playing while navigating on my site ?**
118
+ Because most of the WP themes create and download a new HTML document in your browser each time you navigate to another WP post or page, the answer is NO for such themes.
119
+ However there could be themes which don't download a new HTML document when you switch to another WP post or page. They would rather use Ajax to download the WP post/page in the content area of the downloaded unique main site HTML document.
120
+ If such themes exist, then, YES, by using such a theme you could have a continuous uninterrupted audio stream playing while navigating on your site.
121
+ A Soundy's user is using the [Premium Crea WP theme](http://themeforest.net/item/crea-wp/424783) on his site: http://www.hanstylewedding.com/
122
+ While navigating in the bottom menu of this site, the audio stream is not interrupted and remain continuous as the theme doesn't download any new HTML document while navigating in this menu.
123
+ Having a continuous uninterrupted audio stream playing while navigating on a WP site with Soundy plugin might be possible with some themes but on most themes, it is impossible.
124
+ Here, at [WebArtisan.ch](http://www.webartisan.ch/), we are considering developing a theme which will allow this valuable feature. This will be the Soundy Theme.
125
+ If you know of other themes like the Crea WP theme which don't download new HTML documents while navigating on the site, please, let us know !
126
+
127
+ = Support Questions =
128
 
129
  1. **How should I proceed to enable Soundy Background Music only for a few pages or posts ?**
130
  Go into Soundy's settings page (Settings > Soundy) and uncheck the checkbox “Enable Background Sound”. It actually is unchecked per default. This way Soundy won’t be enabled per default on your site. Then for each page or post in which you want to enable Soundy, go into the Edit Page admin tool and set the “Enable Background Sound” option to “Yes” by checking the corresponding radio button.
131
 
132
+ 1. **After an update of Soundy, my soundtracks are not played anymore and my custom Play/Pause button images are broken. What happened ?**
133
+ As mentioned in the previous paragraph, the reason might be that you had uploaded your audio files and button images under the soundy-background-music plugin directory. This directory is erased and replaced at each update. Do not add any file in it. Again, the prefered location for such files is the WordPress media library.
134
+
135
  1. **I've changed the default soundtrack in the Soundy administration (Settings > Soundy) with a new sountrack but a page carries on playing the old soundtrack. What's happening ?**
136
  While the old soundtrack was active an author did change the Soundtrack option to *Custom* in the Edit Page Soundy meta box.
137
  To correct the problem, reset the Soundtrack option of the Soundy meta box back to *Default* and update the page.
140
  1. **Is it advised to put my audio files on a separate storage cloud ?**
141
  Yes it is, especially if you have a lot of traffic on your website. Putting your audio files on a separate storage cloud will release the load on your website and improve page load response time in your visitor's browsers. There is a lot of Cloud Storage Providers out there like Dropbox, Google Drive, SkyDrive and many others. Your hosting provider might also offer cloud storage.
142
 
 
 
 
 
 
 
 
 
 
 
143
  1. **On WP front-end, Soundy's Play/Pause button does not respond correctly. What's the problem ?**
144
  Soundy needs jQuery 1.10.2 which is the default jQuery library of the last versions of WordPress. However some themes load their own jQuery library. If this library is not up-to-date, Soundy's Play/Pause button gets into troubles.
145
+ Using WordPress Default jQuery library is actually what Soundy does and this is what your theme also should do instead of loading its own old jQuery version. In Soundy Version 2.0 and later, you can now set the variable $use_own_jquery_lib_on_front_end to true in the main Soundy PHP file: soundy.php. To make this modification, go to the plugins page, click on the Edit link of the Soundy plugin, look for the variable and set it to true. This should fix the problem.
 
 
 
 
146
 
147
  == Screenshots ==
148
 
158
 
159
  = Changelog =
160
 
161
+ = 2.1    -    April 26th, 2014 =
162
+ * Corrected major bug introduced in 2.0: when Soundy was installed for the first time: the default audio file URL and the default four play/pause button image URLs were undefined. Sorry for the inconvenience.
163
+
164
+ = 2.0    -    April 23rd, 2014 =
165
  * Object Oriented Redesign of the whole plugin.
166
  * Added Play/Pause Button Preview in Context of any Page or Post in Settings > Soundy > Play/Pause Button Tab.
167
  * Added Play/Pause Button Preview in Context of any Page or Post in Settings > Soundy > Play/Pause Corner Position Tab.
169
  * Fixed minor bug in New Page and New Post Soundy metabox.
170
  * [**Soundy PRO**](http://www.webartisan.ch/en/products/soundy-pro/) and its HTML5 **Play/Pause Button Designer** application is now available.
171
 
172
+ = 1.2    -    March 17th, 2014 =
173
  * Added Audio Volume Control for administrators in Settings > Soundy.
174
  * Added Audio Volume Control for authors in Edit Page and Edit Post Soundy meta box.
175
  * Made Admin User Interface more responsive and user friendlier.
176
 
177
+ = 1.1    -    March 12th, 2014 =
178
  * Corrected a few minor bugs
179
  * Made Soundy forms of the back-end admin section more responsive
180
  * Added possibility to disable Soundy for mobile devices. Set variable **$disable_soundy_for_mobile** to **true** in soundy.php file to disable Soundy for mobile devices.
181
 
182
+ = 1.0    -    March 4th, 2014 =
183
  * First Release
184
 
185
  == Upgrade Notice ==
soundy.php CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
  /**
3
  * @package Soundy_Background_Music
4
- * @version 2.0
5
  */
6
  /*
7
  Plugin Name: Soundy Background Music
8
  Plugin URI: http://webartisan.ch/en/products/soundy-free/
9
  Description: This plugin allows administrators and authors to set a background sound on any post or page.
10
- Version: 2.0
11
  Author: Bertrand du Couédic
12
  Author URI: http://webartisan.ch/en/about
13
  License: GPL2
@@ -30,13 +30,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30
 
31
  class WarSoundy
32
  {
33
- private $soundy_version = '2.0';
34
  private $soundy_type = 'free';
35
  private $soundy_subtype = '';
36
  private $soundy_free_home_wp_url = 'http://wordpress.org/plugins/soundy-background-music/';
37
  private $soundy_pro_home_url = 'http://webartisan.ch/en/products/soundy-pro/';
38
  private $disable_soundy_for_mobile = false;
39
- private $use_own_jquery_lib_on_front_end = true;
40
  private $enable_bg_sound = 'no';
41
  private $audio_url = '/audio/valse.mp3';
42
  private $audio_volume = '80';
@@ -125,55 +125,58 @@ class WarSoundy
125
  add_shortcode( 'soundy', array( $this, 'soundy_shortcode' ) );
126
  }
127
 
128
- $soundy_type = get_option( 'war_soundy_type' );
129
- $soundy_version = get_option( 'war_soundy_version' );
130
- if( ( $soundy_type != $this->soundy_type ) || ( $soundy_version != $this->soundy_version ) )
131
  {
132
- update_option( 'war_soundy_version', $this->soundy_version );
133
-
134
- $volume = get_option( 'war_soundy_audio_volume' );
135
- if( $volume == '' )
136
- {
137
- update_option( 'war_soundy_audio_volume', $this->audio_volume );
138
- }
139
-
140
- $display_play_pause = get_option( 'war_soundy_display_play_pause' );
141
- delete_option( 'war_soundy_display_play_pause' );
142
- $pp_images_to_use = get_option( 'war_soundy_pp_images_to_use' );
143
- if( ! $pp_images_to_use )
144
  {
145
- if( $display_play_pause == 'yes' || $display_play_pause == '' )
146
- {
147
- update_option( 'war_soundy_pp_images_to_use', 'default');
148
- }
149
- else if( $display_play_pause == 'no' )
150
  {
151
- update_option( 'war_soundy_pp_images_to_use', 'none' );
152
  }
153
- else
 
 
 
 
154
  {
155
- update_option( 'war_soundy_pp_images_to_use', 'default');
 
 
 
 
 
 
 
 
 
 
 
156
  }
157
- }
158
-
159
- $image_play_normal = get_option( 'war_soundy_url_play_button' );
160
- $image_play_hover = get_option( 'war_soundy_url_play_hover' );
161
- $image_pause_normal = get_option( 'war_soundy_url_pause_button' );
162
- $image_pause_hover = get_option( 'war_soundy_url_pause_hover' );
 
 
 
 
163
 
164
- $image_play_normal = str_replace( 'soundy-music-pro', 'soundy-background-music', $image_play_normal );
165
- $image_play_hover = str_replace( 'soundy-music-pro', 'soundy-background-music', $image_play_hover );
166
- $image_pause_normal = str_replace( 'soundy-music-pro', 'soundy-background-music', $image_pause_normal );
167
- $image_pause_hover = str_replace( 'soundy-music-pro', 'soundy-background-music', $image_pause_hover );
168
-
169
- update_option( 'war_soundy_url_play_button', $image_play_normal );
170
- update_option( 'war_soundy_url_play_hover', $image_play_hover );
171
- update_option( 'war_soundy_url_pause_button', $image_pause_normal );
172
- update_option( 'war_soundy_url_pause_hover', $image_pause_hover );
173
-
174
- $audio_url = get_option( 'war_soundy_audio_file_url' );
175
- $audio_url = str_replace( 'soundy-music-pro', 'soundy-background-music', $audio_url );
176
- update_option( 'war_soundy_audio_file_url', $audio_url );
177
  }
178
  }
179
 
@@ -181,17 +184,12 @@ class WarSoundy
181
  {
182
  add_option( 'war_soundy_type', $this->soundy_type );
183
  add_option( 'war_soundy_version', $this->soundy_version );
184
- add_option( 'war_soundy_enable_bg_sound', $this->enable_bg_sound );
185
- add_option( 'war_soundy_audio_file_url', $this->audio_url );
186
  add_option( 'war_soundy_audio_volume', $this->audio_volume );
187
  add_option( 'war_soundy_audio_title', $this->audio_title );
188
  add_option( 'war_soundy_autoplay', $this->autoplay );
189
  add_option( 'war_soundy_loop', $this->loop );
190
  add_option( 'war_soundy_pp_images_to_use', $this->pp_images_to_use );
191
- add_option( 'war_soundy_url_play_button', $this->play_button_url );
192
- add_option( 'war_soundy_url_play_hover', $this->play_hover_url );
193
- add_option( 'war_soundy_url_pause_button', $this->pause_button_url );
194
- add_option( 'war_soundy_url_pause_hover', $this->pause_hover_url );
195
  add_option( 'war_soundy_pp_position', $this->pp_position );
196
  add_option( 'war_soundy_pp_corner', $this->pp_corner );
197
  add_option( 'war_soundy_offset_x', $this->offset_x );
@@ -199,6 +197,28 @@ class WarSoundy
199
  add_option( 'war_soundy_offset_y', $this->offset_y );
200
  add_option( 'war_soundy_offset_y_unit', $this->offset_y_unit );
201
  add_option( 'war_soundy_page_preview_url', $this->page_preview_url );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  }
203
 
204
  public function deactivate()
1
  <?php
2
  /**
3
  * @package Soundy_Background_Music
4
+ * @version 2.1
5
  */
6
  /*
7
  Plugin Name: Soundy Background Music
8
  Plugin URI: http://webartisan.ch/en/products/soundy-free/
9
  Description: This plugin allows administrators and authors to set a background sound on any post or page.
10
+ Version: 2.1
11
  Author: Bertrand du Couédic
12
  Author URI: http://webartisan.ch/en/about
13
  License: GPL2
30
 
31
  class WarSoundy
32
  {
33
+ private $soundy_version = '2.1';
34
  private $soundy_type = 'free';
35
  private $soundy_subtype = '';
36
  private $soundy_free_home_wp_url = 'http://wordpress.org/plugins/soundy-background-music/';
37
  private $soundy_pro_home_url = 'http://webartisan.ch/en/products/soundy-pro/';
38
  private $disable_soundy_for_mobile = false;
39
+ private $use_own_jquery_lib_on_front_end = false;
40
  private $enable_bg_sound = 'no';
41
  private $audio_url = '/audio/valse.mp3';
42
  private $audio_volume = '80';
125
  add_shortcode( 'soundy', array( $this, 'soundy_shortcode' ) );
126
  }
127
 
128
+ if( get_option( 'war_soundy_has_been_activated' ) )
 
 
129
  {
130
+ $soundy_type = get_option( 'war_soundy_type' );
131
+ $soundy_version = get_option( 'war_soundy_version' );
132
+ if( ( $soundy_type != $this->soundy_type ) || ( $soundy_version != $this->soundy_version ) )
 
 
 
 
 
 
 
 
 
133
  {
134
+ update_option( 'war_soundy_version', $this->soundy_version );
135
+
136
+ $volume = get_option( 'war_soundy_audio_volume' );
137
+ if( $volume == '' )
 
138
  {
139
+ update_option( 'war_soundy_audio_volume', $this->audio_volume );
140
  }
141
+
142
+ $display_play_pause = get_option( 'war_soundy_display_play_pause' );
143
+ delete_option( 'war_soundy_display_play_pause' );
144
+ $pp_images_to_use = get_option( 'war_soundy_pp_images_to_use' );
145
+ if( ! $pp_images_to_use )
146
  {
147
+ if( $display_play_pause == 'yes' || $display_play_pause == '' )
148
+ {
149
+ update_option( 'war_soundy_pp_images_to_use', 'default');
150
+ }
151
+ else if( $display_play_pause == 'no' )
152
+ {
153
+ update_option( 'war_soundy_pp_images_to_use', 'none' );
154
+ }
155
+ else
156
+ {
157
+ update_option( 'war_soundy_pp_images_to_use', 'default');
158
+ }
159
  }
160
+
161
+ $image_play_normal = get_option( 'war_soundy_url_play_button' );
162
+ $image_play_hover = get_option( 'war_soundy_url_play_hover' );
163
+ $image_pause_normal = get_option( 'war_soundy_url_pause_button' );
164
+ $image_pause_hover = get_option( 'war_soundy_url_pause_hover' );
165
+
166
+ $image_play_normal = str_replace( 'soundy-music-pro', 'soundy-background-music', $image_play_normal );
167
+ $image_play_hover = str_replace( 'soundy-music-pro', 'soundy-background-music', $image_play_hover );
168
+ $image_pause_normal = str_replace( 'soundy-music-pro', 'soundy-background-music', $image_pause_normal );
169
+ $image_pause_hover = str_replace( 'soundy-music-pro', 'soundy-background-music', $image_pause_hover );
170
 
171
+ update_option( 'war_soundy_url_play_button', $image_play_normal );
172
+ update_option( 'war_soundy_url_play_hover', $image_play_hover );
173
+ update_option( 'war_soundy_url_pause_button', $image_pause_normal );
174
+ update_option( 'war_soundy_url_pause_hover', $image_pause_hover );
175
+
176
+ $audio_url = get_option( 'war_soundy_audio_file_url' );
177
+ $audio_url = str_replace( 'soundy-music-pro', 'soundy-background-music', $audio_url );
178
+ update_option( 'war_soundy_audio_file_url', $audio_url );
179
+ }
 
 
 
 
180
  }
181
  }
182
 
184
  {
185
  add_option( 'war_soundy_type', $this->soundy_type );
186
  add_option( 'war_soundy_version', $this->soundy_version );
187
+ add_option( 'war_soundy_enable_bg_sound', $this->enable_bg_sound );
 
188
  add_option( 'war_soundy_audio_volume', $this->audio_volume );
189
  add_option( 'war_soundy_audio_title', $this->audio_title );
190
  add_option( 'war_soundy_autoplay', $this->autoplay );
191
  add_option( 'war_soundy_loop', $this->loop );
192
  add_option( 'war_soundy_pp_images_to_use', $this->pp_images_to_use );
 
 
 
 
193
  add_option( 'war_soundy_pp_position', $this->pp_position );
194
  add_option( 'war_soundy_pp_corner', $this->pp_corner );
195
  add_option( 'war_soundy_offset_x', $this->offset_x );
197
  add_option( 'war_soundy_offset_y', $this->offset_y );
198
  add_option( 'war_soundy_offset_y_unit', $this->offset_y_unit );
199
  add_option( 'war_soundy_page_preview_url', $this->page_preview_url );
200
+
201
+ if( ! get_option( 'war_soundy_audio_file_url' ) )
202
+ {
203
+ update_option( 'war_soundy_audio_file_url', $this->audio_url );
204
+ }
205
+ if( ! get_option( 'war_soundy_url_play_button' ) )
206
+ {
207
+ update_option( 'war_soundy_url_play_button', $this->play_button_url );
208
+ }
209
+ if( ! get_option( 'war_soundy_url_play_hover' ) )
210
+ {
211
+ update_option( 'war_soundy_url_play_hover', $this->play_hover_url );
212
+ }
213
+ if( ! get_option( 'war_soundy_url_pause_button' ) )
214
+ {
215
+ update_option( 'war_soundy_url_pause_button', $this->pause_button_url );
216
+ }
217
+ if( ! get_option( 'war_soundy_url_pause_hover' ) )
218
+ {
219
+ update_option( 'war_soundy_url_pause_hover', $this->pause_hover_url );
220
+ }
221
+ add_option( 'war_soundy_has_been_activated', true );
222
  }
223
 
224
  public function deactivate()