Version Description
Download this release
Release Info
Developer | uberweb |
Plugin | Uber Login Logo |
Version | 1.4 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 1.4
- languages/uber-login-logo-es_ES.mo +0 -0
- languages/uber-login-logo-es_ES.po +87 -0
- languages/uber-login-logo-fr_FR.mo +0 -0
- languages/uber-login-logo-fr_FR.po +88 -0
- languages/uber-login-logo.pot +81 -0
- readme.txt +19 -4
- uber-login-logo-min.js +1 -1
- uber-login-logo.php +28 -17
languages/uber-login-logo-es_ES.mo
ADDED
Binary file
|
languages/uber-login-logo-es_ES.po
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2013 Uber Login Logo
|
2 |
+
# This file is distributed under the same license as the Uber Login Logo package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Uber Login Logo 1.0\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/uber-login-logo\n"
|
7 |
+
"POT-Creation-Date: 2013-05-12 13:07:08+00:00\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2013-10-12 15:22-0300\n"
|
12 |
+
"Last-Translator: gaston999 <gaston_ferbari@hotmail.com>\n"
|
13 |
+
"Language-Team: DeTodoyNada.com.ar <gaston_ferbari@hotmail.com>\n"
|
14 |
+
"Language: es-ES\n"
|
15 |
+
"X-Generator: Poedit 1.5.7\n"
|
16 |
+
|
17 |
+
#: uber-login-logo.php:105
|
18 |
+
msgid "Uber Login Logo Settings"
|
19 |
+
msgstr "Ajustes de Uber Login Logo"
|
20 |
+
|
21 |
+
#: uber-login-logo.php:127
|
22 |
+
msgid "Settings"
|
23 |
+
msgstr "Configuraciónes"
|
24 |
+
|
25 |
+
#: uber-login-logo.php:148
|
26 |
+
msgid "Settings Saved"
|
27 |
+
msgstr "Configuración Guardada"
|
28 |
+
|
29 |
+
#: uber-login-logo.php:151
|
30 |
+
msgid "by %1$s from %2$s"
|
31 |
+
msgstr "Por %1$s de %2$s"
|
32 |
+
|
33 |
+
#: uber-login-logo.php:153
|
34 |
+
msgid "How it Works"
|
35 |
+
msgstr "Como funciona:"
|
36 |
+
|
37 |
+
#: uber-login-logo.php:155
|
38 |
+
msgid ""
|
39 |
+
"Use the WordPress media uploader to upload an image, or select one from the "
|
40 |
+
"media library."
|
41 |
+
msgstr ""
|
42 |
+
"Utilice el cargador de medios de WordPress para cargar una imagen, o "
|
43 |
+
"seleccione una imagen de la biblioteca de medios."
|
44 |
+
|
45 |
+
#: uber-login-logo.php:156
|
46 |
+
msgid ""
|
47 |
+
"It is highly recommended that you select an image with a width less than "
|
48 |
+
"320px."
|
49 |
+
msgstr "Se recomienda elegir una imagen con un ancho de menos o igual a 320px."
|
50 |
+
|
51 |
+
#: uber-login-logo.php:157
|
52 |
+
msgid "Select your desired image size and click \"insert into post\"."
|
53 |
+
msgstr ""
|
54 |
+
"Seleccione el tamaño de la imagen que desee y haga clic en \"insertar en la "
|
55 |
+
"entrada\"."
|
56 |
+
|
57 |
+
#: uber-login-logo.php:158
|
58 |
+
msgid "Finished!"
|
59 |
+
msgstr "¡Y listo!"
|
60 |
+
|
61 |
+
#: uber-login-logo.php:162
|
62 |
+
msgid "Upload Image"
|
63 |
+
msgstr "Subir imagen"
|
64 |
+
|
65 |
+
#: uber-login-logo.php:166
|
66 |
+
msgid "Here is a preview of your selected image at actual size"
|
67 |
+
msgstr "Vista previa de la imagen seleccionada a tamaño real."
|
68 |
+
|
69 |
+
#. Plugin Name of the plugin/theme
|
70 |
+
msgid "Uber Login Logo"
|
71 |
+
msgstr "Uber Login Logo"
|
72 |
+
|
73 |
+
#. Plugin URI of the plugin/theme
|
74 |
+
msgid "http://www.uberweb.com.au/uber-login-logo-wordpress-plugin/"
|
75 |
+
msgstr "http://www.uberweb.com.au/uber-login-logo-wordpress-plugin/"
|
76 |
+
|
77 |
+
#. Description of the plugin/theme
|
78 |
+
msgid "Change your login logo."
|
79 |
+
msgstr "Cambiar el logo de inicio de sesión."
|
80 |
+
|
81 |
+
#. Author of the plugin/theme
|
82 |
+
msgid "UberWeb"
|
83 |
+
msgstr "UberWeb"
|
84 |
+
|
85 |
+
#. Author URI of the plugin/theme
|
86 |
+
msgid "http://www.uberweb.com.au/"
|
87 |
+
msgstr "http://www.uberweb.com.au/"
|
languages/uber-login-logo-fr_FR.mo
ADDED
Binary file
|
languages/uber-login-logo-fr_FR.po
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2013 Uber Login Logo
|
2 |
+
# This file is distributed under the same license as the Uber Login Logo package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Uber Login Logo 1.0\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/uber-login-logo\n"
|
7 |
+
"POT-Creation-Date: 2013-05-12 13:07:08+00:00\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2013-05-12 23:17+1000\n"
|
12 |
+
"Last-Translator: NumidWasNotAvailable\n"
|
13 |
+
"Language-Team: NumidWasNotAvailable\n"
|
14 |
+
"Language: fr_FR\n"
|
15 |
+
|
16 |
+
#: uber-login-logo.php:105
|
17 |
+
msgid "Uber Login Logo Settings"
|
18 |
+
msgstr "Paramètres Uber Login Logo"
|
19 |
+
|
20 |
+
#: uber-login-logo.php:127
|
21 |
+
msgid "Settings"
|
22 |
+
msgstr "Paramètres"
|
23 |
+
|
24 |
+
#: uber-login-logo.php:148
|
25 |
+
msgid "Settings Saved"
|
26 |
+
msgstr "Paramètres sauvegardés"
|
27 |
+
|
28 |
+
#: uber-login-logo.php:151
|
29 |
+
msgid "by %1$s from %2$s"
|
30 |
+
msgstr "Par %1$s du site %2$s"
|
31 |
+
|
32 |
+
#: uber-login-logo.php:153
|
33 |
+
msgid "How it Works"
|
34 |
+
msgstr "Mode de fonctionnement"
|
35 |
+
|
36 |
+
#: uber-login-logo.php:155
|
37 |
+
msgid ""
|
38 |
+
"Use the WordPress media uploader to upload an image, or select one from the "
|
39 |
+
"media library."
|
40 |
+
msgstr ""
|
41 |
+
"Utilisez l'outil de mise en ligne de médias de Wordpress pour télécharger "
|
42 |
+
"une image, ou sélectionnez en une depuis la bibliothèque des médias."
|
43 |
+
|
44 |
+
#: uber-login-logo.php:156
|
45 |
+
msgid ""
|
46 |
+
"It is highly recommended that you select an image with a width less than "
|
47 |
+
"320px."
|
48 |
+
msgstr ""
|
49 |
+
"Il est hautement recommandé que vous sélectionniez une image avec une "
|
50 |
+
"largeur inférieure à 320 pixels."
|
51 |
+
|
52 |
+
#: uber-login-logo.php:157
|
53 |
+
msgid "Select your desired image size and click \"insert into post\"."
|
54 |
+
msgstr ""
|
55 |
+
"Sélectionnez l'image de votre choix et cliquez sur \"Insérer dans l'article"
|
56 |
+
"\"."
|
57 |
+
|
58 |
+
#: uber-login-logo.php:158
|
59 |
+
msgid "Finished!"
|
60 |
+
msgstr "C'est terminé !"
|
61 |
+
|
62 |
+
#: uber-login-logo.php:162
|
63 |
+
msgid "Upload Image"
|
64 |
+
msgstr "Télécharger une image"
|
65 |
+
|
66 |
+
#: uber-login-logo.php:166
|
67 |
+
msgid "Here is a preview of your selected image at actual size"
|
68 |
+
msgstr "Voici un aperçu de l'image que vous avez sélectionnée (taille réelle)"
|
69 |
+
|
70 |
+
#. Plugin Name of the plugin/theme
|
71 |
+
msgid "Uber Login Logo"
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#. Plugin URI of the plugin/theme
|
75 |
+
msgid "http://www.uberweb.com.au/uber-login-logo-wordpress-plugin/"
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#. Description of the plugin/theme
|
79 |
+
msgid "Change your login logo."
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#. Author of the plugin/theme
|
83 |
+
msgid "UberWeb"
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#. Author URI of the plugin/theme
|
87 |
+
msgid "http://www.uberweb.com.au/"
|
88 |
+
msgstr ""
|
languages/uber-login-logo.pot
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2013 Uber Login Logo
|
2 |
+
# This file is distributed under the same license as the Uber Login Logo package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Uber Login Logo 1.0\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/uber-login-logo\n"
|
7 |
+
"POT-Creation-Date: 2013-05-12 13:07:08+00:00\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
|
12 |
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
+
|
15 |
+
#: uber-login-logo.php:105
|
16 |
+
msgid "Uber Login Logo Settings"
|
17 |
+
msgstr ""
|
18 |
+
|
19 |
+
#: uber-login-logo.php:127
|
20 |
+
msgid "Settings"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: uber-login-logo.php:148
|
24 |
+
msgid "Settings Saved"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: uber-login-logo.php:151
|
28 |
+
msgid "by %1$s from %2$s"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: uber-login-logo.php:153
|
32 |
+
msgid "How it Works"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: uber-login-logo.php:155
|
36 |
+
msgid ""
|
37 |
+
"Use the WordPress media uploader to upload an image, or select one from the "
|
38 |
+
"media library."
|
39 |
+
msgstr ""
|
40 |
+
|
41 |
+
#: uber-login-logo.php:156
|
42 |
+
msgid ""
|
43 |
+
"It is highly recommended that you select an image with a width less than "
|
44 |
+
"320px."
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: uber-login-logo.php:157
|
48 |
+
msgid "Select your desired image size and click \"insert into post\"."
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: uber-login-logo.php:158
|
52 |
+
msgid "Finished!"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: uber-login-logo.php:162
|
56 |
+
msgid "Upload Image"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: uber-login-logo.php:166
|
60 |
+
msgid "Here is a preview of your selected image at actual size"
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#. Plugin Name of the plugin/theme
|
64 |
+
msgid "Uber Login Logo"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#. Plugin URI of the plugin/theme
|
68 |
+
msgid "http://www.uberweb.com.au/uber-login-logo-wordpress-plugin/"
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#. Description of the plugin/theme
|
72 |
+
msgid "Change your login logo."
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#. Author of the plugin/theme
|
76 |
+
msgid "UberWeb"
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#. Author URI of the plugin/theme
|
80 |
+
msgid "http://www.uberweb.com.au/"
|
81 |
+
msgstr ""
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: uberweb
|
3 |
Tags: login, logo, login logo, admin, customisation, customization, branding, custom login, media uploader, AJAX, wp-login
|
4 |
Requires at least: 3.5
|
5 |
-
Tested up to: 3.
|
6 |
-
Stable tag: 1.
|
7 |
|
8 |
A simple, lightweight WordPress plugin to change your login logo.
|
9 |
|
@@ -37,6 +37,22 @@ As of 0.5 This plugin makes use of the new media editor introduced in WordPress
|
|
37 |
|
38 |
== Changelog ==
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
= version 1.0 =
|
41 |
|
42 |
* Added proper uninstall hook. removes saved options on delete.
|
@@ -67,5 +83,4 @@ As of 0.5 This plugin makes use of the new media editor introduced in WordPress
|
|
67 |
|
68 |
= Version 0.1 =
|
69 |
|
70 |
-
* The first release.
|
71 |
-
|
2 |
Contributors: uberweb
|
3 |
Tags: login, logo, login logo, admin, customisation, customization, branding, custom login, media uploader, AJAX, wp-login
|
4 |
Requires at least: 3.5
|
5 |
+
Tested up to: 3.8
|
6 |
+
Stable tag: 1.4
|
7 |
|
8 |
A simple, lightweight WordPress plugin to change your login logo.
|
9 |
|
37 |
|
38 |
== Changelog ==
|
39 |
|
40 |
+
= version 1.4 =
|
41 |
+
|
42 |
+
* Fix for the logo cropping in 3.8
|
43 |
+
|
44 |
+
= version 1.3 =
|
45 |
+
|
46 |
+
* Logo shows properly over https.
|
47 |
+
|
48 |
+
= version 1.2 =
|
49 |
+
|
50 |
+
* Added new translation (Spanish) thanks to GaStOn.
|
51 |
+
|
52 |
+
= version 1.1 =
|
53 |
+
|
54 |
+
* Added first translation (French) thanks to NumidWasNotAvailable.
|
55 |
+
|
56 |
= version 1.0 =
|
57 |
|
58 |
* Added proper uninstall hook. removes saved options on delete.
|
83 |
|
84 |
= Version 0.1 =
|
85 |
|
86 |
+
* The first release.
|
|
uber-login-logo-min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
var Uber=Uber||{};
|
2 |
-
(function(d){Uber.LoginLogo={config:{version:"1.
|
1 |
var Uber=Uber||{};
|
2 |
+
(function(d){Uber.LoginLogo={config:{version:"1.4",nonce:null,editor:null,selectedId:0},elems:{$container:".uber-login-logo",$uploadTrigger:".upload-image",$uploadInput:"#upload-input",$nonceInput:"#uber_login_logo_nonce",$updateStatus:".update-status",$imgHolder:".img-holder",$imgPreview:".img-preview"},init:function(){Uber.Tools.setElems(this.elems,this);if(Uber.Tools.doesElemExist(this.elems.$container)){_.bindAll(this);this.setNonce();this.setEditor();this.getOptions();this.catchInsert();var a=this;this.elems.$uploadTrigger.on("click",function(){a.config.editor.open();return!1});this.config.editor.on("open",this.preSelectImage)}},setEditor:function(){this.config.editor=wp.media.editor.add("content")},setNonce:function(){this.config.nonce=this.elems.$nonceInput.val()},getOptions:function(){var a=this;d.ajax({url:ajaxurl,type:"post",dataType:"json",data:{action:"displayPreviewImg",uber_login_logo_nonce:this.config.nonce}}).done(function(b){a.showImagePreview(b)})},updateOptions:function(a,b){var c=this;d.ajax({url:ajaxurl,type:"post",dataType:"json",data:{action:"getImageData",id:a,size:b,uber_login_logo_nonce:this.config.nonce}}).done(function(a){c.showImagePreview(a);c.elems.$updateStatus.show()})},showImagePreview:function(a){this.elems.$uploadInput.val(a.src);this.elems.$imgPreview.html('<img src="'+a.src+'" />');this.elems.$imgHolder.show();this.config.selectedId=a.id},preSelectImage:function(){var a=this.config.editor.state().get("selection"),b=wp.media.attachment(this.config.selectedId);b.fetch();a.add(b?[b]:[])},catchInsert:function(){var a=this;wp.media.editor.send.attachment=function(b,c){a.updateOptions(c.id,b.size)}}};Uber.Tools={setElems:function(a,b,c){b.elems=b.elems||{};for(var e in a)b.elems[e]=c?c.find(a[e]):d(a[e])},doesElemExist:function(a){return"undefined"!==typeof a&&a.length}};d(function(){Uber.LoginLogo.init()})})(jQuery,window,document);
|
uber-login-logo.php
CHANGED
@@ -6,17 +6,19 @@
|
|
6 |
* @link http://www.uberweb.com.au/uber-login-logo-wordpress-plugin/
|
7 |
*
|
8 |
* @author Alex Rogers
|
9 |
-
* @version 1.
|
10 |
* @package Uber_Login_Logo
|
11 |
*/
|
12 |
|
13 |
/*
|
14 |
Plugin Name: Uber Login Logo
|
15 |
Plugin URI: http://www.uberweb.com.au/uber-login-logo-wordpress-plugin/
|
16 |
-
Description: Change login logo.
|
17 |
-
Version: 1.
|
18 |
Author: UberWeb
|
19 |
Author URI: http://www.uberweb.com.au/
|
|
|
|
|
20 |
License: GPLv2 or later
|
21 |
*/
|
22 |
|
@@ -54,7 +56,7 @@ class UberLoginLogo
|
|
54 |
/**
|
55 |
* @const VERSION The current plugin version
|
56 |
*/
|
57 |
-
const VERSION = '1.
|
58 |
|
59 |
/**
|
60 |
* @const UBERURL Link to uberweb site
|
@@ -66,6 +68,7 @@ class UberLoginLogo
|
|
66 |
*/
|
67 |
public static function init()
|
68 |
{
|
|
|
69 |
add_action('admin_menu', array('UberLoginLogo', 'registerAdminMenu'));
|
70 |
add_filter('plugin_action_links', array('UberLoginLogo', 'registerPluginSettingsLink'),10,2);
|
71 |
add_action('wp_ajax_getImageData', array('UberLoginLogo', 'getImageData'));
|
@@ -99,7 +102,7 @@ class UberLoginLogo
|
|
99 |
public static function registerAdminMenu()
|
100 |
{
|
101 |
if (function_exists('add_options_page')) {
|
102 |
-
$page_title = 'Uber Login Logo Settings';
|
103 |
$menu_title = 'Uber Login Logo';
|
104 |
$capability = 'manage_options';
|
105 |
$menu_slug = self::getBaseName();
|
@@ -121,7 +124,7 @@ class UberLoginLogo
|
|
121 |
$this_plugin = self::getBaseName();
|
122 |
|
123 |
if ($file == $this_plugin) {
|
124 |
-
$settings_link = '<a href="' . admin_url() . 'options-general.php?page=' . $this_plugin . '">Settings</a>';
|
125 |
array_unshift($links, $settings_link);
|
126 |
}
|
127 |
|
@@ -130,6 +133,8 @@ class UberLoginLogo
|
|
130 |
|
131 |
/**
|
132 |
* Generate the HTML to display the plugin settings page
|
|
|
|
|
133 |
*/
|
134 |
public static function showOptionsPage()
|
135 |
{
|
@@ -140,25 +145,25 @@ class UberLoginLogo
|
|
140 |
<h2>Uber Login Logo</h2>
|
141 |
|
142 |
<div class="updated fade update-status">
|
143 |
-
<p><strong
|
144 |
</div>
|
145 |
|
146 |
-
<p
|
147 |
|
148 |
-
<h3
|
149 |
<ol>
|
150 |
-
<li
|
151 |
-
<li
|
152 |
-
<li
|
153 |
-
<li
|
154 |
</ol>
|
155 |
<form class="inputfields">
|
156 |
<input id="upload-input" type="text" size="36" name="upload image" class="upload-image" value="" />
|
157 |
-
<input id="upload-button" type="button" value="Upload Image" class="upload-image" />
|
158 |
<?php wp_nonce_field('uber_login_logo_action','uber_login_logo_nonce'); ?>
|
159 |
</form>
|
160 |
<div class="img-holder">
|
161 |
-
<p
|
162 |
<div class="img-preview"></div>
|
163 |
</div>
|
164 |
</div>
|
@@ -172,9 +177,15 @@ class UberLoginLogo
|
|
172 |
public static function replaceLoginLogo()
|
173 |
{
|
174 |
$img_data = get_option('uber_login_logo');
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
if ($img_data) {
|
176 |
$style = '<style type="text/css">';
|
177 |
-
$style .= sprintf('.login h1 a { background: transparent url("%s") no-repeat center top; background-size:%spx %spx; height: %spx;}', $img_data['src'], $img_data['width'], $img_data['height'], $img_data['height']);
|
178 |
$style .= '</style>';
|
179 |
$style .= "\r\n" . '<!-- Uber Login Logo ' . self::VERSION . ' ' . self::UBERURL . ' -->' . "\r\n";
|
180 |
echo $style;
|
@@ -201,7 +212,7 @@ class UberLoginLogo
|
|
201 |
$img_data['width'] = $img[1];
|
202 |
$img_data['height'] = $img[2];
|
203 |
|
204 |
-
update_option(uber_login_logo, $img_data);
|
205 |
|
206 |
$returnval = json_encode(array('src' => $img_data['src'], 'id' => $img_data['id']));
|
207 |
wp_die($returnval);
|
6 |
* @link http://www.uberweb.com.au/uber-login-logo-wordpress-plugin/
|
7 |
*
|
8 |
* @author Alex Rogers
|
9 |
+
* @version 1.4
|
10 |
* @package Uber_Login_Logo
|
11 |
*/
|
12 |
|
13 |
/*
|
14 |
Plugin Name: Uber Login Logo
|
15 |
Plugin URI: http://www.uberweb.com.au/uber-login-logo-wordpress-plugin/
|
16 |
+
Description: Change your login logo.
|
17 |
+
Version: 1.4
|
18 |
Author: UberWeb
|
19 |
Author URI: http://www.uberweb.com.au/
|
20 |
+
Text Domain: uber-login-logo
|
21 |
+
Domain Path: /languages/
|
22 |
License: GPLv2 or later
|
23 |
*/
|
24 |
|
56 |
/**
|
57 |
* @const VERSION The current plugin version
|
58 |
*/
|
59 |
+
const VERSION = '1.4';
|
60 |
|
61 |
/**
|
62 |
* @const UBERURL Link to uberweb site
|
68 |
*/
|
69 |
public static function init()
|
70 |
{
|
71 |
+
load_plugin_textdomain('uber-login-logo', false, dirname(plugin_basename(__FILE__)) . '/languages/');
|
72 |
add_action('admin_menu', array('UberLoginLogo', 'registerAdminMenu'));
|
73 |
add_filter('plugin_action_links', array('UberLoginLogo', 'registerPluginSettingsLink'),10,2);
|
74 |
add_action('wp_ajax_getImageData', array('UberLoginLogo', 'getImageData'));
|
102 |
public static function registerAdminMenu()
|
103 |
{
|
104 |
if (function_exists('add_options_page')) {
|
105 |
+
$page_title = __('Uber Login Logo Settings', 'uber-login-logo');
|
106 |
$menu_title = 'Uber Login Logo';
|
107 |
$capability = 'manage_options';
|
108 |
$menu_slug = self::getBaseName();
|
124 |
$this_plugin = self::getBaseName();
|
125 |
|
126 |
if ($file == $this_plugin) {
|
127 |
+
$settings_link = '<a href="' . admin_url() . 'options-general.php?page=' . $this_plugin . '">' . __('Settings', 'uber-login-logo') . '</a>';
|
128 |
array_unshift($links, $settings_link);
|
129 |
}
|
130 |
|
133 |
|
134 |
/**
|
135 |
* Generate the HTML to display the plugin settings page
|
136 |
+
*
|
137 |
+
* @TODO seperate presentation logic
|
138 |
*/
|
139 |
public static function showOptionsPage()
|
140 |
{
|
145 |
<h2>Uber Login Logo</h2>
|
146 |
|
147 |
<div class="updated fade update-status">
|
148 |
+
<p><strong><?php _e('Settings Saved', 'uber-login-logo'); ?></strong></p>
|
149 |
</div>
|
150 |
|
151 |
+
<p><?php printf(__('by %1$s from %2$s', 'uber-login-logo'), '<strong>Alex Rogers</strong>', '<strong><a href="http://www.uberweb.com.au" title="uberweb web design and development">uberweb.com.au</a></strong>'); ?></p>
|
152 |
|
153 |
+
<h3><?php _e('How it Works', 'uber-login-logo'); ?></h3>
|
154 |
<ol>
|
155 |
+
<li><?php _e('Use the WordPress media uploader to upload an image, or select one from the media library.', 'uber-login-logo'); ?></li>
|
156 |
+
<li><?php _e('It is highly recommended that you select an image with a width less than 320px.', 'uber-login-logo'); ?></li>
|
157 |
+
<li><?php _e('Select your desired image size and click "insert into post".', 'uber-login-logo'); ?></li>
|
158 |
+
<li><?php _e('Finished!', 'uber-login-logo'); ?></li>
|
159 |
</ol>
|
160 |
<form class="inputfields">
|
161 |
<input id="upload-input" type="text" size="36" name="upload image" class="upload-image" value="" />
|
162 |
+
<input id="upload-button" type="button" value="<?php _e('Upload Image', 'uber-login-logo'); ?>" class="upload-image" />
|
163 |
<?php wp_nonce_field('uber_login_logo_action','uber_login_logo_nonce'); ?>
|
164 |
</form>
|
165 |
<div class="img-holder">
|
166 |
+
<p><?php _e('Here is a preview of your selected image at actual size', 'uber-login-logo'); ?></p>
|
167 |
<div class="img-preview"></div>
|
168 |
</div>
|
169 |
</div>
|
177 |
public static function replaceLoginLogo()
|
178 |
{
|
179 |
$img_data = get_option('uber_login_logo');
|
180 |
+
|
181 |
+
// use https for background-image if on ssl
|
182 |
+
if (is_ssl()) {
|
183 |
+
$img_data['src'] = preg_replace( "/^http:/i", "https:", $img_data['src'] );
|
184 |
+
}
|
185 |
+
|
186 |
if ($img_data) {
|
187 |
$style = '<style type="text/css">';
|
188 |
+
$style .= sprintf('.login h1 a { background: transparent url("%s") no-repeat center top; background-size:%spx %spx; height: %spx; width:auto; }', $img_data['src'], $img_data['width'], $img_data['height'], $img_data['height']);
|
189 |
$style .= '</style>';
|
190 |
$style .= "\r\n" . '<!-- Uber Login Logo ' . self::VERSION . ' ' . self::UBERURL . ' -->' . "\r\n";
|
191 |
echo $style;
|
212 |
$img_data['width'] = $img[1];
|
213 |
$img_data['height'] = $img[2];
|
214 |
|
215 |
+
update_option('uber_login_logo', $img_data);
|
216 |
|
217 |
$returnval = json_encode(array('src' => $img_data['src'], 'id' => $img_data['id']));
|
218 |
wp_die($returnval);
|