composer.lock + vendor/

This commit is contained in:
abuyoyo 2023-10-04 01:48:36 +03:00
parent 2c166a33a8
commit 1cd273bded
16 changed files with 103 additions and 68 deletions

30
composer.lock generated
View File

@ -4,20 +4,20 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "a4fa2edfc5b4021a3dc78312c01fbfd0", "content-hash": "4ad7c014df793fb15d9b01b71d7a7acf",
"packages": [ "packages": [
{ {
"name": "abuyoyo/adminmenupage", "name": "abuyoyo/adminmenupage",
"version": "0.27", "version": "0.28",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/abuyoyo/AdminMenuPage.git", "url": "https://github.com/abuyoyo/AdminMenuPage.git",
"reference": "5ab293cbac3613a680bf2bd741214b1ca782f33b" "reference": "c16d80ebbe1cc112acd3e5eca2f97e7abd017d29"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/abuyoyo/AdminMenuPage/zipball/5ab293cbac3613a680bf2bd741214b1ca782f33b", "url": "https://api.github.com/repos/abuyoyo/AdminMenuPage/zipball/c16d80ebbe1cc112acd3e5eca2f97e7abd017d29",
"reference": "5ab293cbac3613a680bf2bd741214b1ca782f33b", "reference": "c16d80ebbe1cc112acd3e5eca2f97e7abd017d29",
"shasum": "" "shasum": ""
}, },
"suggest": { "suggest": {
@ -40,27 +40,27 @@
"description": "WordPress admin menu page helper class", "description": "WordPress admin menu page helper class",
"support": { "support": {
"issues": "https://github.com/abuyoyo/AdminMenuPage/issues", "issues": "https://github.com/abuyoyo/AdminMenuPage/issues",
"source": "https://github.com/abuyoyo/AdminMenuPage/tree/0.27" "source": "https://github.com/abuyoyo/AdminMenuPage/tree/0.28"
}, },
"time": "2023-06-20T00:00:00+00:00" "time": "2023-10-04T00:00:00+00:00"
}, },
{ {
"name": "abuyoyo/plugincore", "name": "abuyoyo/plugincore",
"version": "0.26", "version": "0.27",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/abuyoyo/PluginCore.git", "url": "https://github.com/abuyoyo/PluginCore.git",
"reference": "77f7d5451bdff4bda6c9766847b215bdeaca96d6" "reference": "d730a674cbe2dc92e60ace8e25a2e0e3fdeee3e6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/abuyoyo/PluginCore/zipball/77f7d5451bdff4bda6c9766847b215bdeaca96d6", "url": "https://api.github.com/repos/abuyoyo/PluginCore/zipball/d730a674cbe2dc92e60ace8e25a2e0e3fdeee3e6",
"reference": "77f7d5451bdff4bda6c9766847b215bdeaca96d6", "reference": "d730a674cbe2dc92e60ace8e25a2e0e3fdeee3e6",
"shasum": "" "shasum": ""
}, },
"suggest": { "suggest": {
"abuyoyo/adminmenupage": "~0.25", "abuyoyo/adminmenupage": "~0.27",
"yahnis-elsts/plugin-update-checker": "~4.12" "yahnis-elsts/plugin-update-checker": "~5.2"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -75,9 +75,9 @@
"description": "WordPress plugin core helper class", "description": "WordPress plugin core helper class",
"support": { "support": {
"issues": "https://github.com/abuyoyo/PluginCore/issues", "issues": "https://github.com/abuyoyo/PluginCore/issues",
"source": "https://github.com/abuyoyo/PluginCore/tree/0.26" "source": "https://github.com/abuyoyo/PluginCore/tree/0.27"
}, },
"time": "2022-06-09T00:00:00+00:00" "time": "2022-10-03T00:00:00+00:00"
}, },
{ {
"name": "abuyoyo/screen-meta-links", "name": "abuyoyo/screen-meta-links",

View File

@ -1,6 +1,13 @@
# Changelog # Changelog
WPHelper\AdminMenuPage WPHelper\AdminMenuPage
## 0.28
Release date: Oct 4 2023
### Added
- Option `parent` accepts `tools` as shorthand for `tools.php`.
- Add link to Install Plugin page in "CMB2 plugin missing" template.
## 0.27 ## 0.27
Release date: Sep 10 2023 Release date: Sep 10 2023
@ -28,7 +35,7 @@ Release date: Jun 9 2023
- Fix several PHP undefined variable warnings. - Fix several PHP undefined variable warnings.
### Internal ### Internal
- Setting pages/wrap temlate uses WordPress Core `do_meta_boxes` to render `side` meta boxes div. - Setting pages/wrap template uses WordPress Core `do_meta_boxes` to render `side` meta boxes div.
- Add variables to `AdminPage::options()` array. - Add variables to `AdminPage::options()` array.
- Multiple code refactoring and template restructuring. - Multiple code refactoring and template restructuring.

View File

@ -2,8 +2,8 @@
"name": "abuyoyo/adminmenupage", "name": "abuyoyo/adminmenupage",
"description": "WordPress admin menu page helper class", "description": "WordPress admin menu page helper class",
"type": "library", "type": "library",
"version": "0.27", "version": "0.28",
"time": "2023-06-20", "time": "2023-10-04",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"suggest": { "suggest": {
"abuyoyo/plugincore": "~0.26", "abuyoyo/plugincore": "~0.26",

View File

@ -348,6 +348,10 @@ class AdminPage
case 'options-general.php': case 'options-general.php':
$this->parent = 'options-general.php'; $this->parent = 'options-general.php';
break; break;
case 'tools':
case 'tools.php':
$this->parent = 'tools.php';
break;
default: default:
$this->parent = $parent; $this->parent = $parent;
break; break;

View File

@ -34,7 +34,7 @@ class SettingsPage{
* *
* @var string $page * @var string $page
*/ */
protected $page; public $page;
/** /**
* option_name key used in wp_options table * option_name key used in wp_options table
@ -343,7 +343,7 @@ class SettingsPage{
$new_options[$id] = sanitize_email( $option ); $new_options[$id] = sanitize_email( $option );
break; break;
case 'url': case 'url':
$new_options[$id] = sanitize_url( $option ); $new_options[$id] = esc_url_raw( $option );
break; break;
default: default:
break; break;

View File

@ -7,8 +7,9 @@
?> ?>
<form method="post" action="options.php"> <form method="post" action="options.php">
<?php <?php
/** @var WPHelper\AdminPage $this */
settings_fields( $this->settings_page->option_group );// Print hidden setting fields settings_fields( $this->settings_page->option_group );// Print hidden setting fields
do_settings_sections( $this->get_slug() );// Print title, info callback and form-table do_settings_sections( $this->settings_page->page );// Print title, info callback and form-table
submit_button(); submit_button();
?> ?>
</form> </form>

View File

@ -32,5 +32,6 @@
* @since 0.26 * @since 0.26
*/ */
if ( defined('WPH_DEBUG') && WPH_DEBUG ) { if ( defined('WPH_DEBUG') && WPH_DEBUG ) {
/** @var WPHelper\PluginInfoMetaBox $this */
$this->wph_debug(); $this->wph_debug();
} }

View File

@ -4,6 +4,6 @@
<div class="card"> <div class="card">
<h3>CMB2 Plugin Missing</h3> <h3>CMB2 Plugin Missing</h3>
<p>CMB2 plugin is required to display this page. <p>CMB2 plugin is required to display this page.
<br>Download and activate CMB2 plugin. <br>Please install and activate <a href="<?php echo admin_url('plugin-install.php?s=cmb2&tab=search') ?>">CMB2 plugin</a>.
</div> </div>
</div> </div>

View File

@ -1,5 +1,11 @@
# WPHelper\PluginCore Changelog # WPHelper\PluginCore Changelog
## 0.27
Release Date: Oct 3, 2023
### Added
- Support Plugin Update Checker v5 as well as v4. Create class alias `WPHelper\PucFactory` for `YahnisElsts\PluginUpdateChecker\v5\PucFactory` if available. Fallback to `Puc_v4_Factory`.
## 0.26 ## 0.26
Release Date: Jun 9, 2023 Release Date: Jun 9, 2023

View File

@ -1,14 +1,12 @@
<?php <?php
namespace WPHelper; namespace WPHelper;
use Puc_v4_Factory as PucFactory;
defined( 'ABSPATH' ) || die( 'No soup for you!' ); defined( 'ABSPATH' ) || die( 'No soup for you!' );
if ( ! class_exists( 'WPHelper/PluginCore' ) ): if ( ! class_exists( 'WPHelper/PluginCore' ) ):
// require dependency get_plugin_data() // require dependency get_plugin_data()
if( ! function_exists('get_plugin_data') ) { if( ! function_exists( 'get_plugin_data' ) ) {
require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
} }
@ -19,7 +17,7 @@ if( ! function_exists('get_plugin_data') ) {
* *
* (@see README.md) * (@see README.md)
* *
* @version 0.26 * @version 0.27
*/ */
class PluginCore { class PluginCore {
@ -581,12 +579,30 @@ class PluginCore {
* *
* @since 0.9 init_update_checker() * @since 0.9 init_update_checker()
* @since 0.21 build_update_checker() * @since 0.21 build_update_checker()
* @since 0.27 Create class alias WPHelper\PucFactory - support plugin-update-checker v4 & v5
* *
* @uses PucFactory::buildUpdateChecker * @uses PucFactory::buildUpdateChecker
*/ */
private function build_update_checker() { private function build_update_checker() {
if ( ! class_exists( PucFactory::class ) ) /**
* Create class alias WPHelper\PucFactory
* Support YahnisElsts\PluginUpdateChecker v4 | v5
*
* @since 0.27
*/
if ( ! class_exists( 'WPHelper\PucFactory' ) ) {
if ( class_exists( 'YahnisElsts\PluginUpdateChecker\v5\PucFactory' ) ) {
$actual_puc = 'YahnisElsts\PluginUpdateChecker\v5\PucFactory';
} else if ( class_exists( 'Puc_v4_Factory' ) ) {
$actual_puc = 'Puc_v4_Factory';
}
if ( ! empty( $actual_puc ) ) {
class_alias( $actual_puc, 'WPHelper\PucFactory' );
}
}
if ( ! class_exists( 'WPHelper\PucFactory' ) )
return; return;
$update_checker = PucFactory::buildUpdateChecker( $update_checker = PucFactory::buildUpdateChecker(

View File

@ -2,12 +2,12 @@
"name": "abuyoyo/plugincore", "name": "abuyoyo/plugincore",
"description": "WordPress plugin core helper class", "description": "WordPress plugin core helper class",
"type": "library", "type": "library",
"version": "0.26", "version": "0.27",
"time": "2022-06-09", "time": "2022-10-03",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"suggest": { "suggest": {
"yahnis-elsts/plugin-update-checker": "~4.12", "yahnis-elsts/plugin-update-checker": "~5.2",
"abuyoyo/adminmenupage": "~0.25" "abuyoyo/adminmenupage": "~0.27"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

2
vendor/autoload.php vendored
View File

@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit99e41faf4c8cd1b54927a50ca0e7ee5c::getLoader(); return ComposerAutoloaderInita13a895834453aad32a897cc456c73ff::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer // autoload_real.php @generated by Composer
class ComposerAutoloaderInit99e41faf4c8cd1b54927a50ca0e7ee5c class ComposerAutoloaderInita13a895834453aad32a897cc456c73ff
{ {
private static $loader; private static $loader;
@ -22,16 +22,16 @@ class ComposerAutoloaderInit99e41faf4c8cd1b54927a50ca0e7ee5c
return self::$loader; return self::$loader;
} }
spl_autoload_register(array('ComposerAutoloaderInit99e41faf4c8cd1b54927a50ca0e7ee5c', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInita13a895834453aad32a897cc456c73ff', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit99e41faf4c8cd1b54927a50ca0e7ee5c', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInita13a895834453aad32a897cc456c73ff', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php'; require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit99e41faf4c8cd1b54927a50ca0e7ee5c::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInita13a895834453aad32a897cc456c73ff::getInitializer($loader));
$loader->register(true); $loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit99e41faf4c8cd1b54927a50ca0e7ee5c::$files; $filesToLoad = \Composer\Autoload\ComposerStaticInita13a895834453aad32a897cc456c73ff::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) { $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload; namespace Composer\Autoload;
class ComposerStaticInit99e41faf4c8cd1b54927a50ca0e7ee5c class ComposerStaticInita13a895834453aad32a897cc456c73ff
{ {
public static $files = array ( public static $files = array (
'8653524d908cf23a56335c6d210d6627' => __DIR__ . '/..' . '/abuyoyo/adminmenupage/wph_admin_page.php', '8653524d908cf23a56335c6d210d6627' => __DIR__ . '/..' . '/abuyoyo/adminmenupage/wph_admin_page.php',
@ -33,9 +33,9 @@ class ComposerStaticInit99e41faf4c8cd1b54927a50ca0e7ee5c
public static function getInitializer(ClassLoader $loader) public static function getInitializer(ClassLoader $loader)
{ {
return \Closure::bind(function () use ($loader) { return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit99e41faf4c8cd1b54927a50ca0e7ee5c::$prefixLengthsPsr4; $loader->prefixLengthsPsr4 = ComposerStaticInita13a895834453aad32a897cc456c73ff::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit99e41faf4c8cd1b54927a50ca0e7ee5c::$prefixDirsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInita13a895834453aad32a897cc456c73ff::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit99e41faf4c8cd1b54927a50ca0e7ee5c::$classMap; $loader->classMap = ComposerStaticInita13a895834453aad32a897cc456c73ff::$classMap;
}, null, ClassLoader::class); }, null, ClassLoader::class);
} }

View File

@ -2,26 +2,26 @@
"packages": [ "packages": [
{ {
"name": "abuyoyo/adminmenupage", "name": "abuyoyo/adminmenupage",
"version": "0.27", "version": "0.28",
"version_normalized": "0.27.0.0", "version_normalized": "0.28.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/abuyoyo/AdminMenuPage.git", "url": "https://github.com/abuyoyo/AdminMenuPage.git",
"reference": "5ab293cbac3613a680bf2bd741214b1ca782f33b" "reference": "c16d80ebbe1cc112acd3e5eca2f97e7abd017d29"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/abuyoyo/AdminMenuPage/zipball/5ab293cbac3613a680bf2bd741214b1ca782f33b", "url": "https://api.github.com/repos/abuyoyo/AdminMenuPage/zipball/c16d80ebbe1cc112acd3e5eca2f97e7abd017d29",
"reference": "5ab293cbac3613a680bf2bd741214b1ca782f33b", "reference": "c16d80ebbe1cc112acd3e5eca2f97e7abd017d29",
"shasum": "" "shasum": ""
}, },
"suggest": { "suggest": {
"abuyoyo/plugincore": "~0.26", "abuyoyo/plugincore": "~0.26",
"cmb2/cmb2": "~2.9" "cmb2/cmb2": "~2.9"
}, },
"time": "2023-06-20T00:00:00+00:00", "time": "2023-10-04T00:00:00+00:00",
"type": "library", "type": "library",
"installation-source": "source", "installation-source": "dist",
"autoload": { "autoload": {
"files": [ "files": [
"wph_admin_page.php" "wph_admin_page.php"
@ -37,30 +37,30 @@
"description": "WordPress admin menu page helper class", "description": "WordPress admin menu page helper class",
"support": { "support": {
"issues": "https://github.com/abuyoyo/AdminMenuPage/issues", "issues": "https://github.com/abuyoyo/AdminMenuPage/issues",
"source": "https://github.com/abuyoyo/AdminMenuPage/tree/0.27" "source": "https://github.com/abuyoyo/AdminMenuPage/tree/0.28"
}, },
"install-path": "../abuyoyo/adminmenupage" "install-path": "../abuyoyo/adminmenupage"
}, },
{ {
"name": "abuyoyo/plugincore", "name": "abuyoyo/plugincore",
"version": "0.26", "version": "0.27",
"version_normalized": "0.26.0.0", "version_normalized": "0.27.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/abuyoyo/PluginCore.git", "url": "https://github.com/abuyoyo/PluginCore.git",
"reference": "77f7d5451bdff4bda6c9766847b215bdeaca96d6" "reference": "d730a674cbe2dc92e60ace8e25a2e0e3fdeee3e6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/abuyoyo/PluginCore/zipball/77f7d5451bdff4bda6c9766847b215bdeaca96d6", "url": "https://api.github.com/repos/abuyoyo/PluginCore/zipball/d730a674cbe2dc92e60ace8e25a2e0e3fdeee3e6",
"reference": "77f7d5451bdff4bda6c9766847b215bdeaca96d6", "reference": "d730a674cbe2dc92e60ace8e25a2e0e3fdeee3e6",
"shasum": "" "shasum": ""
}, },
"suggest": { "suggest": {
"abuyoyo/adminmenupage": "~0.25", "abuyoyo/adminmenupage": "~0.27",
"yahnis-elsts/plugin-update-checker": "~4.12" "yahnis-elsts/plugin-update-checker": "~5.2"
}, },
"time": "2022-06-09T00:00:00+00:00", "time": "2022-10-03T00:00:00+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@ -75,7 +75,7 @@
"description": "WordPress plugin core helper class", "description": "WordPress plugin core helper class",
"support": { "support": {
"issues": "https://github.com/abuyoyo/PluginCore/issues", "issues": "https://github.com/abuyoyo/PluginCore/issues",
"source": "https://github.com/abuyoyo/PluginCore/tree/0.26" "source": "https://github.com/abuyoyo/PluginCore/tree/0.27"
}, },
"install-path": "../abuyoyo/plugincore" "install-path": "../abuyoyo/plugincore"
}, },

View File

@ -1,8 +1,8 @@
<?php return array( <?php return array(
'root' => array( 'root' => array(
'name' => 'abuyoyo/notice-manager', 'name' => 'abuyoyo/notice-manager',
'pretty_version' => '0.23', 'pretty_version' => '0.24',
'version' => '0.23.0.0', 'version' => '0.24.0.0',
'reference' => NULL, 'reference' => NULL,
'type' => 'wordpress-plugin', 'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
@ -11,17 +11,17 @@
), ),
'versions' => array( 'versions' => array(
'abuyoyo/adminmenupage' => array( 'abuyoyo/adminmenupage' => array(
'pretty_version' => '0.27', 'pretty_version' => '0.28',
'version' => '0.27.0.0', 'version' => '0.28.0.0',
'reference' => '5ab293cbac3613a680bf2bd741214b1ca782f33b', 'reference' => 'c16d80ebbe1cc112acd3e5eca2f97e7abd017d29',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../abuyoyo/adminmenupage', 'install_path' => __DIR__ . '/../abuyoyo/adminmenupage',
'aliases' => array(), 'aliases' => array(),
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'abuyoyo/notice-manager' => array( 'abuyoyo/notice-manager' => array(
'pretty_version' => '0.23', 'pretty_version' => '0.24',
'version' => '0.23.0.0', 'version' => '0.24.0.0',
'reference' => NULL, 'reference' => NULL,
'type' => 'wordpress-plugin', 'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
@ -29,9 +29,9 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'abuyoyo/plugincore' => array( 'abuyoyo/plugincore' => array(
'pretty_version' => '0.26', 'pretty_version' => '0.27',
'version' => '0.26.0.0', 'version' => '0.27.0.0',
'reference' => '77f7d5451bdff4bda6c9766847b215bdeaca96d6', 'reference' => 'd730a674cbe2dc92e60ace8e25a2e0e3fdeee3e6',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../abuyoyo/plugincore', 'install_path' => __DIR__ . '/../abuyoyo/plugincore',
'aliases' => array(), 'aliases' => array(),