Version Description
- Fixed an issue with images loading via http when on an https site
- Did some general code cleanup and improvement
Download this release
Release Info
Developer | mordauk |
Plugin | Simple Full Screen Background Image |
Version | 1.0.4 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 1.0.4
- {simple-full-screen-background/includes → includes}/admin-page.php +9 -42
- includes/display-image.php +14 -0
- includes/fsb-scripts.js +27 -0
- {simple-full-screen-background/includes → includes}/fullscreen-image.css +0 -0
- {simple-full-screen-background/includes → includes}/preview.jpg +0 -0
- includes/scripts.php +21 -0
- simple-full-screen-background/readme.txt → readme.txt +10 -5
- simple-full-screen-background/screenshot-1.png → screenshot-1.png +0 -0
- simple-full-screen-background/screenshot-2.png → screenshot-2.png +0 -0
- simple-full-screen-background/screenshot-3.png → screenshot-3.png +0 -0
- simple-full-screen-background/simple-full-screen-background.php → simple-full-screen-background.php +1 -1
- simple-full-screen-background/includes/display-image.php +0 -12
- simple-full-screen-background/includes/scripts.php +0 -6
{simple-full-screen-background/includes → includes}/admin-page.php
RENAMED
@@ -1,42 +1,9 @@
|
|
1 |
-
<?php
|
2 |
|
3 |
function fsb_admin_page() {
|
4 |
|
5 |
global $fsb_options;
|
6 |
?>
|
7 |
-
|
8 |
-
<script type="text/javascript">
|
9 |
-
//<![CDATA[
|
10 |
-
jQuery(document).ready(function()
|
11 |
-
{
|
12 |
-
// Media Uploader
|
13 |
-
window.widgetFormfield = '';
|
14 |
-
|
15 |
-
jQuery('.upload_image_button').live('click', function() {
|
16 |
-
window.widgetFormfield = jQuery('.upload_field',jQuery(this).parent());
|
17 |
-
tb_show('Choose Image', 'media-upload.php?TB_iframe=true');
|
18 |
-
return false;
|
19 |
-
});
|
20 |
-
|
21 |
-
window.original_send_to_editor = window.send_to_editor;
|
22 |
-
window.send_to_editor = function(html) {
|
23 |
-
if (window.widgetFormfield) {
|
24 |
-
imgurl = jQuery('img',html).attr('src');
|
25 |
-
window.widgetFormfield.val(imgurl);
|
26 |
-
tb_remove();
|
27 |
-
}
|
28 |
-
else {
|
29 |
-
window.original_send_to_editor(html);
|
30 |
-
}
|
31 |
-
window.widgetFormfield = '';
|
32 |
-
window.imagefield = false;
|
33 |
-
|
34 |
-
jQuery('#fsb_preview_image').attr('src', imgurl);
|
35 |
-
}
|
36 |
-
});
|
37 |
-
//]]>
|
38 |
-
</script>
|
39 |
-
|
40 |
<div class="wrap">
|
41 |
<div id="fsb-wrap" class="fsb-help">
|
42 |
<h2>Full Screen Background Image</h2>
|
@@ -50,12 +17,12 @@ function fsb_admin_page() {
|
|
50 |
<form method="post" action="options.php">
|
51 |
|
52 |
<?php settings_fields( 'fsb_register_settings' ); ?>
|
53 |
-
|
54 |
<h4>Choose Your Image</h4>
|
55 |
-
|
56 |
<p>
|
57 |
<input id="fsb_settings[image]" name="fsb_settings[image]" type="text" class="upload_field" value="<?php echo $fsb_options['image']; ?>"/>
|
58 |
-
<input class="upload_image_button" type="button" value="Choose Image"/>
|
59 |
<label class="description" for="fsb_settings[image]"><?php _e( 'This image will be applied to the background of your website' ); ?></label>
|
60 |
</p>
|
61 |
|
@@ -66,18 +33,18 @@ function fsb_admin_page() {
|
|
66 |
<img src="<?php echo plugin_dir_url( __FILE__ ) . 'preview.jpg'; ?>" id="fsb_preview_image" style="padding: 3px; border: 1px solid #f0f0f0; max-width: 600px; overflow: hidden;"/>
|
67 |
<?php } ?>
|
68 |
</p>
|
69 |
-
|
70 |
<!-- save the options -->
|
71 |
<p class="submit">
|
72 |
<input type="submit" class="button-primary" value="<?php _e( 'Save Options' ); ?>" />
|
73 |
</p>
|
74 |
-
|
75 |
-
|
76 |
</form>
|
77 |
</div><!--end fsb-wrap-->
|
78 |
</div><!--end wrap-->
|
79 |
-
<?php
|
80 |
-
|
81 |
}
|
82 |
function fsb_init_admin() {
|
83 |
add_submenu_page( 'themes.php', 'Full Screen Background Image', 'Fullscreen BG Image', 'manage_options', 'full-screen-background', 'fsb_admin_page' );
|
1 |
+
<?php
|
2 |
|
3 |
function fsb_admin_page() {
|
4 |
|
5 |
global $fsb_options;
|
6 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
<div class="wrap">
|
8 |
<div id="fsb-wrap" class="fsb-help">
|
9 |
<h2>Full Screen Background Image</h2>
|
17 |
<form method="post" action="options.php">
|
18 |
|
19 |
<?php settings_fields( 'fsb_register_settings' ); ?>
|
20 |
+
|
21 |
<h4>Choose Your Image</h4>
|
22 |
+
|
23 |
<p>
|
24 |
<input id="fsb_settings[image]" name="fsb_settings[image]" type="text" class="upload_field" value="<?php echo $fsb_options['image']; ?>"/>
|
25 |
+
<input class="upload_image_button button-secondary" type="button" value="Choose Image"/>
|
26 |
<label class="description" for="fsb_settings[image]"><?php _e( 'This image will be applied to the background of your website' ); ?></label>
|
27 |
</p>
|
28 |
|
33 |
<img src="<?php echo plugin_dir_url( __FILE__ ) . 'preview.jpg'; ?>" id="fsb_preview_image" style="padding: 3px; border: 1px solid #f0f0f0; max-width: 600px; overflow: hidden;"/>
|
34 |
<?php } ?>
|
35 |
</p>
|
36 |
+
|
37 |
<!-- save the options -->
|
38 |
<p class="submit">
|
39 |
<input type="submit" class="button-primary" value="<?php _e( 'Save Options' ); ?>" />
|
40 |
</p>
|
41 |
+
|
42 |
+
|
43 |
</form>
|
44 |
</div><!--end fsb-wrap-->
|
45 |
</div><!--end wrap-->
|
46 |
+
<?php
|
47 |
+
|
48 |
}
|
49 |
function fsb_init_admin() {
|
50 |
add_submenu_page( 'themes.php', 'Full Screen Background Image', 'Fullscreen BG Image', 'manage_options', 'full-screen-background', 'fsb_admin_page' );
|
includes/display-image.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function fsb_display_image() {
|
4 |
+
global $fsb_options;
|
5 |
+
|
6 |
+
if ( isset( $fsb_options['image'] ) ) {
|
7 |
+
$image = $fsb_options['image'];
|
8 |
+
if( is_ssl() ) {
|
9 |
+
$image = str_replace( 'http://', 'https://', $image );
|
10 |
+
}
|
11 |
+
echo '<img src="' . esc_url( $image ) . '" id="fsb_image"/>';
|
12 |
+
}
|
13 |
+
}
|
14 |
+
add_action( 'wp_footer', 'fsb_display_image' );
|
includes/fsb-scripts.js
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function($) {
|
2 |
+
|
3 |
+
window.widgetFormfield = '';
|
4 |
+
|
5 |
+
jQuery('.upload_image_button').on('click', function() {
|
6 |
+
window.widgetFormfield = jQuery('.upload_field',jQuery(this).parent());
|
7 |
+
tb_show('Choose Image', 'media-upload.php?TB_iframe=true');
|
8 |
+
return false;
|
9 |
+
});
|
10 |
+
|
11 |
+
window.original_send_to_editor = window.send_to_editor;
|
12 |
+
window.send_to_editor = function(html) {
|
13 |
+
if (window.widgetFormfield) {
|
14 |
+
imgurl = jQuery('img',html).attr('src');
|
15 |
+
window.widgetFormfield.val(imgurl);
|
16 |
+
tb_remove();
|
17 |
+
}
|
18 |
+
else {
|
19 |
+
window.original_send_to_editor(html);
|
20 |
+
}
|
21 |
+
window.widgetFormfield = '';
|
22 |
+
window.imagefield = false;
|
23 |
+
|
24 |
+
jQuery('#fsb_preview_image').attr('src', imgurl);
|
25 |
+
}
|
26 |
+
|
27 |
+
});
|
{simple-full-screen-background/includes → includes}/fullscreen-image.css
RENAMED
File without changes
|
{simple-full-screen-background/includes → includes}/preview.jpg
RENAMED
File without changes
|
includes/scripts.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function fsb_load_css() {
|
4 |
+
global $fsb_options;
|
5 |
+
if( isset( $fsb_options['image'] ) )
|
6 |
+
wp_enqueue_style( 'fsb-image', plugin_dir_url( __FILE__ ) . 'fullscreen-image.css' );
|
7 |
+
}
|
8 |
+
add_action( 'init', 'fsb_load_css' );
|
9 |
+
|
10 |
+
function fsb_load_admin_scripts( $hook ) {
|
11 |
+
if( 'appearance_page_full-screen-background' !== $hook )
|
12 |
+
return;
|
13 |
+
wp_enqueue_script( 'fsb-scripts', plugin_dir_url( __FILE__ ) . 'fsb-scripts.js', array( 'jquery', 'media-upload', 'thickbox' ), filemtime( plugin_dir_path( __FILE__ ) . 'fsb-scripts.js' ) );
|
14 |
+
}
|
15 |
+
function fsb_load_admin_styles( $hook ) {
|
16 |
+
if( 'appearance_page_full-screen-background' !== $hook )
|
17 |
+
return;
|
18 |
+
wp_enqueue_style( 'thickbox' );
|
19 |
+
}
|
20 |
+
add_action( 'admin_enqueue_scripts', 'fsb_load_admin_scripts' );
|
21 |
+
add_action( 'admin_enqueue_scripts', 'fsb_load_admin_styles' );
|
simple-full-screen-background/readme.txt → readme.txt
RENAMED
@@ -1,12 +1,12 @@
|
|
1 |
=== Simple Full Screen Background Image ===
|
2 |
-
Author:
|
3 |
Author URI: http://pippinsplugins.com
|
4 |
Plugin URI: http://pippinspages.com/simple-fullscreen-background-image
|
5 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=72HGD7SA97KPE
|
6 |
Tags: background, fullscreen, image, bg image, full screen
|
7 |
-
Requires at least:
|
8 |
-
Tested up to: 3.
|
9 |
-
Stable tag: 1.0
|
10 |
|
11 |
This plugin lets provides a simple way to set an automatically scaled full screen background image.
|
12 |
|
@@ -15,7 +15,7 @@ This plugin lets provides a simple way to set an automatically scaled full scree
|
|
15 |
Simple Full Screen Background Image will allow you to easily upload and set a full screen image as the background of your website. Images will be automatically scaled
|
16 |
with the browser, so regardless of the browser size, the image will always fill the screen, even as the browser is resized live.
|
17 |
|
18 |
-
|
19 |
|
20 |
Once activated, go to Appearance > Fullscreen BG Image. From here click Choose Image, then either upload from your computer or choose one from the media library.
|
21 |
Once you have chosen your image, select the size you wish to insert and click Insert Into Post. A preview of your image will appear below. Now click Save Options
|
@@ -30,6 +30,11 @@ and view your site. The image should now be applied as a full screen background
|
|
30 |
|
31 |
Check out http://pippinsplugins.com/simple-fullscreen-background-image for screenshots and a demonstration video
|
32 |
|
|
|
33 |
|
|
|
|
|
|
|
|
|
34 |
|
35 |
|
1 |
=== Simple Full Screen Background Image ===
|
2 |
+
Author: mordauk
|
3 |
Author URI: http://pippinsplugins.com
|
4 |
Plugin URI: http://pippinspages.com/simple-fullscreen-background-image
|
5 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=72HGD7SA97KPE
|
6 |
Tags: background, fullscreen, image, bg image, full screen
|
7 |
+
Requires at least: 3.0
|
8 |
+
Tested up to: 3.6
|
9 |
+
Stable tag: 1.0.4
|
10 |
|
11 |
This plugin lets provides a simple way to set an automatically scaled full screen background image.
|
12 |
|
15 |
Simple Full Screen Background Image will allow you to easily upload and set a full screen image as the background of your website. Images will be automatically scaled
|
16 |
with the browser, so regardless of the browser size, the image will always fill the screen, even as the browser is resized live.
|
17 |
|
18 |
+
Usage
|
19 |
|
20 |
Once activated, go to Appearance > Fullscreen BG Image. From here click Choose Image, then either upload from your computer or choose one from the media library.
|
21 |
Once you have chosen your image, select the size you wish to insert and click Insert Into Post. A preview of your image will appear below. Now click Save Options
|
30 |
|
31 |
Check out http://pippinsplugins.com/simple-fullscreen-background-image for screenshots and a demonstration video
|
32 |
|
33 |
+
== Changelog ==
|
34 |
|
35 |
+
= 1.0.4 =
|
36 |
+
|
37 |
+
* Fixed an issue with images loading via http when on an https site
|
38 |
+
* Did some general code cleanup and improvement
|
39 |
|
40 |
|
simple-full-screen-background/screenshot-1.png → screenshot-1.png
RENAMED
File without changes
|
simple-full-screen-background/screenshot-2.png → screenshot-2.png
RENAMED
File without changes
|
simple-full-screen-background/screenshot-3.png → screenshot-3.png
RENAMED
File without changes
|
simple-full-screen-background/simple-full-screen-background.php → simple-full-screen-background.php
RENAMED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Simple Full Screen Background Image
|
4 |
Description: Easily set an automatically scaled full-screen background image
|
5 |
-
Version: 1.0
|
6 |
Author: Pippin Williamson
|
7 |
Author URI: http://pippinsplugins.com
|
8 |
*/
|
2 |
/*
|
3 |
Plugin Name: Simple Full Screen Background Image
|
4 |
Description: Easily set an automatically scaled full-screen background image
|
5 |
+
Version: 1.0.4
|
6 |
Author: Pippin Williamson
|
7 |
Author URI: http://pippinsplugins.com
|
8 |
*/
|
simple-full-screen-background/includes/display-image.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
function fsb_display_image() {
|
4 |
-
global $fsb_options;
|
5 |
-
|
6 |
-
if($fsb_options) {
|
7 |
-
$image = '<img src="' . $fsb_options['image'] . '" id="fsb_image"/>';
|
8 |
-
}
|
9 |
-
// output the image
|
10 |
-
echo $image;
|
11 |
-
}
|
12 |
-
add_action('wp_footer', 'fsb_display_image');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
simple-full-screen-background/includes/scripts.php
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
function fsb_load_css() {
|
4 |
-
wp_enqueue_style('fsb-image', plugin_dir_url( __FILE__ ) . 'fullscreen-image.css');
|
5 |
-
}
|
6 |
-
add_action('init', 'fsb_load_css');
|
|
|
|
|
|
|
|
|
|
|
|