From ad90026cedf78cea18ea20d74de214bb88e70630 Mon Sep 17 00:00:00 2001 From: SM Date: Mon, 21 Apr 2014 08:04:39 -1000 Subject: [PATCH 1/7] Update: WordPress 3.9 compatibility --- readme.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.txt b/readme.txt index b4ce7f2..65ccf2e 100644 --- a/readme.txt +++ b/readme.txt @@ -2,8 +2,8 @@ Contributors: Archetyped Donate link: http://mycharitywater.org/archetyped-2012-fall Tags: favicon,icon,template,theme,customization,simple,media,touch,ios,android -Requires at least: 3.8 -Tested up to: 3.8 +Requires at least: 3.9 +Tested up to: 3.9 Stable tag: trunk Easily set site favicon and even rotate through multiple icons From fd42167260f60a556547c95fcfa6ff861e3781d1 Mon Sep 17 00:00:00 2001 From: SM Date: Thu, 7 Jan 2016 16:39:40 -1000 Subject: [PATCH 2/7] Optimize: PHP: Remove legacy constructors --- includes/class.base.php | 7 ------- includes/class.media.php | 7 ------- includes/class.utilities.php | 4 ---- model.php | 4 ---- 4 files changed, 22 deletions(-) diff --git a/includes/class.base.php b/includes/class.base.php index ecc3277..6c048d8 100644 --- a/includes/class.base.php +++ b/includes/class.base.php @@ -27,13 +27,6 @@ class FVRT_Base { */ var $debug; - /** - * Legacy constructor - */ - function FVRT_Base() { - $this->__construct(); - } - /** * Constructor */ diff --git a/includes/class.media.php b/includes/class.media.php index 4213cc5..9e72160 100644 --- a/includes/class.media.php +++ b/includes/class.media.php @@ -65,13 +65,6 @@ class FVRT_Media extends FVRT_Base { */ var $type_current = null; - /** - * Legacy Constructor - */ - function FVRT_Media() { - $this->__construct(); - } - /** * Constructor */ diff --git a/includes/class.utilities.php b/includes/class.utilities.php index 12ac2ae..1dcb2b3 100644 --- a/includes/class.utilities.php +++ b/includes/class.utilities.php @@ -10,10 +10,6 @@ */ class FVRT_Utilities { - function FVRT_Utilities() { - $this->__construct(); - } - function __construct() { } diff --git a/model.php b/model.php index 6b3ce81..17d5050 100644 --- a/model.php +++ b/model.php @@ -103,10 +103,6 @@ class FaviconRotator extends FVRT_Base { /*-** Initialization **-*/ - function FaviconRotator() { - $this->__construct(); - } - function __construct() { parent::__construct(); $this->opt_key = $this->add_prefix($this->opt_key); From 2b560b8966569a2a9db049341a52d14b9d1028dd Mon Sep 17 00:00:00 2001 From: SM Date: Thu, 7 Jan 2016 16:48:12 -1000 Subject: [PATCH 3/7] Update: Dev version (0.0.0-dev) --- main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.php b/main.php index 1ac4451..fda314d 100644 --- a/main.php +++ b/main.php @@ -3,7 +3,7 @@ Plugin Name: Favicon Rotator Plugin URI: http://archetyped.com/tools/favicon-rotator/ Description: Easily set site favicon and even rotate through multiple icons -Version: dev (Beta) +Version: 0.0.0-dev Author: Archetyped Author URI: http://archetyped.com */ From 5e6d3b148987ee8ccd398fcf885b8c03235036ca Mon Sep 17 00:00:00 2001 From: SM Date: Thu, 7 Jan 2016 17:24:06 -1000 Subject: [PATCH 4/7] Optimize: PHP standards (remove notices) --- includes/class.media.php | 13 ++++++++----- model.php | 13 +++++++++---- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/includes/class.media.php b/includes/class.media.php index 9e72160..5a4a581 100644 --- a/includes/class.media.php +++ b/includes/class.media.php @@ -392,7 +392,7 @@ function media_upload_mime_type_links($type_links) { */ function attachment_fields_to_edit($form_fields, $attachment) { if ( $this->is_custom_media() ) { - $post =& get_post($attachment); + $post = get_post($attachment); //Clear all form fields $form_fields = array(); if ( isset($post->post_mime_type) && 0 === strpos($post->post_mime_type, 'image/') && ( $q = $this->get_request_props() ) && false !== $q ) { @@ -849,12 +849,15 @@ function &get_types() { */ function get_type($type) { //Normalize - if ( is_object($type) ) + if ( is_object($type) ) { $type = get_object_vars($type); - if ( is_array($type) && isset($type['name']) ) - $type = $type['name']; - if ( !is_string($type) ) + } + if ( is_array($type) && isset($type['type_name']) ) { + $type = $type['type_name']; + } + if ( !is_string($type) ) { $type = strval($type); + } $types =& $this->get_types(); //Fetch type diff --git a/model.php b/model.php index 17d5050..70c03b9 100644 --- a/model.php +++ b/model.php @@ -395,7 +395,8 @@ function display_icon($type) { //Select random icon $idx = ( count($icons) > 1 ) ? array_rand($icons) : 0; $icon_id = $icons[$idx]; - $icon = array_shift($this->media->get_icon_src($icon_id, $type)); + $icon_src = $this->media->get_icon_src($icon_id, $type); + $icon = array_shift($icon_src); //Validate icon if ( !is_string($icon) || empty($icon) ) { //Reset variable to NULL (will loop to next icon) @@ -493,8 +494,10 @@ function admin_page() {
    media->get_icon_src($icon->ID, $t->type_name)); - $src = array_shift(wp_get_attachment_image_src($icon->ID, 'full')); + $icon_srcs = $this->media->get_icon_src($icon->ID, $t->type_name); + $icon_src = array_shift($icon_srcs); + $icon_media = wp_get_attachment_image_src($icon->ID, 'full'); + $src = array_shift($icon_media); ?>
  • @@ -507,7 +510,9 @@ function admin_page() {
  • - +
  • From f69087684410fb512491317662a7a1013c6341d9 Mon Sep 17 00:00:00 2001 From: SM Date: Thu, 7 Jan 2016 17:26:11 -1000 Subject: [PATCH 5/7] Update: WordPress compatibility (4.4) --- readme.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.txt b/readme.txt index 65ccf2e..aac6dce 100644 --- a/readme.txt +++ b/readme.txt @@ -2,8 +2,8 @@ Contributors: Archetyped Donate link: http://mycharitywater.org/archetyped-2012-fall Tags: favicon,icon,template,theme,customization,simple,media,touch,ios,android -Requires at least: 3.9 -Tested up to: 3.9 +Requires at least: 4.4 +Tested up to: 4.4 Stable tag: trunk Easily set site favicon and even rotate through multiple icons From 9c765ad81ff9ea1a7ba1a40ca02e1160e013ca27 Mon Sep 17 00:00:00 2001 From: SM Date: Thu, 7 Jan 2016 17:29:45 -1000 Subject: [PATCH 6/7] Update: Readme (1.2.6) --- readme.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/readme.txt b/readme.txt index aac6dce..e852abd 100644 --- a/readme.txt +++ b/readme.txt @@ -48,6 +48,11 @@ No upgrade notices 1. Favicon submenu in Appearance menu == Changelog == + += 1.2.6 = +* Update: WordPress compatibility (4.4) +* Optimize: PHP standards + = 1.2.5 = * Update: WordPress 3.8 support From 2b93656d5cc8081ba8f3f2961fd3c0633b6c4623 Mon Sep 17 00:00:00 2001 From: SM Date: Thu, 7 Jan 2016 17:31:57 -1000 Subject: [PATCH 7/7] Prep release (1.2.6) --- main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.php b/main.php index fda314d..a659d4c 100644 --- a/main.php +++ b/main.php @@ -3,7 +3,7 @@ Plugin Name: Favicon Rotator Plugin URI: http://archetyped.com/tools/favicon-rotator/ Description: Easily set site favicon and even rotate through multiple icons -Version: 0.0.0-dev +Version: 1.2.6 Author: Archetyped Author URI: http://archetyped.com */