Favicon by RealFaviconGenerator - Version 1.1.0

Version Description

  • Run RealFaviconGenerator's favicon checker from the admin interface.
Download this release

Release Info

Developer phbernard
Plugin Icon 128x128 Favicon by RealFaviconGenerator
Version 1.1.0
Comparing to
See all releases

Code changes from version 1.0.7 to 1.1.0

README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: phbernard
3
  Tags: favicon, apple-touch-icon, realfavicongenerator
4
  Requires at least: 3.5
5
  Tested up to: 3.9.1
6
- Stable tag: 1.0.7
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -11,6 +11,8 @@ Create and install your favicon for all platforms: PC/Mac of course, but also iP
11
 
12
  == Description ==
13
 
 
 
14
  Favicon is not just a single `favicon.ico` file dropped in the middle of your site. Nowadays, with so many different platforms and devices, you need a bunch of pictures to get the job done. With RealFaviconGenerator, generate all the icons you need for desktop browsers, iPhone/iPad, Android devices, Windows 8 devices, and more.
15
 
16
  iOS devices use a high resolution Apple touch icon to illustrate bookmarks and home screen shortcuts. A first generation iPhone needs a 57x57 picture, whereas a brand new iPad with Retina screen looks for a 152x152 picture. Android Chrome also use these pictures if it finds them. Windows 8 takes another route with a dedicated set of icons and HTML declarations.
@@ -28,6 +30,12 @@ Save hours of research and image edition with RealFaviconGenerator and its compa
28
 
29
  We take compatibility very seriously. See http://realfavicongenerator.net/favicon_compatibility for the full list.
30
 
 
 
 
 
 
 
31
  == Installation ==
32
 
33
  = Using The WordPress Dashboard =
@@ -61,6 +69,10 @@ This screen presents you a preview of the favicon you various platforms, so you
61
 
62
  == Changelog ==
63
 
 
 
 
 
64
  = 1.0.7 =
65
 
66
  - Deactivate default Genesis favicon when one is configured in FbRFG.
3
  Tags: favicon, apple-touch-icon, realfavicongenerator
4
  Requires at least: 3.5
5
  Tested up to: 3.9.1
6
+ Stable tag: 1.1.0
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
11
 
12
  == Description ==
13
 
14
+ Generate and setup a favicon for desktop browsers, iPhone/iPad, Android devices, Windows 8 tablets and more. In a matter of seconds, design an icon that looks great on all major platforms.
15
+
16
  Favicon is not just a single `favicon.ico` file dropped in the middle of your site. Nowadays, with so many different platforms and devices, you need a bunch of pictures to get the job done. With RealFaviconGenerator, generate all the icons you need for desktop browsers, iPhone/iPad, Android devices, Windows 8 devices, and more.
17
 
18
  iOS devices use a high resolution Apple touch icon to illustrate bookmarks and home screen shortcuts. A first generation iPhone needs a 57x57 picture, whereas a brand new iPad with Retina screen looks for a 152x152 picture. Android Chrome also use these pictures if it finds them. Windows 8 takes another route with a dedicated set of icons and HTML declarations.
30
 
31
  We take compatibility very seriously. See http://realfavicongenerator.net/favicon_compatibility for the full list.
32
 
33
+ ** Localization **
34
+
35
+ * English (`en_EN`) by [Philippe Bernard](http://realfavicongenerator.net/)
36
+ * French (`fr_FR`) by [Philippe Bernard](http://realfavicongenerator.net/)
37
+ * Swedish (`sv_SE`) by [Linus Wileryd](https://twitter.com/wileryd)
38
+
39
  == Installation ==
40
 
41
  = Using The WordPress Dashboard =
69
 
70
  == Changelog ==
71
 
72
+ = 1.1.0 =
73
+
74
+ - Run RealFaviconGenerator's favicon checker from the admin interface.
75
+
76
  = 1.0.7 =
77
 
78
  - Deactivate default Genesis favicon when one is configured in FbRFG.
admin/class-favicon-by-realfavicongenerator-admin.php CHANGED
@@ -63,6 +63,7 @@ class Favicon_By_RealFaviconGenerator_Admin extends Favicon_By_RealFaviconGenera
63
  $pic_path = $this->get_full_picture_path();
64
 
65
  $favicon_configured = $this->is_favicon_configured();
 
66
 
67
  $preview_url = $this->is_preview_available() ? $this->get_preview_url() : NULL;
68
 
@@ -127,11 +128,12 @@ class Favicon_By_RealFaviconGenerator_Admin extends Favicon_By_RealFaviconGenera
127
 
128
  update_option( Favicon_By_RealFaviconGenerator_Common::OPTION_HTML_CODE, $response->getHtmlCode() );
129
 
130
- $this->set_favicon_configured();
131
  ?>
132
  {
133
  "status": "success",
134
- "preview_url": <?php echo json_encode( $this->get_preview_url() ) ?>
 
135
  }
136
  <?php
137
  }
63
  $pic_path = $this->get_full_picture_path();
64
 
65
  $favicon_configured = $this->is_favicon_configured();
66
+ $favicon_in_root = $this->is_favicon_in_root();
67
 
68
  $preview_url = $this->is_preview_available() ? $this->get_preview_url() : NULL;
69
 
128
 
129
  update_option( Favicon_By_RealFaviconGenerator_Common::OPTION_HTML_CODE, $response->getHtmlCode() );
130
 
131
+ $this->set_favicon_configured( true, $response->isFilesInRoot() );
132
  ?>
133
  {
134
  "status": "success",
135
+ "preview_url": <?php echo json_encode( $this->get_preview_url() ) ?>,
136
+ "favicon_in_root": <?php echo json_encode( $this->is_favicon_in_root() ) ?>
137
  }
138
  <?php
139
  }
admin/views/settings.php CHANGED
@@ -20,6 +20,12 @@
20
  <h3><?php _e( 'Current favicon', FBRFG_PLUGIN_SLUG ) ?></h3>
21
  <p><?php _e( 'The favicon is up and ready.', FBRFG_PLUGIN_SLUG ) ?></p>
22
  <img id="preview_image">
 
 
 
 
 
 
23
  </div>
24
  <?php } else { ?>
25
  <h3><?php _e( 'Current favicon', FBRFG_PLUGIN_SLUG ) ?></h3>
@@ -35,7 +41,14 @@
35
 
36
  <img src="<?php echo $preview_url ?>">
37
 
38
- <?php }
 
 
 
 
 
 
 
39
  }
40
  } ?>
41
 
@@ -162,6 +175,9 @@
162
  .done(function(response) {
163
  if (response.status == 'success') {
164
  jQuery('#preview_image').attr('src', response.preview_url);
 
 
 
165
  jQuery('#install_in_progress_message').fadeOut(function() {
166
  jQuery('#install_completed_message').fadeIn();
167
  jQuery('#install_completed_container').fadeIn();
@@ -169,7 +185,7 @@
169
  });
170
  }
171
  else {
172
- var msg = "An error occured";
173
  if (response.message != null) {
174
  msg += ": " + response.message;
175
  }
@@ -180,7 +196,7 @@
180
  }
181
  })
182
  .fail(function() {
183
- var msg = "An internal error occurred";
184
  jQuery('#install_error_message p').html(msg);
185
  jQuery('#install_in_progress_message').fadeOut(function() {
186
  jQuery('#install_error_message').fadeIn();
20
  <h3><?php _e( 'Current favicon', FBRFG_PLUGIN_SLUG ) ?></h3>
21
  <p><?php _e( 'The favicon is up and ready.', FBRFG_PLUGIN_SLUG ) ?></p>
22
  <img id="preview_image">
23
+
24
+ <p>
25
+ <?php printf( __( '<a %s>Check your favicon</a> with RealFaviconGenerator\'s favicon checker.', FBRFG_PLUGIN_SLUG ),
26
+ 'id="checker_link" class="button-primary" href="#"' ) ?>
27
+ <?php _e( 'This option works only if your site is accessible from the outside.', FBRFG_PLUGIN_SLUG ) ?>
28
+ </p>
29
  </div>
30
  <?php } else { ?>
31
  <h3><?php _e( 'Current favicon', FBRFG_PLUGIN_SLUG ) ?></h3>
41
 
42
  <img src="<?php echo $preview_url ?>">
43
 
44
+ <?php } ?>
45
+ <p>
46
+ <?php printf( __( '<a %s>Check your favicon</a> with RealFaviconGenerator\'s favicon checker.', FBRFG_PLUGIN_SLUG ),
47
+ 'class="button-primary" ' .
48
+ 'href="http://realfavicongenerator.net/favicon_checker?site=' . urlencode( home_url() ) . ($favicon_in_root ? '' : '&ignore_root_issues=on') . '"' ) ?>
49
+ <?php _e( 'This option works only if your site is accessible from the outside.', FBRFG_PLUGIN_SLUG ) ?>
50
+ </p>
51
+ <?php
52
  }
53
  } ?>
54
 
175
  .done(function(response) {
176
  if (response.status == 'success') {
177
  jQuery('#preview_image').attr('src', response.preview_url);
178
+ var checkerUrl = "http://realfavicongenerator.net/favicon_checker?site=<?php echo urlencode( home_url() ) ?>" +
179
+ (response.favicon_in_root ? '' : '&ignore_root_issues=on');
180
+ jQuery('#checker_link').attr('href', checkerUrl);
181
  jQuery('#install_in_progress_message').fadeOut(function() {
182
  jQuery('#install_completed_message').fadeIn();
183
  jQuery('#install_completed_container').fadeIn();
185
  });
186
  }
187
  else {
188
+ var msg = "<?php _e( "An error occured", FBRFG_PLUGIN_SLUG ) ?>";
189
  if (response.message != null) {
190
  msg += ": " + response.message;
191
  }
196
  }
197
  })
198
  .fail(function() {
199
+ var msg = "<?php _e( "An internal error occurred", FBRFG_PLUGIN_SLUG ) ?>";
200
  jQuery('#install_error_message p').html(msg);
201
  jQuery('#install_in_progress_message').fadeOut(function() {
202
  jQuery('#install_error_message').fadeIn();
favicon-by-realfavicongenerator.php CHANGED
@@ -12,7 +12,7 @@
12
  * Plugin Name: Favicon by RealFaviconGenerator
13
  * Plugin URI: http://realfavicongenerator.net/extensions/wordpress
14
  * Description: Create and install your favicon for all platforms: PC/Mac of course, but also iPhone/iPad, Android devices, Windows 8 tablets, etc.
15
- * Version: 1.0.7
16
  * Author: Philippe Bernard
17
  * Author URI: http://realfavicongenerator.net/
18
  * License: GPLv2
12
  * Plugin Name: Favicon by RealFaviconGenerator
13
  * Plugin URI: http://realfavicongenerator.net/extensions/wordpress
14
  * Description: Create and install your favicon for all platforms: PC/Mac of course, but also iPhone/iPad, Android devices, Windows 8 tablets, etc.
15
+ * Version: 1.1.0
16
  * Author: Philippe Bernard
17
  * Author URI: http://realfavicongenerator.net/
18
  * License: GPLv2
languages/favicon-by-realfavicongenerator-sv_SE.mo ADDED
Binary file
languages/favicon-by-realfavicongenerator-sv_SE.po ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2014 Favicon by RealFaviconGenerator
2
+ # This file is distributed under the same license as the Favicon by RealFaviconGenerator package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Favicon by RealFaviconGenerator 1.0.4\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/favicon-by-"
7
+ "realfavicongenerator\n"
8
+ "POT-Creation-Date: 2014-05-23 13:22:05+00:00\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "PO-Revision-Date: 2014-06-05 12:24+0100\n"
13
+ "Last-Translator: Linus <linus@cutup.se>\n"
14
+ "Language-Team: Linus <linus@cutup.se>\n"
15
+ "Language: sv_SE\n"
16
+ "X-Generator: Poedit 1.6.5\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+ "X-Poedit-SourceCharset: UTF-8\n"
19
+
20
+ #: admin/class-favicon-by-realfavicongenerator-admin.php:48
21
+ msgid "Favicon Settings"
22
+ msgstr "Favicon-inställningar"
23
+
24
+ #: admin/class-favicon-by-realfavicongenerator-admin.php:49
25
+ msgid "Favicon"
26
+ msgstr "Favicon"
27
+
28
+ #: admin/views/settings.php:11
29
+ msgid "Favicon installation in progress. Please wait..."
30
+ msgstr "Favicon installeras just nu. Var vänlig vänta..."
31
+
32
+ #: admin/views/settings.php:15
33
+ msgid "Favicon installed!"
34
+ msgstr "Favicon installerad!"
35
+
36
+ #: admin/views/settings.php:20 admin/views/settings.php:25
37
+ msgid "Current favicon"
38
+ msgstr "Aktuell favicon"
39
+
40
+ #: admin/views/settings.php:21 admin/views/settings.php:28
41
+ msgid "The favicon is up and ready."
42
+ msgstr "Favicon är uppladdad och redo."
43
+
44
+ #: admin/views/settings.php:30
45
+ msgid "No favicon has been configured yet."
46
+ msgstr "Ingen favicon har konfigurerats ännu."
47
+
48
+ #: admin/views/settings.php:43
49
+ msgid "Favicon generation"
50
+ msgstr "Genererande av favicon"
51
+
52
+ #: admin/views/settings.php:45
53
+ msgid "You can replace the existing favicon."
54
+ msgstr "Du kan ersätta den favicon som existerar."
55
+
56
+ #: admin/views/settings.php:52
57
+ msgid "Master picture URL"
58
+ msgstr "Originalbildlänk"
59
+
60
+ #: admin/views/settings.php:56 admin/views/settings.php:57
61
+ msgid "Select from the Media Library"
62
+ msgstr "Välj från Mediabiblioteket"
63
+
64
+ #: admin/views/settings.php:60
65
+ msgid "Submit a square picture, at least 70x70 (recommended: 260x260 or more)"
66
+ msgstr ""
67
+ "Skicka in en kvadratisk bild, minst 70x70 (rekommenderat: 260x260 eller "
68
+ "högre)"
69
+
70
+ #: admin/views/settings.php:62
71
+ msgid ""
72
+ "If the picture is on your hard drive, you can leave this field blank and "
73
+ "upload the picture from RealFaviconGenerator."
74
+ msgstr ""
75
+ "Om bilden finns på din hårddisk kan du lämna fältet blankt och ladda upp "
76
+ "bilden från RealFaviconGenerator."
77
+
78
+ #: admin/views/settings.php:70
79
+ msgid "Favicon files in root directory"
80
+ msgstr "Favicon-filer i rotmappen"
81
+
82
+ #: admin/views/settings.php:75
83
+ msgid "The plugin always stores the favicon files in a dedicated directory."
84
+ msgstr "Tillägget sparar alltid favicon-filerna i en dedikerad mapp."
85
+
86
+ #: admin/views/settings.php:77
87
+ msgid ""
88
+ "However, if this option is enabled, the plugin takes advantage of the "
89
+ "permalink feature and the favicon files appear to be in the root directory"
90
+ msgstr ""
91
+ "Hursomhelst, om detta tillval är aktiverat använder tillägget sig av "
92
+ "permalänk-funktionen och favicon-filerna ser ut att finnas i rotmappen"
93
+
94
+ #: admin/views/settings.php:78
95
+ msgid "recommended"
96
+ msgstr "rekommenderat"
97
+
98
+ #: admin/views/settings.php:87
99
+ msgid "Generate favicon"
100
+ msgstr "Generera favicon"
101
+
102
+ #. Plugin Name of the plugin/theme
103
+ msgid "Favicon by RealFaviconGenerator"
104
+ msgstr "Favicon av RealFaviconGenerator"
105
+
106
+ #. Plugin URI of the plugin/theme
107
+ msgid "http://realfavicongenerator.net/extensions/wordpress"
108
+ msgstr "http://realfavicongenerator.net/extensions/wordpress"
109
+
110
+ #. Description of the plugin/theme
111
+ msgid ""
112
+ "Create and install your favicon for all platforms: PC/Mac of course, but "
113
+ "also iPhone/iPad, Android devices, Windows 8 tablets, etc."
114
+ msgstr ""
115
+ "Skapa och installera din favicon för alla plattformar: PC/Mac såklart, men "
116
+ "också iPhone/iPad, Android-enheter, Windows 8-surfplattor etc."
117
+
118
+ #. Author of the plugin/theme
119
+ msgid "Philippe Bernard"
120
+ msgstr "Philippe Bernard"
121
+
122
+ #. Author URI of the plugin/theme
123
+ msgid "http://realfavicongenerator.net/"
124
+ msgstr "http://realfavicongenerator.net/"
public/class-favicon-by-realfavicongenerator-common.php CHANGED
@@ -6,12 +6,14 @@ class Favicon_By_RealFaviconGenerator_Common {
6
  const PLUGIN_PREFIX = 'fbrfg';
7
 
8
  const OPTION_FAVICON_CONFIGURED = 'fbrfg_favicon_configured';
9
- const OPTION_PREVIEW_FILE_NAME = 'fbrfg_preview_file_name';
10
- const OPTION_HTML_CODE = 'fbrfg_html_code';
 
11
 
12
  public static function get_options_list() {
13
  return array(
14
  Favicon_By_RealFaviconGenerator_Common::OPTION_FAVICON_CONFIGURED,
 
15
  Favicon_By_RealFaviconGenerator_Common::OPTION_PREVIEW_FILE_NAME,
16
  Favicon_By_RealFaviconGenerator_Common::OPTION_HTML_CODE );
17
  }
@@ -26,9 +28,19 @@ class Favicon_By_RealFaviconGenerator_Common {
26
  return ( $opt == 1 );
27
  }
28
 
29
- public function set_favicon_configured( $configured = true ) {
 
 
 
 
 
 
 
 
30
  update_option( Favicon_By_RealFaviconGenerator_Common::OPTION_FAVICON_CONFIGURED,
31
  $configured ? 1 : 0 );
 
 
32
  }
33
 
34
  public function is_preview_available() {
6
  const PLUGIN_PREFIX = 'fbrfg';
7
 
8
  const OPTION_FAVICON_CONFIGURED = 'fbrfg_favicon_configured';
9
+ const OPTION_FAVICON_IN_ROOT = 'fbrfg_favicon_in_root';
10
+ const OPTION_PREVIEW_FILE_NAME = 'fbrfg_preview_file_name';
11
+ const OPTION_HTML_CODE = 'fbrfg_html_code';
12
 
13
  public static function get_options_list() {
14
  return array(
15
  Favicon_By_RealFaviconGenerator_Common::OPTION_FAVICON_CONFIGURED,
16
+ Favicon_By_RealFaviconGenerator_Common::OPTION_FAVICON_IN_ROOT,
17
  Favicon_By_RealFaviconGenerator_Common::OPTION_PREVIEW_FILE_NAME,
18
  Favicon_By_RealFaviconGenerator_Common::OPTION_HTML_CODE );
19
  }
28
  return ( $opt == 1 );
29
  }
30
 
31
+ /**
32
+ * Indicate if the configured favicon is in the root directory of the web site.
33
+ */
34
+ public function is_favicon_in_root() {
35
+ $opt = get_option( Favicon_By_RealFaviconGenerator_Common::OPTION_FAVICON_IN_ROOT );
36
+ return ( $opt == 1 ) && $this->is_favicon_configured();
37
+ }
38
+
39
+ public function set_favicon_configured( $configured = true, $favicon_in_root = false ) {
40
  update_option( Favicon_By_RealFaviconGenerator_Common::OPTION_FAVICON_CONFIGURED,
41
  $configured ? 1 : 0 );
42
+ update_option( Favicon_By_RealFaviconGenerator_Common::OPTION_FAVICON_IN_ROOT,
43
+ $favicon_in_root ? 1 : 0 );
44
  }
45
 
46
  public function is_preview_available() {