Version Description
- Support for WordPress 3.3
- Fix a bug in CSS resizing of oversized images
Download this release
Release Info
Developer | markjaquith |
Plugin | Login Logo |
Version | 0.5 |
Comparing to | |
See all releases |
Code changes from version 0.4 to 0.5
- login-logo.php +10 -3
- readme.txt +9 -2
login-logo.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Login Logo
|
4 |
Description: Drop a PNG file named <code>login-logo.png</code> into your <code>wp-content</code> directory. This simple plugin takes care of the rest, with zero configuration. Transparent backgrounds work best. Keep the width below 326 pixels.
|
5 |
-
Version: 0.
|
6 |
License: GPL
|
7 |
Author: Mark Jaquith
|
8 |
Author URI: http://coveredwebservices.com/
|
@@ -15,6 +15,7 @@ class CWS_Login_Logo_Plugin {
|
|
15 |
var $logo_location;
|
16 |
var $width = 0;
|
17 |
var $height = 0;
|
|
|
18 |
var $original_height;
|
19 |
var $logo_size;
|
20 |
var $logo_file_exists;
|
@@ -82,6 +83,11 @@ class CWS_Login_Logo_Plugin {
|
|
82 |
return absint( $this->height );
|
83 |
}
|
84 |
|
|
|
|
|
|
|
|
|
|
|
85 |
private function get_original_height() {
|
86 |
$this->get_logo_size();
|
87 |
return absint( $this->original_height );
|
@@ -96,6 +102,7 @@ class CWS_Login_Logo_Plugin {
|
|
96 |
$this->width = $sizes[0];
|
97 |
$this->height = $sizes[1];
|
98 |
$this->original_height = $this->height;
|
|
|
99 |
if ( $this->width > self::cutoff ) {
|
100 |
// Use CSS 3 scaling
|
101 |
$ratio = $this->height / $this->width;
|
@@ -127,11 +134,11 @@ class CWS_Login_Logo_Plugin {
|
|
127 |
?>
|
128 |
<!-- Login Logo plugin for WordPress: http://txfx.net/wordpress-plugins/login-logo/ -->
|
129 |
<style type="text/css">
|
130 |
-
h1 a {
|
131 |
background: url(<?php echo esc_url_raw( $this->get_location( 'url' ) ); ?>) no-repeat top center;
|
132 |
width: <?php echo self::cutoff; ?>px;
|
133 |
height: <?php echo $this->get_height() + 3; ?>px;
|
134 |
-
<?php if ( self::cutoff < $this->
|
135 |
}
|
136 |
</style>
|
137 |
<?php if ( self::cutoff < $this->get_width() ) { ?>
|
2 |
/*
|
3 |
Plugin Name: Login Logo
|
4 |
Description: Drop a PNG file named <code>login-logo.png</code> into your <code>wp-content</code> directory. This simple plugin takes care of the rest, with zero configuration. Transparent backgrounds work best. Keep the width below 326 pixels.
|
5 |
+
Version: 0.5
|
6 |
License: GPL
|
7 |
Author: Mark Jaquith
|
8 |
Author URI: http://coveredwebservices.com/
|
15 |
var $logo_location;
|
16 |
var $width = 0;
|
17 |
var $height = 0;
|
18 |
+
var $original_width;
|
19 |
var $original_height;
|
20 |
var $logo_size;
|
21 |
var $logo_file_exists;
|
83 |
return absint( $this->height );
|
84 |
}
|
85 |
|
86 |
+
private function get_original_width() {
|
87 |
+
$this->get_logo_size();
|
88 |
+
return absint( $this->original_width );
|
89 |
+
}
|
90 |
+
|
91 |
private function get_original_height() {
|
92 |
$this->get_logo_size();
|
93 |
return absint( $this->original_height );
|
102 |
$this->width = $sizes[0];
|
103 |
$this->height = $sizes[1];
|
104 |
$this->original_height = $this->height;
|
105 |
+
$this->original_width = $this->width;
|
106 |
if ( $this->width > self::cutoff ) {
|
107 |
// Use CSS 3 scaling
|
108 |
$ratio = $this->height / $this->width;
|
134 |
?>
|
135 |
<!-- Login Logo plugin for WordPress: http://txfx.net/wordpress-plugins/login-logo/ -->
|
136 |
<style type="text/css">
|
137 |
+
.login h1 a {
|
138 |
background: url(<?php echo esc_url_raw( $this->get_location( 'url' ) ); ?>) no-repeat top center;
|
139 |
width: <?php echo self::cutoff; ?>px;
|
140 |
height: <?php echo $this->get_height() + 3; ?>px;
|
141 |
+
<?php if ( self::cutoff < $this->get_original_width() ) $this->css3( 'background-size', 'contain' ); ?>
|
142 |
}
|
143 |
</style>
|
144 |
<?php if ( self::cutoff < $this->get_width() ) { ?>
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: markjaquith
|
|
3 |
Donate link: http://txfx.net/wordpress-plugins/donate
|
4 |
Tags: customize, login, login screen, logo, custom logo
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 0.
|
8 |
|
9 |
Customize the logo on the WP login screen by simply dropping a file named login-logo.png into your WP content directory. CSS is automatic!
|
10 |
|
@@ -42,6 +42,10 @@ Your image is probably too wide. Wide images are scaled down in IE 9 or other mo
|
|
42 |
|
43 |
|
44 |
== Changelog ==
|
|
|
|
|
|
|
|
|
45 |
= 0.4 =
|
46 |
* Use HTTPS if `is_ssl()` on the login page.
|
47 |
|
@@ -57,6 +61,9 @@ Your image is probably too wide. Wide images are scaled down in IE 9 or other mo
|
|
57 |
* Original version
|
58 |
|
59 |
== Upgrade Notice ==
|
|
|
|
|
|
|
60 |
= 0.4 =
|
61 |
Adds support for SSL
|
62 |
|
3 |
Donate link: http://txfx.net/wordpress-plugins/donate
|
4 |
Tags: customize, login, login screen, logo, custom logo
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 3.3
|
7 |
+
Stable tag: 0.5
|
8 |
|
9 |
Customize the logo on the WP login screen by simply dropping a file named login-logo.png into your WP content directory. CSS is automatic!
|
10 |
|
42 |
|
43 |
|
44 |
== Changelog ==
|
45 |
+
= 0.5 =
|
46 |
+
* Support for WordPress 3.3
|
47 |
+
* Fix a bug in CSS resizing of oversized images
|
48 |
+
|
49 |
= 0.4 =
|
50 |
* Use HTTPS if `is_ssl()` on the login page.
|
51 |
|
61 |
* Original version
|
62 |
|
63 |
== Upgrade Notice ==
|
64 |
+
= 0.5 =
|
65 |
+
Upgrade immediately or the plugin will not work in WordPress 3.3!
|
66 |
+
|
67 |
= 0.4 =
|
68 |
Adds support for SSL
|
69 |
|