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

Commit 904d7ac

Browse files
Merge pull request #106 from technote-space/release/v1.7.1
wp-content-framework/custom_post#73
2 parents f05abec + bf04aa9 commit 904d7ac

File tree

14 files changed

+159
-33
lines changed

14 files changed

+159
-33
lines changed

composer.lock

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

configs/filter.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* @version 1.6.6
3+
* @version 1.7.1
44
* @author Technote
55
* @since 1.0.0
66
* @since 1.2.0
@@ -11,6 +11,7 @@
1111
* @since 1.4.0 Added: filter of marker setting
1212
* @since 1.5.0 Changed: trivial change
1313
* @since 1.6.6 Changed: trivial change
14+
* @since 1.7.1 #102
1415
* @copyright Technote All Rights Reserved
1516
* @license http://www.opensource.org/licenses/gpl-2.0.php GNU General Public License, version 2
1617
* @link https://technote.space/
@@ -83,7 +84,13 @@
8384
* @since 1.4.0
8485
*/
8586
'\Marker_Animation\Classes\Models\Custom_Post\Setting' => [
86-
'load-edit.php' => [
87+
/**
88+
* @since 1.7.1
89+
*/
90+
'${prefix}app_activated' => [
91+
'insert_presets',
92+
],
93+
'load-edit.php' => [
8794
'setup_assets',
8895
],
8996
],

configs/preset.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
/**
3+
* @version 1.7.1
4+
* @author Technote
5+
* @since 1.7.1 #102
6+
* @copyright Technote All Rights Reserved
7+
* @license http://www.opensource.org/licenses/gpl-2.0.php GNU General Public License, version 2
8+
* @link https://technote.space/
9+
*/
10+
11+
if ( ! defined( 'MARKER_ANIMATION' ) ) {
12+
exit;
13+
}
14+
15+
return [
16+
17+
[
18+
'name' => 'Red',
19+
'color' => '#f69',
20+
'priority' => 50,
21+
],
22+
23+
[
24+
'name' => 'Green',
25+
'color' => '#6f6',
26+
'priority' => 50,
27+
],
28+
29+
[
30+
'name' => 'Blue',
31+
'color' => '#6cf',
32+
'priority' => 50,
33+
],
34+
35+
];

languages/marker-animation-ja.mo

75 Bytes
Binary file not shown.

languages/marker-animation-ja.po

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ msgid ""
22
msgstr ""
33
"Project-Id-Version: marker-animation\n"
44
"POT-Creation-Date: 2018-07-01 17:47+0900\n"
5-
"PO-Revision-Date: 2019-03-08 13:33+0900\n"
5+
"PO-Revision-Date: 2019-03-18 02:26+0900\n"
66
"Last-Translator: \n"
77
"Language-Team: \n"
88
"MIME-Version: 1.0\n"
@@ -150,3 +150,12 @@ msgstr "表示させる"
150150

151151
msgid "others"
152152
msgstr "その他"
153+
154+
msgid "Red"
155+
msgstr "赤"
156+
157+
msgid "Green"
158+
msgstr "緑"
159+
160+
msgid "Blue"
161+
msgstr "青"

marker-animation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Plugin URI: https://wordpress.org/plugins/marker-animation
55
Description: This plugin will add "Marker animation" function
66
Author: Technote
7-
Version: 1.7.0
7+
Version: 1.7.1
88
Author URI: https://technote.space
99
Text Domain: marker-animation
1010
Domain Path: /languages/

readme.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: marker, marker animation, highlighter, 蛍光ペン, マーカー, アン
44
Requires at least: 4.6
55
Requires PHP: 5.6
66
Tested up to: 5.1.1
7-
Stable tag: 1.7.0
7+
Stable tag: 1.7.1
88
License: GPLv2 or later
99
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1010

@@ -41,6 +41,11 @@ This plugin needs PHP5.6 or higher.
4141

4242
== Upgrade Notice ==
4343

44+
= 1.7.1 =
45+
* 『設定』のエクスポートが正しく動作しない問題を修正しました [詳細](https://github.com/wp-content-framework/custom_post/issues/73)
46+
* デフォルト設定の更新時に『設定』のデフォルト値が更新されない問題を修正しました [詳細](https://github.com/technote-space/marker-animation/issues/103)
47+
* [その他の差分](https://github.com/technote-space/marker-animation/pull/106)
48+
4449
= 1.7.0 =
4550
* クラシックエディタの詳細設定の項目名を修正しました。
4651
* いくつかのパフォーマンスの改善を行いました [詳細](https://github.com/wp-content-framework/core/issues/138)
@@ -65,6 +70,11 @@ This plugin needs PHP5.6 or higher.
6570

6671
== Changelog ==
6772

73+
= 1.7.1 (2019/3/18) =
74+
* Added: [Presets](https://github.com/technote-space/marker-animation/issues/102)
75+
* Fixed: [Delete cache when update default settings](https://github.com/technote-space/marker-animation/issues/103)
76+
* Fixed: [Export setting](https://github.com/wp-content-framework/custom_post#73)
77+
6878
= 1.7.0 (2019/3/17) =
6979
* Improved: [Performance issues](https://github.com/wp-content-framework/core/issues/138)
7080
* Improved: [Dashboard page](https://github.com/wp-content-framework/admin/issues/20)

src/classes/controllers/admin/dashboard.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* @version 1.7.0
3+
* @version 1.7.1
44
* @author Technote
55
* @since 1.0.0
66
* @since 1.2.0
@@ -9,6 +9,7 @@
99
* @since 1.5.0 Changed: ライブラリの変更 (#37)
1010
* @since 1.6.0 Fixed: デフォルト値の保存が正しく動作していない (#41)
1111
* @since 1.7.0 wp-content-framework/admin#20, wp-content-framework/common#57
12+
* @since 1.7.1 #103
1213
* @copyright Technote All Rights Reserved
1314
* @license http://www.opensource.org/licenses/gpl-2.0.php GNU General Public License, version 2
1415
* @link https://technote.space/
@@ -49,6 +50,7 @@ protected function post_action() {
4950
foreach ( $assets->get_setting_keys() as $key => $form ) {
5051
$this->update_setting( $key );
5152
}
53+
$assets->clear_options_cache();
5254
$this->app->add_message( 'Settings updated.', 'setting' );
5355
}
5456

src/classes/models/custom_post/setting.php

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<?php
22
/**
3-
* @version 1.7.0
3+
* @version 1.7.1
44
* @author Technote
55
* @since 1.4.0
66
* @since 1.5.0 Changed: ライブラリの変更 (#37)
77
* @since 1.6.0 Changed: Gutenbergへの対応 (#3)
88
* @since 1.6.6 Changed: フレームワークの更新 (#76)
99
* @since 1.6.11 #85
1010
* @since 1.7.0 wp-content-framework/db#9, wp-content-framework/common#57
11+
* @since 1.7.1 #102
1112
* @copyright Technote All Rights Reserved
1213
* @license http://www.opensource.org/licenses/gpl-2.0.php GNU General Public License, version 2
1314
* @link https://technote.space/
@@ -27,6 +28,27 @@ class Setting implements \Marker_Animation\Interfaces\Models\Custom_Post, \WP_Fr
2728

2829
use \Marker_Animation\Traits\Models\Custom_Post, \WP_Framework_Upgrade\Traits\Upgrade;
2930

31+
/**
32+
* insert presets
33+
*/
34+
/** @noinspection PhpUnusedPrivateMethodInspection */
35+
private function insert_presets() {
36+
if ( $this->app->get_option( 'has_inserted_presets' ) ) {
37+
return;
38+
}
39+
$this->app->option->set( 'has_inserted_presets', true );
40+
41+
if ( ! $this->is_empty() ) {
42+
return;
43+
}
44+
45+
foreach ( $this->apply_filters( 'get_setting_presets', $this->app->get_config( 'preset' ) ) as $item ) {
46+
$item['post_title'] = $this->translate( $this->app->array->get( $item, 'name', '' ) );
47+
unset( $item['name'] );
48+
$this->insert( $item );
49+
}
50+
}
51+
3052
/**
3153
* setup assets
3254
*/

vendor/composer/installed.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -371,17 +371,17 @@
371371
},
372372
{
373373
"name": "wp-content-framework/custom_post",
374-
"version": "v0.0.28",
375-
"version_normalized": "0.0.28.0",
374+
"version": "v0.0.29",
375+
"version_normalized": "0.0.29.0",
376376
"source": {
377377
"type": "git",
378378
"url": "https://github.com/wp-content-framework/custom_post.git",
379-
"reference": "a52d8bd5ec20c910fb081b9c6032c315689177c2"
379+
"reference": "0a7f1072d0dfb029729e68053b7e4035825a20ab"
380380
},
381381
"dist": {
382382
"type": "zip",
383-
"url": "https://api.github.com/repos/wp-content-framework/custom_post/zipball/a52d8bd5ec20c910fb081b9c6032c315689177c2",
384-
"reference": "a52d8bd5ec20c910fb081b9c6032c315689177c2",
383+
"url": "https://api.github.com/repos/wp-content-framework/custom_post/zipball/0a7f1072d0dfb029729e68053b7e4035825a20ab",
384+
"reference": "0a7f1072d0dfb029729e68053b7e4035825a20ab",
385385
"shasum": ""
386386
},
387387
"require": {
@@ -395,7 +395,7 @@
395395
"phake/phake": "~2.0",
396396
"phpunit/phpunit": "~5.7"
397397
},
398-
"time": "2019-03-16T05:24:13+00:00",
398+
"time": "2019-03-17T16:56:23+00:00",
399399
"type": "library",
400400
"installation-source": "dist",
401401
"notification-url": "https://packagist.org/downloads/",

0 commit comments

Comments
 (0)