Add Logo to Admin - Version 1.0.1

Version Description

Download this release

Release Info

Developer tinkerpriest
Plugin Icon wp plugin Add Logo to Admin
Version 1.0.1
Comparing to
See all releases

Version 1.0.1

add-logo.php ADDED
@@ -0,0 +1,25 @@
1
+ <?php
2
+ /*
3
+ 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.0.1
8
+ Author URI: http://bavotasan.com
9
+ */
10
+
11
+ function add_logo_to_admin() {
12
+ echo '<link rel="stylesheet" type="text/css" href="' . get_settings('siteurl') . '/wp-content/plugins/add-logo-to-admin/css/wp-admin.css" />'."\n";
13
+ echo '<script type="text/javascript" src="' . get_settings('siteurl') . '/wp-content/plugins/add-logo-to-admin/js/admin.js"></script>'."\n";
14
+ }
15
+
16
+ add_action('admin_head', 'add_logo_to_admin');
17
+
18
+ function wp_admin_login_css() {
19
+ echo '<link rel="stylesheet" type="text/css" href="' . get_settings('siteurl') . '/wp-content/plugins/add-logo-to-admin/css/login.css" />'."\n";
20
+ echo '<script type="text/javascript" src="' . get_settings('siteurl') . '/wp-content/plugins/add-logo-to-admin/js/login.js"></script>'."\n";
21
+ }
22
+
23
+ add_action('login_head', 'wp_admin_login_css');
24
+
25
+ ?>
trunk/add-logo.php ADDED
@@ -0,0 +1,25 @@
1
+ <?php
2
+ /*
3
+ 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.0.1
8
+ Author URI: http://bavotasan.com
9
+ */
10
+
11
+ function add_logo_to_admin() {
12
+ echo '<link rel="stylesheet" type="text/css" href="' . get_settings('siteurl') . '/wp-content/plugins/add-logo-to-admin/css/wp-admin.css" />'."\n";
13
+ echo '<script type="text/javascript" src="' . get_settings('siteurl') . '/wp-content/plugins/add-logo-to-admin/js/admin.js"></script>'."\n";
14
+ }
15
+
16
+ add_action('admin_head', 'add_logo_to_admin');
17
+
18
+ function wp_admin_login_css() {
19
+ echo '<link rel="stylesheet" type="text/css" href="' . get_settings('siteurl') . '/wp-content/plugins/add-logo-to-admin/css/login.css" />'."\n";
20
+ echo '<script type="text/javascript" src="' . get_settings('siteurl') . '/wp-content/plugins/add-logo-to-admin/js/login.js"></script>'."\n";
21
+ }
22
+
23
+ add_action('login_head', 'wp_admin_login_css');
24
+
25
+ ?>
trunk/css/login.css ADDED
@@ -0,0 +1,3 @@
1
+ #newLogo {
2
+ padding: 0 0 20px;
3
+ }
trunk/css/wp-admin.css ADDED
@@ -0,0 +1,14 @@
1
+ #header-logo {
2
+ display: none;
3
+ }
4
+
5
+ #newLogo {
6
+ padding: 0 0 10px;
7
+ }
8
+
9
+ #wphead {
10
+ height: auto;
11
+ float: left;
12
+ width: 100%;
13
+ }
14
+
trunk/images/logo.png ADDED
Binary file
trunk/js/admin.js ADDED
@@ -0,0 +1,14 @@
1
+ window.onload = addLogo;
2
+
3
+ function addLogo() {
4
+ var myBody = document.getElementById("wphead").getElementsByTagName("a")[0];
5
+ myBody.innerHTML = "";
6
+
7
+ var img = document.createElement("img");
8
+ var imgSrc = "../wp-content/plugins/add-logo-to-admin/images/logo.png";
9
+ img.setAttribute("src",imgSrc);
10
+ img.setAttribute("id", "newLogo");
11
+
12
+ myBody.appendChild(img);
13
+ return false;
14
+ }
trunk/js/login.js ADDED
@@ -0,0 +1,14 @@
1
+ window.onload = addLogo;
2
+
3
+ function addLogo() {
4
+ var myBody = document.getElementsByTagName("h1")[0];
5
+ myBody.innerHTML = "";
6
+
7
+ var img = document.createElement("img");
8
+ var imgSrc = "../wp-content/plugins/add-logo-to-admin/images/logo.png";
9
+ img.setAttribute("src",imgSrc);
10
+ img.setAttribute("id", "newLogo");
11
+
12
+ myBody.appendChild(img);
13
+ return false;
14
+ }
trunk/readme.txt ADDED
@@ -0,0 +1,59 @@
1
+ === Add Logo to Admin ===
2
+ 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.0.1
8
+
9
+ Add a custom logo to your admin header and to your login page.
10
+
11
+ == Description ==
12
+
13
+ Add a custom logo to your admin header and to your login page.
14
+
15
+ This plugin allows a user to customize their admin panel by adding their own logo to the header. It also replaces the WordPress logo on the login screen with the same custom logo.
16
+
17
+ == Installation ==
18
+
19
+ 1. Unzip the add-logo.zip file.
20
+ 2. Create your own logo and name it logo.png. Add it to add-logo/images folder.
21
+ 3. Upload the `add-logo` folder to the `/wp-content/plugins/` directory.
22
+ 4. Activate the plugin through the 'Plugins' menu in WordPress.
23
+
24
+ == Frequently Asked Questions ==
25
+
26
+ 1) How do I add my own logo?
27
+
28
+ Create your own logo and name it logo.png. Add it to add-logo/images folder.
29
+
30
+ 2) How big does my logo need to be?
31
+
32
+ You can make it any width or height.
33
+
34
+ 3) Can my logo by a jpg file?
35
+
36
+ Yes it can. But you would need to edit two lines in two files of the plugin to make it work.
37
+
38
+ Open file js/login.js and change line 8 to
39
+
40
+ var imgSrc = "../wp-content/plugins/add-logo/images/logo.jpg";
41
+
42
+ Open file js/admin.js and change line 8 to
43
+
44
+ var imgSrc = "../wp-content/plugins/add-logo/images/logo.jpg";
45
+
46
+ NOTE: You can also change it to logo.gif or whichever file format you prefer. I chose .png to take advantage of the high quality transparency it offers.
47
+
48
+ == Screenshots ==
49
+
50
+ 1. Admin before and after
51
+ 2. Login page before and after
52
+
53
+ == Change Log ==
54
+
55
+ 1.0.1 (2008-12-16)
56
+ Fixed the code to direct the proper plugin folder
57
+
58
+ 1.0 (2008-12-15)
59
+ Initial Public Release
trunk/screenshot-1.jpg ADDED
Binary file
trunk/screenshot-2.jpg ADDED
Binary file