Version Description
- Deactivate default Genesis favicon when one is configured in FbRFG.
Download this release
Release Info
Developer | phbernard |
Plugin | Favicon by RealFaviconGenerator |
Version | 1.0.7 |
Comparing to | |
See all releases |
Code changes from version 1.0.6 to 1.0.7
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 |
License: GPLv2
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -61,6 +61,10 @@ This screen presents you a preview of the favicon you various platforms, so you
|
|
61 |
|
62 |
== Changelog ==
|
63 |
|
|
|
|
|
|
|
|
|
64 |
= 1.0.6 =
|
65 |
|
66 |
- Error management improved during favicon install.
|
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 |
|
61 |
|
62 |
== Changelog ==
|
63 |
|
64 |
+
= 1.0.7 =
|
65 |
+
|
66 |
+
- Deactivate default Genesis favicon when one is configured in FbRFG.
|
67 |
+
|
68 |
= 1.0.6 =
|
69 |
|
70 |
- Error management improved during favicon install.
|
admin/class-favicon-by-realfavicongenerator-admin.php
CHANGED
@@ -12,6 +12,9 @@ class Favicon_By_RealFaviconGenerator_Admin extends Favicon_By_RealFaviconGenera
|
|
12 |
add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
|
13 |
|
14 |
add_action( 'admin_head', array( $this, 'add_favicon_markups' ) );
|
|
|
|
|
|
|
15 |
|
16 |
// Except for the headers, everything is accessible only to the admin
|
17 |
if ( ! is_super_admin() ) {
|
12 |
add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
|
13 |
|
14 |
add_action( 'admin_head', array( $this, 'add_favicon_markups' ) );
|
15 |
+
|
16 |
+
// Deactivate Genesis default favicon
|
17 |
+
add_filter( 'genesis_pre_load_favicon', array( $this, 'return_empty_favicon_for_genesis' ) );
|
18 |
|
19 |
// Except for the headers, everything is accessible only to the admin
|
20 |
if ( ! is_super_admin() ) {
|
admin/views/settings.php
CHANGED
@@ -180,7 +180,7 @@
|
|
180 |
}
|
181 |
})
|
182 |
.fail(function() {
|
183 |
-
var msg = "An internal error
|
184 |
jQuery('#install_error_message p').html(msg);
|
185 |
jQuery('#install_in_progress_message').fadeOut(function() {
|
186 |
jQuery('#install_error_message').fadeIn();
|
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();
|
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.
|
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.0.7
|
16 |
* Author: Philippe Bernard
|
17 |
* Author URI: http://realfavicongenerator.net/
|
18 |
* License: GPLv2
|
public/class-favicon-by-realfavicongenerator-common.php
CHANGED
@@ -52,6 +52,29 @@ class Favicon_By_RealFaviconGenerator_Common {
|
|
52 |
}
|
53 |
}
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
/**
|
56 |
* Returns /www/wordpress/wp-content/uploaded/fbrfg
|
57 |
*/
|
52 |
}
|
53 |
}
|
54 |
|
55 |
+
public function remove_genesis_favicon() {
|
56 |
+
// See http://dreamwhisperdesigns.com/genesis-tutorials/change-default-genesis-favicon/
|
57 |
+
// However, I didn't find the right hook to trigger this code in time to deactivate Genesis hooks.
|
58 |
+
// As a consequence, this function is not used and mostly here as a reference.
|
59 |
+
remove_action( 'genesis_meta', 'genesis_load_favicon' );
|
60 |
+
remove_action( 'wp_head', 'genesis_load_favicon' );
|
61 |
+
}
|
62 |
+
|
63 |
+
public function return_empty_favicon_for_genesis( $param ) {
|
64 |
+
$code = get_option( Favicon_By_RealFaviconGenerator_Common::OPTION_HTML_CODE );
|
65 |
+
if ( $code ) {
|
66 |
+
// Why NULL?
|
67 |
+
// - It is not false (ie. the exact boolean value 'false')
|
68 |
+
// - When tested with 'if ($value)', the condition fails.
|
69 |
+
// See function genesis_load_favicon for more details
|
70 |
+
return NULL;
|
71 |
+
}
|
72 |
+
else {
|
73 |
+
// Return the value as is, no interference with the rest of WordPress
|
74 |
+
return $param;
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
/**
|
79 |
* Returns /www/wordpress/wp-content/uploaded/fbrfg
|
80 |
*/
|
public/class-favicon-by-realfavicongenerator.php
CHANGED
@@ -10,6 +10,9 @@ class Favicon_By_RealFaviconGenerator extends Favicon_By_RealFaviconGenerator_Co
|
|
10 |
private function __construct() {
|
11 |
add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
|
12 |
add_action( 'wp_head', array( $this, 'add_favicon_markups' ) );
|
|
|
|
|
|
|
13 |
}
|
14 |
|
15 |
public static function get_instance() {
|
10 |
private function __construct() {
|
11 |
add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
|
12 |
add_action( 'wp_head', array( $this, 'add_favicon_markups' ) );
|
13 |
+
|
14 |
+
// Deactivate Genesis default favicon
|
15 |
+
add_filter( 'genesis_pre_load_favicon', array( $this, 'return_empty_favicon_for_genesis' ) );
|
16 |
}
|
17 |
|
18 |
public static function get_instance() {
|