From ccffcb20d7eac31f3107036abd9de43ceed02710 Mon Sep 17 00:00:00 2001 From: SM Date: Wed, 9 Dec 2020 16:24:34 -1000 Subject: [PATCH 01/14] fix: icon removal event handler (WP 5.6) --- js/admin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/admin.js b/js/admin.js index 6aca990..39fa10c 100644 --- a/js/admin.js +++ b/js/admin.js @@ -43,7 +43,7 @@ if ( typeof(fvrt) != 'object' ) fvrt.setupActions = function() { //Get remove links on page var t = this; - $(this.buildSelector('item', 'remove')).live('click', function() { + $(this.buildSelector('item', 'remove')).on('click', function() { t.removeItem(this); return false; }); From 530771b23a127fc06b17863d0d3b609b5629cdca Mon Sep 17 00:00:00 2001 From: SM Date: Wed, 9 Dec 2020 16:27:18 -1000 Subject: [PATCH 02/14] meta: update changelog for v1.2.10 --- readme.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index d1f93fc..3ed1e11 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: Archetyped Donate link: http://mycharitywater.org/archetyped-2012-fall Tags: favicon,icon,template,theme,customization,simple,media,touch,ios,android Requires at least: 5.4 -Tested up to: 5.5 +Tested up to: 5.6 Stable tag: trunk Easily set site favicon and even rotate through multiple icons @@ -51,6 +51,9 @@ No upgrade notices == Changelog == += 1.2.10 = +* Optimize: WordPress 5.6 Compatibility + = 1.2.9 = * Optimize: WordPress 5.5 Compatibility From 2797038b9e2e1fc605e5aa9cf0679e16c50dbe46 Mon Sep 17 00:00:00 2001 From: SM Date: Thu, 30 Sep 2021 14:58:15 -1000 Subject: [PATCH 03/14] meta: confirm WordPress 5.8 compatibility --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 3ed1e11..ae22850 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: Archetyped Donate link: http://mycharitywater.org/archetyped-2012-fall Tags: favicon,icon,template,theme,customization,simple,media,touch,ios,android Requires at least: 5.4 -Tested up to: 5.6 +Tested up to: 5.8 Stable tag: trunk Easily set site favicon and even rotate through multiple icons From d33b9cefe1e0c7743b062155f8f85ae7c7160491 Mon Sep 17 00:00:00 2001 From: Archetyped Date: Tue, 25 Jan 2022 17:06:18 -1000 Subject: [PATCH 04/14] meta: confirm WordPress 5.9 compatibility --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index ae22850..a8656b2 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: Archetyped Donate link: http://mycharitywater.org/archetyped-2012-fall Tags: favicon,icon,template,theme,customization,simple,media,touch,ios,android Requires at least: 5.4 -Tested up to: 5.8 +Tested up to: 5.9 Stable tag: trunk Easily set site favicon and even rotate through multiple icons From 5a2516ad945f3ccdb4d44c4764b08672077bcc6f Mon Sep 17 00:00:00 2001 From: Archetyped Date: Tue, 31 May 2022 13:51:30 -1000 Subject: [PATCH 05/14] meta: confirm WordPress 6.0 compatibility --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index a8656b2..fecbae2 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: Archetyped Donate link: http://mycharitywater.org/archetyped-2012-fall Tags: favicon,icon,template,theme,customization,simple,media,touch,ios,android Requires at least: 5.4 -Tested up to: 5.9 +Tested up to: 6.0 Stable tag: trunk Easily set site favicon and even rotate through multiple icons From f34e3d0ac9bfc72d5ec2bbea44c252ac9f041b82 Mon Sep 17 00:00:00 2001 From: Archetyped Date: Mon, 31 Oct 2022 14:06:33 -1000 Subject: [PATCH 06/14] meta: confirm WordPress 6.1 compatibility --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index fecbae2..0c87a11 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: Archetyped Donate link: http://mycharitywater.org/archetyped-2012-fall Tags: favicon,icon,template,theme,customization,simple,media,touch,ios,android Requires at least: 5.4 -Tested up to: 6.0 +Tested up to: 6.1 Stable tag: trunk Easily set site favicon and even rotate through multiple icons From fc870275d128f4c37c5a80431c735bcfc7797a2a Mon Sep 17 00:00:00 2001 From: Archetyped Date: Mon, 17 Apr 2023 15:50:34 -1000 Subject: [PATCH 07/14] meta: confirm WordPress 6.2 compatibility --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 0c87a11..7929b6c 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: Archetyped Donate link: http://mycharitywater.org/archetyped-2012-fall Tags: favicon,icon,template,theme,customization,simple,media,touch,ios,android Requires at least: 5.4 -Tested up to: 6.1 +Tested up to: 6.2 Stable tag: trunk Easily set site favicon and even rotate through multiple icons From 1142bb80634435b7c7ff4403a2e8afa52d634e4e Mon Sep 17 00:00:00 2001 From: Archetyped Date: Wed, 9 Aug 2023 17:11:54 -1000 Subject: [PATCH 08/14] git: update ignore config --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a0e3f08..67257d1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.ds_store .vscode .sass-cache node_modules/ From ed22bde415b17049be25831feb720178fd9945e1 Mon Sep 17 00:00:00 2001 From: Archetyped Date: Wed, 9 Aug 2023 17:12:16 -1000 Subject: [PATCH 09/14] meta: confirm WordPress 6.3 compatibility --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 7929b6c..bdb5d12 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: Archetyped Donate link: http://mycharitywater.org/archetyped-2012-fall Tags: favicon,icon,template,theme,customization,simple,media,touch,ios,android Requires at least: 5.4 -Tested up to: 6.2 +Tested up to: 6.3 Stable tag: trunk Easily set site favicon and even rotate through multiple icons From d4518f695368c0c47fe374eea9d4e2ec3e7e7d19 Mon Sep 17 00:00:00 2001 From: Archetyped Date: Wed, 1 Nov 2023 16:10:45 -1000 Subject: [PATCH 10/14] meta: confirm WordPress 6.4 compatibility --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index bdb5d12..ca083dd 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: Archetyped Donate link: http://mycharitywater.org/archetyped-2012-fall Tags: favicon,icon,template,theme,customization,simple,media,touch,ios,android Requires at least: 5.4 -Tested up to: 6.3 +Tested up to: 6.4 Stable tag: trunk Easily set site favicon and even rotate through multiple icons From 98b32e9f090873f3027c19b191658cb29020e2b8 Mon Sep 17 00:00:00 2001 From: Archetyped Date: Tue, 27 Feb 2024 15:27:21 -1000 Subject: [PATCH 11/14] optimize: data validation/formatting --- includes/class.media.php | 6 +++--- includes/class.utilities.php | 7 ++++--- model.php | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/includes/class.media.php b/includes/class.media.php index f4e47a2..4e9451f 100644 --- a/includes/class.media.php +++ b/includes/class.media.php @@ -202,7 +202,7 @@ function upload_url($url, $type = null) { if ( count($tb) ) $url = add_query_arg($tb, $url); } - return $url; + return sanitize_url( $url ); } /** @@ -263,7 +263,7 @@ function upload_media() { /* Send image data to main post edit form and close popup */ //Get Attachment ID $args = new stdClass(); - $args->id = $this->util->array_key_first( $_POST[ $this->var_setmedia ] ); + $args->id = esc_attr( $this->util->array_key_first( $_POST[ $this->var_setmedia ] ) ); //Make sure post is valid if ( wp_attachment_is_image($args->id) ) { $p = $this->get_request_props(); @@ -311,7 +311,7 @@ function upload_media() { //Display default UI //Determine media type - $type = ( isset($_REQUEST['type']) ) ? $_REQUEST['type'] : $this->var_type; + $type = ( isset($_REQUEST['type']) ) ? esc_attr( $_REQUEST['type'] ) : $this->var_type; //Determine UI to use (disk or URL upload) $upload_form = ( isset($_GET['tab']) && 'type_url' == $_GET['tab'] ) ? 'media_upload_type_url_form' : 'media_upload_type_form'; //Load UI diff --git a/includes/class.utilities.php b/includes/class.utilities.php index feefa77..19e1d8c 100644 --- a/includes/class.utilities.php +++ b/includes/class.utilities.php @@ -213,11 +213,12 @@ function get_action($default = null) { $action = ''; //Check if action is set in URL - if ( isset($_GET['action']) ) - $action = $_GET['action']; + if ( isset($_GET['action']) ) { + $action = esc_attr( $_GET['action'] ); + } //Otherwise, Determine action based on plugin plugin admin page suffix elseif ( isset($_GET['page']) && ($pos = strrpos($_GET['page'], '-')) && $pos !== false && ( $pos != count($_GET['page']) - 1 ) ) - $action = trim(substr($_GET['page'], $pos + 1), '-_'); + $action = trim( esc_attr( substr( $_GET['page'], $pos + 1 ) ), '-_'); //Determine action for core admin pages if ( ! isset($_GET['page']) || empty($action) ) { diff --git a/model.php b/model.php index dd1fdca..deb3640 100644 --- a/model.php +++ b/model.php @@ -339,7 +339,7 @@ function save_icons($icons = null, $type = null) { foreach ( $this->get_icon_type_names() as $itype ) { $field = $field_base . $itype; if ( isset($_POST[$field]) ) { - $icons[$itype] = explode(',', $_POST[$field]); + $icons[$itype] = explode( ',', esc_attr( $_POST[$field] ) ); } } } From 081d44e32bdaba1a5b0954f4b47b05065d143b86 Mon Sep 17 00:00:00 2001 From: Archetyped Date: Tue, 27 Feb 2024 15:50:38 -1000 Subject: [PATCH 12/14] optimize: cleanup references --- includes/class.utilities.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/class.utilities.php b/includes/class.utilities.php index 19e1d8c..b7d06bc 100644 --- a/includes/class.utilities.php +++ b/includes/class.utilities.php @@ -75,7 +75,7 @@ function is_admin_management_page() { && ( $this->is_file('edit.php') || ( $this->is_file('admin.php') && isset($_GET['page']) - && strpos($_GET['page'], 'cnr') === 0 ) + && strpos($_GET['page'], 'fvrt') === 0 ) ) ); } @@ -683,7 +683,7 @@ class FVRT_Debug { /* Constructor */ - function CNR_Debug() { + function FVRT_Debug() { $this->__construct(); } @@ -766,7 +766,7 @@ function timer_show($name = 'default', $format = 'Elapsed time: %s') { * Retrieve current function name * @param string|array $properties (optional) Properties to retrieve for current function * @return string|array Current function properties. Default: function name. Will return array if multiple properties are requested - * @see CNR_Debug::backtrace + * @see FVRT_Debug::backtrace */ function get_current($properties = 'function') { return $this->backtrace($properties, 1, 2); @@ -776,7 +776,7 @@ function get_current($properties = 'function') { * Retrieves calling function name * @param string|array $properties (optional) Properties to retrieve for caller * @return string|array Calling function properties. Default: function name. Will return array if multiple properties are requested - * @see CNR_Debug::backtrace + * @see FVRT_Debug::backtrace */ function get_caller($properties = 'function') { return $this->backtrace($properties, 1, 3); From 1281e78d5b1f6df70077d1fe20e3ca957d64afd2 Mon Sep 17 00:00:00 2001 From: Archetyped Date: Tue, 27 Feb 2024 16:22:48 -1000 Subject: [PATCH 13/14] meta: add release notes (v1.2.11) --- readme.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/readme.txt b/readme.txt index ca083dd..ca21527 100644 --- a/readme.txt +++ b/readme.txt @@ -51,6 +51,11 @@ No upgrade notices == Changelog == += 1.2.11 = +* Optimize: WordPress 6.4 Compatibility +* Optimize: Data validation/formatting +* Optimize: Internal code cleanup + = 1.2.10 = * Optimize: WordPress 5.6 Compatibility From 9f5be624cb9976197e861e582e7769e85463f510 Mon Sep 17 00:00:00 2001 From: Archetyped Date: Tue, 27 Feb 2024 16:25:13 -1000 Subject: [PATCH 14/14] build: prep release (1.2.11) --- main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.php b/main.php index 8e022c0..6189f9e 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.11 Author: Archetyped Author URI: http://archetyped.com Text Domain: favicon-rotator