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:
+
+
+