Version Description
- Improvement: add
change
event forfile_advanced
andimage_advanced
fields. - Improvement: add support for boolean attributes.
- Improvement: add support for boolean attributes.
- Improvement: add Russian language.
- Improvement: changed
wp_get_post_terms
toget_the_terms
to use WordPress cache. - Improvement: refactored code to make textarea, select use attributes.
- Improvement:
fieldset_text
now cloneable. Also removedrows
option for this field. - Improvement: refactored
has_been_saved()
function.
Download this release
Release Info
Developer | rilwis |
Plugin | Meta Box |
Version | 4.7.3 |
Comparing to | |
See all releases |
Code changes from version 4.7.2 to 4.7.3
- inc/field.php +17 -3
- inc/fields/fieldset-text.php +13 -30
- inc/fields/input.php +1 -7
- inc/fields/map.php +12 -2
- inc/fields/media.php +2 -2
- inc/fields/select.php +11 -7
- inc/fields/taxonomy.php +1 -1
- inc/fields/textarea.php +20 -8
- inc/helpers.php +1 -1
- inc/meta-box.php +12 -14
- js/media.js +1 -0
- lang/meta-box-ru_RU.mo +0 -0
- meta-box-loader.php +1 -1
- meta-box.php +2 -2
- readme.txt +15 -3
inc/field.php
CHANGED
@@ -34,10 +34,11 @@ if ( ! class_exists( 'RWMB_Field ' ) )
|
|
34 |
*/
|
35 |
static function show( $field, $saved )
|
36 |
{
|
37 |
-
$post
|
|
|
38 |
|
39 |
$field_class = RW_Meta_Box::get_class_name( $field );
|
40 |
-
$meta = call_user_func( array( $field_class, 'meta' ), $
|
41 |
|
42 |
// Apply filter to field meta value
|
43 |
// 1st filter applies to all fields
|
@@ -397,9 +398,21 @@ if ( ! class_exists( 'RWMB_Field ' ) )
|
|
397 |
*/
|
398 |
static function normalize_field( $field )
|
399 |
{
|
400 |
-
|
|
|
|
|
401 |
'attributes' => array()
|
402 |
) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
403 |
}
|
404 |
|
405 |
/**
|
@@ -416,6 +429,7 @@ if ( ! class_exists( 'RWMB_Field ' ) )
|
|
416 |
{
|
417 |
if ( $value )
|
418 |
{
|
|
|
419 |
$attr_string .= sprintf(
|
420 |
' %s="%s"',
|
421 |
$key,
|
34 |
*/
|
35 |
static function show( $field, $saved )
|
36 |
{
|
37 |
+
$post = get_post();
|
38 |
+
$post_id = isset( $post->ID ) ? $post->ID : 0;
|
39 |
|
40 |
$field_class = RW_Meta_Box::get_class_name( $field );
|
41 |
+
$meta = call_user_func( array( $field_class, 'meta' ), $post_id, $saved, $field );
|
42 |
|
43 |
// Apply filter to field meta value
|
44 |
// 1st filter applies to all fields
|
398 |
*/
|
399 |
static function normalize_field( $field )
|
400 |
{
|
401 |
+
$field = wp_parse_args( $field, array(
|
402 |
+
'disabled' => false,
|
403 |
+
'required' => false,
|
404 |
'attributes' => array()
|
405 |
) );
|
406 |
+
|
407 |
+
$field['attributes'] = wp_parse_args( $field['attributes'], array(
|
408 |
+
'disabled' => $field['disabled'],
|
409 |
+
'required' => $field['required'],
|
410 |
+
'class' => "rwmb-{$field['type']}",
|
411 |
+
'id' => $field['clone'] ? false : $field['id'],
|
412 |
+
'name' => $field['field_name'],
|
413 |
+
) );
|
414 |
+
|
415 |
+
return $field;
|
416 |
}
|
417 |
|
418 |
/**
|
429 |
{
|
430 |
if ( $value )
|
431 |
{
|
432 |
+
$value = ( true === $value ) ? $key : $value;
|
433 |
$attr_string .= sprintf(
|
434 |
' %s="%s"',
|
435 |
$key,
|
inc/fields/fieldset-text.php
CHANGED
@@ -2,9 +2,12 @@
|
|
2 |
// Prevent loading this file directly
|
3 |
defined( 'ABSPATH' ) || exit;
|
4 |
|
|
|
|
|
|
|
5 |
if ( ! class_exists( 'RWMB_Fieldset_Text_Field' ) )
|
6 |
{
|
7 |
-
class RWMB_Fieldset_Text_Field extends
|
8 |
{
|
9 |
/**
|
10 |
* Get field HTML
|
@@ -17,42 +20,20 @@ if ( ! class_exists( 'RWMB_Fieldset_Text_Field' ) )
|
|
17 |
static function html( $meta, $field )
|
18 |
{
|
19 |
$html = array();
|
20 |
-
$tpl = '<label>%s
|
21 |
-
|
22 |
-
|
23 |
{
|
24 |
-
|
25 |
-
{
|
26 |
-
|
27 |
-
|
28 |
-
}
|
29 |
-
$html[] = '<br>';
|
30 |
-
}
|
31 |
|
32 |
$out = '<fieldset><legend>' . $field['desc'] . '</legend>' . implode( ' ', $html ) . '</fieldset>';
|
33 |
|
34 |
return $out;
|
35 |
}
|
36 |
|
37 |
-
/**
|
38 |
-
* Show end HTML markup for fields
|
39 |
-
* Do not show field description. Field description is shown before list of fields
|
40 |
-
*
|
41 |
-
* @param mixed $meta
|
42 |
-
* @param array $field
|
43 |
-
*
|
44 |
-
* @return string
|
45 |
-
*/
|
46 |
-
static function end_html( $meta, $field )
|
47 |
-
{
|
48 |
-
$button = $field['clone'] ? call_user_func( array( RW_Meta_Box::get_class_name( $field ), 'add_clone_button' ), $field ) : '';
|
49 |
-
|
50 |
-
// Closes the container
|
51 |
-
$html = "$button</div>";
|
52 |
-
|
53 |
-
return $html;
|
54 |
-
}
|
55 |
-
|
56 |
/**
|
57 |
* Normalize parameters for field
|
58 |
*
|
@@ -62,7 +43,9 @@ if ( ! class_exists( 'RWMB_Fieldset_Text_Field' ) )
|
|
62 |
*/
|
63 |
static function normalize_field( $field )
|
64 |
{
|
|
|
65 |
$field['multiple'] = false;
|
|
|
66 |
return $field;
|
67 |
}
|
68 |
|
2 |
// Prevent loading this file directly
|
3 |
defined( 'ABSPATH' ) || exit;
|
4 |
|
5 |
+
// Make sure "text" field is loaded
|
6 |
+
require_once RWMB_FIELDS_DIR . 'text.php';
|
7 |
+
|
8 |
if ( ! class_exists( 'RWMB_Fieldset_Text_Field' ) )
|
9 |
{
|
10 |
+
class RWMB_Fieldset_Text_Field extends RWMB_Text_Field
|
11 |
{
|
12 |
/**
|
13 |
* Get field HTML
|
20 |
static function html( $meta, $field )
|
21 |
{
|
22 |
$html = array();
|
23 |
+
$tpl = '<label>%s %s</label>';
|
24 |
+
|
25 |
+
foreach ( $field['options'] as $key => $label )
|
26 |
{
|
27 |
+
$value = isset( $meta[$key] ) ? $meta[$key] : '';
|
28 |
+
$field['attributes']['name'] = $field['field_name'] . "[{$key}]";
|
29 |
+
$html[] = sprintf( $tpl, $label, parent::html( $value, $field) );
|
30 |
+
}
|
|
|
|
|
|
|
31 |
|
32 |
$out = '<fieldset><legend>' . $field['desc'] . '</legend>' . implode( ' ', $html ) . '</fieldset>';
|
33 |
|
34 |
return $out;
|
35 |
}
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
/**
|
38 |
* Normalize parameters for field
|
39 |
*
|
43 |
*/
|
44 |
static function normalize_field( $field )
|
45 |
{
|
46 |
+
$field = parent::normalize_field( $field );
|
47 |
$field['multiple'] = false;
|
48 |
+
$field['attributes']['id'] = false;
|
49 |
return $field;
|
50 |
}
|
51 |
|
inc/fields/input.php
CHANGED
@@ -18,6 +18,7 @@ if ( ! class_exists( 'RWMB_Input_Field' ) )
|
|
18 |
{
|
19 |
$attributes = $field['attributes'];
|
20 |
$attributes['value'] = $meta;
|
|
|
21 |
return sprintf(
|
22 |
'<input %s>%s',
|
23 |
self::render_attributes( $attributes ),
|
@@ -37,8 +38,6 @@ if ( ! class_exists( 'RWMB_Input_Field' ) )
|
|
37 |
$field = parent::normalize_field( $field );
|
38 |
$field = wp_parse_args( $field, array(
|
39 |
'datalist' => false,
|
40 |
-
'disabled' => false,
|
41 |
-
'required' => false,
|
42 |
'readonly' => false,
|
43 |
) );
|
44 |
if ( $field['datalist'] )
|
@@ -50,13 +49,8 @@ if ( ! class_exists( 'RWMB_Input_Field' ) )
|
|
50 |
}
|
51 |
|
52 |
$field['attributes'] = wp_parse_args( $field['attributes'], array(
|
53 |
-
'disabled' => $field['disabled'],
|
54 |
'list' => $field['datalist'] ? $field['datalist']['id'] : false,
|
55 |
'readonly' => $field['readonly'],
|
56 |
-
'required' => $field['required'],
|
57 |
-
'name' => $field['field_name'],
|
58 |
-
'class' => "rwmb-{$field['type']}",
|
59 |
-
'id' => $field['clone'] ? false : $field['id'],
|
60 |
) );
|
61 |
|
62 |
return $field;
|
18 |
{
|
19 |
$attributes = $field['attributes'];
|
20 |
$attributes['value'] = $meta;
|
21 |
+
|
22 |
return sprintf(
|
23 |
'<input %s>%s',
|
24 |
self::render_attributes( $attributes ),
|
38 |
$field = parent::normalize_field( $field );
|
39 |
$field = wp_parse_args( $field, array(
|
40 |
'datalist' => false,
|
|
|
|
|
41 |
'readonly' => false,
|
42 |
) );
|
43 |
if ( $field['datalist'] )
|
49 |
}
|
50 |
|
51 |
$field['attributes'] = wp_parse_args( $field['attributes'], array(
|
|
|
52 |
'list' => $field['datalist'] ? $field['datalist']['id'] : false,
|
53 |
'readonly' => $field['readonly'],
|
|
|
|
|
|
|
|
|
54 |
) );
|
55 |
|
56 |
return $field;
|
inc/fields/map.php
CHANGED
@@ -13,7 +13,12 @@ if ( ! class_exists( 'RWMB_Map_Field' ) )
|
|
13 |
*/
|
14 |
static function admin_enqueue_scripts()
|
15 |
{
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
17 |
wp_enqueue_style( 'rwmb-map', RWMB_CSS_URL . 'map.css' );
|
18 |
wp_enqueue_script( 'rwmb-map', RWMB_JS_URL . 'map.js', array( 'jquery-ui-autocomplete', 'google-maps' ), RWMB_VER, true );
|
19 |
}
|
@@ -113,7 +118,12 @@ if ( ! class_exists( 'RWMB_Map_Field' ) )
|
|
113 |
* Enqueue scripts
|
114 |
* Note: We still can enqueue script which outputs in the footer
|
115 |
*/
|
116 |
-
|
|
|
|
|
|
|
|
|
|
|
117 |
wp_enqueue_script( 'rwmb-map-frontend', RWMB_JS_URL . 'map-frontend.js', array( 'google-maps' ), '', true );
|
118 |
|
119 |
// Map parameters
|
13 |
*/
|
14 |
static function admin_enqueue_scripts()
|
15 |
{
|
16 |
+
/**
|
17 |
+
* Allows developers load more libraries via a filter.
|
18 |
+
* @link https://developers.google.com/maps/documentation/javascript/libraries
|
19 |
+
*/
|
20 |
+
$google_maps_url = apply_filters( 'rwmb_google_maps_url', 'https://maps.google.com/maps/api/js?sensor=false' );
|
21 |
+
wp_register_script( 'google-maps', esc_url_raw( $google_maps_url ), array(), '', true );
|
22 |
wp_enqueue_style( 'rwmb-map', RWMB_CSS_URL . 'map.css' );
|
23 |
wp_enqueue_script( 'rwmb-map', RWMB_JS_URL . 'map.js', array( 'jquery-ui-autocomplete', 'google-maps' ), RWMB_VER, true );
|
24 |
}
|
118 |
* Enqueue scripts
|
119 |
* Note: We still can enqueue script which outputs in the footer
|
120 |
*/
|
121 |
+
/**
|
122 |
+
* Allows developers load more libraries via a filter.
|
123 |
+
* @link https://developers.google.com/maps/documentation/javascript/libraries
|
124 |
+
*/
|
125 |
+
$google_maps_url = apply_filters( 'rwmb_google_maps_url', 'https://maps.google.com/maps/api/js?sensor=false' );
|
126 |
+
wp_register_script( 'google-maps', esc_url_raw( $google_maps_url ), array(), '', true );
|
127 |
wp_enqueue_script( 'rwmb-map-frontend', RWMB_JS_URL . 'map-frontend.js', array( 'google-maps' ), '', true );
|
128 |
|
129 |
// Map parameters
|
inc/fields/media.php
CHANGED
@@ -107,12 +107,12 @@ if ( ! class_exists( 'RWMB_Media_Field' ) )
|
|
107 |
{
|
108 |
foreach ( $new as &$value )
|
109 |
{
|
110 |
-
$value =
|
111 |
}
|
112 |
}
|
113 |
else
|
114 |
{
|
115 |
-
$new =
|
116 |
}
|
117 |
return $new;
|
118 |
}
|
107 |
{
|
108 |
foreach ( $new as &$value )
|
109 |
{
|
110 |
+
$value = wp_parse_id_list( $value );
|
111 |
}
|
112 |
}
|
113 |
else
|
114 |
{
|
115 |
+
$new = wp_parse_id_list( $new );
|
116 |
}
|
117 |
return $new;
|
118 |
}
|
inc/fields/select.php
CHANGED
@@ -28,11 +28,8 @@ if ( ! class_exists( 'RWMB_Select_Field' ) )
|
|
28 |
static function html( $meta, $field )
|
29 |
{
|
30 |
$html = sprintf(
|
31 |
-
'<select
|
32 |
-
$field['
|
33 |
-
$field['id'],
|
34 |
-
$field['size'],
|
35 |
-
$field['multiple'] ? ' multiple' : ''
|
36 |
);
|
37 |
|
38 |
$html .= self::options_html( $field, $meta );
|
@@ -80,11 +77,18 @@ if ( ! class_exists( 'RWMB_Select_Field' ) )
|
|
80 |
*/
|
81 |
static function normalize_field( $field )
|
82 |
{
|
|
|
|
|
|
|
|
|
83 |
$field = wp_parse_args( $field, array(
|
84 |
'size' => $field['multiple'] ? 5 : 0,
|
85 |
) );
|
86 |
-
|
87 |
-
|
|
|
|
|
|
|
88 |
|
89 |
return $field;
|
90 |
}
|
28 |
static function html( $meta, $field )
|
29 |
{
|
30 |
$html = sprintf(
|
31 |
+
'<select %s>',
|
32 |
+
self::render_attributes( $field['attributes'] )
|
|
|
|
|
|
|
33 |
);
|
34 |
|
35 |
$html .= self::options_html( $field, $meta );
|
77 |
*/
|
78 |
static function normalize_field( $field )
|
79 |
{
|
80 |
+
if ( ! $field['clone'] && $field['multiple'] )
|
81 |
+
$field['field_name'] .= '[]';
|
82 |
+
|
83 |
+
$field = parent::normalize_field( $field );
|
84 |
$field = wp_parse_args( $field, array(
|
85 |
'size' => $field['multiple'] ? 5 : 0,
|
86 |
) );
|
87 |
+
|
88 |
+
$field['attributes'] = wp_parse_args( $field['attributes'], array(
|
89 |
+
'multiple' => $field['multiple'],
|
90 |
+
'size' => $field['size'],
|
91 |
+
) );
|
92 |
|
93 |
return $field;
|
94 |
}
|
inc/fields/taxonomy.php
CHANGED
@@ -255,7 +255,7 @@ if ( ! class_exists( 'RWMB_Taxonomy_Field' ) )
|
|
255 |
{
|
256 |
$options = $field['options'];
|
257 |
|
258 |
-
$meta =
|
259 |
$meta = is_array( $meta ) ? $meta : (array) $meta;
|
260 |
$meta = wp_list_pluck( $meta, 'term_id' );
|
261 |
|
255 |
{
|
256 |
$options = $field['options'];
|
257 |
|
258 |
+
$meta = get_the_terms( $post_id, $options['taxonomy'] );
|
259 |
$meta = is_array( $meta ) ? $meta : (array) $meta;
|
260 |
$meta = wp_list_pluck( $meta, 'term_id' );
|
261 |
|
inc/fields/textarea.php
CHANGED
@@ -16,13 +16,10 @@ if ( ! class_exists( 'RWMB_Textarea_Field' ) )
|
|
16 |
*/
|
17 |
static function html( $meta, $field )
|
18 |
{
|
|
|
19 |
return sprintf(
|
20 |
-
'<textarea
|
21 |
-
$
|
22 |
-
$field['id'],
|
23 |
-
$field['cols'],
|
24 |
-
$field['rows'],
|
25 |
-
$field['placeholder'],
|
26 |
$meta
|
27 |
);
|
28 |
}
|
@@ -48,10 +45,25 @@ if ( ! class_exists( 'RWMB_Textarea_Field' ) )
|
|
48 |
*/
|
49 |
static function normalize_field( $field )
|
50 |
{
|
|
|
51 |
$field = wp_parse_args( $field, array(
|
52 |
-
'cols'
|
53 |
-
'rows'
|
|
|
|
|
|
|
|
|
54 |
) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
return $field;
|
57 |
}
|
16 |
*/
|
17 |
static function html( $meta, $field )
|
18 |
{
|
19 |
+
$attributes = $field['attributes'];
|
20 |
return sprintf(
|
21 |
+
'<textarea %s>%s</textarea>',
|
22 |
+
self::render_attributes( $attributes ),
|
|
|
|
|
|
|
|
|
23 |
$meta
|
24 |
);
|
25 |
}
|
45 |
*/
|
46 |
static function normalize_field( $field )
|
47 |
{
|
48 |
+
$field = parent::normalize_field( $field );
|
49 |
$field = wp_parse_args( $field, array(
|
50 |
+
'cols' => 60,
|
51 |
+
'rows' => 3,
|
52 |
+
'maxlength' => false,
|
53 |
+
'wrap' => false,
|
54 |
+
'readonly' => false,
|
55 |
+
'placeholder' => '',
|
56 |
) );
|
57 |
+
|
58 |
+
$field['attributes'] = wp_parse_args( $field['attributes'], array(
|
59 |
+
'cols' => $field['cols'],
|
60 |
+
'rows' => $field['rows'],
|
61 |
+
'maxlength' => $field['maxlength'],
|
62 |
+
'wrap' => $field['wrap'],
|
63 |
+
'readonly' => $field['readonly'],
|
64 |
+
'placeholder' => $field['placeholder'],
|
65 |
+
) );
|
66 |
+
$field['attributes']['class'] .= ' large-text';
|
67 |
|
68 |
return $field;
|
69 |
}
|
inc/helpers.php
CHANGED
@@ -125,7 +125,7 @@ if ( ! class_exists( 'RWMB_Helper' ) )
|
|
125 |
// Get post terms
|
126 |
elseif ( 'taxonomy' == $args['type'] )
|
127 |
{
|
128 |
-
$meta = empty( $args['taxonomy'] ) ? array() :
|
129 |
}
|
130 |
// Get map
|
131 |
elseif ( 'map' == $args['type'] )
|
125 |
// Get post terms
|
126 |
elseif ( 'taxonomy' == $args['type'] )
|
127 |
{
|
128 |
+
$meta = empty( $args['taxonomy'] ) ? array() : get_the_terms( $post_id, $args['taxonomy'] );
|
129 |
}
|
130 |
// Get map
|
131 |
elseif ( 'map' == $args['type'] )
|
inc/meta-box.php
CHANGED
@@ -207,9 +207,7 @@ if ( ! class_exists( 'RW_Meta_Box' ) )
|
|
207 |
*/
|
208 |
function show()
|
209 |
{
|
210 |
-
$
|
211 |
-
|
212 |
-
$saved = self::has_been_saved( $post->ID, $this->fields );
|
213 |
|
214 |
// Container
|
215 |
printf(
|
@@ -374,9 +372,9 @@ if ( ! class_exists( 'RW_Meta_Box' ) )
|
|
374 |
'required' => false,
|
375 |
'placeholder' => '',
|
376 |
|
377 |
-
'clone'
|
378 |
-
'max_clone'
|
379 |
-
'sort_clone'
|
380 |
) );
|
381 |
|
382 |
$class = self::get_class_name( $field );
|
@@ -427,19 +425,19 @@ if ( ! class_exists( 'RW_Meta_Box' ) )
|
|
427 |
}
|
428 |
|
429 |
/**
|
430 |
-
* Check if meta box
|
431 |
-
* This helps saving empty value in meta fields (for text box, check box, etc.)
|
432 |
-
*
|
433 |
-
* @param int $post_id
|
434 |
-
* @param array $fields
|
435 |
*
|
436 |
* @return bool
|
437 |
*/
|
438 |
-
|
439 |
{
|
440 |
-
|
|
|
|
|
441 |
{
|
442 |
-
$value = get_post_meta( $
|
443 |
if (
|
444 |
( ! $field['multiple'] && '' !== $value )
|
445 |
|| ( $field['multiple'] && array() !== $value )
|
207 |
*/
|
208 |
function show()
|
209 |
{
|
210 |
+
$saved = $this->is_saved();
|
|
|
|
|
211 |
|
212 |
// Container
|
213 |
printf(
|
372 |
'required' => false,
|
373 |
'placeholder' => '',
|
374 |
|
375 |
+
'clone' => false,
|
376 |
+
'max_clone' => 0,
|
377 |
+
'sort_clone' => false,
|
378 |
) );
|
379 |
|
380 |
$class = self::get_class_name( $field );
|
425 |
}
|
426 |
|
427 |
/**
|
428 |
+
* Check if meta box is saved before.
|
429 |
+
* This helps saving empty value in meta fields (for text box, check box, etc.) and set the correct
|
430 |
+
* default values.
|
|
|
|
|
431 |
*
|
432 |
* @return bool
|
433 |
*/
|
434 |
+
public function is_saved()
|
435 |
{
|
436 |
+
$post = get_post();
|
437 |
+
|
438 |
+
foreach ( $this->fields as $field )
|
439 |
{
|
440 |
+
$value = get_post_meta( $post->ID, $field['id'], ! $field['multiple'] );
|
441 |
if (
|
442 |
( ! $field['multiple'] && '' !== $value )
|
443 |
|| ( $field['multiple'] && array() !== $value )
|
js/media.js
CHANGED
@@ -113,6 +113,7 @@ jQuery( function ( $ )
|
|
113 |
{
|
114 |
var ids = that.collection.pluck( 'id' );
|
115 |
that.input.val( ids.join( ',' ) );
|
|
|
116 |
}, 500 ) );
|
117 |
|
118 |
//Limit max files
|
113 |
{
|
114 |
var ids = that.collection.pluck( 'id' );
|
115 |
that.input.val( ids.join( ',' ) );
|
116 |
+
that.input.trigger( 'change' );
|
117 |
}, 500 ) );
|
118 |
|
119 |
//Limit max files
|
lang/meta-box-ru_RU.mo
ADDED
Binary file
|
meta-box-loader.php
CHANGED
@@ -4,7 +4,7 @@ class RWMB_Loader
|
|
4 |
{
|
5 |
static function load( $url, $dir )
|
6 |
{
|
7 |
-
define( 'RWMB_VER', '4.7.
|
8 |
|
9 |
define( 'RWMB_URL', $url );
|
10 |
define( 'RWMB_DIR', $dir );
|
4 |
{
|
5 |
static function load( $url, $dir )
|
6 |
{
|
7 |
+
define( 'RWMB_VER', '4.7.3' );
|
8 |
|
9 |
define( 'RWMB_URL', $url );
|
10 |
define( 'RWMB_DIR', $dir );
|
meta-box.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Meta Box
|
4 |
* Plugin URI: https://metabox.io
|
5 |
* Description: Create custom meta boxes and custom fields for any post type in WordPress.
|
6 |
-
* Version: 4.7.
|
7 |
* Author: Rilwis
|
8 |
* Author URI: http://www.deluxeblogtips.com
|
9 |
* License: GPL2+
|
@@ -15,7 +15,7 @@
|
|
15 |
defined( 'ABSPATH' ) || exit;
|
16 |
|
17 |
// Script version, used to add version for scripts and styles
|
18 |
-
define( 'RWMB_VER', '4.7.
|
19 |
|
20 |
// Define plugin URLs, for fast enqueuing scripts and styles
|
21 |
if ( ! defined( 'RWMB_URL' ) )
|
3 |
* Plugin Name: Meta Box
|
4 |
* Plugin URI: https://metabox.io
|
5 |
* Description: Create custom meta boxes and custom fields for any post type in WordPress.
|
6 |
+
* Version: 4.7.3
|
7 |
* Author: Rilwis
|
8 |
* Author URI: http://www.deluxeblogtips.com
|
9 |
* License: GPL2+
|
15 |
defined( 'ABSPATH' ) || exit;
|
16 |
|
17 |
// Script version, used to add version for scripts and styles
|
18 |
+
define( 'RWMB_VER', '4.7.3' );
|
19 |
|
20 |
// Define plugin URLs, for fast enqueuing scripts and styles
|
21 |
if ( ! defined( 'RWMB_URL' ) )
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: rilwis, fitwp, f-j-kaiser, funkatronic, PerWiklander, ruanmer, Omn
|
|
3 |
Donate link: http://www.deluxeblogtips.com/donate
|
4 |
Tags: meta-box, custom fields, custom field, meta, meta-boxes, admin, advanced, custom, edit, field, file, image, magic fields, matrix, more fields, Post, repeater, simple fields, text, textarea, type, cms, fields post
|
5 |
Requires at least: 3.5
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 4.7.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Meta Box plugin is a powerful, professional solution to create custom meta boxes and custom fields for WordPress websites.
|
@@ -33,7 +33,9 @@ See more documentation [here](https://metabox.io/docs/).
|
|
33 |
|
34 |
### Extensions
|
35 |
|
36 |
-
- [MB
|
|
|
|
|
37 |
- [Meta Box Yoast SEO](https://wordpress.org/plugins/meta-box-yoast-seo/): Add content of custom fields to Yoast SEO Content Analysis to have better/correct SEO score.
|
38 |
- [Meta Box Text Limiter](https://wordpress.org/plugins/meta-box-text-limiter/): Limit the number of characters or words entered for text and textarea fields.
|
39 |
- [Meta Box Conditional Logic](https://metabox.io/plugins/meta-box-conditional-logic/): Add visibility dependency for custom meta boxes and custom fields in WordPress.
|
@@ -75,6 +77,16 @@ To getting started with the plugin API, please read [this tutorial](https://meta
|
|
75 |
|
76 |
== Changelog ==
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
= 4.7.2 =
|
80 |
|
3 |
Donate link: http://www.deluxeblogtips.com/donate
|
4 |
Tags: meta-box, custom fields, custom field, meta, meta-boxes, admin, advanced, custom, edit, field, file, image, magic fields, matrix, more fields, Post, repeater, simple fields, text, textarea, type, cms, fields post
|
5 |
Requires at least: 3.5
|
6 |
+
Tested up to: 4.4
|
7 |
+
Stable tag: 4.7.3
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Meta Box plugin is a powerful, professional solution to create custom meta boxes and custom fields for WordPress websites.
|
33 |
|
34 |
### Extensions
|
35 |
|
36 |
+
- [MB Term Meta](https://metabox.io/plugins/mb-term-meta/): Add meta data to categories, tags or any custom taxonomy with simple syntax.
|
37 |
+
- [MB Settings Page](https://metabox.io/plugins/mb-settings-page/): Create settings pages for themes, plugins or websites with beautiful syntax.
|
38 |
+
- [MB Custom Post Type](https://wordpress.org/plugins/mb-custom-post-type/): Create and manage custom post types and taxonomies easily in WordPress with an easy-to-use interface.
|
39 |
- [Meta Box Yoast SEO](https://wordpress.org/plugins/meta-box-yoast-seo/): Add content of custom fields to Yoast SEO Content Analysis to have better/correct SEO score.
|
40 |
- [Meta Box Text Limiter](https://wordpress.org/plugins/meta-box-text-limiter/): Limit the number of characters or words entered for text and textarea fields.
|
41 |
- [Meta Box Conditional Logic](https://metabox.io/plugins/meta-box-conditional-logic/): Add visibility dependency for custom meta boxes and custom fields in WordPress.
|
77 |
|
78 |
== Changelog ==
|
79 |
|
80 |
+
= 4.7.3 =
|
81 |
+
|
82 |
+
* Improvement: add `change` event for `file_advanced` and `image_advanced` fields.
|
83 |
+
* Improvement: add support for boolean attributes.
|
84 |
+
* Improvement: add support for boolean attributes.
|
85 |
+
* Improvement: add Russian language.
|
86 |
+
* Improvement: changed `wp_get_post_terms` to `get_the_terms` to use WordPress cache.
|
87 |
+
* Improvement: refactored code to make textarea, select use attributes.
|
88 |
+
* Improvement: `fieldset_text` now cloneable. Also removed `rows` option for this field.
|
89 |
+
* Improvement: refactored `has_been_saved()` function.
|
90 |
|
91 |
= 4.7.2 =
|
92 |
|