Skip to content
This repository was archived by the owner on Aug 1, 2021. It is now read-only.

Commit 08a3374

Browse files
1 parent 68aae3a commit 08a3374

File tree

15 files changed

+491
-151
lines changed

15 files changed

+491
-151
lines changed

composer.lock

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/composer/installed.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -114,25 +114,25 @@
114114
},
115115
{
116116
"name": "wp-content-framework/admin",
117-
"version": "v0.0.18",
118-
"version_normalized": "0.0.18.0",
117+
"version": "v0.0.19",
118+
"version_normalized": "0.0.19.0",
119119
"source": {
120120
"type": "git",
121121
"url": "https://github.com/wp-content-framework/admin.git",
122-
"reference": "876d41a723f9936d10380c69630bdef68439b0e3"
122+
"reference": "6418b51b8e4327531fb67a8d618cf69673a759d1"
123123
},
124124
"dist": {
125125
"type": "zip",
126-
"url": "https://api.github.com/repos/wp-content-framework/admin/zipball/876d41a723f9936d10380c69630bdef68439b0e3",
127-
"reference": "876d41a723f9936d10380c69630bdef68439b0e3",
126+
"url": "https://api.github.com/repos/wp-content-framework/admin/zipball/6418b51b8e4327531fb67a8d618cf69673a759d1",
127+
"reference": "6418b51b8e4327531fb67a8d618cf69673a759d1",
128128
"shasum": ""
129129
},
130130
"require": {
131131
"php": ">=5.6.0",
132132
"wp-content-framework/controller": "~0.0.1",
133133
"wp-content-framework/view": "~0.0.1"
134134
},
135-
"time": "2019-03-16T05:31:37+00:00",
135+
"time": "2019-03-19T06:51:15+00:00",
136136
"type": "library",
137137
"installation-source": "dist",
138138
"notification-url": "https://packagist.org/downloads/",
@@ -195,17 +195,17 @@
195195
},
196196
{
197197
"name": "wp-content-framework/cache",
198-
"version": "v0.0.6",
199-
"version_normalized": "0.0.6.0",
198+
"version": "v0.0.7",
199+
"version_normalized": "0.0.7.0",
200200
"source": {
201201
"type": "git",
202202
"url": "https://github.com/wp-content-framework/cache.git",
203-
"reference": "42ead926d92b90e4b767849698da3a3c89456cc9"
203+
"reference": "6f20870af689706001a24577a7f67c6db6701059"
204204
},
205205
"dist": {
206206
"type": "zip",
207-
"url": "https://api.github.com/repos/wp-content-framework/cache/zipball/42ead926d92b90e4b767849698da3a3c89456cc9",
208-
"reference": "42ead926d92b90e4b767849698da3a3c89456cc9",
207+
"url": "https://api.github.com/repos/wp-content-framework/cache/zipball/6f20870af689706001a24577a7f67c6db6701059",
208+
"reference": "6f20870af689706001a24577a7f67c6db6701059",
209209
"shasum": ""
210210
},
211211
"require": {
@@ -215,7 +215,7 @@
215215
"phake/phake": "~2.0",
216216
"phpunit/phpunit": "~5.7"
217217
},
218-
"time": "2019-03-16T15:58:03+00:00",
218+
"time": "2019-03-19T07:04:42+00:00",
219219
"type": "library",
220220
"installation-source": "dist",
221221
"notification-url": "https://packagist.org/downloads/",
@@ -238,17 +238,17 @@
238238
},
239239
{
240240
"name": "wp-content-framework/common",
241-
"version": "v0.0.35",
242-
"version_normalized": "0.0.35.0",
241+
"version": "v0.0.36",
242+
"version_normalized": "0.0.36.0",
243243
"source": {
244244
"type": "git",
245245
"url": "https://github.com/wp-content-framework/common.git",
246-
"reference": "d1fc95799bf5aeb18b5fc84f4f2ae26d38c67f8d"
246+
"reference": "868aa79153714a95b43a5501bb53a1eef5fa255c"
247247
},
248248
"dist": {
249249
"type": "zip",
250-
"url": "https://api.github.com/repos/wp-content-framework/common/zipball/d1fc95799bf5aeb18b5fc84f4f2ae26d38c67f8d",
251-
"reference": "d1fc95799bf5aeb18b5fc84f4f2ae26d38c67f8d",
250+
"url": "https://api.github.com/repos/wp-content-framework/common/zipball/868aa79153714a95b43a5501bb53a1eef5fa255c",
251+
"reference": "868aa79153714a95b43a5501bb53a1eef5fa255c",
252252
"shasum": ""
253253
},
254254
"require": {
@@ -258,7 +258,7 @@
258258
"phake/phake": "~2.0",
259259
"phpunit/phpunit": "~5.7"
260260
},
261-
"time": "2019-03-16T18:03:25+00:00",
261+
"time": "2019-03-19T06:41:30+00:00",
262262
"type": "library",
263263
"installation-source": "dist",
264264
"notification-url": "https://packagist.org/downloads/",
@@ -321,17 +321,17 @@
321321
},
322322
{
323323
"name": "wp-content-framework/core",
324-
"version": "v0.0.47",
325-
"version_normalized": "0.0.47.0",
324+
"version": "v0.0.48",
325+
"version_normalized": "0.0.48.0",
326326
"source": {
327327
"type": "git",
328328
"url": "https://github.com/wp-content-framework/core.git",
329-
"reference": "4fb1aaad602193f975fd9a1a9ae84a441724bb0c"
329+
"reference": "6368cb82182bbbc4d3df6e28f5fa436f45050f85"
330330
},
331331
"dist": {
332332
"type": "zip",
333-
"url": "https://api.github.com/repos/wp-content-framework/core/zipball/4fb1aaad602193f975fd9a1a9ae84a441724bb0c",
334-
"reference": "4fb1aaad602193f975fd9a1a9ae84a441724bb0c",
333+
"url": "https://api.github.com/repos/wp-content-framework/core/zipball/6368cb82182bbbc4d3df6e28f5fa436f45050f85",
334+
"reference": "6368cb82182bbbc4d3df6e28f5fa436f45050f85",
335335
"shasum": ""
336336
},
337337
"require": {
@@ -343,7 +343,7 @@
343343
"phake/phake": "~2.0",
344344
"phpunit/phpunit": "~5.7"
345345
},
346-
"time": "2019-03-17T05:10:06+00:00",
346+
"time": "2019-03-19T16:19:05+00:00",
347347
"type": "library",
348348
"installation-source": "dist",
349349
"autoload": {

vendor/wp-content-framework/admin/src/views/admin/dashboard.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* WP_Framework_Admin Views Admin Dashboard
44
*
5-
* @version 0.0.15
5+
* @version 0.0.19
66
* @author Technote
77
* @copyright Technote All Rights Reserved
88
* @license http://www.opensource.org/licenses/gpl-2.0.php GNU General Public License, version 2
@@ -14,7 +14,6 @@
1414
}
1515
/** @var \WP_Framework_Presenter\Interfaces\Presenter $instance */
1616
/** @var array $args */
17-
$instance->add_style_view( 'admin/style/dashboard' );
1817
$instance->add_script_view( 'admin/script/dashboard_form' );
1918
?>
2019
<?php $instance->form( 'open', $args ); ?>

vendor/wp-content-framework/admin/src/views/admin/script/dashboard_form.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* WP_Framework_Admin Views Admin Script Dashboard_form
44
*
5-
* @version 0.0.15
5+
* @version 0.0.19
66
* @author Technote
77
* @copyright Technote All Rights Reserved
88
* @license http://www.opensource.org/licenses/gpl-2.0.php GNU General Public License, version 2
@@ -12,6 +12,7 @@
1212
if ( ! defined( 'ADD_RICHTEXT_TOOLBAR_BUTTON' ) ) {
1313
return;
1414
}
15+
/** @var \WP_Framework_Presenter\Interfaces\Presenter $instance */
1516
?>
1617
<script>
1718
(function ($) {
@@ -25,6 +26,16 @@
2526
});
2627
return true;
2728
});
29+
30+
const $reset = $('.form-buttons input[name="reset"]');
31+
if (!$._data($reset.get(0), 'events')) {
32+
$reset.on('click', function () {
33+
if (window.confirm('<?php $instance->h( 'Are you sure to reset settings?', true );?>')) {
34+
$(this).closest('form').submit();
35+
}
36+
return false;
37+
});
38+
}
2839
});
2940
})(jQuery);
3041
</script>
Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
1-
<?php
2-
/**
3-
* WP_Framework_Cache Configs Config
4-
*
5-
* @version 0.0.5
6-
* @author Technote
7-
* @copyright Technote All Rights Reserved
8-
* @license http://www.opensource.org/licenses/gpl-2.0.php GNU General Public License, version 2
9-
* @link https://technote.space
10-
*/
11-
12-
if ( ! defined( 'WP_CONTENT_FRAMEWORK' ) ) {
13-
exit;
14-
}
15-
16-
return [
17-
18-
// cache type (option, class name)
19-
'cache_type' => 'option',
20-
1+
<?php
2+
/**
3+
* WP_Framework_Cache Configs Setting
4+
*
5+
* @version 0.0.7
6+
* @author Technote
7+
* @copyright Technote All Rights Reserved
8+
* @license http://www.opensource.org/licenses/gpl-2.0.php GNU General Public License, version 2
9+
* @link https://technote.space
10+
*/
11+
12+
if ( ! defined( 'WP_CONTENT_FRAMEWORK' ) ) {
13+
exit;
14+
}
15+
16+
return [
17+
18+
'100' => [
19+
'Performance' => [
20+
'100' => [
21+
'cache_type' => [
22+
'label' => 'Cache type (option or file)',
23+
'default' => 'option',
24+
],
25+
],
26+
],
27+
],
28+
2129
];

vendor/wp-content-framework/cache/package_cache.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* WP_Framework Package Cache
44
*
5-
* @version 0.0.6
5+
* @version 0.0.7
66
* @author Technote
77
* @copyright Technote All Rights Reserved
88
* @license http://www.opensource.org/licenses/gpl-2.0.php GNU General Public License, version 2
@@ -33,8 +33,8 @@ public function get_priority() {
3333
*/
3434
public function get_configs() {
3535
return [
36-
'config',
3736
'filter',
37+
'setting'
3838
];
3939
}
4040
}

vendor/wp-content-framework/cache/src/classes/models/cache.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* WP_Framework_Cache Classes Models Cache
44
*
5-
* @version 0.0.5
5+
* @version 0.0.7
66
* @author Technote
77
* @copyright Technote All Rights Reserved
88
* @license http://www.opensource.org/licenses/gpl-2.0.php GNU General Public License, version 2
@@ -33,11 +33,20 @@ class Cache implements \WP_Framework_Cache\Interfaces\Cache, \WP_Framework_Commo
3333
*/
3434
protected function initialized() {
3535
$cache_class = '\WP_Framework_Cache\Classes\Models\Cache\Option';
36-
if ( ( $cache_type = $this->app->get_config( 'config', 'cache_type' ) ) && 'option' !== $cache_type ) {
37-
$cache_class = $cache_type;
38-
if ( ! class_exists( $cache_class ) || ! is_subclass_of( $cache_class, '\WP_Framework_Cache\Interfaces\Cache' ) ) {
39-
$cache_class = '\WP_Framework_Cache\Classes\Models\Cache\Option';
36+
$cache_type = $this->app->get_config( 'config', 'cache_type' );
37+
if ( $cache_type ) {
38+
if ( 'option' !== $cache_type ) {
39+
if ( 'file' === $cache_type ) {
40+
$cache_class = '\WP_Framework_Cache\Classes\Models\Cache\File';
41+
} else {
42+
$cache_class = $cache_type;
43+
if ( ! class_exists( $cache_class ) || ! is_subclass_of( $cache_class, '\WP_Framework_Cache\Interfaces\Cache' ) ) {
44+
$cache_class = '\WP_Framework_Cache\Classes\Models\Cache\Option';
45+
}
46+
}
4047
}
48+
} elseif ( 'file' === $this->apply_filters( 'cache_type' ) ) {
49+
$cache_class = '\WP_Framework_Cache\Classes\Models\Cache\File';
4150
}
4251
/** @var \WP_Framework_Core\Traits\Singleton $cache_class */
4352
$this->_cache = $cache_class::get_instance( $this->app );

0 commit comments

Comments
 (0)