Version Description
- Added taxonomy relation field.
- Added textarea rows setting.
- Fixed a bug that tinymce js error when disabled rich editing.
Download this release
Release Info
Developer | inc2734 |
Plugin | Smart Custom Fields |
Version | 1.7.0 |
Comparing to | |
See all releases |
Code changes from version 1.6.7 to 1.7.0
- classes/controller/class.controller-base.php +14 -4
- classes/controller/class.settings.php +6 -1
- classes/fields/class.field-relation.php +12 -12
- classes/fields/class.field-taxonomy.php +264 -0
- classes/fields/class.field-textarea.php +17 -4
- css/editor.css +5 -5
- js/{editor-relation.js → editor-relation-post-types.js} +17 -18
- js/editor-relation-taxonomies.js +152 -0
- js/editor.js +4 -2
- languages/smart-custom-fields-ja.mo +0 -0
- languages/smart-custom-fields-ja.po +56 -41
- languages/smart-custom-fields.pot +53 -41
- readme.txt +8 -2
- smart-custom-fields.php +2 -2
classes/controller/class.controller-base.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Controller_Base
|
4 |
-
* Version : 1.
|
5 |
* Author : inc2734
|
6 |
* Created : April 27, 2015
|
7 |
-
* Modified :
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
@@ -47,6 +47,16 @@ class Smart_Custom_Fields_Controller_Base {
|
|
47 |
'file_uploader_title' => esc_html__( 'File setting', 'smart-custom-fields' ),
|
48 |
) );
|
49 |
do_action( SCF_Config::PREFIX . 'after-editor-enqueue-scripts' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
|
52 |
/**
|
@@ -175,11 +185,11 @@ class Smart_Custom_Fields_Controller_Base {
|
|
175 |
if ( is_null( $index ) ) {
|
176 |
return SCF::get_default_value( $Field );
|
177 |
}
|
178 |
-
|
179 |
if ( !$Meta->is_saved() ) {
|
180 |
return SCF::get_default_value( $Field );
|
181 |
}
|
182 |
-
|
183 |
$value = $Meta->get( $field_name );
|
184 |
|
185 |
// in the loop
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Controller_Base
|
4 |
+
* Version : 1.3.0
|
5 |
* Author : inc2734
|
6 |
* Created : April 27, 2015
|
7 |
+
* Modified : February 3, 2016
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
47 |
'file_uploader_title' => esc_html__( 'File setting', 'smart-custom-fields' ),
|
48 |
) );
|
49 |
do_action( SCF_Config::PREFIX . 'after-editor-enqueue-scripts' );
|
50 |
+
|
51 |
+
if ( !user_can_richedit() ) {
|
52 |
+
wp_enqueue_script(
|
53 |
+
'tinymce',
|
54 |
+
includes_url( '/js/tinymce/tinymce.min.js' ),
|
55 |
+
array(),
|
56 |
+
null,
|
57 |
+
true
|
58 |
+
);
|
59 |
+
}
|
60 |
}
|
61 |
|
62 |
/**
|
185 |
if ( is_null( $index ) ) {
|
186 |
return SCF::get_default_value( $Field );
|
187 |
}
|
188 |
+
|
189 |
if ( !$Meta->is_saved() ) {
|
190 |
return SCF::get_default_value( $Field );
|
191 |
}
|
192 |
+
|
193 |
$value = $Meta->get( $field_name );
|
194 |
|
195 |
// in the loop
|
classes/controller/class.settings.php
CHANGED
@@ -145,7 +145,12 @@ class Smart_Custom_Fields_Controller_Settings {
|
|
145 |
?>
|
146 |
<div class="<?php echo esc_attr( SCF_Config::PREFIX . 'icon-handle' ); ?>"></div>
|
147 |
<b class="btn-remove-field"><span class="dashicons dashicons-no-alt"></span></b>
|
148 |
-
<div class="field-label"
|
|
|
|
|
|
|
|
|
|
|
149 |
<table class="<?php $this->add_hide_class( !$Field->get( 'name' ) ); ?>">
|
150 |
<tr>
|
151 |
<th><?php esc_html_e( 'Type', 'smart-custom-fields' ); ?><span class="<?php echo esc_attr( SCF_Config::PREFIX . 'require' ); ?>">*</span></th>
|
145 |
?>
|
146 |
<div class="<?php echo esc_attr( SCF_Config::PREFIX . 'icon-handle' ); ?>"></div>
|
147 |
<b class="btn-remove-field"><span class="dashicons dashicons-no-alt"></span></b>
|
148 |
+
<div class="field-label">
|
149 |
+
<?php echo esc_html( $field_label ); ?>
|
150 |
+
<?php if ( $field_name ) : ?>
|
151 |
+
<small>[ <?php echo esc_html( $field_name ); ?> ]</small>
|
152 |
+
<?php endif; ?>
|
153 |
+
</div>
|
154 |
<table class="<?php $this->add_hide_class( !$Field->get( 'name' ) ); ?>">
|
155 |
<tr>
|
156 |
<th><?php esc_html_e( 'Type', 'smart-custom-fields' ); ?><span class="<?php echo esc_attr( SCF_Config::PREFIX . 'require' ); ?>">*</span></th>
|
classes/fields/class.field-relation.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Relation
|
4 |
-
* Version : 1.3.
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
-
* Modified :
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
@@ -21,7 +21,7 @@ class Smart_Custom_Fields_Field_Relation extends Smart_Custom_Fields_Field_Base
|
|
21 |
add_filter( 'smart-cf-validate-get-value', array( $this, 'validate_get_value' ), 10, 2 );
|
22 |
return array(
|
23 |
'type' => 'relation',
|
24 |
-
'display-name' => __( 'Relation', 'smart-custom-fields' ),
|
25 |
'optgroup' => 'other-fields',
|
26 |
'allow-multiple-data' => true,
|
27 |
);
|
@@ -47,16 +47,16 @@ class Smart_Custom_Fields_Field_Relation extends Smart_Custom_Fields_Field_Base
|
|
47 |
public function admin_enqueue_scripts( $hook ) {
|
48 |
if ( in_array( $hook, array( 'post-new.php', 'post.php', 'user-edit.php', 'profile.php', 'edit-tags.php' ) ) ) {
|
49 |
wp_enqueue_script(
|
50 |
-
SCF_Config::PREFIX . 'editor-relation',
|
51 |
-
plugins_url( SCF_Config::NAME ) . '/js/editor-relation.js',
|
52 |
array( 'jquery' ),
|
53 |
null,
|
54 |
true
|
55 |
);
|
56 |
-
wp_localize_script( SCF_Config::PREFIX . 'editor-relation', '
|
57 |
'endpoint' => admin_url( 'admin-ajax.php' ),
|
58 |
'action' => SCF_Config::PREFIX . 'relational-posts-search',
|
59 |
-
'nonce' => wp_create_nonce( SCF_Config::NAME . '-relation' )
|
60 |
) );
|
61 |
}
|
62 |
}
|
@@ -65,7 +65,7 @@ class Smart_Custom_Fields_Field_Relation extends Smart_Custom_Fields_Field_Base
|
|
65 |
* Process that loading post when clicking post load button
|
66 |
*/
|
67 |
public function relational_posts_search() {
|
68 |
-
check_ajax_referer( SCF_Config::NAME . '-relation', 'nonce' );
|
69 |
$_posts = array();
|
70 |
$args = array();
|
71 |
if ( isset( $_POST['post_types'] ) ) {
|
@@ -76,7 +76,7 @@ class Smart_Custom_Fields_Field_Relation extends Smart_Custom_Fields_Field_Base
|
|
76 |
'orderby' => 'ID',
|
77 |
'posts_per_page' => -1,
|
78 |
);
|
79 |
-
|
80 |
if ( isset( $_POST['click_count'] ) ) {
|
81 |
$posts_per_page = get_option( 'posts_per_page' );
|
82 |
$offset = $_POST['click_count'] * $posts_per_page;
|
@@ -88,7 +88,7 @@ class Smart_Custom_Fields_Field_Relation extends Smart_Custom_Fields_Field_Base
|
|
88 |
)
|
89 |
);
|
90 |
}
|
91 |
-
|
92 |
if ( isset( $_POST['s'] ) ) {
|
93 |
$args = array_merge(
|
94 |
$args,
|
@@ -175,11 +175,11 @@ class Smart_Custom_Fields_Field_Relation extends Smart_Custom_Fields_Field_Base
|
|
175 |
return sprintf(
|
176 |
'<div class="%s" data-post-types="%s">
|
177 |
<div class="%s">
|
178 |
-
<input type="text" class="widefat search-input" name="search-input" placeholder="%s" />
|
179 |
</div>
|
180 |
<div class="%s">
|
181 |
<ul>%s</ul>
|
182 |
-
<p class="load-relation-
|
183 |
<input type="hidden" name="%s" %s />
|
184 |
%s
|
185 |
</div>
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Relation
|
4 |
+
* Version : 1.3.1
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
+
* Modified : February 1, 2016
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
21 |
add_filter( 'smart-cf-validate-get-value', array( $this, 'validate_get_value' ), 10, 2 );
|
22 |
return array(
|
23 |
'type' => 'relation',
|
24 |
+
'display-name' => __( 'Relation ( Post Types )', 'smart-custom-fields' ),
|
25 |
'optgroup' => 'other-fields',
|
26 |
'allow-multiple-data' => true,
|
27 |
);
|
47 |
public function admin_enqueue_scripts( $hook ) {
|
48 |
if ( in_array( $hook, array( 'post-new.php', 'post.php', 'user-edit.php', 'profile.php', 'edit-tags.php' ) ) ) {
|
49 |
wp_enqueue_script(
|
50 |
+
SCF_Config::PREFIX . 'editor-relation-post-types',
|
51 |
+
plugins_url( SCF_Config::NAME ) . '/js/editor-relation-post-types.js',
|
52 |
array( 'jquery' ),
|
53 |
null,
|
54 |
true
|
55 |
);
|
56 |
+
wp_localize_script( SCF_Config::PREFIX . 'editor-relation-post-types', 'smart_cf_relation_post_types', array(
|
57 |
'endpoint' => admin_url( 'admin-ajax.php' ),
|
58 |
'action' => SCF_Config::PREFIX . 'relational-posts-search',
|
59 |
+
'nonce' => wp_create_nonce( SCF_Config::NAME . '-relation-post-types' )
|
60 |
) );
|
61 |
}
|
62 |
}
|
65 |
* Process that loading post when clicking post load button
|
66 |
*/
|
67 |
public function relational_posts_search() {
|
68 |
+
check_ajax_referer( SCF_Config::NAME . '-relation-post-types', 'nonce' );
|
69 |
$_posts = array();
|
70 |
$args = array();
|
71 |
if ( isset( $_POST['post_types'] ) ) {
|
76 |
'orderby' => 'ID',
|
77 |
'posts_per_page' => -1,
|
78 |
);
|
79 |
+
|
80 |
if ( isset( $_POST['click_count'] ) ) {
|
81 |
$posts_per_page = get_option( 'posts_per_page' );
|
82 |
$offset = $_POST['click_count'] * $posts_per_page;
|
88 |
)
|
89 |
);
|
90 |
}
|
91 |
+
|
92 |
if ( isset( $_POST['s'] ) ) {
|
93 |
$args = array_merge(
|
94 |
$args,
|
175 |
return sprintf(
|
176 |
'<div class="%s" data-post-types="%s">
|
177 |
<div class="%s">
|
178 |
+
<input type="text" class="widefat search-input search-input-post-types" name="search-input" placeholder="%s" />
|
179 |
</div>
|
180 |
<div class="%s">
|
181 |
<ul>%s</ul>
|
182 |
+
<p class="load-relation-items load-relation-post-types %s">%s</p>
|
183 |
<input type="hidden" name="%s" %s />
|
184 |
%s
|
185 |
</div>
|
classes/fields/class.field-taxonomy.php
ADDED
@@ -0,0 +1,264 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Smart_Custom_Fields_Field_Taxonomy
|
4 |
+
* Version : 1.3.0
|
5 |
+
* Author : inc2734
|
6 |
+
* Created : October 7, 2014
|
7 |
+
* Modified : November 12, 2015
|
8 |
+
* License : GPLv2 or later
|
9 |
+
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
+
*/
|
11 |
+
class Smart_Custom_Fields_Field_Taxonomy extends Smart_Custom_Fields_Field_Base {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Set the required items
|
15 |
+
*
|
16 |
+
* @return array
|
17 |
+
*/
|
18 |
+
protected function init() {
|
19 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
20 |
+
add_action( 'wp_ajax_smart-cf-relational-terms-search', array( $this, 'relational_terms_search' ) );
|
21 |
+
add_filter( 'smart-cf-validate-get-value', array( $this, 'validate_get_value' ), 10, 2 );
|
22 |
+
return array(
|
23 |
+
'type' => 'taxonomy',
|
24 |
+
'display-name' => __( 'Relation ( Taxonomies )', 'smart-custom-fields' ),
|
25 |
+
'optgroup' => 'other-fields',
|
26 |
+
'allow-multiple-data' => true,
|
27 |
+
);
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Set the non required items
|
32 |
+
*
|
33 |
+
* @return array
|
34 |
+
*/
|
35 |
+
protected function options() {
|
36 |
+
return array(
|
37 |
+
'taxonomy' => '',
|
38 |
+
'notes' => '',
|
39 |
+
);
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Loading resources
|
44 |
+
*
|
45 |
+
* @param string $hook
|
46 |
+
*/
|
47 |
+
public function admin_enqueue_scripts( $hook ) {
|
48 |
+
if ( in_array( $hook, array( 'post-new.php', 'post.php', 'user-edit.php', 'profile.php', 'edit-tags.php' ) ) ) {
|
49 |
+
wp_enqueue_script(
|
50 |
+
SCF_Config::PREFIX . 'editor-relation-taxonomies',
|
51 |
+
plugins_url( SCF_Config::NAME ) . '/js/editor-relation-taxonomies.js',
|
52 |
+
array( 'jquery' ),
|
53 |
+
null,
|
54 |
+
true
|
55 |
+
);
|
56 |
+
wp_localize_script( SCF_Config::PREFIX . 'editor-relation-taxonomies', 'smart_cf_relation_taxonomies', array(
|
57 |
+
'endpoint' => admin_url( 'admin-ajax.php' ),
|
58 |
+
'action' => SCF_Config::PREFIX . 'relational-terms-search',
|
59 |
+
'nonce' => wp_create_nonce( SCF_Config::NAME . '-relation-taxonomies' )
|
60 |
+
) );
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Process that loading post when clicking post load button
|
66 |
+
*/
|
67 |
+
public function relational_terms_search() {
|
68 |
+
check_ajax_referer( SCF_Config::NAME . '-relation-taxonomies', 'nonce' );
|
69 |
+
$_terms = array();
|
70 |
+
$args = array();
|
71 |
+
if ( isset( $_POST['taxonomies'] ) ) {
|
72 |
+
$taxonomies = explode( ',', $_POST['taxonomies'] );
|
73 |
+
$args = array(
|
74 |
+
'order' => 'ASC',
|
75 |
+
'orderby' => 'ID',
|
76 |
+
'number' => '',
|
77 |
+
'hide_empty' => false,
|
78 |
+
'hierarchical' => false,
|
79 |
+
);
|
80 |
+
|
81 |
+
if ( isset( $_POST['click_count'] ) ) {
|
82 |
+
$number = get_option( 'posts_per_page' );
|
83 |
+
$offset = $_POST['click_count'] * $number;
|
84 |
+
$args = array_merge(
|
85 |
+
$args,
|
86 |
+
array(
|
87 |
+
'offset' => $offset,
|
88 |
+
'number' => $number,
|
89 |
+
)
|
90 |
+
);
|
91 |
+
}
|
92 |
+
|
93 |
+
if ( isset( $_POST['search'] ) ) {
|
94 |
+
$args = array_merge(
|
95 |
+
$args,
|
96 |
+
array(
|
97 |
+
'search' => $_POST['search'],
|
98 |
+
)
|
99 |
+
);
|
100 |
+
}
|
101 |
+
$_terms = get_terms( $taxonomies, $args );
|
102 |
+
}
|
103 |
+
header( 'Content-Type: application/json; charset=utf-8' );
|
104 |
+
echo json_encode( $_terms );
|
105 |
+
die();
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Getting the field
|
110 |
+
*
|
111 |
+
* @param int $index
|
112 |
+
* @param array $value
|
113 |
+
* @return string html
|
114 |
+
*/
|
115 |
+
public function get_field( $index, $value ) {
|
116 |
+
$name = $this->get_field_name_in_editor( $index );
|
117 |
+
$disabled = $this->get_disable_attribute( $index );
|
118 |
+
$taxonomies = $this->get( 'taxonomy' );
|
119 |
+
if ( !$taxonomies ) {
|
120 |
+
$taxonomies = array( 'category' );
|
121 |
+
}
|
122 |
+
$number = get_option( 'posts_per_page' );
|
123 |
+
|
124 |
+
// choicse
|
125 |
+
$choices_terms = get_terms( $taxonomies, array(
|
126 |
+
'order' => 'ASC',
|
127 |
+
'orderby' => 'ID',
|
128 |
+
'hide_empty' => false,
|
129 |
+
'hierarchical' => false,
|
130 |
+
'number' => $number,
|
131 |
+
) );
|
132 |
+
$choices_li = array();
|
133 |
+
foreach ( $choices_terms as $_term ) {
|
134 |
+
$term_name = $_term->name;
|
135 |
+
if ( empty( $term_name ) ) {
|
136 |
+
$term_name = ' ';
|
137 |
+
}
|
138 |
+
$choices_li[] = sprintf(
|
139 |
+
'<li data-id="%d">%s</li>',
|
140 |
+
$_term->term_id,
|
141 |
+
$term_name
|
142 |
+
);
|
143 |
+
}
|
144 |
+
|
145 |
+
// selected
|
146 |
+
$selected_terms = array();
|
147 |
+
if ( !empty( $value ) && is_array( $value ) ) {
|
148 |
+
foreach ( $value as $term_id ) {
|
149 |
+
$term_name = get_term( $term_id )->name;
|
150 |
+
if ( empty( $term_name ) ) {
|
151 |
+
$term_name = ' ';
|
152 |
+
}
|
153 |
+
$selected_terms[$term_id] = $term_name;
|
154 |
+
}
|
155 |
+
}
|
156 |
+
$selected_li = array();
|
157 |
+
$hidden = array();
|
158 |
+
foreach ( $selected_terms as $term_id => $term_name ) {
|
159 |
+
$selected_li[] = sprintf(
|
160 |
+
'<li data-id="%d"><span class="%s"></span>%s<span class="relation-remove">-</li></li>',
|
161 |
+
$term_id,
|
162 |
+
esc_attr( SCF_Config::PREFIX . 'icon-handle dashicons dashicons-menu' ),
|
163 |
+
$term_name
|
164 |
+
);
|
165 |
+
$hidden[] = sprintf(
|
166 |
+
'<input type="hidden" name="%s" value="%d" %s />',
|
167 |
+
esc_attr( $name . '[]' ),
|
168 |
+
$term_id,
|
169 |
+
disabled( true, $disabled, false )
|
170 |
+
);
|
171 |
+
}
|
172 |
+
|
173 |
+
$hide_class = '';
|
174 |
+
if ( count( $choices_li ) < $number ) {
|
175 |
+
$hide_class = 'hide';
|
176 |
+
}
|
177 |
+
|
178 |
+
return sprintf(
|
179 |
+
'<div class="%s" data-taxonomies="%s">
|
180 |
+
<div class="%s">
|
181 |
+
<input type="text" class="widefat search-input search-input-terms" name="search-input" placeholder="%s" />
|
182 |
+
</div>
|
183 |
+
<div class="%s">
|
184 |
+
<ul>%s</ul>
|
185 |
+
<p class="load-relation-items load-relation-terms %s">%s</p>
|
186 |
+
<input type="hidden" name="%s" %s />
|
187 |
+
%s
|
188 |
+
</div>
|
189 |
+
</div>
|
190 |
+
<div class="%s"><ul>%s</ul></div>',
|
191 |
+
SCF_Config::PREFIX . 'relation-left',
|
192 |
+
implode( ',', $taxonomies ),
|
193 |
+
SCF_Config::PREFIX . 'search',
|
194 |
+
esc_attr__( 'Search...', 'smart-custom-fields' ),
|
195 |
+
SCF_Config::PREFIX . 'relation-children-select',
|
196 |
+
implode( '', $choices_li ),
|
197 |
+
$hide_class,
|
198 |
+
esc_html__( 'Load more', 'smart-custom-fields' ),
|
199 |
+
esc_attr( $name ),
|
200 |
+
disabled( true, $disabled, false ),
|
201 |
+
implode( '', $hidden ),
|
202 |
+
SCF_Config::PREFIX . 'relation-right',
|
203 |
+
implode( '', $selected_li )
|
204 |
+
);
|
205 |
+
}
|
206 |
+
|
207 |
+
/**
|
208 |
+
* Displaying the option fields in custom field settings page
|
209 |
+
*
|
210 |
+
* @param int $group_key
|
211 |
+
* @param int $field_key
|
212 |
+
*/
|
213 |
+
public function display_field_options( $group_key, $field_key ) {
|
214 |
+
?>
|
215 |
+
<tr>
|
216 |
+
<th><?php esc_html_e( 'Taxonomies', 'smart-custom-fields' ); ?></th>
|
217 |
+
<td>
|
218 |
+
<?php
|
219 |
+
$tasonomies = get_taxonomies( array(
|
220 |
+
'show_ui' => true,
|
221 |
+
), 'objects' );
|
222 |
+
?>
|
223 |
+
<?php foreach ( $tasonomies as $taxonomy => $taxonomy_object ) : ?>
|
224 |
+
<?php
|
225 |
+
$save_taxonomies = $this->get( 'taxonomy' );
|
226 |
+
$checked = ( is_array( $save_taxonomies ) && in_array( $taxonomy, $save_taxonomies ) ) ? 'checked="checked"' : ''; ?>
|
227 |
+
<input type="checkbox"
|
228 |
+
name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'taxonomy' ) ); ?>[]"
|
229 |
+
value="<?php echo esc_attr( $taxonomy ); ?>"
|
230 |
+
<?php echo $checked; ?> /><?php echo esc_html( $taxonomy_object->labels->singular_name ); ?>
|
231 |
+
<?php endforeach; ?>
|
232 |
+
</td>
|
233 |
+
</tr>
|
234 |
+
<tr>
|
235 |
+
<th><?php esc_html_e( 'Notes', 'smart-custom-fields' ); ?></th>
|
236 |
+
<td>
|
237 |
+
<input type="text"
|
238 |
+
name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'notes' ) ); ?>"
|
239 |
+
class="widefat"
|
240 |
+
value="<?php echo esc_attr( $this->get( 'notes' ) ); ?>"
|
241 |
+
/>
|
242 |
+
</td>
|
243 |
+
</tr>
|
244 |
+
<?php
|
245 |
+
}
|
246 |
+
|
247 |
+
/**
|
248 |
+
* Validating when displaying meta data
|
249 |
+
*
|
250 |
+
* @param array $value
|
251 |
+
* @param string $field_type
|
252 |
+
* @return array
|
253 |
+
*/
|
254 |
+
public function validate_get_value( $value, $field_type ) {
|
255 |
+
if ( $field_type === $this->get_attribute( 'type' ) ) {
|
256 |
+
$validated_value = array();
|
257 |
+
foreach ( $value as $term ) {
|
258 |
+
$validated_value[] = $term;
|
259 |
+
}
|
260 |
+
$value = $validated_value;
|
261 |
+
}
|
262 |
+
return $value;
|
263 |
+
}
|
264 |
+
}
|
classes/fields/class.field-textarea.php
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Textarea
|
4 |
-
* Version : 1.
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
-
* Modified : February
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
@@ -30,6 +30,7 @@ class Smart_Custom_Fields_Field_Textarea extends Smart_Custom_Fields_Field_Base
|
|
30 |
*/
|
31 |
protected function options() {
|
32 |
return array(
|
|
|
33 |
'default' => '',
|
34 |
'notes' => '',
|
35 |
);
|
@@ -43,11 +44,13 @@ class Smart_Custom_Fields_Field_Textarea extends Smart_Custom_Fields_Field_Base
|
|
43 |
* @return string html
|
44 |
*/
|
45 |
public function get_field( $index, $value ) {
|
46 |
-
$name
|
47 |
$disabled = $this->get_disable_attribute( $index );
|
|
|
48 |
return sprintf(
|
49 |
-
'<textarea name="%s" rows="
|
50 |
esc_attr( $name ),
|
|
|
51 |
disabled( true, $disabled, false ),
|
52 |
$value
|
53 |
);
|
@@ -61,6 +64,16 @@ class Smart_Custom_Fields_Field_Textarea extends Smart_Custom_Fields_Field_Base
|
|
61 |
*/
|
62 |
public function display_field_options( $group_key, $field_key ) {
|
63 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
<tr>
|
65 |
<th><?php esc_html_e( 'Default', 'smart-custom-fields' ); ?></th>
|
66 |
<td>
|
1 |
<?php
|
2 |
/**
|
3 |
* Smart_Custom_Fields_Field_Textarea
|
4 |
+
* Version : 1.2.0
|
5 |
* Author : inc2734
|
6 |
* Created : October 7, 2014
|
7 |
+
* Modified : February 3, 2016
|
8 |
* License : GPLv2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
*/
|
30 |
*/
|
31 |
protected function options() {
|
32 |
return array(
|
33 |
+
'rows' => 5,
|
34 |
'default' => '',
|
35 |
'notes' => '',
|
36 |
);
|
44 |
* @return string html
|
45 |
*/
|
46 |
public function get_field( $index, $value ) {
|
47 |
+
$name = $this->get_field_name_in_editor( $index );
|
48 |
$disabled = $this->get_disable_attribute( $index );
|
49 |
+
$rows = $this->get( 'rows' );
|
50 |
return sprintf(
|
51 |
+
'<textarea name="%s" rows="%d" class="widefat" %s>%s</textarea>',
|
52 |
esc_attr( $name ),
|
53 |
+
esc_attr( $rows ),
|
54 |
disabled( true, $disabled, false ),
|
55 |
$value
|
56 |
);
|
64 |
*/
|
65 |
public function display_field_options( $group_key, $field_key ) {
|
66 |
?>
|
67 |
+
<tr>
|
68 |
+
<th><?php esc_html_e( 'Rows', 'smart-custom-fields' ); ?></th>
|
69 |
+
<td>
|
70 |
+
<input type="number"
|
71 |
+
name="<?php echo esc_attr( $this->get_field_name_in_setting( $group_key, $field_key, 'rows' ) ); ?>"
|
72 |
+
min="3"
|
73 |
+
value="<?php echo esc_attr( $this->get( 'rows' ) ); ?>"
|
74 |
+
/>
|
75 |
+
</td>
|
76 |
+
</tr>
|
77 |
<tr>
|
78 |
<th><?php esc_html_e( 'Default', 'smart-custom-fields' ); ?></th>
|
79 |
<td>
|
css/editor.css
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
/**
|
2 |
* editor.css
|
3 |
-
* Version : 1.
|
4 |
* Author : inc2734
|
5 |
* Created : September 23, 2014
|
6 |
-
* Modified :
|
7 |
* License : GPLv2 or later
|
8 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
*/
|
@@ -122,14 +122,14 @@
|
|
122 |
.smart-cf-meta-box-table .smart-cf-relation-left ul li:hover {
|
123 |
background: #e4f6fd;
|
124 |
}
|
125 |
-
.smart-cf-meta-box-table .smart-cf-relation-left .load-relation-
|
126 |
background: #e4f6fd;
|
127 |
cursor: pointer;
|
128 |
margin: 0;
|
129 |
padding: 6px 10px;
|
130 |
text-align: center;
|
131 |
}
|
132 |
-
.smart-cf-meta-box-table .smart-cf-relation-left .load-relation-
|
133 |
background: #c1ebfc;
|
134 |
}
|
135 |
.smart-cf-meta-box-table .smart-cf-relation-right {
|
@@ -184,7 +184,7 @@
|
|
184 |
.smart-cf-upload-file.hide,
|
185 |
.smart-cf-upload-image .btn-remove-image.hide,
|
186 |
.smart-cf-upload-file .btn-remove-file.hide,
|
187 |
-
.load-relation-
|
188 |
display: none;
|
189 |
}
|
190 |
|
1 |
/**
|
2 |
* editor.css
|
3 |
+
* Version : 1.3.0
|
4 |
* Author : inc2734
|
5 |
* Created : September 23, 2014
|
6 |
+
* Modified : February 1, 2016
|
7 |
* License : GPLv2 or later
|
8 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
*/
|
122 |
.smart-cf-meta-box-table .smart-cf-relation-left ul li:hover {
|
123 |
background: #e4f6fd;
|
124 |
}
|
125 |
+
.smart-cf-meta-box-table .smart-cf-relation-left .load-relation-items {
|
126 |
background: #e4f6fd;
|
127 |
cursor: pointer;
|
128 |
margin: 0;
|
129 |
padding: 6px 10px;
|
130 |
text-align: center;
|
131 |
}
|
132 |
+
.smart-cf-meta-box-table .smart-cf-relation-left .load-relation-items:hover {
|
133 |
background: #c1ebfc;
|
134 |
}
|
135 |
.smart-cf-meta-box-table .smart-cf-relation-right {
|
184 |
.smart-cf-upload-file.hide,
|
185 |
.smart-cf-upload-image .btn-remove-image.hide,
|
186 |
.smart-cf-upload-file .btn-remove-file.hide,
|
187 |
+
.load-relation-items.hide {
|
188 |
display: none;
|
189 |
}
|
190 |
|
js/{editor-relation.js → editor-relation-post-types.js}
RENAMED
@@ -9,29 +9,29 @@
|
|
9 |
*/
|
10 |
jQuery( function( $ ) {
|
11 |
|
12 |
-
var table_class = '
|
13 |
-
|
14 |
/**
|
15 |
* 初期化
|
16 |
* click_count はロードボタンを押すごとに加算。
|
17 |
* 検索ボックスが変更されるたびに 0 にリセットすること。
|
18 |
*/
|
19 |
-
$( '.smart-cf-meta-box .load-relation-
|
20 |
.data( 'click_count', 0 )
|
21 |
.data( 'search_timer', null )
|
22 |
.data( 'recent_search_query', '' );
|
23 |
-
|
24 |
/**
|
25 |
* 検索ボタン
|
26 |
*/
|
27 |
-
$( document ).on( 'keyup', '.smart-cf-meta-box .search-input', function() {
|
28 |
var parent = $( this ).closest( table_class );
|
29 |
var search_timer = parent.data( 'search_timer' );
|
30 |
clearTimeout( search_timer );
|
31 |
-
|
32 |
parent.data( 'click_count', 0 );
|
33 |
parent.find( '.smart-cf-relation-children-select ul li' ).remove();
|
34 |
-
|
35 |
var search_query = $( this ).val();
|
36 |
parent.data( 'recent_search_query', search_query );
|
37 |
parent.data( 'search_timer', setTimeout( function() {
|
@@ -42,7 +42,7 @@ jQuery( function( $ ) {
|
|
42 |
/**
|
43 |
* 読み込みボタン
|
44 |
*/
|
45 |
-
$( document ).on( 'click', '.smart-cf-meta-box .load-relation-
|
46 |
var parent = $( this ).closest( table_class );
|
47 |
var click_count = parent.data( 'click_count' );
|
48 |
click_count ++;
|
@@ -54,25 +54,25 @@ jQuery( function( $ ) {
|
|
54 |
get_posts( {}, parent );
|
55 |
}
|
56 |
} );
|
57 |
-
|
58 |
/**
|
59 |
* クエリ
|
60 |
*/
|
61 |
function get_posts( args, table ) {
|
62 |
var click_count = table.data( 'click_count' );
|
63 |
var post_types = table.find( '.smart-cf-relation-left' ).data( 'post-types' );
|
64 |
-
var btn_load = table.find( '.load-relation-
|
65 |
var btn_load_text = btn_load.text();
|
66 |
btn_load.text( 'Now loading...' );
|
67 |
-
|
68 |
args = $.extend( args, {
|
69 |
-
action :
|
70 |
-
nonce :
|
71 |
click_count: click_count,
|
72 |
post_types : post_types
|
73 |
} );
|
74 |
$.post(
|
75 |
-
|
76 |
args,
|
77 |
function( response ) {
|
78 |
btn_load.addClass( 'hide' );
|
@@ -83,10 +83,9 @@ jQuery( function( $ ) {
|
|
83 |
.text( this.post_title )
|
84 |
);
|
85 |
} );
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
}
|
90 |
}
|
91 |
);
|
92 |
return false;
|
9 |
*/
|
10 |
jQuery( function( $ ) {
|
11 |
|
12 |
+
var table_class = 'tr';
|
13 |
+
|
14 |
/**
|
15 |
* 初期化
|
16 |
* click_count はロードボタンを押すごとに加算。
|
17 |
* 検索ボックスが変更されるたびに 0 にリセットすること。
|
18 |
*/
|
19 |
+
$( '.smart-cf-meta-box .load-relation-post-types' ).closest( table_class )
|
20 |
.data( 'click_count', 0 )
|
21 |
.data( 'search_timer', null )
|
22 |
.data( 'recent_search_query', '' );
|
23 |
+
|
24 |
/**
|
25 |
* 検索ボタン
|
26 |
*/
|
27 |
+
$( document ).on( 'keyup', '.smart-cf-meta-box .search-input-post-types', function() {
|
28 |
var parent = $( this ).closest( table_class );
|
29 |
var search_timer = parent.data( 'search_timer' );
|
30 |
clearTimeout( search_timer );
|
31 |
+
|
32 |
parent.data( 'click_count', 0 );
|
33 |
parent.find( '.smart-cf-relation-children-select ul li' ).remove();
|
34 |
+
|
35 |
var search_query = $( this ).val();
|
36 |
parent.data( 'recent_search_query', search_query );
|
37 |
parent.data( 'search_timer', setTimeout( function() {
|
42 |
/**
|
43 |
* 読み込みボタン
|
44 |
*/
|
45 |
+
$( document ).on( 'click', '.smart-cf-meta-box .load-relation-post-types', function() {
|
46 |
var parent = $( this ).closest( table_class );
|
47 |
var click_count = parent.data( 'click_count' );
|
48 |
click_count ++;
|
54 |
get_posts( {}, parent );
|
55 |
}
|
56 |
} );
|
57 |
+
|
58 |
/**
|
59 |
* クエリ
|
60 |
*/
|
61 |
function get_posts( args, table ) {
|
62 |
var click_count = table.data( 'click_count' );
|
63 |
var post_types = table.find( '.smart-cf-relation-left' ).data( 'post-types' );
|
64 |
+
var btn_load = table.find( '.load-relation-post-types' );
|
65 |
var btn_load_text = btn_load.text();
|
66 |
btn_load.text( 'Now loading...' );
|
67 |
+
|
68 |
args = $.extend( args, {
|
69 |
+
action : smart_cf_relation_post_types.action,
|
70 |
+
nonce : smart_cf_relation_post_types.nonce,
|
71 |
click_count: click_count,
|
72 |
post_types : post_types
|
73 |
} );
|
74 |
$.post(
|
75 |
+
smart_cf_relation_post_types.endpoint,
|
76 |
args,
|
77 |
function( response ) {
|
78 |
btn_load.addClass( 'hide' );
|
83 |
.text( this.post_title )
|
84 |
);
|
85 |
} );
|
86 |
+
|
87 |
+
btn_load.text( btn_load_text );
|
88 |
+
btn_load.removeClass( 'hide' );
|
|
|
89 |
}
|
90 |
);
|
91 |
return false;
|
js/editor-relation-taxonomies.js
ADDED
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* editor.js
|
3 |
+
* Version : 1.0.0
|
4 |
+
* Author : inc2734
|
5 |
+
* Created : February 2, 2016
|
6 |
+
* Modified :
|
7 |
+
* License : GPLv2 or later
|
8 |
+
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
+
*/
|
10 |
+
jQuery( function( $ ) {
|
11 |
+
|
12 |
+
var table_class = 'tr';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* 初期化
|
16 |
+
* click_count はロードボタンを押すごとに加算。
|
17 |
+
* 検索ボックスが変更されるたびに 0 にリセットすること。
|
18 |
+
*/
|
19 |
+
$( '.smart-cf-meta-box .load-relation-terms' ).closest( table_class )
|
20 |
+
.data( 'click_count', 0 )
|
21 |
+
.data( 'search_timer', null )
|
22 |
+
.data( 'recent_search_query', '' );
|
23 |
+
|
24 |
+
/**
|
25 |
+
* 検索ボタン
|
26 |
+
*/
|
27 |
+
$( document ).on( 'keyup', '.smart-cf-meta-box .search-input-terms', function() {
|
28 |
+
var parent = $( this ).closest( table_class );
|
29 |
+
var search_timer = parent.data( 'search_timer' );
|
30 |
+
clearTimeout( search_timer );
|
31 |
+
|
32 |
+
parent.data( 'click_count', 0 );
|
33 |
+
parent.find( '.smart-cf-relation-children-select ul li' ).remove();
|
34 |
+
|
35 |
+
var search_query = $( this ).val();
|
36 |
+
parent.data( 'recent_search_query', search_query );
|
37 |
+
parent.data( 'search_timer', setTimeout( function() {
|
38 |
+
get_terms( { search: search_query }, parent );
|
39 |
+
}, 2000 ) );
|
40 |
+
} );
|
41 |
+
|
42 |
+
/**
|
43 |
+
* 読み込みボタン
|
44 |
+
*/
|
45 |
+
$( document ).on( 'click', '.smart-cf-meta-box .load-relation-terms', function() {
|
46 |
+
var parent = $( this ).closest( table_class );
|
47 |
+
var click_count = parent.data( 'click_count' );
|
48 |
+
click_count ++;
|
49 |
+
parent.data( 'click_count', click_count );
|
50 |
+
var search_query = parent.data( 'recent_search_query' );
|
51 |
+
if ( search_query ) {
|
52 |
+
get_terms( { search: search_query }, parent );
|
53 |
+
} else {
|
54 |
+
get_terms( {}, parent );
|
55 |
+
}
|
56 |
+
} );
|
57 |
+
|
58 |
+
/**
|
59 |
+
* クエリ
|
60 |
+
*/
|
61 |
+
function get_terms( args, table ) {
|
62 |
+
var click_count = table.data( 'click_count' );
|
63 |
+
var taxonomies = table.find( '.smart-cf-relation-left' ).data( 'taxonomies' );
|
64 |
+
var btn_load = table.find( '.load-relation-terms' );
|
65 |
+
var btn_load_text = btn_load.text();
|
66 |
+
btn_load.text( 'Now loading...' );
|
67 |
+
|
68 |
+
args = $.extend( args, {
|
69 |
+
action : smart_cf_relation_taxonomies.action,
|
70 |
+
nonce : smart_cf_relation_taxonomies.nonce,
|
71 |
+
click_count: click_count,
|
72 |
+
taxonomies : taxonomies
|
73 |
+
} );
|
74 |
+
$.post(
|
75 |
+
smart_cf_relation_taxonomies.endpoint,
|
76 |
+
args,
|
77 |
+
function( response ) {
|
78 |
+
btn_load.addClass( 'hide' );
|
79 |
+
$( response ).each( function( i, e ) {
|
80 |
+
table.find( '.smart-cf-relation-children-select ul' ).append(
|
81 |
+
$( '<li />' )
|
82 |
+
.attr( 'data-id', this.term_id )
|
83 |
+
.text( this.name )
|
84 |
+
);
|
85 |
+
} );
|
86 |
+
|
87 |
+
btn_load.text( btn_load_text );
|
88 |
+
btn_load.removeClass( 'hide' );
|
89 |
+
}
|
90 |
+
);
|
91 |
+
return false;
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* 選択肢
|
96 |
+
*/
|
97 |
+
var choices_li = '.smart-cf-relation-children-select li';
|
98 |
+
$( '.smart-cf-meta-box' ).on( 'click', choices_li, function() {
|
99 |
+
var id = $( this ).data( 'id' );
|
100 |
+
var parent = $( this ).closest( table_class );
|
101 |
+
if ( parent.find( '.smart-cf-relation-right li[data-id="' + id + '"]' ).length === 0 ) {
|
102 |
+
var clone = $( this ).clone();
|
103 |
+
clone
|
104 |
+
.prepend( $( '<span class="smart-cf-icon-handle dashicons dashicons-menu"></span>' ) )
|
105 |
+
.append( $( '<span class="relation-remove">-</span>' ) );
|
106 |
+
parent.find( '.smart-cf-relation-right ul' ).append( clone );
|
107 |
+
update_relation_value( $( this ).closest( 'tr' ) );
|
108 |
+
}
|
109 |
+
} );
|
110 |
+
|
111 |
+
/**
|
112 |
+
* 選択済み項目の削除
|
113 |
+
*/
|
114 |
+
var relation_remove = '.smart-cf-relation-right li .relation-remove';
|
115 |
+
$( '.smart-cf-meta-box' ).on( 'click', relation_remove, function() {
|
116 |
+
var tr = $( this ).closest( 'tr' );
|
117 |
+
$( this ).parent().remove();
|
118 |
+
update_relation_value( tr );
|
119 |
+
} );
|
120 |
+
|
121 |
+
/**
|
122 |
+
* update_relation_value
|
123 |
+
* @param dom tr
|
124 |
+
*/
|
125 |
+
function update_relation_value( tr ) {
|
126 |
+
var hidden = tr.find( 'input[type="hidden"]' );
|
127 |
+
hidden.each( function( i, e ) {
|
128 |
+
if ( i !== 0 ) {
|
129 |
+
$( this ).remove();
|
130 |
+
}
|
131 |
+
} );
|
132 |
+
tr.find( '.smart-cf-relation-right li' ).each( function( i, e ) {
|
133 |
+
var hidden_box = $( this ).closest( table_class ).find( '.smart-cf-relation-children-select' );
|
134 |
+
var id = $( this ).data( 'id' );
|
135 |
+
var clone = hidden.first().clone();
|
136 |
+
var name = clone.attr( 'name' );
|
137 |
+
clone.attr( 'name', name + '[]' );
|
138 |
+
clone.val( id );
|
139 |
+
hidden_box.append( clone );
|
140 |
+
} );
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* sortable
|
145 |
+
*/
|
146 |
+
$( '.smart-cf-meta-box .smart-cf-relation-right ul' ).sortable( {
|
147 |
+
handle: '.smart-cf-icon-handle',
|
148 |
+
update: function() {
|
149 |
+
update_relation_value( $( this ).closest( 'tr' ) );
|
150 |
+
}
|
151 |
+
} );
|
152 |
+
} );
|
js/editor.js
CHANGED
@@ -25,7 +25,7 @@ jQuery( function( $ ) {
|
|
25 |
$( this ).attr( 'id', 'smart-cf-wysiwyg-' + wrapper_index + '-' + cnt + '-' + i );
|
26 |
var editor_id = $( this ).attr( 'id' );
|
27 |
$( this ).parents( '.wp-editor-wrap' ).find( 'a.add_media' ).attr( 'data-editor', editor_id );
|
28 |
-
|
29 |
var init;
|
30 |
if ( typeof tinyMCEPreInit.mceInit.content !== 'undefined' ) {
|
31 |
init = $.extend( true, {}, tinyMCEPreInit.mceInit.content );
|
@@ -46,7 +46,9 @@ jQuery( function( $ ) {
|
|
46 |
};
|
47 |
}
|
48 |
tinyMCEPreInit.mceInit[editor_id] = init;
|
49 |
-
|
|
|
|
|
50 |
//tinymce.execCommand( 'mceAddEditor', false, editor_id );
|
51 |
}
|
52 |
} );
|
25 |
$( this ).attr( 'id', 'smart-cf-wysiwyg-' + wrapper_index + '-' + cnt + '-' + i );
|
26 |
var editor_id = $( this ).attr( 'id' );
|
27 |
$( this ).parents( '.wp-editor-wrap' ).find( 'a.add_media' ).attr( 'data-editor', editor_id );
|
28 |
+
|
29 |
var init;
|
30 |
if ( typeof tinyMCEPreInit.mceInit.content !== 'undefined' ) {
|
31 |
init = $.extend( true, {}, tinyMCEPreInit.mceInit.content );
|
46 |
};
|
47 |
}
|
48 |
tinyMCEPreInit.mceInit[editor_id] = init;
|
49 |
+
if ( typeof tinymce !== 'undefined' ) {
|
50 |
+
tinymce.init( init );
|
51 |
+
}
|
52 |
//tinymce.execCommand( 'mceAddEditor', false, editor_id );
|
53 |
}
|
54 |
} );
|
languages/smart-custom-fields-ja.mo
CHANGED
Binary file
|
languages/smart-custom-fields-ja.po
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
# This file is distributed under the same license as the Smart Custom Fields package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Smart Custom Fields 1.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/smart-custom-fields\n"
|
7 |
-
"POT-Creation-Date:
|
8 |
-
"PO-Revision-Date:
|
9 |
"Last-Translator: inc2734 <inc@2inc.org>\n"
|
10 |
"Language-Team: \n"
|
11 |
"Language: ja\n"
|
@@ -62,32 +62,33 @@ msgstr "表示条件(プロフィール)"
|
|
62 |
msgid "Display conditions ( Taxonomy )"
|
63 |
msgstr "表示条件(タクソノミー)"
|
64 |
|
65 |
-
#: classes/controller/class.settings.php:
|
66 |
msgid "Type"
|
67 |
msgstr "タイプ"
|
68 |
|
69 |
-
#: classes/controller/class.settings.php:
|
70 |
msgid "Add Sub field"
|
71 |
msgstr "サブフィールドを追加"
|
72 |
|
73 |
-
#: classes/controller/class.settings.php:
|
74 |
msgid "Add Field"
|
75 |
msgstr "フィールド追加"
|
76 |
|
77 |
-
#: classes/controller/class.settings.php:
|
78 |
-
#: classes/fields/class.field-relation.php:
|
79 |
msgid "Post Types"
|
80 |
msgstr "投稿タイプ"
|
81 |
|
82 |
-
#: classes/controller/class.settings.php:
|
83 |
msgid "Post Ids ( Comma separated )"
|
84 |
msgstr "投稿 ID (カンマ区切り)"
|
85 |
|
86 |
-
#: classes/controller/class.settings.php:
|
87 |
msgid "Roles"
|
88 |
msgstr "権限"
|
89 |
|
90 |
-
#: classes/controller/class.settings.php:
|
|
|
91 |
msgid "Taxonomies"
|
92 |
msgstr "タクソノミー"
|
93 |
|
@@ -103,33 +104,34 @@ msgstr "はい"
|
|
103 |
msgid "No"
|
104 |
msgstr "いいえ"
|
105 |
|
106 |
-
#: classes/fields/class.field-boolean.php:
|
107 |
#: classes/fields/class.field-colorpicker.php:102
|
108 |
#: classes/fields/class.field-datepicker.php:124
|
109 |
#: classes/fields/class.field-radio.php:111 classes/fields/class.field-select.php:85
|
110 |
-
#: classes/fields/class.field-text.php:65 classes/fields/class.field-textarea.php:
|
111 |
-
#: classes/fields/class.field-wysiwyg.php:
|
112 |
msgid "Default"
|
113 |
msgstr "デフォルト"
|
114 |
|
115 |
-
#: classes/fields/class.field-boolean.php:
|
116 |
msgid "TRUE Label"
|
117 |
msgstr "TRUE ラベル"
|
118 |
|
119 |
-
#: classes/fields/class.field-boolean.php:
|
120 |
msgid "FALSE Label"
|
121 |
msgstr "FALSE ラベル"
|
122 |
|
123 |
-
#: classes/fields/class.field-boolean.php:
|
124 |
#: classes/fields/class.field-check.php:121
|
125 |
#: classes/fields/class.field-colorpicker.php:111
|
126 |
#: classes/fields/class.field-datepicker.php:188
|
127 |
#: classes/fields/class.field-file.php:92 classes/fields/class.field-image.php:93
|
128 |
#: classes/fields/class.field-radio.php:120
|
129 |
-
#: classes/fields/class.field-relation.php:
|
130 |
-
#: classes/fields/class.field-select.php:94
|
131 |
-
#: classes/fields/class.field-
|
132 |
-
#: classes/fields/class.field-
|
|
|
133 |
msgid "Notes"
|
134 |
msgstr "注記"
|
135 |
|
@@ -212,15 +214,17 @@ msgid "Radio"
|
|
212 |
msgstr "ラジオボタン"
|
213 |
|
214 |
#: classes/fields/class.field-relation.php:24
|
215 |
-
msgid "Relation"
|
216 |
-
msgstr "
|
217 |
|
218 |
-
#: classes/fields/class.field-relation.php:
|
|
|
219 |
#, fuzzy
|
220 |
msgid "Search..."
|
221 |
msgstr "検索 …"
|
222 |
|
223 |
-
#: classes/fields/class.field-relation.php:
|
|
|
224 |
msgid "Load more"
|
225 |
msgstr "さらに読み込む"
|
226 |
|
@@ -228,6 +232,10 @@ msgstr "さらに読み込む"
|
|
228 |
msgid "Select"
|
229 |
msgstr "セレクトボックス"
|
230 |
|
|
|
|
|
|
|
|
|
231 |
#: classes/fields/class.field-text.php:21
|
232 |
msgid "Text"
|
233 |
msgstr "テキスト"
|
@@ -236,12 +244,16 @@ msgstr "テキスト"
|
|
236 |
msgid "Textarea"
|
237 |
msgstr "テキストエリア"
|
238 |
|
|
|
|
|
|
|
|
|
239 |
#: classes/fields/class.field-wysiwyg.php:26
|
240 |
msgid "Wysiwyg"
|
241 |
msgstr "WYSIWYG"
|
242 |
|
243 |
-
#: classes/fields/class.field-wysiwyg.php:
|
244 |
-
#: classes/fields/class.field-wysiwyg.php:
|
245 |
msgid "Add Media"
|
246 |
msgstr "メディアを追加"
|
247 |
|
@@ -253,54 +265,54 @@ msgstr "名前"
|
|
253 |
msgid "Label"
|
254 |
msgstr "ラベル"
|
255 |
|
256 |
-
#: classes/models/class.group.php:
|
257 |
msgid "Repeat"
|
258 |
msgstr "繰り返し"
|
259 |
|
260 |
-
#: classes/models/class.group.php:
|
261 |
msgid "Group name"
|
262 |
msgstr "グループ名"
|
263 |
|
264 |
#. Plugin Name of the plugin/theme
|
265 |
-
#: classes/models/class.revisions.php:
|
266 |
-
#: smart-custom-fields.php:
|
267 |
msgid "Smart Custom Fields"
|
268 |
msgstr "Smart Custom Fields"
|
269 |
|
270 |
-
#: smart-custom-fields.php:
|
271 |
-
#: smart-custom-fields.php:
|
272 |
msgid "Add New"
|
273 |
msgstr "新規追加"
|
274 |
|
275 |
-
#: smart-custom-fields.php:
|
276 |
msgid "New Field"
|
277 |
msgstr "新規フィールド"
|
278 |
|
279 |
-
#: smart-custom-fields.php:
|
280 |
msgid "Edit Field"
|
281 |
msgstr "フィールド編集"
|
282 |
|
283 |
-
#: smart-custom-fields.php:
|
284 |
msgid "View Field"
|
285 |
msgstr "フィールドを表示"
|
286 |
|
287 |
-
#: smart-custom-fields.php:
|
288 |
msgid "All Fields"
|
289 |
msgstr "すべてのフィールド"
|
290 |
|
291 |
-
#: smart-custom-fields.php:
|
292 |
msgid "Search Fields"
|
293 |
msgstr "フィールドを検索"
|
294 |
|
295 |
-
#: smart-custom-fields.php:
|
296 |
msgid "Parent Fields:"
|
297 |
msgstr "親フィールド:"
|
298 |
|
299 |
-
#: smart-custom-fields.php:
|
300 |
msgid "No Fields found."
|
301 |
msgstr "フィールドは見つかりませんでした。"
|
302 |
|
303 |
-
#: smart-custom-fields.php:
|
304 |
msgid "No Fields found in Trash."
|
305 |
msgstr "ゴミ箱にフィールドは見つかりませんでした"
|
306 |
|
@@ -319,3 +331,6 @@ msgstr "inc2734"
|
|
319 |
#. Author URI of the plugin/theme
|
320 |
msgid "http://2inc.org"
|
321 |
msgstr "http://2inc.org"
|
|
|
|
|
|
2 |
# This file is distributed under the same license as the Smart Custom Fields package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Smart Custom Fields 1.7.0\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/smart-custom-fields\n"
|
7 |
+
"POT-Creation-Date: 2016-02-03 14:02+0900\n"
|
8 |
+
"PO-Revision-Date: 2016-02-03 14:03+0900\n"
|
9 |
"Last-Translator: inc2734 <inc@2inc.org>\n"
|
10 |
"Language-Team: \n"
|
11 |
"Language: ja\n"
|
62 |
msgid "Display conditions ( Taxonomy )"
|
63 |
msgstr "表示条件(タクソノミー)"
|
64 |
|
65 |
+
#: classes/controller/class.settings.php:156
|
66 |
msgid "Type"
|
67 |
msgstr "タイプ"
|
68 |
|
69 |
+
#: classes/controller/class.settings.php:191
|
70 |
msgid "Add Sub field"
|
71 |
msgstr "サブフィールドを追加"
|
72 |
|
73 |
+
#: classes/controller/class.settings.php:195
|
74 |
msgid "Add Field"
|
75 |
msgstr "フィールド追加"
|
76 |
|
77 |
+
#: classes/controller/class.settings.php:225
|
78 |
+
#: classes/fields/class.field-relation.php:213
|
79 |
msgid "Post Types"
|
80 |
msgstr "投稿タイプ"
|
81 |
|
82 |
+
#: classes/controller/class.settings.php:232
|
83 |
msgid "Post Ids ( Comma separated )"
|
84 |
msgstr "投稿 ID (カンマ区切り)"
|
85 |
|
86 |
+
#: classes/controller/class.settings.php:257
|
87 |
msgid "Roles"
|
88 |
msgstr "権限"
|
89 |
|
90 |
+
#: classes/controller/class.settings.php:283
|
91 |
+
#: classes/fields/class.field-taxonomy.php:216
|
92 |
msgid "Taxonomies"
|
93 |
msgstr "タクソノミー"
|
94 |
|
104 |
msgid "No"
|
105 |
msgstr "いいえ"
|
106 |
|
107 |
+
#: classes/fields/class.field-boolean.php:82 classes/fields/class.field-check.php:112
|
108 |
#: classes/fields/class.field-colorpicker.php:102
|
109 |
#: classes/fields/class.field-datepicker.php:124
|
110 |
#: classes/fields/class.field-radio.php:111 classes/fields/class.field-select.php:85
|
111 |
+
#: classes/fields/class.field-text.php:65 classes/fields/class.field-textarea.php:78
|
112 |
+
#: classes/fields/class.field-wysiwyg.php:111
|
113 |
msgid "Default"
|
114 |
msgstr "デフォルト"
|
115 |
|
116 |
+
#: classes/fields/class.field-boolean.php:107
|
117 |
msgid "TRUE Label"
|
118 |
msgstr "TRUE ラベル"
|
119 |
|
120 |
+
#: classes/fields/class.field-boolean.php:117
|
121 |
msgid "FALSE Label"
|
122 |
msgstr "FALSE ラベル"
|
123 |
|
124 |
+
#: classes/fields/class.field-boolean.php:127
|
125 |
#: classes/fields/class.field-check.php:121
|
126 |
#: classes/fields/class.field-colorpicker.php:111
|
127 |
#: classes/fields/class.field-datepicker.php:188
|
128 |
#: classes/fields/class.field-file.php:92 classes/fields/class.field-image.php:93
|
129 |
#: classes/fields/class.field-radio.php:120
|
130 |
+
#: classes/fields/class.field-relation.php:234
|
131 |
+
#: classes/fields/class.field-select.php:94
|
132 |
+
#: classes/fields/class.field-taxonomy.php:235 classes/fields/class.field-text.php:74
|
133 |
+
#: classes/fields/class.field-textarea.php:87
|
134 |
+
#: classes/fields/class.field-wysiwyg.php:120
|
135 |
msgid "Notes"
|
136 |
msgstr "注記"
|
137 |
|
214 |
msgstr "ラジオボタン"
|
215 |
|
216 |
#: classes/fields/class.field-relation.php:24
|
217 |
+
msgid "Relation ( Post Types )"
|
218 |
+
msgstr "関連(投稿タイプ)"
|
219 |
|
220 |
+
#: classes/fields/class.field-relation.php:191
|
221 |
+
#: classes/fields/class.field-taxonomy.php:194
|
222 |
#, fuzzy
|
223 |
msgid "Search..."
|
224 |
msgstr "検索 …"
|
225 |
|
226 |
+
#: classes/fields/class.field-relation.php:195
|
227 |
+
#: classes/fields/class.field-taxonomy.php:198
|
228 |
msgid "Load more"
|
229 |
msgstr "さらに読み込む"
|
230 |
|
232 |
msgid "Select"
|
233 |
msgstr "セレクトボックス"
|
234 |
|
235 |
+
#: classes/fields/class.field-taxonomy.php:24
|
236 |
+
msgid "Relation ( Taxonomies )"
|
237 |
+
msgstr "関連(タクソノミー)"
|
238 |
+
|
239 |
#: classes/fields/class.field-text.php:21
|
240 |
msgid "Text"
|
241 |
msgstr "テキスト"
|
244 |
msgid "Textarea"
|
245 |
msgstr "テキストエリア"
|
246 |
|
247 |
+
#: classes/fields/class.field-textarea.php:68
|
248 |
+
msgid "Rows"
|
249 |
+
msgstr "行数"
|
250 |
+
|
251 |
#: classes/fields/class.field-wysiwyg.php:26
|
252 |
msgid "Wysiwyg"
|
253 |
msgstr "WYSIWYG"
|
254 |
|
255 |
+
#: classes/fields/class.field-wysiwyg.php:142
|
256 |
+
#: classes/fields/class.field-wysiwyg.php:143
|
257 |
msgid "Add Media"
|
258 |
msgstr "メディアを追加"
|
259 |
|
265 |
msgid "Label"
|
266 |
msgstr "ラベル"
|
267 |
|
268 |
+
#: classes/models/class.group.php:127
|
269 |
msgid "Repeat"
|
270 |
msgstr "繰り返し"
|
271 |
|
272 |
+
#: classes/models/class.group.php:132
|
273 |
msgid "Group name"
|
274 |
msgstr "グループ名"
|
275 |
|
276 |
#. Plugin Name of the plugin/theme
|
277 |
+
#: classes/models/class.revisions.php:124 smart-custom-fields.php:158
|
278 |
+
#: smart-custom-fields.php:159 smart-custom-fields.php:160
|
279 |
msgid "Smart Custom Fields"
|
280 |
msgstr "Smart Custom Fields"
|
281 |
|
282 |
+
#: smart-custom-fields.php:161 smart-custom-fields.php:162
|
283 |
+
#: smart-custom-fields.php:208 smart-custom-fields.php:209
|
284 |
msgid "Add New"
|
285 |
msgstr "新規追加"
|
286 |
|
287 |
+
#: smart-custom-fields.php:163
|
288 |
msgid "New Field"
|
289 |
msgstr "新規フィールド"
|
290 |
|
291 |
+
#: smart-custom-fields.php:164
|
292 |
msgid "Edit Field"
|
293 |
msgstr "フィールド編集"
|
294 |
|
295 |
+
#: smart-custom-fields.php:165
|
296 |
msgid "View Field"
|
297 |
msgstr "フィールドを表示"
|
298 |
|
299 |
+
#: smart-custom-fields.php:166
|
300 |
msgid "All Fields"
|
301 |
msgstr "すべてのフィールド"
|
302 |
|
303 |
+
#: smart-custom-fields.php:167
|
304 |
msgid "Search Fields"
|
305 |
msgstr "フィールドを検索"
|
306 |
|
307 |
+
#: smart-custom-fields.php:168
|
308 |
msgid "Parent Fields:"
|
309 |
msgstr "親フィールド:"
|
310 |
|
311 |
+
#: smart-custom-fields.php:169
|
312 |
msgid "No Fields found."
|
313 |
msgstr "フィールドは見つかりませんでした。"
|
314 |
|
315 |
+
#: smart-custom-fields.php:170
|
316 |
msgid "No Fields found in Trash."
|
317 |
msgstr "ゴミ箱にフィールドは見つかりませんでした"
|
318 |
|
331 |
#. Author URI of the plugin/theme
|
332 |
msgid "http://2inc.org"
|
333 |
msgstr "http://2inc.org"
|
334 |
+
|
335 |
+
#~ msgid "Relation"
|
336 |
+
#~ msgstr "リレーション"
|
languages/smart-custom-fields.pot
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
-
# Copyright (C)
|
2 |
# This file is distributed under the same license as the Smart Custom Fields package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Smart Custom Fields 1.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/smart-custom-"
|
7 |
"fields\n"
|
8 |
-
"POT-Creation-Date:
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"PO-Revision-Date:
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15 |
|
@@ -58,32 +58,33 @@ msgstr ""
|
|
58 |
msgid "Display conditions ( Taxonomy )"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: classes/controller/class.settings.php:
|
62 |
msgid "Type"
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: classes/controller/class.settings.php:
|
66 |
msgid "Add Sub field"
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: classes/controller/class.settings.php:
|
70 |
msgid "Add Field"
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: classes/controller/class.settings.php:
|
74 |
-
#: classes/fields/class.field-relation.php:
|
75 |
msgid "Post Types"
|
76 |
msgstr ""
|
77 |
|
78 |
-
#: classes/controller/class.settings.php:
|
79 |
msgid "Post Ids ( Comma separated )"
|
80 |
msgstr ""
|
81 |
|
82 |
-
#: classes/controller/class.settings.php:
|
83 |
msgid "Roles"
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: classes/controller/class.settings.php:
|
|
|
87 |
msgid "Taxonomies"
|
88 |
msgstr ""
|
89 |
|
@@ -99,38 +100,39 @@ msgstr ""
|
|
99 |
msgid "No"
|
100 |
msgstr ""
|
101 |
|
102 |
-
#: classes/fields/class.field-boolean.php:
|
103 |
#: classes/fields/class.field-check.php:112
|
104 |
#: classes/fields/class.field-colorpicker.php:102
|
105 |
#: classes/fields/class.field-datepicker.php:124
|
106 |
#: classes/fields/class.field-radio.php:111
|
107 |
#: classes/fields/class.field-select.php:85
|
108 |
#: classes/fields/class.field-text.php:65
|
109 |
-
#: classes/fields/class.field-textarea.php:
|
110 |
-
#: classes/fields/class.field-wysiwyg.php:
|
111 |
msgid "Default"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: classes/fields/class.field-boolean.php:
|
115 |
msgid "TRUE Label"
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: classes/fields/class.field-boolean.php:
|
119 |
msgid "FALSE Label"
|
120 |
msgstr ""
|
121 |
|
122 |
-
#: classes/fields/class.field-boolean.php:
|
123 |
#: classes/fields/class.field-check.php:121
|
124 |
#: classes/fields/class.field-colorpicker.php:111
|
125 |
#: classes/fields/class.field-datepicker.php:188
|
126 |
#: classes/fields/class.field-file.php:92
|
127 |
#: classes/fields/class.field-image.php:93
|
128 |
#: classes/fields/class.field-radio.php:120
|
129 |
-
#: classes/fields/class.field-relation.php:
|
130 |
#: classes/fields/class.field-select.php:94
|
|
|
131 |
#: classes/fields/class.field-text.php:74
|
132 |
-
#: classes/fields/class.field-textarea.php:
|
133 |
-
#: classes/fields/class.field-wysiwyg.php:
|
134 |
msgid "Notes"
|
135 |
msgstr ""
|
136 |
|
@@ -218,14 +220,16 @@ msgid "Radio"
|
|
218 |
msgstr ""
|
219 |
|
220 |
#: classes/fields/class.field-relation.php:24
|
221 |
-
msgid "Relation"
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: classes/fields/class.field-relation.php:
|
|
|
225 |
msgid "Search..."
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: classes/fields/class.field-relation.php:
|
|
|
229 |
msgid "Load more"
|
230 |
msgstr ""
|
231 |
|
@@ -233,6 +237,10 @@ msgstr ""
|
|
233 |
msgid "Select"
|
234 |
msgstr ""
|
235 |
|
|
|
|
|
|
|
|
|
236 |
#: classes/fields/class.field-text.php:21
|
237 |
msgid "Text"
|
238 |
msgstr ""
|
@@ -241,12 +249,16 @@ msgstr ""
|
|
241 |
msgid "Textarea"
|
242 |
msgstr ""
|
243 |
|
|
|
|
|
|
|
|
|
244 |
#: classes/fields/class.field-wysiwyg.php:26
|
245 |
msgid "Wysiwyg"
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: classes/fields/class.field-wysiwyg.php:
|
249 |
-
#: classes/fields/class.field-wysiwyg.php:
|
250 |
msgid "Add Media"
|
251 |
msgstr ""
|
252 |
|
@@ -258,55 +270,55 @@ msgstr ""
|
|
258 |
msgid "Label"
|
259 |
msgstr ""
|
260 |
|
261 |
-
#: classes/models/class.group.php:
|
262 |
msgid "Repeat"
|
263 |
msgstr ""
|
264 |
|
265 |
-
#: classes/models/class.group.php:
|
266 |
msgid "Group name"
|
267 |
msgstr ""
|
268 |
|
269 |
-
#. #-#-#-#-# smart-custom-fields.pot (Smart Custom Fields 1.
|
270 |
#. Plugin Name of the plugin/theme
|
271 |
-
#: classes/models/class.revisions.php:
|
272 |
-
#: smart-custom-fields.php:
|
273 |
msgid "Smart Custom Fields"
|
274 |
msgstr ""
|
275 |
|
276 |
-
#: smart-custom-fields.php:
|
277 |
-
#: smart-custom-fields.php:
|
278 |
msgid "Add New"
|
279 |
msgstr ""
|
280 |
|
281 |
-
#: smart-custom-fields.php:
|
282 |
msgid "New Field"
|
283 |
msgstr ""
|
284 |
|
285 |
-
#: smart-custom-fields.php:
|
286 |
msgid "Edit Field"
|
287 |
msgstr ""
|
288 |
|
289 |
-
#: smart-custom-fields.php:
|
290 |
msgid "View Field"
|
291 |
msgstr ""
|
292 |
|
293 |
-
#: smart-custom-fields.php:
|
294 |
msgid "All Fields"
|
295 |
msgstr ""
|
296 |
|
297 |
-
#: smart-custom-fields.php:
|
298 |
msgid "Search Fields"
|
299 |
msgstr ""
|
300 |
|
301 |
-
#: smart-custom-fields.php:
|
302 |
msgid "Parent Fields:"
|
303 |
msgstr ""
|
304 |
|
305 |
-
#: smart-custom-fields.php:
|
306 |
msgid "No Fields found."
|
307 |
msgstr ""
|
308 |
|
309 |
-
#: smart-custom-fields.php:
|
310 |
msgid "No Fields found in Trash."
|
311 |
msgstr ""
|
312 |
|
1 |
+
# Copyright (C) 2016 Smart Custom Fields
|
2 |
# This file is distributed under the same license as the Smart Custom Fields package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Smart Custom Fields 1.7.0\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/smart-custom-"
|
7 |
"fields\n"
|
8 |
+
"POT-Creation-Date: 2016-02-03 05:01:33+00:00\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15 |
|
58 |
msgid "Display conditions ( Taxonomy )"
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: classes/controller/class.settings.php:156
|
62 |
msgid "Type"
|
63 |
msgstr ""
|
64 |
|
65 |
+
#: classes/controller/class.settings.php:191
|
66 |
msgid "Add Sub field"
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: classes/controller/class.settings.php:195
|
70 |
msgid "Add Field"
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: classes/controller/class.settings.php:225
|
74 |
+
#: classes/fields/class.field-relation.php:213
|
75 |
msgid "Post Types"
|
76 |
msgstr ""
|
77 |
|
78 |
+
#: classes/controller/class.settings.php:232
|
79 |
msgid "Post Ids ( Comma separated )"
|
80 |
msgstr ""
|
81 |
|
82 |
+
#: classes/controller/class.settings.php:257
|
83 |
msgid "Roles"
|
84 |
msgstr ""
|
85 |
|
86 |
+
#: classes/controller/class.settings.php:283
|
87 |
+
#: classes/fields/class.field-taxonomy.php:216
|
88 |
msgid "Taxonomies"
|
89 |
msgstr ""
|
90 |
|
100 |
msgid "No"
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: classes/fields/class.field-boolean.php:82
|
104 |
#: classes/fields/class.field-check.php:112
|
105 |
#: classes/fields/class.field-colorpicker.php:102
|
106 |
#: classes/fields/class.field-datepicker.php:124
|
107 |
#: classes/fields/class.field-radio.php:111
|
108 |
#: classes/fields/class.field-select.php:85
|
109 |
#: classes/fields/class.field-text.php:65
|
110 |
+
#: classes/fields/class.field-textarea.php:78
|
111 |
+
#: classes/fields/class.field-wysiwyg.php:111
|
112 |
msgid "Default"
|
113 |
msgstr ""
|
114 |
|
115 |
+
#: classes/fields/class.field-boolean.php:107
|
116 |
msgid "TRUE Label"
|
117 |
msgstr ""
|
118 |
|
119 |
+
#: classes/fields/class.field-boolean.php:117
|
120 |
msgid "FALSE Label"
|
121 |
msgstr ""
|
122 |
|
123 |
+
#: classes/fields/class.field-boolean.php:127
|
124 |
#: classes/fields/class.field-check.php:121
|
125 |
#: classes/fields/class.field-colorpicker.php:111
|
126 |
#: classes/fields/class.field-datepicker.php:188
|
127 |
#: classes/fields/class.field-file.php:92
|
128 |
#: classes/fields/class.field-image.php:93
|
129 |
#: classes/fields/class.field-radio.php:120
|
130 |
+
#: classes/fields/class.field-relation.php:234
|
131 |
#: classes/fields/class.field-select.php:94
|
132 |
+
#: classes/fields/class.field-taxonomy.php:235
|
133 |
#: classes/fields/class.field-text.php:74
|
134 |
+
#: classes/fields/class.field-textarea.php:87
|
135 |
+
#: classes/fields/class.field-wysiwyg.php:120
|
136 |
msgid "Notes"
|
137 |
msgstr ""
|
138 |
|
220 |
msgstr ""
|
221 |
|
222 |
#: classes/fields/class.field-relation.php:24
|
223 |
+
msgid "Relation ( Post Types )"
|
224 |
msgstr ""
|
225 |
|
226 |
+
#: classes/fields/class.field-relation.php:191
|
227 |
+
#: classes/fields/class.field-taxonomy.php:194
|
228 |
msgid "Search..."
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: classes/fields/class.field-relation.php:195
|
232 |
+
#: classes/fields/class.field-taxonomy.php:198
|
233 |
msgid "Load more"
|
234 |
msgstr ""
|
235 |
|
237 |
msgid "Select"
|
238 |
msgstr ""
|
239 |
|
240 |
+
#: classes/fields/class.field-taxonomy.php:24
|
241 |
+
msgid "Relation ( Taxonomies )"
|
242 |
+
msgstr ""
|
243 |
+
|
244 |
#: classes/fields/class.field-text.php:21
|
245 |
msgid "Text"
|
246 |
msgstr ""
|
249 |
msgid "Textarea"
|
250 |
msgstr ""
|
251 |
|
252 |
+
#: classes/fields/class.field-textarea.php:68
|
253 |
+
msgid "Rows"
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
#: classes/fields/class.field-wysiwyg.php:26
|
257 |
msgid "Wysiwyg"
|
258 |
msgstr ""
|
259 |
|
260 |
+
#: classes/fields/class.field-wysiwyg.php:142
|
261 |
+
#: classes/fields/class.field-wysiwyg.php:143
|
262 |
msgid "Add Media"
|
263 |
msgstr ""
|
264 |
|
270 |
msgid "Label"
|
271 |
msgstr ""
|
272 |
|
273 |
+
#: classes/models/class.group.php:127
|
274 |
msgid "Repeat"
|
275 |
msgstr ""
|
276 |
|
277 |
+
#: classes/models/class.group.php:132
|
278 |
msgid "Group name"
|
279 |
msgstr ""
|
280 |
|
281 |
+
#. #-#-#-#-# smart-custom-fields.pot (Smart Custom Fields 1.7.0) #-#-#-#-#
|
282 |
#. Plugin Name of the plugin/theme
|
283 |
+
#: classes/models/class.revisions.php:124 smart-custom-fields.php:158
|
284 |
+
#: smart-custom-fields.php:159 smart-custom-fields.php:160
|
285 |
msgid "Smart Custom Fields"
|
286 |
msgstr ""
|
287 |
|
288 |
+
#: smart-custom-fields.php:161 smart-custom-fields.php:162
|
289 |
+
#: smart-custom-fields.php:208 smart-custom-fields.php:209
|
290 |
msgid "Add New"
|
291 |
msgstr ""
|
292 |
|
293 |
+
#: smart-custom-fields.php:163
|
294 |
msgid "New Field"
|
295 |
msgstr ""
|
296 |
|
297 |
+
#: smart-custom-fields.php:164
|
298 |
msgid "Edit Field"
|
299 |
msgstr ""
|
300 |
|
301 |
+
#: smart-custom-fields.php:165
|
302 |
msgid "View Field"
|
303 |
msgstr ""
|
304 |
|
305 |
+
#: smart-custom-fields.php:166
|
306 |
msgid "All Fields"
|
307 |
msgstr ""
|
308 |
|
309 |
+
#: smart-custom-fields.php:167
|
310 |
msgid "Search Fields"
|
311 |
msgstr ""
|
312 |
|
313 |
+
#: smart-custom-fields.php:168
|
314 |
msgid "Parent Fields:"
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: smart-custom-fields.php:169
|
318 |
msgid "No Fields found."
|
319 |
msgstr ""
|
320 |
|
321 |
+
#: smart-custom-fields.php:170
|
322 |
msgid "No Fields found in Trash."
|
323 |
msgstr ""
|
324 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.amazon.co.jp/registry/wishlist/39ANKRNSTNW40
|
|
4 |
Tags: plugin, custom field, custom, field, meta, meta field, repeat, repeatable
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.4
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -30,7 +30,8 @@ https://www.youtube.com/watch?v=WxPZurn0yvI
|
|
30 |
* Wysiwyg editor
|
31 |
* Image
|
32 |
* File
|
33 |
-
* Relation
|
|
|
34 |
* Color picker
|
35 |
* Date picker
|
36 |
* Boolean
|
@@ -86,6 +87,11 @@ You can send your own language pack to me.
|
|
86 |
|
87 |
== Changelog ==
|
88 |
|
|
|
|
|
|
|
|
|
|
|
89 |
= 1.6.7 =
|
90 |
* Removed console.log in a js file.
|
91 |
|
4 |
Tags: plugin, custom field, custom, field, meta, meta field, repeat, repeatable
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.4
|
7 |
+
Stable tag: 1.7.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
30 |
* Wysiwyg editor
|
31 |
* Image
|
32 |
* File
|
33 |
+
* Relation ( Post Types )
|
34 |
+
* Relation ( Taxonomies )
|
35 |
* Color picker
|
36 |
* Date picker
|
37 |
* Boolean
|
87 |
|
88 |
== Changelog ==
|
89 |
|
90 |
+
= 1.7.0 =
|
91 |
+
* Added taxonomy relation field.
|
92 |
+
* Added textarea rows setting.
|
93 |
+
* Fixed a bug that tinymce js error when disabled rich editing.
|
94 |
+
|
95 |
= 1.6.7 =
|
96 |
* Removed console.log in a js file.
|
97 |
|
smart-custom-fields.php
CHANGED
@@ -3,11 +3,11 @@
|
|
3 |
* Plugin name: Smart Custom Fields
|
4 |
* Plugin URI: https://github.com/inc2734/smart-custom-fields/
|
5 |
* Description: Smart Custom Fields is a simple plugin that management custom fields.
|
6 |
-
* Version: 1.
|
7 |
* Author: inc2734
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created: October 9, 2014
|
10 |
-
* Modified:
|
11 |
* Text Domain: smart-custom-fields
|
12 |
* Domain Path: /languages
|
13 |
* License: GPLv2 or later
|
3 |
* Plugin name: Smart Custom Fields
|
4 |
* Plugin URI: https://github.com/inc2734/smart-custom-fields/
|
5 |
* Description: Smart Custom Fields is a simple plugin that management custom fields.
|
6 |
+
* Version: 1.7.0
|
7 |
* Author: inc2734
|
8 |
* Author URI: http://2inc.org
|
9 |
* Created: October 9, 2014
|
10 |
+
* Modified: February 1, 2016
|
11 |
* Text Domain: smart-custom-fields
|
12 |
* Domain Path: /languages
|
13 |
* License: GPLv2 or later
|