mirror of
https://ghproxy.net/https://github.com/BracketSpace/WP-Admin-Reference.git
synced 2025-10-04 18:25:19 +08:00
Merge branch 'develop' of github.com:BracketSpace/WP-Admin-Reference into develop
This commit is contained in:
commit
f84ee50ed9
5 changed files with 156 additions and 50 deletions
55
.gitignore
vendored
55
.gitignore
vendored
|
@ -1,27 +1,28 @@
|
||||||
# Application
|
# Application
|
||||||
web/app/plugins/*
|
web/app/plugins/*
|
||||||
!web/app/plugins/.gitkeep
|
!web/app/plugins/.gitkeep
|
||||||
web/app/upgrade
|
web/app/upgrade
|
||||||
web/app/ewww/*
|
web/app/ewww/*
|
||||||
web/app/debug.log
|
web/app/debug.log
|
||||||
web/app/uploads/*
|
web/app/uploads/*
|
||||||
!web/app/uploads/.gitkeep
|
!web/app/uploads/.gitkeep
|
||||||
|
|
||||||
# WordPress
|
# WordPress
|
||||||
web/wp
|
web/wp
|
||||||
web/.htaccess
|
web/.htaccess
|
||||||
|
|
||||||
# Dotenv
|
# Dotenv
|
||||||
.env
|
.env
|
||||||
.env.*
|
.env.*
|
||||||
!.env.example
|
!.env.example
|
||||||
|
|
||||||
# Composer
|
# Composer
|
||||||
/vendor
|
/vendor
|
||||||
auth.json
|
auth.json
|
||||||
|
|
||||||
# WP-CLI
|
# WP-CLI
|
||||||
wp-cli.local.yml
|
wp-cli.local.yml
|
||||||
|
|
||||||
/web/app/themes/wpadminref/.gitignore
|
/web/app/themes/wpadminref/.gitignore
|
||||||
sql/local.sql
|
|
||||||
|
sql/local.sql
|
48
composer.lock
generated
48
composer.lock
generated
|
@ -173,43 +173,47 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpoption/phpoption",
|
"name": "phpoption/phpoption",
|
||||||
"version": "1.5.0",
|
"version": "1.6.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/schmittjoh/php-option.git",
|
"url": "https://github.com/schmittjoh/php-option.git",
|
||||||
"reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed"
|
"reference": "f4e7a6a1382183412246f0d361078c29fb85089e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/schmittjoh/php-option/zipball/94e644f7d2051a5f0fcf77d81605f152eecff0ed",
|
"url": "https://api.github.com/repos/schmittjoh/php-option/zipball/f4e7a6a1382183412246f0d361078c29fb85089e",
|
||||||
"reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed",
|
"reference": "f4e7a6a1382183412246f0d361078c29fb85089e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.0"
|
"php": "^5.5.9 || ^7.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "4.7.*"
|
"phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.3-dev"
|
"dev-master": "1.6-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-4": {
|
||||||
"PhpOption\\": "src/"
|
"PhpOption\\": "src/PhpOption/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"Apache2"
|
"Apache-2.0"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Johannes M. Schmitt",
|
"name": "Johannes M. Schmitt",
|
||||||
"email": "schmittjoh@gmail.com"
|
"email": "schmittjoh@gmail.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Graham Campbell",
|
||||||
|
"email": "graham@alt-three.com"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Option Type for PHP",
|
"description": "Option Type for PHP",
|
||||||
|
@ -219,20 +223,20 @@
|
||||||
"php",
|
"php",
|
||||||
"type"
|
"type"
|
||||||
],
|
],
|
||||||
"time": "2015-07-25T16:39:46+00:00"
|
"time": "2019-11-30T20:20:49+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "roots/wordpress",
|
"name": "roots/wordpress",
|
||||||
"version": "5.2.3",
|
"version": "5.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/WordPress/WordPress.git",
|
"url": "https://github.com/WordPress/WordPress.git",
|
||||||
"reference": "5.2.3"
|
"reference": "5.3"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/WordPress/WordPress/zipball/5.2.3",
|
"url": "https://api.github.com/repos/WordPress/WordPress/zipball/5.3",
|
||||||
"reference": "5.2.3"
|
"reference": "5.3"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.2",
|
"php": ">=5.3.2",
|
||||||
|
@ -256,7 +260,7 @@
|
||||||
"cms",
|
"cms",
|
||||||
"wordpress"
|
"wordpress"
|
||||||
],
|
],
|
||||||
"time": "2019-09-04T22:41:56+00:00"
|
"time": "2019-11-12T20:34:22+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "roots/wordpress-core-installer",
|
"name": "roots/wordpress-core-installer",
|
||||||
|
@ -415,16 +419,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-ctype",
|
"name": "symfony/polyfill-ctype",
|
||||||
"version": "v1.12.0",
|
"version": "v1.13.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||||
"reference": "550ebaac289296ce228a706d0867afc34687e3f4"
|
"reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4",
|
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3",
|
||||||
"reference": "550ebaac289296ce228a706d0867afc34687e3f4",
|
"reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -436,7 +440,7 @@
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.12-dev"
|
"dev-master": "1.13-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -469,7 +473,7 @@
|
||||||
"polyfill",
|
"polyfill",
|
||||||
"portable"
|
"portable"
|
||||||
],
|
],
|
||||||
"time": "2019-08-06T08:03:45+00:00"
|
"time": "2019-11-27T13:56:44+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "vlucas/phpdotenv",
|
"name": "vlucas/phpdotenv",
|
||||||
|
|
|
@ -101,6 +101,11 @@ add_filter( 'wpadminref/sections', function( $sections ) {
|
||||||
'title' => __( 'Tables', 'wpadminref' ),
|
'title' => __( 'Tables', 'wpadminref' ),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$sections['tabs'] = [
|
||||||
|
'icon' => 'index-card',
|
||||||
|
'title' => __( 'Tabs', 'wpadminref' ),
|
||||||
|
];
|
||||||
|
|
||||||
$sections['post_list'] = [
|
$sections['post_list'] = [
|
||||||
'icon' => 'editor-justify',
|
'icon' => 'editor-justify',
|
||||||
'title' => __( 'Post List', 'wpadminref' ),
|
'title' => __( 'Post List', 'wpadminref' ),
|
||||||
|
|
|
@ -73,7 +73,13 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="column-code h-500">
|
<div class="column-code h-500">
|
||||||
<pre class="line-numbers language-markup"><code class="line-numbers language-markup"></code></pre>
|
<pre class="line-numbers language-php">
|
||||||
|
<code class="line-numbers language-php">
|
||||||
|
if ( ! class_exists( 'WP_List_Table' ) ) {
|
||||||
|
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
|
||||||
|
}
|
||||||
|
</code>
|
||||||
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
90
web/app/themes/wpadminref/template-parts/sections/tabs.php
Normal file
90
web/app/themes/wpadminref/template-parts/sections/tabs.php
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Section tans view
|
||||||
|
*
|
||||||
|
* @package wpadminref
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
<section class="section section-with-columns section-tabs" id="tabs">
|
||||||
|
<header class="section-header">
|
||||||
|
<h2>Tabs</h2>
|
||||||
|
<hr/>
|
||||||
|
</header>
|
||||||
|
<div class="section-content">
|
||||||
|
<div class="grid-2">
|
||||||
|
<div>
|
||||||
|
<h2 class="nav-tab-wrapper">
|
||||||
|
<a href="javascript:void(0)" class="nav-tab nav-tab-active">Tab #01</a>
|
||||||
|
<a href="javascript:void(0)" class="nav-tab">Tab #02</a>
|
||||||
|
<a href="javascript:void(0)" class="nav-tab">Tab #03</a>
|
||||||
|
</h2>
|
||||||
|
<div class="tabs-content">
|
||||||
|
<h3>Settings tabs</h3>
|
||||||
|
<p>
|
||||||
|
These are native WordPress tabs. Unfortunately they are not supported by JS :(. Fortunately, you can code it yourself!
|
||||||
|
</p>
|
||||||
|
<h3><strong>Here's the tutorial!</strong></h3>
|
||||||
|
<p><strong>Markup: </strong></p>
|
||||||
|
<script type="text/plain" class="line-numbers language-markup">
|
||||||
|
<div id="tabs">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#tab-01">Tab #01</a></li>
|
||||||
|
<li><a href="#tab-02">Tab #02</a></li>
|
||||||
|
<li><a href="#tab-03">Tab #03</a></li>
|
||||||
|
</ul>
|
||||||
|
<div id="tab-01">Tab #01 content here</div>
|
||||||
|
<div id="tab-02">Tab #02 content here</div>
|
||||||
|
<div id="tab-03">Tab #03 content here</div>
|
||||||
|
</div>
|
||||||
|
</script>
|
||||||
|
<p><strong>JS: </strong></p>
|
||||||
|
<pre class="line-numbers language-js">
|
||||||
|
<code class="line-numbers language-js">
|
||||||
|
(function($) {
|
||||||
|
$(function(){
|
||||||
|
$('#tabs').tabs();
|
||||||
|
});
|
||||||
|
})(jQuery);
|
||||||
|
</code>
|
||||||
|
</pre>
|
||||||
|
<p>That's all folks!</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="column-code h-500">
|
||||||
|
<pre class="line-numbers language-markup">
|
||||||
|
<code class="line-numbers language-php">
|
||||||
|
<h2 class="nav-tab-wrapper">
|
||||||
|
<a href="javascript:void(0)" class="nav-tab <?php echo $active_tab == 'display_options' ? 'nav-tab-active' : ''; ?>">Tab #01</a>
|
||||||
|
<a href="javascript:void(0)" class="nav-tab <?php echo $active_tab == 'display_options' ? 'nav-tab-active' : ''; ?>">Tab #02</a>
|
||||||
|
<a href="javascript:void(0)" class="nav-tab <?php echo $active_tab == 'display_options' ? 'nav-tab-active' : ''; ?>">Tab #03</a>
|
||||||
|
</h2>
|
||||||
|
<div class="tabs-content">
|
||||||
|
<h3>Settings tabs</h3>
|
||||||
|
<p>
|
||||||
|
"But I must explain to you how all this mistaken idea of denouncing pleasure and
|
||||||
|
praising pain was born and I will give you a complete account of the system, and
|
||||||
|
expound the actual teachings of the great explorer of the truth, the master-builder
|
||||||
|
of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it
|
||||||
|
is pleasure, but because those who do not know how to pursue pleasure rationally
|
||||||
|
encounter consequences that are extremely painful.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Nor again is there anyone who loves or pursues or desires to obtain pain of itself,
|
||||||
|
because it is pain, but because occasionally circumstances occur in which toil and
|
||||||
|
pain can procure him some great pleasure. To take a trivial example, which of us
|
||||||
|
ever undertakes laborious physical exercise, except to obtain some advantage from it?
|
||||||
|
But who has any right to find fault with a man who chooses to enjoy a pleasure that has
|
||||||
|
no annoying consequences, or one who avoids a pain that produces no resultant pleasure?"
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<a href="javascript:void(0)" target="_blank" class="button button-primary">Save changes</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</code>
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
Loading…
Add table
Add a link
Reference in a new issue