Simple Full Screen Background Image - Version 1.2.5

Version Description

  • Detection of the pro version of the plugin did not fully remove this version's admin menu, which caused paying users to have a confusing experience when clicking on the wrong menu.
Download this release

Release Info

Developer scott.deluzio
Plugin Icon 128x128 Simple Full Screen Background Image
Version 1.2.5
Comparing to
See all releases

Code changes from version 1.2.4 to 1.2.5

includes/admin-page.php CHANGED
@@ -53,7 +53,7 @@ function sfsb_init_admin() {
53
  add_action( 'sfsb_additional_image_sources', 'instant_img_media_popup' );
54
  }
55
  }
56
- add_action('admin_menu', 'sfsb_init_admin');
57
 
58
  // register the plugin settings
59
  function sfsb_register_settings() {
53
  add_action( 'sfsb_additional_image_sources', 'instant_img_media_popup' );
54
  }
55
  }
56
+ add_action( 'admin_menu', 'sfsb_init_admin' );
57
 
58
  // register the plugin settings
59
  function sfsb_register_settings() {
readme.txt CHANGED
@@ -1,12 +1,12 @@
1
  === Simple Full Screen Background Image ===
2
  Contributors: scott.deluzio
3
  Author: scott.deluzio
4
- Author URI: https://scottdeluzio.com
5
  Plugin URI: https://fullscreenbackgroundimages.com
6
  Tags: background, fullscreen, background image, full screen, image
7
  Requires at least: 3.6
8
- Tested up to: 4.9.7
9
- Stable tag: 1.2.4
10
 
11
  This plugin provides a simple way to set an automatically scaled full screen background image.
12
 
@@ -41,6 +41,10 @@ Learn more about the Pro version [here](https://fullscreenbackgroundimages.com/d
41
 
42
  == Changelog ==
43
 
 
 
 
 
44
  = 1.2.4 =
45
 
46
  * Added automatic deactivation when the pro version of this plugin is installed as the two plugins should not be used together.
@@ -80,8 +84,6 @@ Learn more about the Pro version [here](https://fullscreenbackgroundimages.com/d
80
 
81
  == Upgrade Notice ==
82
 
83
- = 1.2.4 =
84
 
85
- * Added automatic deactivation when the pro version of this plugin is installed as the two plugins should not be used together.
86
- * Automatic deactivation migrates Simple Full Screen Background Image to Pro's settings so the site's layout won't be changed by deactivating the Simple Full Screen Background Image plugin.
87
- * Added uninstall.php to clean up when the plugin is deleted.
1
  === Simple Full Screen Background Image ===
2
  Contributors: scott.deluzio
3
  Author: scott.deluzio
4
+ Author URI: https://amplifyplugins.com
5
  Plugin URI: https://fullscreenbackgroundimages.com
6
  Tags: background, fullscreen, background image, full screen, image
7
  Requires at least: 3.6
8
+ Tested up to: 5.0.3
9
+ Stable tag: 1.2.5
10
 
11
  This plugin provides a simple way to set an automatically scaled full screen background image.
12
 
41
 
42
  == Changelog ==
43
 
44
+ = 1.2.5 =
45
+
46
+ * Detection of the pro version of the plugin did not fully remove this version's admin menu, which caused paying users to have a confusing experience when clicking on the wrong menu.
47
+
48
  = 1.2.4 =
49
 
50
  * Added automatic deactivation when the pro version of this plugin is installed as the two plugins should not be used together.
84
 
85
  == Upgrade Notice ==
86
 
87
+ = 1.2.5 =
88
 
89
+ * Detection of the pro version of the plugin did not fully remove this version's admin menu, which caused paying users to have a confusing experience when clicking on the wrong menu.
 
 
simple-full-screen-background.php CHANGED
@@ -3,9 +3,9 @@
3
  Plugin Name: Simple Full Screen Background Image
4
  Plugin URI: https://fullscreenbackgroundimages.com/
5
  Description: Easily set an automatically scaled full-screen background image
6
- Version: 1.2.4
7
  Author: Scott DeLuzio
8
- Author URI: http://scottdeluzio.com
9
  */
10
 
11
  function sfsb_textdomain() {
@@ -28,12 +28,33 @@ $sfsb_options = get_option( 'fsb_settings' );
28
  /*****************************************
29
  * includes
30
  *****************************************/
31
- include('includes/admin-page.php');
32
- include('includes/display-image.php');
33
- include('includes/scripts.php');
34
- include('includes/meta-box.php');
35
 
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  add_action( 'admin_init', 'sfsb_check_for_pro' );
38
  function sfsb_check_for_pro(){
39
  // FSB_VERSION is defined in Pro, so this should be true if Pro is active.
3
  Plugin Name: Simple Full Screen Background Image
4
  Plugin URI: https://fullscreenbackgroundimages.com/
5
  Description: Easily set an automatically scaled full-screen background image
6
+ Version: 1.2.5
7
  Author: Scott DeLuzio
8
+ Author URI: https://amplifyplugins.com
9
  */
10
 
11
  function sfsb_textdomain() {
28
  /*****************************************
29
  * includes
30
  *****************************************/
31
+ include( 'includes/admin-page.php' );
32
+ include( 'includes/display-image.php' );
33
+ include( 'includes/scripts.php' );
34
+ include( 'includes/meta-box.php' );
35
 
36
 
37
+ /**
38
+ * When activating the pro version of Full Screen Background Images, this plugin's admin menu remains.
39
+ * The menus have the same name and slug, so users get an inconsistent experience. It seems that some users
40
+ * get the correct admin page when the pro version while others get this version's admin page.
41
+ *
42
+ * First we're checking if the pro version is installed, then removing this version's admin page.
43
+ * This needs to come first since the admin_menu action is called before the admin_init action, which we'll need below.
44
+ */
45
+ if( defined( 'FSB_VERSION' ) && is_string( FSB_VERSION ) ){
46
+ remove_action( 'admin_menu', 'sfsb_init_admin' );
47
+ }
48
+
49
+ /**
50
+ * Now, using the admin_init action we can copy the image that was set in this version of the plugin over
51
+ * to the pro version. This image will be set with a global context, which is the same behavior as this version.
52
+ * This will give the site the same appearance with the pro version activated as it had with this version activated.
53
+ *
54
+ * Finally, once the image has been copied over we'll deactivate this plugin. It is recommended that deactivate_plugins
55
+ * is called in the admin_init action. https://codex.wordpress.org/Function_Reference/deactivate_plugins
56
+ * However, this would be too late for the admin_menu action, so we had to remove this version's menu earlier.
57
+ */
58
  add_action( 'admin_init', 'sfsb_check_for_pro' );
59
  function sfsb_check_for_pro(){
60
  // FSB_VERSION is defined in Pro, so this should be true if Pro is active.