From abedf94f24c4081f38e3f04caf2e098ba9b4bb9a Mon Sep 17 00:00:00 2001
From: abuyoyo
Date: Thu, 10 Aug 2023 03:34:31 +0300
Subject: [PATCH 1/3] composer.json - update abuyoyo/screen-meta-links ~0.13
---
composer.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/composer.json b/composer.json
index 7c80616..28145d5 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,7 @@
}
],
"require":{
- "abuyoyo/screen-meta-links": "~0.11",
+ "abuyoyo/screen-meta-links": "~0.13",
"abuyoyo/plugincore": "~0.26",
"abuyoyo/adminmenupage": "~0.25"
}
From fcee298dab7a2c20353da1ce0ad59a00f19da523 Mon Sep 17 00:00:00 2001
From: abuyoyo
Date: Thu, 10 Aug 2023 03:36:46 +0300
Subject: [PATCH 2/3] composer.lock + vendor update
---
composer.lock | 26 +++---
vendor/abuyoyo/adminmenupage/CHANGELOG.md | 7 ++
vendor/abuyoyo/adminmenupage/composer.json | 4 +-
.../adminmenupage/src/CMB2_OptionsPage.php | 6 +-
.../adminmenupage/src/PluginInfoMetaBox.php | 14 ++++
.../src/tpl/plugin_info_meta_box-inside.php | 9 +-
.../tpl/plugin_info_meta_box-wph_debug.php | 82 +++++++++++++++++++
vendor/abuyoyo/screen-meta-links/CHANGELOG.md | 10 +++
.../screen-meta-links/screen-meta-links.php | 13 +--
vendor/composer/installed.json | 28 +++----
vendor/composer/installed.php | 20 ++---
11 files changed, 172 insertions(+), 47 deletions(-)
create mode 100644 vendor/abuyoyo/adminmenupage/src/tpl/plugin_info_meta_box-wph_debug.php
diff --git a/composer.lock b/composer.lock
index 1c6eb17..c865a59 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,20 +4,20 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "f7b75f26e447e0d13270ca9591fc4bd4",
+ "content-hash": "6d8701d5158bd7f07c4775c45160cde4",
"packages": [
{
"name": "abuyoyo/adminmenupage",
- "version": "0.25",
+ "version": "0.26",
"source": {
"type": "git",
"url": "https://github.com/abuyoyo/AdminMenuPage.git",
- "reference": "487d262aec77a9a3ce04fa762e9048f30d22f123"
+ "reference": "f2fcb6d4c8b232ca03cef1908253aed4e5962be8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/abuyoyo/AdminMenuPage/zipball/487d262aec77a9a3ce04fa762e9048f30d22f123",
- "reference": "487d262aec77a9a3ce04fa762e9048f30d22f123",
+ "url": "https://api.github.com/repos/abuyoyo/AdminMenuPage/zipball/f2fcb6d4c8b232ca03cef1908253aed4e5962be8",
+ "reference": "f2fcb6d4c8b232ca03cef1908253aed4e5962be8",
"shasum": ""
},
"suggest": {
@@ -40,9 +40,9 @@
"description": "WordPress admin menu page helper class",
"support": {
"issues": "https://github.com/abuyoyo/AdminMenuPage/issues",
- "source": "https://github.com/abuyoyo/AdminMenuPage/tree/0.25"
+ "source": "https://github.com/abuyoyo/AdminMenuPage/tree/0.26"
},
- "time": "2023-06-09T00:00:00+00:00"
+ "time": "2023-06-20T00:00:00+00:00"
},
{
"name": "abuyoyo/plugincore",
@@ -81,16 +81,16 @@
},
{
"name": "abuyoyo/screen-meta-links",
- "version": "0.11",
+ "version": "0.13",
"source": {
"type": "git",
"url": "https://github.com/abuyoyo/screen-meta-links.git",
- "reference": "04e3c892f0c6095b4c31a489e06336f0917128d3"
+ "reference": "b324cef9eb5825d04ffa17f771237b7deca5cd01"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/abuyoyo/screen-meta-links/zipball/04e3c892f0c6095b4c31a489e06336f0917128d3",
- "reference": "04e3c892f0c6095b4c31a489e06336f0917128d3",
+ "url": "https://api.github.com/repos/abuyoyo/screen-meta-links/zipball/b324cef9eb5825d04ffa17f771237b7deca5cd01",
+ "reference": "b324cef9eb5825d04ffa17f771237b7deca5cd01",
"shasum": ""
},
"type": "library",
@@ -101,10 +101,10 @@
},
"description": "API for adding custom screen-meta-links alongside the 'Screen Options' and 'Help' links.",
"support": {
- "source": "https://github.com/abuyoyo/screen-meta-links/tree/0.11",
+ "source": "https://github.com/abuyoyo/screen-meta-links/tree/0.13",
"issues": "https://github.com/abuyoyo/screen-meta-links/issues"
},
- "time": "2022-05-18T01:18:24+00:00"
+ "time": "2023-08-08T22:37:03+00:00"
}
],
"packages-dev": [],
diff --git a/vendor/abuyoyo/adminmenupage/CHANGELOG.md b/vendor/abuyoyo/adminmenupage/CHANGELOG.md
index 4f1cecc..e07ff2d 100644
--- a/vendor/abuyoyo/adminmenupage/CHANGELOG.md
+++ b/vendor/abuyoyo/adminmenupage/CHANGELOG.md
@@ -1,6 +1,13 @@
# Changelog
WPHelper\AdminMenuPage
+## 0.26
+Release date: Jun 20 2023
+
+### Added
+- Add `allow_on_front` setting to CMB2 pages. Hooks metabox on `cmb2_init` instead of `cmb2_admin_init`.
+- If defined `WPH_DEBUG` add WPHelper classes debug information to plugin info meta box.
+
## 0.25
Release date: Jun 9 2023
diff --git a/vendor/abuyoyo/adminmenupage/composer.json b/vendor/abuyoyo/adminmenupage/composer.json
index bfe3a87..82de1b8 100644
--- a/vendor/abuyoyo/adminmenupage/composer.json
+++ b/vendor/abuyoyo/adminmenupage/composer.json
@@ -2,8 +2,8 @@
"name": "abuyoyo/adminmenupage",
"description": "WordPress admin menu page helper class",
"type": "library",
- "version": "0.25",
- "time": "2023-06-09",
+ "version": "0.26",
+ "time": "2023-06-20",
"license": "BSD-3-Clause",
"suggest": {
"abuyoyo/plugincore": "~0.26",
diff --git a/vendor/abuyoyo/adminmenupage/src/CMB2_OptionsPage.php b/vendor/abuyoyo/adminmenupage/src/CMB2_OptionsPage.php
index bd79663..5eb2cfb 100644
--- a/vendor/abuyoyo/adminmenupage/src/CMB2_OptionsPage.php
+++ b/vendor/abuyoyo/adminmenupage/src/CMB2_OptionsPage.php
@@ -192,7 +192,11 @@ class CMB2_OptionsPage{
// register parent pages before sub-menu pages
$priority = empty( $settings['parent_slug'] ) ? 9 : 10;
- add_action( 'cmb2_admin_init', [ $this, 'register_metabox' ], $priority );
+ if ( $settings['allow_on_front'] ?? false ){
+ add_action( 'cmb2_init', [ $this, 'register_metabox' ], $priority );
+ } else {
+ add_action( 'cmb2_admin_init', [ $this, 'register_metabox' ], $priority );
+ }
/**
* @todo add 'submenu' field and functionality to WPHelper\AdminPage
diff --git a/vendor/abuyoyo/adminmenupage/src/PluginInfoMetaBox.php b/vendor/abuyoyo/adminmenupage/src/PluginInfoMetaBox.php
index 952deb9..4736d1f 100644
--- a/vendor/abuyoyo/adminmenupage/src/PluginInfoMetaBox.php
+++ b/vendor/abuyoyo/adminmenupage/src/PluginInfoMetaBox.php
@@ -18,6 +18,8 @@ class PluginInfoMetaBox{
private $tpl_inside = '/tpl/plugin_info_meta_box-inside.php';
+ private $tpl_debug = '/tpl/plugin_info_meta_box-wph_debug.php';
+
/**
* @var PluginCore
*/
@@ -38,6 +40,7 @@ class PluginInfoMetaBox{
add_action( "wphelper/plugin_info_meta_box/{$this->plugin_core->slug()}", [ $this, 'plugin_info_box' ] );
add_action( "wphelper/plugin_info_meta_box/inside/{$this->plugin_core->slug()}", [ $this, 'inside' ] );
+
}
/**
@@ -98,5 +101,16 @@ class PluginInfoMetaBox{
extract($args);
include __DIR__ . $this->tpl_inside;
}
+
+ /**
+ * WPHelper classes debug info
+ *
+ * Prints inside Plugin Info Meta Box
+ *
+ * @since 0.26
+ */
+ function wph_debug() {
+ include __DIR__ . $this->tpl_debug;
+ }
}
endif;
\ No newline at end of file
diff --git a/vendor/abuyoyo/adminmenupage/src/tpl/plugin_info_meta_box-inside.php b/vendor/abuyoyo/adminmenupage/src/tpl/plugin_info_meta_box-inside.php
index fe18e6c..e76121d 100644
--- a/vendor/abuyoyo/adminmenupage/src/tpl/plugin_info_meta_box-inside.php
+++ b/vendor/abuyoyo/adminmenupage/src/tpl/plugin_info_meta_box-inside.php
@@ -24,4 +24,11 @@
Last Updated:
-
\ No newline at end of file
+
+wph_debug();
+}
\ No newline at end of file
diff --git a/vendor/abuyoyo/adminmenupage/src/tpl/plugin_info_meta_box-wph_debug.php b/vendor/abuyoyo/adminmenupage/src/tpl/plugin_info_meta_box-wph_debug.php
new file mode 100644
index 0000000..083aa07
--- /dev/null
+++ b/vendor/abuyoyo/adminmenupage/src/tpl/plugin_info_meta_box-wph_debug.php
@@ -0,0 +1,82 @@
+getFileName();
+ $wph_admin_composer = json_decode(file_get_contents( dirname( dirname( $wph_admin_file ) ) . '/composer.json' )) ;
+}
+
+if (class_exists(PluginCore::class)){
+ $wph_pc_ref = new ReflectionClass(PluginCore::class);
+ $wph_pc_file = $wph_pc_ref->getFileName();
+ $wph_pc_composer = json_decode(file_get_contents( dirname( $wph_pc_file ) . '/composer.json' )) ;
+}
+
+if (class_exists(MetaBox::class)){
+ $wph_mb_ref = new ReflectionClass(MetaBox::class);
+ $wph_mb_file = $wph_mb_ref->getFileName();
+ $wph_mb_composer = json_decode(file_get_contents( dirname( $wph_mb_file ) . '/composer.json' )) ;
+}
+
+if (trait_exists(Singleton::class)){
+ $wph_util_ref = new ReflectionClass(Singleton::class);
+ $wph_util_file = $wph_util_ref->getFileName();
+ $wph_util_composer = json_decode(file_get_contents( dirname( dirname( $wph_util_file ) ) . '/composer.json' )) ;
+}
+
+if (class_exists(DatabaseTable::class)){
+ $wph_db_ref = new ReflectionClass(DatabaseTable::class);
+ $wph_db_file = $wph_db_ref->getFileName();
+ $wph_db_composer = json_decode(file_get_contents( dirname( $wph_db_file ) . '/composer.json' )) ;
+}
+?>
+
+
+
+
+ AdminPage: version; ?>
+ Location:
+
+
+
+
+
+ PluginCore: version; ?>
+ Location:
+
+
+
+
+
+ MetaBox: version; ?>
+ Location:
+
+
+
+
+
+ Utility: version; ?>
+ Location:
+
+
+
+
+
+ DatabaseTable: version; ?>
+ Location:
+
+
+
\ No newline at end of file
diff --git a/vendor/abuyoyo/screen-meta-links/CHANGELOG.md b/vendor/abuyoyo/screen-meta-links/CHANGELOG.md
index 9676cab..4a2876f 100644
--- a/vendor/abuyoyo/screen-meta-links/CHANGELOG.md
+++ b/vendor/abuyoyo/screen-meta-links/CHANGELOG.md
@@ -2,6 +2,16 @@
API for adding custom `screen-meta-links` links and panels alongside the 'Screen Options' and 'Help' links on the WordPress admin page.
+## [0.13](https://github.com/abuyoyo/screen-meta-links/releases/tag/0.13)
+
+### Fixed
+- Fix PHP 8.2 depreacted: Optional parameter declared before required parameter.
+
+## [0.12](https://github.com/abuyoyo/screen-meta-links/releases/tag/0.12)
+
+### Fixed
+- Fix PHP notice: Constant already defined.
+
## [0.11](https://github.com/abuyoyo/screen-meta-links/releases/tag/0.11)
### Removed
diff --git a/vendor/abuyoyo/screen-meta-links/screen-meta-links.php b/vendor/abuyoyo/screen-meta-links/screen-meta-links.php
index d5f6989..348aa38 100644
--- a/vendor/abuyoyo/screen-meta-links/screen-meta-links.php
+++ b/vendor/abuyoyo/screen-meta-links/screen-meta-links.php
@@ -2,7 +2,7 @@
/**
* Plugin Name: abuyoyo / Screen Meta Links
* Description: API for adding custom screen-meta-links alongside the "Screen Options" and "Help" links.
- * Version: 0.11
+ * Version: 0.13
* Author: abuyoyo
* Author URI: https://github.com/abuyoyo
* Plugin URI: https://github.com/abuyoyo/screen-meta-links
@@ -16,9 +16,9 @@
*
*/
-if ( ! defined( 'SML_FILE' ) ) define ( 'SML_FILE', __FILE__ );
-if ( ! defined( 'SML_URL' ) ) define ( 'SML_URL', plugin_dir_url( __FILE__ ) );
-if ( ! defined( 'SML_PATH' ) ) define ( 'SML_PATH', plugin_dir_path( __FILE__ ) );
+! defined( 'SML_FILE' ) && define ( 'SML_FILE', __FILE__ );
+! defined( 'SML_URL' ) && define ( 'SML_URL' , plugin_dir_url( __FILE__ ) );
+! defined( 'SML_PATH' ) && define ( 'SML_PATH', plugin_dir_path( __FILE__ ) );
if ( ! class_exists('Screen_Meta_Links') ):
@@ -352,14 +352,15 @@ if ( ! function_exists( 'wph_add_screen_meta_panel' ) ):
* @param string $id - Link ID. Should be unique and a valid value for a HTML ID attribute.
* @param string $text - Link text.
* @param string $href - Optional. Link URL to be used if no panel is provided
- * @param string|array $page - The page(s) where you want to add the link.
+ * @param string|array $page - Optional. The page(s) where you want to add the link. Accepts wildcard '*'. If left empty will not add to any page.
* @param array $attributes - Optional. Additional attributes for the link tag. Add 'aria-controls' => "{$id}-wrap" to toggle panel
* @param callback $panel - Optional. Callback should print out screen-meta panel contents
* @return void
*
* @todo Remove $href parameter and functionailty
+ * @todo $page should not be optional. We need to remove $href first.
*/
-function wph_add_screen_meta_panel($id, $text, $href = '', $page, $attributes = null, $panel=''){
+function wph_add_screen_meta_panel( $id, $text, $href = '', $page = '', $attributes = null, $panel = '' ){
static $sml_instance = null;
if ( null === $sml_instance){
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 130eea7..ddeebdc 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -2,24 +2,24 @@
"packages": [
{
"name": "abuyoyo/adminmenupage",
- "version": "0.25",
- "version_normalized": "0.25.0.0",
+ "version": "0.26",
+ "version_normalized": "0.26.0.0",
"source": {
"type": "git",
"url": "https://github.com/abuyoyo/AdminMenuPage.git",
- "reference": "487d262aec77a9a3ce04fa762e9048f30d22f123"
+ "reference": "f2fcb6d4c8b232ca03cef1908253aed4e5962be8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/abuyoyo/AdminMenuPage/zipball/487d262aec77a9a3ce04fa762e9048f30d22f123",
- "reference": "487d262aec77a9a3ce04fa762e9048f30d22f123",
+ "url": "https://api.github.com/repos/abuyoyo/AdminMenuPage/zipball/f2fcb6d4c8b232ca03cef1908253aed4e5962be8",
+ "reference": "f2fcb6d4c8b232ca03cef1908253aed4e5962be8",
"shasum": ""
},
"suggest": {
"abuyoyo/plugincore": "~0.26",
"cmb2/cmb2": "~2.9"
},
- "time": "2023-06-09T00:00:00+00:00",
+ "time": "2023-06-20T00:00:00+00:00",
"type": "library",
"installation-source": "source",
"autoload": {
@@ -37,7 +37,7 @@
"description": "WordPress admin menu page helper class",
"support": {
"issues": "https://github.com/abuyoyo/AdminMenuPage/issues",
- "source": "https://github.com/abuyoyo/AdminMenuPage/tree/0.25"
+ "source": "https://github.com/abuyoyo/AdminMenuPage/tree/0.26"
},
"install-path": "../abuyoyo/adminmenupage"
},
@@ -81,20 +81,20 @@
},
{
"name": "abuyoyo/screen-meta-links",
- "version": "0.11",
- "version_normalized": "0.11.0.0",
+ "version": "0.13",
+ "version_normalized": "0.13.0.0",
"source": {
"type": "git",
"url": "https://github.com/abuyoyo/screen-meta-links.git",
- "reference": "04e3c892f0c6095b4c31a489e06336f0917128d3"
+ "reference": "b324cef9eb5825d04ffa17f771237b7deca5cd01"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/abuyoyo/screen-meta-links/zipball/04e3c892f0c6095b4c31a489e06336f0917128d3",
- "reference": "04e3c892f0c6095b4c31a489e06336f0917128d3",
+ "url": "https://api.github.com/repos/abuyoyo/screen-meta-links/zipball/b324cef9eb5825d04ffa17f771237b7deca5cd01",
+ "reference": "b324cef9eb5825d04ffa17f771237b7deca5cd01",
"shasum": ""
},
- "time": "2022-05-18T01:18:24+00:00",
+ "time": "2023-08-08T22:37:03+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -104,7 +104,7 @@
},
"description": "API for adding custom screen-meta-links alongside the 'Screen Options' and 'Help' links.",
"support": {
- "source": "https://github.com/abuyoyo/screen-meta-links/tree/0.11",
+ "source": "https://github.com/abuyoyo/screen-meta-links/tree/0.13",
"issues": "https://github.com/abuyoyo/screen-meta-links/issues"
},
"install-path": "../abuyoyo/screen-meta-links"
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index f827bd9..0d764a9 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -1,7 +1,7 @@
array(
- 'pretty_version' => '0.20',
- 'version' => '0.20.0.0',
+ 'pretty_version' => '0.21',
+ 'version' => '0.21.0.0',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -11,17 +11,17 @@
),
'versions' => array(
'abuyoyo/adminmenupage' => array(
- 'pretty_version' => '0.25',
- 'version' => '0.25.0.0',
+ 'pretty_version' => '0.26',
+ 'version' => '0.26.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../abuyoyo/adminmenupage',
'aliases' => array(),
- 'reference' => '487d262aec77a9a3ce04fa762e9048f30d22f123',
+ 'reference' => 'f2fcb6d4c8b232ca03cef1908253aed4e5962be8',
'dev_requirement' => false,
),
'abuyoyo/notice-manager' => array(
- 'pretty_version' => '0.20',
- 'version' => '0.20.0.0',
+ 'pretty_version' => '0.21',
+ 'version' => '0.21.0.0',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -38,12 +38,12 @@
'dev_requirement' => false,
),
'abuyoyo/screen-meta-links' => array(
- 'pretty_version' => '0.11',
- 'version' => '0.11.0.0',
+ 'pretty_version' => '0.13',
+ 'version' => '0.13.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../abuyoyo/screen-meta-links',
'aliases' => array(),
- 'reference' => '04e3c892f0c6095b4c31a489e06336f0917128d3',
+ 'reference' => 'b324cef9eb5825d04ffa17f771237b7deca5cd01',
'dev_requirement' => false,
),
),
From a856f85cb846de63809fd73b94ee9e0e24f7d8bc Mon Sep 17 00:00:00 2001
From: abuyoyo
Date: Thu, 10 Aug 2023 03:40:54 +0300
Subject: [PATCH 3/3] 0.21 - version bump + changelog
---
CHANGELOG.md | 8 ++++++++
composer.json | 2 +-
notice-manager.php | 2 +-
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index db510ca..82291a1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Notice Manager Changelog
+## 0.21
+
+### Fixed
+- Fix PHP 8.2 deprecated optional parameter before required parameter. Fixed upstream in `abuyoyo/screen-meta-links ~0.13`.
+
+### Dependencies
+- Update library `abuyoyo/screen-meta-links` to version 0.13.
+
## 0.20
### Minor
diff --git a/composer.json b/composer.json
index 28145d5..e86e701 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
"name": "abuyoyo/notice-manager",
"description": "Manage notices on WordPress admin pages. Adds 'Notices' screen-meta-link.",
"type": "wordpress-plugin",
- "version": "0.20",
+ "version": "0.21",
"repositories": [
{
"type": "vcs",
diff --git a/notice-manager.php b/notice-manager.php
index 83729e4..4d185f6 100644
--- a/notice-manager.php
+++ b/notice-manager.php
@@ -2,7 +2,7 @@
/**
* Plugin Name: Notice Manager
* Description: Manage notices on WordPress admin pages. Adds 'Notices' screen-meta-link.
- * Version: 0.20
+ * Version: 0.21
* Author: abuyoyo
* Author URI: https://github.com/abuyoyo/
* Plugin URI: https://github.com/abuyoyo/notice-manager