Version Description
Download this release
Release Info
Developer | tinkerpriest |
Plugin | Add Logo to Admin |
Version | 1.2 |
Comparing to | |
See all releases |
Code changes from version 1.1 to 1.2
- add-logo.php +8 -7
- js/admin.js +1 -1
- js/login.js +1 -1
- readme.txt +18 -5
add-logo.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Add Logo to Admin
|
|
4 |
Plugin URI: http://bavotasan.com/tidbits/add-your-logo-to-the-wordpress-admin-and-login-page/
|
5 |
Description: Adds a custom logo to your site's Admin header and your login page.
|
6 |
Author: c.bavota
|
7 |
-
Version: 1.
|
8 |
Author URI: http://bavotasan.com
|
9 |
*/
|
10 |
|
@@ -39,11 +39,12 @@ if(get_option('add_logo_on_admin') == "yes") {
|
|
39 |
if (is_admin()) {
|
40 |
add_action('admin_head', 'wp_admin_admin_css');
|
41 |
function wp_admin_admin_css() {
|
42 |
-
echo '<link rel="stylesheet" type="text/css" href="' .
|
43 |
}
|
44 |
-
wp_enqueue_script('add_logo_admin_script',
|
45 |
wp_localize_script( 'add_logo_admin_script', 'newLogo', array(
|
46 |
-
'logo' => get_option('add_logo_logo')
|
|
|
47 |
));
|
48 |
}
|
49 |
}
|
@@ -52,9 +53,9 @@ if(get_option('add_logo_on_admin') == "yes") {
|
|
52 |
if(get_option('add_logo_on_login') == "yes") {
|
53 |
add_action('login_head', 'wp_admin_login_css');
|
54 |
function wp_admin_login_css() {
|
55 |
-
echo '<link rel="stylesheet" type="text/css" href="' .
|
56 |
-
echo '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n" . ' newLogo = {' . "\n" . ' logo: "' . get_option('add_logo_logo') . '"' . "\n" . ' }' . "\n" . '/* ]]> */' . "\n" . '</script>' . "\n";
|
57 |
-
echo '<script type="text/javascript" src="' .
|
58 |
}
|
59 |
}
|
60 |
|
4 |
Plugin URI: http://bavotasan.com/tidbits/add-your-logo-to-the-wordpress-admin-and-login-page/
|
5 |
Description: Adds a custom logo to your site's Admin header and your login page.
|
6 |
Author: c.bavota
|
7 |
+
Version: 1.2
|
8 |
Author URI: http://bavotasan.com
|
9 |
*/
|
10 |
|
39 |
if (is_admin()) {
|
40 |
add_action('admin_head', 'wp_admin_admin_css');
|
41 |
function wp_admin_admin_css() {
|
42 |
+
echo '<link rel="stylesheet" type="text/css" href="' . get_option('siteurl') . '/wp-content/plugins/add-logo-to-admin/css/wp-admin.css" />'."\n";
|
43 |
}
|
44 |
+
wp_enqueue_script('add_logo_admin_script', get_option('siteurl') . '/wp-content/plugins/add-logo-to-admin/js/admin.js');
|
45 |
wp_localize_script( 'add_logo_admin_script', 'newLogo', array(
|
46 |
+
'logo' => get_option('add_logo_logo'),
|
47 |
+
'site' => get_option('siteurl')
|
48 |
));
|
49 |
}
|
50 |
}
|
53 |
if(get_option('add_logo_on_login') == "yes") {
|
54 |
add_action('login_head', 'wp_admin_login_css');
|
55 |
function wp_admin_login_css() {
|
56 |
+
echo '<link rel="stylesheet" type="text/css" href="' . get_option('siteurl') . '/wp-content/plugins/add-logo-to-admin/css/login.css" />'."\n";
|
57 |
+
echo '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n" . ' newLogo = {' . "\n" . ' logo: "' . get_option('add_logo_logo') . '",' . "\n" . ' site: "' . get_option('siteurl') . '"' . "\n" .' }' . "\n" . '/* ]]> */' . "\n" . '</script>' . "\n";
|
58 |
+
echo '<script type="text/javascript" src="' . get_option('siteurl') . '/wp-content/plugins/add-logo-to-admin/js/login.js"></script>'."\n";
|
59 |
}
|
60 |
}
|
61 |
|
js/admin.js
CHANGED
@@ -16,7 +16,7 @@ function addLogo() {
|
|
16 |
myBody.innerHTML = "";
|
17 |
|
18 |
var img = document.createElement("img");
|
19 |
-
var imgSrc = newLogo.logo;
|
20 |
img.setAttribute("src",imgSrc);
|
21 |
img.setAttribute("id", "newLogo");
|
22 |
|
16 |
myBody.innerHTML = "";
|
17 |
|
18 |
var img = document.createElement("img");
|
19 |
+
var imgSrc = newLogo.site+newLogo.logo;
|
20 |
img.setAttribute("src",imgSrc);
|
21 |
img.setAttribute("id", "newLogo");
|
22 |
|
js/login.js
CHANGED
@@ -16,7 +16,7 @@ function addLogo() {
|
|
16 |
myBody.innerHTML = "";
|
17 |
|
18 |
var img = document.createElement("img");
|
19 |
-
var imgSrc = newLogo.logo;
|
20 |
img.setAttribute("src",imgSrc);
|
21 |
img.setAttribute("id", "newLogo");
|
22 |
|
16 |
myBody.innerHTML = "";
|
17 |
|
18 |
var img = document.createElement("img");
|
19 |
+
var imgSrc = newLogo.site+newLogo.logo;
|
20 |
img.setAttribute("src",imgSrc);
|
21 |
img.setAttribute("id", "newLogo");
|
22 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: c.bavota
|
|
3 |
Donate Link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=1929921
|
4 |
Tags: custom logo, admin, login
|
5 |
Requires at least: 2.7
|
6 |
-
Tested up to: 2.7
|
7 |
-
Stable tag: 1.
|
8 |
|
9 |
Add a custom logo to your admin header and to your login page.
|
10 |
|
@@ -36,6 +36,13 @@ You can make it any width or height.
|
|
36 |
|
37 |
== Change Log ==
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
1.1 (2008-12-24)
|
40 |
<ul>
|
41 |
<li>Added admin page with options</li>
|
@@ -45,10 +52,16 @@ You can make it any width or height.
|
|
45 |
</ul>
|
46 |
|
47 |
1.0.2 (2008-12-16)
|
48 |
-
|
|
|
|
|
49 |
|
50 |
1.0.1 (2008-12-16)
|
51 |
-
|
|
|
|
|
52 |
|
53 |
1.0 (2008-12-15)
|
54 |
-
|
|
|
|
3 |
Donate Link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=1929921
|
4 |
Tags: custom logo, admin, login
|
5 |
Requires at least: 2.7
|
6 |
+
Tested up to: 2.7.1
|
7 |
+
Stable tag: 1.2
|
8 |
|
9 |
Add a custom logo to your admin header and to your login page.
|
10 |
|
36 |
|
37 |
== Change Log ==
|
38 |
|
39 |
+
1.2 (2009-02-23)
|
40 |
+
<ul>
|
41 |
+
<li>Fixed issue with WP installs in subdirectories</li>
|
42 |
+
<li>Removed old code</li>
|
43 |
+
<li>Tested on WP version 2.7.1</li>
|
44 |
+
</ul>
|
45 |
+
|
46 |
1.1 (2008-12-24)
|
47 |
<ul>
|
48 |
<li>Added admin page with options</li>
|
52 |
</ul>
|
53 |
|
54 |
1.0.2 (2008-12-16)
|
55 |
+
<ul>
|
56 |
+
<li>Fixed weirdness with extra folder</li>
|
57 |
+
</ul>
|
58 |
|
59 |
1.0.1 (2008-12-16)
|
60 |
+
<ul>
|
61 |
+
<li>Fixed the code to direct to the proper plugin folder</li>
|
62 |
+
</ul>
|
63 |
|
64 |
1.0 (2008-12-15)
|
65 |
+
<ul>
|
66 |
+
<li>Initial Public Release</li>
|
67 |
+
</ul>
|