Uber Login Logo - Version 1.1

Version Description

Download this release

Release Info

Developer uberweb
Plugin Icon wp plugin Uber Login Logo
Version 1.1
Comparing to
See all releases

Code changes from version 1.0 to 1.1

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
@@ -3,7 +3,7 @@ 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.5.1
6
- Stable tag: 1.0
7
 
8
  A simple, lightweight WordPress plugin to change your login logo.
9
 
@@ -37,6 +37,10 @@ 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 +71,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
-
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.5.1
6
+ Stable tag: 1.1
7
 
8
  A simple, lightweight WordPress plugin to change your login logo.
9
 
37
 
38
  == Changelog ==
39
 
40
+ = version 1.1 =
41
+
42
+ * Added first translation (French) thanks to NumidWasNotAvailable.
43
+
44
  = version 1.0 =
45
 
46
  * Added proper uninstall hook. removes saved options on delete.
71
 
72
  = Version 0.1 =
73
 
74
+ * 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.0",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);
1
  var Uber=Uber||{};
2
+ (function(d){Uber.LoginLogo={config:{version:"1.1",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.0
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.0
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.0';
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>Settings Saved</strong></p>
144
  </div>
145
 
146
- <p>by <strong>Alex Rogers</strong> from <strong><a href="http://www.uberweb.com.au" title="uberweb web design and development">uberweb.com.au</a></strong></p>
147
 
148
- <h3>How it Works</h3>
149
  <ol>
150
- <li>Use the WordPress media uploader to upload an image, or select one from the media library.</li>
151
- <li>It is highly recommended that you select an image with a width less than 320px.</li>
152
- <li>Select your desired image size and click "insert into post".</li>
153
- <li>Finished!</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>Here is a preview of your selected image at actual size</p>
162
  <div class="img-preview"></div>
163
  </div>
164
  </div>
@@ -201,7 +206,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.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 your login logo.
17
+ Version: 1.1
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.1';
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>
206
  $img_data['width'] = $img[1];
207
  $img_data['height'] = $img[2];
208
 
209
+ update_option('uber_login_logo', $img_data);
210
 
211
  $returnval = json_encode(array('src' => $img_data['src'], 'id' => $img_data['id']));
212
  wp_die($returnval);