=== TinyMCE:Editor Template Filess ===
Contributors: hana015
Donate link:
Plugin URL: https://wordpress.org/plugins/editor-template-files/
Tags: tinymce, editor, template
Requires at least: 3.9
Tested up to: 4.8
Stable tag: 1.0.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Wordpressのビジュアルエディタ「TinyMCE」で、テンプレートを利用できるようにします。
ファイルでテンプレートを作成し、編集不可・編集可能領域の設定が可能です。
You can templates available in Wordpress' s visual editor "TinyMCE".
You can create a template with the file and set the noneditable & editable area in your template.
== Description ==
Wordpressのビジュアルエディタ「TinyMCE」で、テンプレートを利用できるようにします。
ファイルでテンプレートを作成し、編集不可・編集可能領域の設定が可能です。
* [サイト](https://15-source.com/release/editor-template-files/)
## Introduction ##
### Features ###
* ビジュアルエディタ「TinyMCE」で、テンプレートを利用できます。
* テンプレートは、ファイルで作成できます。
* テンプレートに編集不可・可能領域を設定できます。
* テンプレートに「'template_replace_values’」を利用した、値を利用できます。
### How to use ###
1. Install & Activate the plugin.
2. Create & Upload Your Template.(check below or our site.)
3. Use Your Template.
#### How to use Sample Template ####
1. copy from “sample” foler.
sample template foler:
`/wp-content/plugins/editor-template-files/sample/〜`
2. move to “Your Theme Folder”.
`/wp-content/plugins/editor-template-files/sample/〜`
↓
`/wp-content/themes/Your Theme Folder/sample/〜`
4. rename folder to “editor-template-files” from “sample”.
`/wp-content/themes/Your Theme Folder/editor-template-files/〜`
5. If you want to check beautiful style sample.
Please check below.
please add this code to `functions.php`.
`add_editor_style( 'editor-template-files/custom-editor-style.css' );`
Notes:
It may affect all editor styles.
We recommend that you cancel when you no longer need it.
4. If you want to check perfect sample.
Please check below.
please add this code to `functions.php`.
```
#!php
add_filter('etf_tpl_values', 'hoge');
function hoge( $values ) {
global $post_id;
$values['sample_value'] = 'Editor Template Files
Sample Page !!';
$values['date'] = get_the_time( 'Y-m-d', $post_id );
$values['etf_plugin_autor'] = 'hana';
return $values;
}
```
Thank you for sample settings.
You can experience the sample with this.
#### Create Your Template ####
1. create folder and file in “Your Theme Folder”.
`/Your Theme Folder/editor-template-files/template/***.php`
2. write “Template Info” in your template.
```
#!php
/**
*
* Editor Template Files Name: Sample Template
* Description: This is a Sample Template.
*/
```
“Editor Template Files Name: ” will “Template Title” when you select Template.
“Description: ” will “Template Description” when you select Template.
3. write template As you like.
Notes:
You must write your code inside “mceTmpl” Class.
```
#!html