composer.lock + vendor/
- abuyoyo/metabox 0.8 - abuyoyo/adminmenupage 0.29
This commit is contained in:
parent
3458b724be
commit
b99be56795
50
composer.lock
generated
50
composer.lock
generated
@ -4,22 +4,25 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "4ad7c014df793fb15d9b01b71d7a7acf",
|
||||
"content-hash": "b1a74cf1316f5dd317f70efeb60d9f4d",
|
||||
"packages": [
|
||||
{
|
||||
"name": "abuyoyo/adminmenupage",
|
||||
"version": "0.28",
|
||||
"version": "0.29",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/abuyoyo/AdminMenuPage.git",
|
||||
"reference": "c16d80ebbe1cc112acd3e5eca2f97e7abd017d29"
|
||||
"reference": "4cd47d5217ca25ed17af76f5fdbab3cab3b37ef8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/abuyoyo/AdminMenuPage/zipball/c16d80ebbe1cc112acd3e5eca2f97e7abd017d29",
|
||||
"reference": "c16d80ebbe1cc112acd3e5eca2f97e7abd017d29",
|
||||
"url": "https://api.github.com/repos/abuyoyo/AdminMenuPage/zipball/4cd47d5217ca25ed17af76f5fdbab3cab3b37ef8",
|
||||
"reference": "4cd47d5217ca25ed17af76f5fdbab3cab3b37ef8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"abuyoyo/metabox": "~0.8"
|
||||
},
|
||||
"suggest": {
|
||||
"abuyoyo/plugincore": "~0.26",
|
||||
"cmb2/cmb2": "~2.9"
|
||||
@ -40,9 +43,40 @@
|
||||
"description": "WordPress admin menu page helper class",
|
||||
"support": {
|
||||
"issues": "https://github.com/abuyoyo/AdminMenuPage/issues",
|
||||
"source": "https://github.com/abuyoyo/AdminMenuPage/tree/0.28"
|
||||
"source": "https://github.com/abuyoyo/AdminMenuPage/tree/0.29"
|
||||
},
|
||||
"time": "2023-10-04T00:00:00+00:00"
|
||||
"time": "2023-10-05T00:00:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "abuyoyo/metabox",
|
||||
"version": "0.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/abuyoyo/MetaBox.git",
|
||||
"reference": "98cb4c30db4c366c0d273985eb9c31ffa1cd78f9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/abuyoyo/MetaBox/zipball/98cb4c30db4c366c0d273985eb9c31ffa1cd78f9",
|
||||
"reference": "98cb4c30db4c366c0d273985eb9c31ffa1cd78f9",
|
||||
"shasum": ""
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"WPHelper\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"description": "WordPress metabox helper class",
|
||||
"support": {
|
||||
"issues": "https://github.com/abuyoyo/MetaBox/issues",
|
||||
"source": "https://github.com/abuyoyo/MetaBox/tree/0.8"
|
||||
},
|
||||
"time": "2023-07-18T19:14:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "abuyoyo/plugincore",
|
||||
@ -112,7 +146,7 @@
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"prefer-lowest": true,
|
||||
"platform": [],
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "2.3.0"
|
||||
|
||||
9
vendor/abuyoyo/adminmenupage/CHANGELOG.md
vendored
9
vendor/abuyoyo/adminmenupage/CHANGELOG.md
vendored
@ -1,6 +1,15 @@
|
||||
# Changelog
|
||||
WPHelper\AdminMenuPage
|
||||
|
||||
## 0.29
|
||||
Release date: Oct 5 2023
|
||||
|
||||
### Fixed
|
||||
- `composer.json` - Require `abuyoyo/metabox`. WPHelper\Metabox has been a required library since 0.25.
|
||||
|
||||
### Dependencies
|
||||
- lib: WPHelper\Metabox (`abuyoyo/metabox`) ~0.8.
|
||||
|
||||
## 0.28
|
||||
Release date: Oct 4 2023
|
||||
|
||||
|
||||
7
vendor/abuyoyo/adminmenupage/composer.json
vendored
7
vendor/abuyoyo/adminmenupage/composer.json
vendored
@ -2,9 +2,12 @@
|
||||
"name": "abuyoyo/adminmenupage",
|
||||
"description": "WordPress admin menu page helper class",
|
||||
"type": "library",
|
||||
"version": "0.28",
|
||||
"time": "2023-10-04",
|
||||
"version": "0.29",
|
||||
"time": "2023-10-05",
|
||||
"license": "BSD-3-Clause",
|
||||
"require": {
|
||||
"abuyoyo/metabox": "~0.8"
|
||||
},
|
||||
"suggest": {
|
||||
"abuyoyo/plugincore": "~0.26",
|
||||
"cmb2/cmb2": "~2.9"
|
||||
|
||||
38
vendor/abuyoyo/metabox/.github/workflows/create-github-release.yml
vendored
Normal file
38
vendor/abuyoyo/metabox/.github/workflows/create-github-release.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
# Create Github Release
|
||||
# v1.0
|
||||
# Create Github release on tag push
|
||||
# - Use tag name as release title
|
||||
# - Use CHANGELOG.md log entry as body
|
||||
|
||||
on:
|
||||
push:
|
||||
# Sequence of patterns matched against refs/tags
|
||||
tags:
|
||||
- '*' # Match any tag
|
||||
|
||||
name: Create Release
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Create Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Get Changelog Entry
|
||||
id: changelog_reader
|
||||
uses: mindsers/changelog-reader-action@v1.1.0
|
||||
with:
|
||||
version: ${{ github.ref }}
|
||||
path: ./CHANGELOG.md
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: ${{ github.ref }}
|
||||
body: ${{ steps.changelog_reader.outputs.log_entry }} # This pulls from the GET CHANGELOG ENTRY step above, referencing it's ID to get its outputs object, which include a `log_entry`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
||||
draft: false
|
||||
prerelease: false
|
||||
26
vendor/abuyoyo/metabox/CHANGELOG.md
vendored
Normal file
26
vendor/abuyoyo/metabox/CHANGELOG.md
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
# Changelog
|
||||
WPHelper\MetaBox
|
||||
|
||||
## 0.8
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix `Metabox::render()` callback arguments. Callback is passed `$data_object` and `$box`.
|
||||
|
||||
## 0.7
|
||||
|
||||
### Fixed
|
||||
|
||||
- Validate `is_callable(render_cb)` before `call_user_func` call.
|
||||
|
||||
## 0.6
|
||||
|
||||
### Added
|
||||
|
||||
- Accept callable `render_cb` as well as readable `render_tpl` as render template.
|
||||
|
||||
## 0.5
|
||||
|
||||
### Added
|
||||
|
||||
- Basic Metabox API.
|
||||
220
vendor/abuyoyo/metabox/MetaBox.php
vendored
Normal file
220
vendor/abuyoyo/metabox/MetaBox.php
vendored
Normal file
@ -0,0 +1,220 @@
|
||||
<?php
|
||||
namespace WPHelper;
|
||||
|
||||
use function wp_parse_args;
|
||||
use function add_action;
|
||||
use function add_meta_box;
|
||||
/**
|
||||
* MetaBox
|
||||
*
|
||||
* Object-Oriented WordPress meta box creator.
|
||||
*
|
||||
* @author abuyoyo
|
||||
* @version 0.8
|
||||
*/
|
||||
class MetaBox
|
||||
{
|
||||
/**
|
||||
* Screen context where the meta box should display.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $context;
|
||||
|
||||
/**
|
||||
* The ID of the meta box.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* The display priority of the meta box.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $priority;
|
||||
|
||||
/**
|
||||
* Screens where this meta box will appear.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
private $screens;
|
||||
|
||||
/**
|
||||
* Path to the template used to display the content of the meta box.
|
||||
*
|
||||
* @var string filename
|
||||
*/
|
||||
private $render_tpl;
|
||||
|
||||
/**
|
||||
* Path to the template used to display the content of the meta box.
|
||||
*
|
||||
* @var callable
|
||||
*/
|
||||
private $render_cb;
|
||||
|
||||
/**
|
||||
* The title of the meta box.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $title;
|
||||
|
||||
/**
|
||||
* Hook where this meta box will be added.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $hook;
|
||||
|
||||
/**
|
||||
* Array of $args to be sent to callback function's second parameter
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $args;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $id
|
||||
* @param string $template
|
||||
* @param string $title
|
||||
* @param string $context
|
||||
* @param string $priority
|
||||
* @param string[] $screens
|
||||
*/
|
||||
public function __construct($options)
|
||||
{
|
||||
// should throw error if required fields (id, title) not given
|
||||
// template is actually optional
|
||||
|
||||
$defaults = [
|
||||
'context' => 'advanced',
|
||||
'priority' => 'default',
|
||||
'screens' => [],
|
||||
'args' => null,
|
||||
'hook' => 'add_meta_boxes',
|
||||
];
|
||||
|
||||
$options = wp_parse_args( $options, $defaults );
|
||||
extract($options);
|
||||
|
||||
$this->context = $context;
|
||||
$this->id = $id;
|
||||
$this->priority = $priority;
|
||||
$this->screens = $screens;
|
||||
$this->render_tpl = isset( $template ) ? rtrim( $template, '/' ) : '';
|
||||
$this->render_cb = $render ?? '';
|
||||
$this->title = $title;
|
||||
$this->hook = $hook;
|
||||
$this->args = $args;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add metabox at given hook.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
add_action( $this->hook, [ $this, 'wp_add_metabox' ] );
|
||||
}
|
||||
|
||||
public function wp_add_metabox(){
|
||||
add_meta_box(
|
||||
$this->id,
|
||||
$this->title,
|
||||
[ $this, 'render' ], // $this->render_tpl | $this->render_cb
|
||||
$this->screens,
|
||||
$this->context,
|
||||
$this->priority,
|
||||
$this->args
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the callable that will render the content of the meta box.
|
||||
*
|
||||
* @return callable
|
||||
*/
|
||||
public function get_callback()
|
||||
{
|
||||
return [ $this, 'render' ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the screen context where the meta box should display.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_context()
|
||||
{
|
||||
return $this->context;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the ID of the meta box.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_id()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the display priority of the meta box.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_priority()
|
||||
{
|
||||
return $this->priority;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the screen(s) where the meta box will appear.
|
||||
*
|
||||
* @return array|string|WP_Screen
|
||||
*/
|
||||
public function get_screens()
|
||||
{
|
||||
return $this->screens;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the title of the meta box.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_title()
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the content of the meta box using a PHP template.
|
||||
* Callback passed to to add_meta_box()
|
||||
*
|
||||
* @see do_meta_boxes()
|
||||
*
|
||||
* @param mixed $data_object Object that's the focus of the current screen. eg. WP_Post|WP_Comment
|
||||
* @param array $box Meta-box data [id, title, callback, args] (@see global $wp_meta_boxes)
|
||||
*/
|
||||
public function render( $data_object, $box )
|
||||
{
|
||||
if ( ! is_readable( $this->render_tpl ) && ! is_callable( $this->render_cb ) ){
|
||||
return;
|
||||
}
|
||||
|
||||
if ( is_callable( $this->render_cb ) ){
|
||||
call_user_func( $this->render_cb, $data_object, $box );
|
||||
} else if ( isset( $this->render_tpl ) ){
|
||||
include $this->render_tpl;
|
||||
}
|
||||
}
|
||||
}
|
||||
1
vendor/abuyoyo/metabox/README.md
vendored
Normal file
1
vendor/abuyoyo/metabox/README.md
vendored
Normal file
@ -0,0 +1 @@
|
||||
# WPHelper\MetaBox
|
||||
12
vendor/abuyoyo/metabox/composer.json
vendored
Normal file
12
vendor/abuyoyo/metabox/composer.json
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "abuyoyo/metabox",
|
||||
"description": "WordPress metabox helper class",
|
||||
"type": "library",
|
||||
"version": "0.8",
|
||||
"license": "BSD-3-Clause",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"WPHelper\\" : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
2
vendor/composer/autoload_psr4.php
vendored
2
vendor/composer/autoload_psr4.php
vendored
@ -6,5 +6,5 @@ $vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'WPHelper\\' => array($vendorDir . '/abuyoyo/adminmenupage/src', $vendorDir . '/abuyoyo/plugincore'),
|
||||
'WPHelper\\' => array($vendorDir . '/abuyoyo/adminmenupage/src', $vendorDir . '/abuyoyo/metabox', $vendorDir . '/abuyoyo/plugincore'),
|
||||
);
|
||||
|
||||
3
vendor/composer/autoload_static.php
vendored
3
vendor/composer/autoload_static.php
vendored
@ -22,7 +22,8 @@ class ComposerStaticInita13a895834453aad32a897cc456c73ff
|
||||
'WPHelper\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/abuyoyo/adminmenupage/src',
|
||||
1 => __DIR__ . '/..' . '/abuyoyo/plugincore',
|
||||
1 => __DIR__ . '/..' . '/abuyoyo/metabox',
|
||||
2 => __DIR__ . '/..' . '/abuyoyo/plugincore',
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
51
vendor/composer/installed.json
vendored
51
vendor/composer/installed.json
vendored
@ -2,24 +2,27 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "abuyoyo/adminmenupage",
|
||||
"version": "0.28",
|
||||
"version_normalized": "0.28.0.0",
|
||||
"version": "0.29",
|
||||
"version_normalized": "0.29.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/abuyoyo/AdminMenuPage.git",
|
||||
"reference": "c16d80ebbe1cc112acd3e5eca2f97e7abd017d29"
|
||||
"reference": "4cd47d5217ca25ed17af76f5fdbab3cab3b37ef8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/abuyoyo/AdminMenuPage/zipball/c16d80ebbe1cc112acd3e5eca2f97e7abd017d29",
|
||||
"reference": "c16d80ebbe1cc112acd3e5eca2f97e7abd017d29",
|
||||
"url": "https://api.github.com/repos/abuyoyo/AdminMenuPage/zipball/4cd47d5217ca25ed17af76f5fdbab3cab3b37ef8",
|
||||
"reference": "4cd47d5217ca25ed17af76f5fdbab3cab3b37ef8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"abuyoyo/metabox": "~0.8"
|
||||
},
|
||||
"suggest": {
|
||||
"abuyoyo/plugincore": "~0.26",
|
||||
"cmb2/cmb2": "~2.9"
|
||||
},
|
||||
"time": "2023-10-04T00:00:00+00:00",
|
||||
"time": "2023-10-05T00:00:00+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -37,10 +40,44 @@
|
||||
"description": "WordPress admin menu page helper class",
|
||||
"support": {
|
||||
"issues": "https://github.com/abuyoyo/AdminMenuPage/issues",
|
||||
"source": "https://github.com/abuyoyo/AdminMenuPage/tree/0.28"
|
||||
"source": "https://github.com/abuyoyo/AdminMenuPage/tree/0.29"
|
||||
},
|
||||
"install-path": "../abuyoyo/adminmenupage"
|
||||
},
|
||||
{
|
||||
"name": "abuyoyo/metabox",
|
||||
"version": "0.8",
|
||||
"version_normalized": "0.8.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/abuyoyo/MetaBox.git",
|
||||
"reference": "98cb4c30db4c366c0d273985eb9c31ffa1cd78f9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/abuyoyo/MetaBox/zipball/98cb4c30db4c366c0d273985eb9c31ffa1cd78f9",
|
||||
"reference": "98cb4c30db4c366c0d273985eb9c31ffa1cd78f9",
|
||||
"shasum": ""
|
||||
},
|
||||
"time": "2023-07-18T19:14:03+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"WPHelper\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"description": "WordPress metabox helper class",
|
||||
"support": {
|
||||
"issues": "https://github.com/abuyoyo/MetaBox/issues",
|
||||
"source": "https://github.com/abuyoyo/MetaBox/tree/0.8"
|
||||
},
|
||||
"install-path": "../abuyoyo/metabox"
|
||||
},
|
||||
{
|
||||
"name": "abuyoyo/plugincore",
|
||||
"version": "0.27",
|
||||
|
||||
23
vendor/composer/installed.php
vendored
23
vendor/composer/installed.php
vendored
@ -1,8 +1,8 @@
|
||||
<?php return array(
|
||||
'root' => array(
|
||||
'name' => 'abuyoyo/notice-manager',
|
||||
'pretty_version' => '0.24',
|
||||
'version' => '0.24.0.0',
|
||||
'pretty_version' => '0.25',
|
||||
'version' => '0.25.0.0',
|
||||
'reference' => NULL,
|
||||
'type' => 'wordpress-plugin',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
@ -11,17 +11,26 @@
|
||||
),
|
||||
'versions' => array(
|
||||
'abuyoyo/adminmenupage' => array(
|
||||
'pretty_version' => '0.28',
|
||||
'version' => '0.28.0.0',
|
||||
'reference' => 'c16d80ebbe1cc112acd3e5eca2f97e7abd017d29',
|
||||
'pretty_version' => '0.29',
|
||||
'version' => '0.29.0.0',
|
||||
'reference' => '4cd47d5217ca25ed17af76f5fdbab3cab3b37ef8',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../abuyoyo/adminmenupage',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'abuyoyo/metabox' => array(
|
||||
'pretty_version' => '0.8',
|
||||
'version' => '0.8.0.0',
|
||||
'reference' => '98cb4c30db4c366c0d273985eb9c31ffa1cd78f9',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../abuyoyo/metabox',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'abuyoyo/notice-manager' => array(
|
||||
'pretty_version' => '0.24',
|
||||
'version' => '0.24.0.0',
|
||||
'pretty_version' => '0.25',
|
||||
'version' => '0.25.0.0',
|
||||
'reference' => NULL,
|
||||
'type' => 'wordpress-plugin',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user