diff --git a/CHANGES.md b/CHANGES.md
index 7af5967..b125885 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,9 @@
# Changelog
+## 1.5.5 (11/27/23)
+* Changed: Updated the updater.
+* Changed: Updated character encoding function for PHP 8.2 compatibility.
+
## 1.5.4 (10/18/23)
* Fixed: Styles missing in the editor when using TOC block.
diff --git a/classes/class-table-of-contents.php b/classes/class-table-of-contents.php
index c598108..119f75b 100644
--- a/classes/class-table-of-contents.php
+++ b/classes/class-table-of-contents.php
@@ -270,8 +270,9 @@ function get_data() {
// Modify state.
$libxml_previous_state = libxml_use_internal_errors( true );
- // Encode.
- $html = mb_convert_encoding( $this->content, 'HTML-ENTITIES', 'UTF-8' );
+ // Encode. Can't use `mb_convert_encoding()` because it's deprecated in PHP 8.2.
+ // @link https://stackoverflow.com/questions/8218230/php-domdocument-loadhtml-not-encoding-utf-8-correctly
+ $html = mb_encode_numericentity( $this->content, [0x80, 0x10FFFF, 0, ~0], 'UTF-8' );
// Load the content in the document HTML.
$dom->loadHTML( "
$html
" );
diff --git a/composer.lock b/composer.lock
index 74e3314..f616f2f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -8,16 +8,16 @@
"packages": [
{
"name": "yahnis-elsts/plugin-update-checker",
- "version": "v5.2",
+ "version": "v5.3",
"source": {
"type": "git",
"url": "https://github.com/YahnisElsts/plugin-update-checker.git",
- "reference": "5a270988c5f76bfdfbbb42cccc7c9627f7dd64d0"
+ "reference": "0b6bd7cd3286688ab680201aa6a7d8572c51ae1f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/YahnisElsts/plugin-update-checker/zipball/5a270988c5f76bfdfbbb42cccc7c9627f7dd64d0",
- "reference": "5a270988c5f76bfdfbbb42cccc7c9627f7dd64d0",
+ "url": "https://api.github.com/repos/YahnisElsts/plugin-update-checker/zipball/0b6bd7cd3286688ab680201aa6a7d8572c51ae1f",
+ "reference": "0b6bd7cd3286688ab680201aa6a7d8572c51ae1f",
"shasum": ""
},
"require": {
@@ -27,7 +27,7 @@
"type": "library",
"autoload": {
"files": [
- "load-v5p2.php"
+ "load-v5p3.php"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -52,9 +52,9 @@
],
"support": {
"issues": "https://github.com/YahnisElsts/plugin-update-checker/issues",
- "source": "https://github.com/YahnisElsts/plugin-update-checker/tree/v5.2"
+ "source": "https://github.com/YahnisElsts/plugin-update-checker/tree/v5.3"
},
- "time": "2023-08-17T12:44:32+00:00"
+ "time": "2023-11-09T08:34:00+00:00"
}
],
"packages-dev": [],
diff --git a/mai-table-of-contents.php b/mai-table-of-contents.php
index 19d356e..1fd022f 100644
--- a/mai-table-of-contents.php
+++ b/mai-table-of-contents.php
@@ -4,7 +4,7 @@
* Plugin Name: Mai Table of Contents
* Plugin URI: https://bizbudding.com/mai-design-pack/
* Description: Automatically create a table of contents from headings in your posts.
- * Version: 1.5.4
+ * Version: 1.5.5
*
* Author: BizBudding
* Author URI: https://bizbudding.com
@@ -92,7 +92,7 @@ public function __wakeup() {
private function setup_constants() {
// Plugin version.
if ( ! defined( 'MAI_TABLE_OF_CONTENTS_VERSION' ) ) {
- define( 'MAI_TABLE_OF_CONTENTS_VERSION', '1.5.4' );
+ define( 'MAI_TABLE_OF_CONTENTS_VERSION', '1.5.5' );
}
// Plugin Folder Path.
diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php
index 2874378..605388e 100644
--- a/vendor/composer/autoload_files.php
+++ b/vendor/composer/autoload_files.php
@@ -6,5 +6,5 @@
$baseDir = dirname($vendorDir);
return array(
- 'efd9d646f43178e7ba3f07758c02ce1d' => $vendorDir . '/yahnis-elsts/plugin-update-checker/load-v5p2.php',
+ '45a16669595eb3c0a9e2994e57fc3188' => $vendorDir . '/yahnis-elsts/plugin-update-checker/load-v5p3.php',
);
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index 54a788e..534f652 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -7,7 +7,7 @@
class ComposerStaticInit1782162e12bcf11213202aa27e2616cd
{
public static $files = array (
- 'efd9d646f43178e7ba3f07758c02ce1d' => __DIR__ . '/..' . '/yahnis-elsts/plugin-update-checker/load-v5p2.php',
+ '45a16669595eb3c0a9e2994e57fc3188' => __DIR__ . '/..' . '/yahnis-elsts/plugin-update-checker/load-v5p3.php',
);
public static $classMap = array (
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 68dc7f2..920024e 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -2,29 +2,29 @@
"packages": [
{
"name": "yahnis-elsts/plugin-update-checker",
- "version": "v5.2",
- "version_normalized": "5.2.0.0",
+ "version": "v5.3",
+ "version_normalized": "5.3.0.0",
"source": {
"type": "git",
"url": "https://github.com/YahnisElsts/plugin-update-checker.git",
- "reference": "5a270988c5f76bfdfbbb42cccc7c9627f7dd64d0"
+ "reference": "0b6bd7cd3286688ab680201aa6a7d8572c51ae1f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/YahnisElsts/plugin-update-checker/zipball/5a270988c5f76bfdfbbb42cccc7c9627f7dd64d0",
- "reference": "5a270988c5f76bfdfbbb42cccc7c9627f7dd64d0",
+ "url": "https://api.github.com/repos/YahnisElsts/plugin-update-checker/zipball/0b6bd7cd3286688ab680201aa6a7d8572c51ae1f",
+ "reference": "0b6bd7cd3286688ab680201aa6a7d8572c51ae1f",
"shasum": ""
},
"require": {
"ext-json": "*",
"php": ">=5.6.20"
},
- "time": "2023-08-17T12:44:32+00:00",
+ "time": "2023-11-09T08:34:00+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"files": [
- "load-v5p2.php"
+ "load-v5p3.php"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -49,7 +49,7 @@
],
"support": {
"issues": "https://github.com/YahnisElsts/plugin-update-checker/issues",
- "source": "https://github.com/YahnisElsts/plugin-update-checker/tree/v5.2"
+ "source": "https://github.com/YahnisElsts/plugin-update-checker/tree/v5.3"
},
"install-path": "../yahnis-elsts/plugin-update-checker"
}
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index 6971c33..1b66c29 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
- 'reference' => '8630a81cb04dd13343bc8135de13c434933a6006',
+ 'reference' => '31929455f5b1939fa21e10e8080407e4546472b5',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -13,16 +13,16 @@
'__root__' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
- 'reference' => '8630a81cb04dd13343bc8135de13c434933a6006',
+ 'reference' => '31929455f5b1939fa21e10e8080407e4546472b5',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev_requirement' => false,
),
'yahnis-elsts/plugin-update-checker' => array(
- 'pretty_version' => 'v5.2',
- 'version' => '5.2.0.0',
- 'reference' => '5a270988c5f76bfdfbbb42cccc7c9627f7dd64d0',
+ 'pretty_version' => 'v5.3',
+ 'version' => '5.3.0.0',
+ 'reference' => '0b6bd7cd3286688ab680201aa6a7d8572c51ae1f',
'type' => 'library',
'install_path' => __DIR__ . '/../yahnis-elsts/plugin-update-checker',
'aliases' => array(),
diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v5/PucFactory.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v5/PucFactory.php
index c2e1243..a2ec2d2 100644
--- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v5/PucFactory.php
+++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v5/PucFactory.php
@@ -4,7 +4,7 @@
if ( !class_exists(PucFactory::class, false) ):
- class PucFactory extends \YahnisElsts\PluginUpdateChecker\v5p2\PucFactory {
+ class PucFactory extends \YahnisElsts\PluginUpdateChecker\v5p3\PucFactory {
}
endif;
diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v5p2/Autoloader.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v5p3/Autoloader.php
similarity index 98%
rename from vendor/yahnis-elsts/plugin-update-checker/Puc/v5p2/Autoloader.php
rename to vendor/yahnis-elsts/plugin-update-checker/Puc/v5p3/Autoloader.php
index 87e734d..5074ab2 100644
--- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v5p2/Autoloader.php
+++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v5p3/Autoloader.php
@@ -1,6 +1,6 @@
throttledCheckPeriod * 3600;
} else if ( defined('DOING_CRON') && constant('DOING_CRON') ) {
- //WordPress cron schedules are not exact, so lets do an update check even
+ //WordPress cron schedules are not exact, so let's do an update check even
//if slightly less than $checkPeriod hours have elapsed since the last check.
$cronFuzziness = 20 * 60;
$period = $this->checkPeriod * 3600 - $cronFuzziness;
diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v5p2/StateStore.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v5p3/StateStore.php
similarity index 98%
rename from vendor/yahnis-elsts/plugin-update-checker/Puc/v5p2/StateStore.php
rename to vendor/yahnis-elsts/plugin-update-checker/Puc/v5p3/StateStore.php
index 0228195..f182787 100644
--- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v5p2/StateStore.php
+++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v5p3/StateStore.php
@@ -1,5 +1,5 @@
debugBarExtension = $this->createDebugBarExtension();
}
}
diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v5p2/UpgraderStatus.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v5p3/UpgraderStatus.php
similarity index 99%
rename from vendor/yahnis-elsts/plugin-update-checker/Puc/v5p2/UpgraderStatus.php
rename to vendor/yahnis-elsts/plugin-update-checker/Puc/v5p3/UpgraderStatus.php
index b65303d..81b1f4c 100644
--- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v5p2/UpgraderStatus.php
+++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v5p3/UpgraderStatus.php
@@ -1,5 +1,5 @@
setInfoFromHeader($remoteHeader, $info);
}
+ //Sanity check: Reject updates that don't have a version number.
+ //This can happen when we're using a branch, and we either fail to retrieve the main plugin
+ //file or the file doesn't have a "Version" header.
+ if ( empty($info->version) ) {
+ do_action(
+ 'puc_api_error',
+ new \WP_Error(
+ 'puc-no-plugin-version',
+ 'Could not find the version number in the repository.'
+ ),
+ null, null, $this->slug
+ );
+ return null;
+ }
+
//Try parsing readme.txt. If it's formatted according to WordPress.org standards, it will contain
//a lot of useful information like the required/tested WP version, changelog, and so on.
if ( $this->readmeTxtExistsLocally() ) {
diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v5p2/Vcs/Reference.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v5p3/Vcs/Reference.php
similarity index 95%
rename from vendor/yahnis-elsts/plugin-update-checker/Puc/v5p2/Vcs/Reference.php
rename to vendor/yahnis-elsts/plugin-update-checker/Puc/v5p3/Vcs/Reference.php
index 3b00942..7f6988a 100644
--- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v5p2/Vcs/Reference.php
+++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v5p3/Vcs/Reference.php
@@ -1,5 +1,5 @@
$pucVersionedClass
) {
- MajorFactory::addVersion($pucGeneralClass, $pucVersionedClass, '5.2');
+ MajorFactory::addVersion($pucGeneralClass, $pucVersionedClass, '5.3');
//Also add it to the minor-version factory in case the major-version factory
//was already defined by another, older version of the update checker.
- MinorFactory::addVersion($pucGeneralClass, $pucVersionedClass, '5.2');
+ MinorFactory::addVersion($pucGeneralClass, $pucVersionedClass, '5.3');
}
diff --git a/vendor/yahnis-elsts/plugin-update-checker/plugin-update-checker.php b/vendor/yahnis-elsts/plugin-update-checker/plugin-update-checker.php
index 98f3af8..7a9268c 100644
--- a/vendor/yahnis-elsts/plugin-update-checker/plugin-update-checker.php
+++ b/vendor/yahnis-elsts/plugin-update-checker/plugin-update-checker.php
@@ -1,10 +1,10 @@