Meta Box - Version 4.5.7

Version Description

  • Fix: Always set std as value for hidden field
  • Fix: rwmb_meta now can display rich content from oembed field
  • Fix: Wrong format for datetime field
  • Fix: Check and reset clone index when add/remove/sort clones
  • Improvement: Optionally display ID attribute for heading and divider
  • Improvement: Adding new style to date field to match WordPress style
  • Improvement: Change saving hooks to specific post types to prevent saving images to wrong post
Download this release

Release Info

Developer rilwis
Plugin Icon 128x128 Meta Box
Version 4.5.7
Comparing to
See all releases

Code changes from version 4.5.6 to 4.5.7

css/datepicker.css ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Date Picker Default Styles */
2
+ .ui-datepicker {
3
+ padding: 0;
4
+ border: 1px solid #ddd;
5
+ -webkit-border-radius: 0;
6
+ -moz-border-radius: 0;
7
+ border-radius: 0;
8
+ }
9
+ .ui-datepicker * {
10
+ padding: 0;
11
+ font-family: "Open Sans", sans-serif;
12
+ -webkit-border-radius: 0;
13
+ -moz-border-radius: 0;
14
+ border-radius: 0;
15
+ }
16
+ .ui-datepicker table {
17
+ font-size: 13px;
18
+ margin: 0;
19
+ }
20
+ .ui-datepicker .ui-datepicker-header {
21
+ border: none;
22
+ background: #23282d;
23
+ color: #fff;
24
+ font-weight: normal;
25
+ }
26
+ .ui-datepicker .ui-datepicker-header .ui-state-hover {
27
+ background: #23282d;
28
+ border-color: transparent;
29
+ cursor: pointer;
30
+ -webkit-border-radius: 0;
31
+ -moz-border-radius: 0;
32
+ border-radius: 0;
33
+ }
34
+ .ui-datepicker thead {
35
+ background: #23282d;
36
+ color: #fff;
37
+ }
38
+ .ui-datepicker .ui-datepicker-title {
39
+ margin-top: .4em;
40
+ margin-bottom: .3em;
41
+ color: #fff;
42
+ font-size: 14px;
43
+ }
44
+ .ui-datepicker .ui-datepicker-prev-hover,
45
+ .ui-datepicker .ui-datepicker-next-hover,
46
+ .ui-datepicker .ui-datepicker-next,
47
+ .ui-datepicker .ui-datepicker-prev {
48
+ height: 1em;
49
+ top: .9em;
50
+ border: none;
51
+ }
52
+ .ui-datepicker .ui-datepicker-prev-hover {
53
+ left: 2px;
54
+ }
55
+ .ui-datepicker .ui-datepicker-next-hover {
56
+ right: 2px;
57
+ }
58
+ .ui-datepicker .ui-datepicker-next span,
59
+ .ui-datepicker .ui-datepicker-prev span {
60
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAADwCAQAAABFnnJAAAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAAAEgAAABIAEbJaz4AABe4SURBVHja7V1diCXHdf56vbZmVl6nxwKFO2yyq1mM4qAwM7oDsR6C7iYIKesH3V1QHgyBu5YYJwHjrB9NQCuByIthHbAga6TZxeBgHMJKISZ+SDIb1oQgRtoVgtjGyD8PmSGQMIpfJmCLk4f+q6o+daq6+965P1VfM3Pv7VN16ud8Vd1dp6o6IUSEjBPTzkDEdBEJEDgiAXT0QOhNOxPHiUgAFT3sA9gPiQLjJsD0208Pbe9rM/OvwkaBQvP0yzhG6ASQO0AqDwmu9mOPT3nqPWsYV9qFEduVIDP/QU4BSfMC9REqAcbRAa520FDELdphc3SJCyRIcADgAAkSQXOXMs4ckrIxFEUs2oENBNSqR0WmJ2kVv2hltvRdaVPHvP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pl57TQszB/vAcYCfUbQPhLss26WhPlrhi2vUIX5V0X5QbwHGBd0Akg9wGppmuKvWSe8VztTJ1FP0c9RTDd/vAiMAbPUA0TzTwG+PUB3uN/f0cz8PUu4iEbw7QGOA1Lvwpk/3gOMAfqEkB4O0JvJzpXyTt/8jOiIOCMocMyvLyBiLPh/gj9Qphd3t8gAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTMtMDItMDFUMDU6MzM6MTAtMDg6MDApYMCSAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDEzLTAyLTAxVDA1OjMzOjEwLTA4OjAwWD14LgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAASUVORK5CYII=');
61
+ background-position: -32px 0;
62
+ margin-top: 0;
63
+ top: 0;
64
+ font-weight: normal;
65
+ }
66
+ .ui-datepicker .ui-datepicker-prev span {
67
+ background-position: -96px 0;
68
+ }
69
+ .ui-datepicker th {
70
+ padding: 0.75em 0;
71
+ color: #fff;
72
+ font-weight: normal;
73
+ border: none;
74
+ border-top: 1px solid #32373c;
75
+ }
76
+ .ui-datepicker td {
77
+ background: #f1f1f1;
78
+ border: none;
79
+ padding: 0;
80
+ }
81
+ .ui-datepicker td .ui-state-default {
82
+ background: transparent;
83
+ border: none;
84
+ text-align: center;
85
+ padding: .5em;
86
+ margin: 0;
87
+ font-weight: normal;
88
+ color: #32373c;
89
+ }
90
+ .ui-datepicker td .ui-state-active,
91
+ .ui-datepicker td .ui-state-hover {
92
+ background: #0073aa;
93
+ color: #fff;
94
+ }
95
+ .ui-datepicker td.ui-state-disabled,
96
+ .ui-datepicker td.ui-state-disabled .ui-state-default {
97
+ opacity: 1;
98
+ color: #999;
99
+ }
100
+ /* Other Datepicker Color Schemes */
101
+ /* Blue */
102
+ .admin-color-blue .ui-datepicker .ui-datepicker-header,
103
+ .admin-color-blue .ui-datepicker .ui-datepicker-header .ui-state-hover,
104
+ .admin-color-blue .ui-datepicker thead {
105
+ background: #4796b3;
106
+ }
107
+ .admin-color-blue .ui-datepicker th {
108
+ border-color: #52accc;
109
+ }
110
+ .admin-color-blue .ui-datepicker td .ui-state-active,
111
+ .admin-color-blue .ui-datepicker td .ui-state-hover {
112
+ background: #096484;
113
+ }
114
+ /* Coffee */
115
+ .admin-color-coffee .ui-datepicker .ui-datepicker-header,
116
+ .admin-color-coffee .ui-datepicker .ui-datepicker-header .ui-state-hover,
117
+ .admin-color-coffee .ui-datepicker thead {
118
+ background: #46403c;
119
+ }
120
+ .admin-color-coffee .ui-datepicker th {
121
+ border-color: #59524c;
122
+ }
123
+ .admin-color-coffee .ui-datepicker td .ui-state-active,
124
+ .admin-color-coffee .ui-datepicker td .ui-state-hover {
125
+ background: #c7a589;
126
+ }
127
+ /* Ectoplasm */
128
+ .admin-color-ectoplasm .ui-datepicker .ui-datepicker-header,
129
+ .admin-color-ectoplasm .ui-datepicker .ui-datepicker-header .ui-state-hover,
130
+ .admin-color-ectoplasm .ui-datepicker thead {
131
+ background: #413256;
132
+ }
133
+ .admin-color-ectoplasm .ui-datepicker th {
134
+ border-color: #523f6d;
135
+ }
136
+ .admin-color-ectoplasm .ui-datepicker td .ui-state-active,
137
+ .admin-color-ectoplasm .ui-datepicker td .ui-state-hover {
138
+ background: #a3b745;
139
+ }
140
+ /* Midnight */
141
+ .admin-color-midnight .ui-datepicker .ui-datepicker-header,
142
+ .admin-color-midnight .ui-datepicker .ui-datepicker-header .ui-state-hover,
143
+ .admin-color-midnight .ui-datepicker thead {
144
+ background: #26292c;
145
+ }
146
+ .admin-color-midnight .ui-datepicker th {
147
+ border-color: #363b3f;
148
+ }
149
+ .admin-color-midnight .ui-datepicker td .ui-state-active,
150
+ .admin-color-midnight .ui-datepicker td .ui-state-hover {
151
+ background: #e14d43;
152
+ }
153
+ /* Ocean */
154
+ .admin-color-ocean .ui-datepicker .ui-datepicker-header,
155
+ .admin-color-ocean .ui-datepicker .ui-datepicker-header .ui-state-hover,
156
+ .admin-color-ocean .ui-datepicker thead {
157
+ background: #627c83;
158
+ }
159
+ .admin-color-ocean .ui-datepicker th {
160
+ border-color: #738e96;
161
+ }
162
+ .admin-color-ocean .ui-datepicker td .ui-state-active,
163
+ .admin-color-ocean .ui-datepicker td .ui-state-hover {
164
+ background: #9ebaa0;
165
+ }
166
+ /* Sunrise */
167
+ .admin-color-sunrise .ui-datepicker .ui-datepicker-header,
168
+ .admin-color-sunrise .ui-datepicker .ui-datepicker-header .ui-state-hover,
169
+ .admin-color-sunrise .ui-datepicker thead {
170
+ background: #be3631;
171
+ }
172
+ .admin-color-sunrise .ui-datepicker th {
173
+ border-color: #cf4944;
174
+ }
175
+ .admin-color-sunrise .ui-datepicker td .ui-state-active,
176
+ .admin-color-sunrise .ui-datepicker td .ui-state-hover {
177
+ background: #dd823b;
178
+ }
179
+ /* Light */
180
+ .admin-color-light .ui-datepicker .ui-datepicker-header,
181
+ .admin-color-light .ui-datepicker .ui-datepicker-header .ui-state-hover,
182
+ .admin-color-light .ui-datepicker thead {
183
+ background: #e5e5e5;
184
+ }
185
+ .admin-color-light .ui-datepicker td {
186
+ background: #fff;
187
+ }
188
+ .admin-color-light .ui-datepicker .ui-datepicker-next span,
189
+ .admin-color-light .ui-datepicker .ui-datepicker-prev span {
190
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAADwCAYAAADvl7rLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPS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m0fSArhPAtHFFzx1Hhrryb6I4ga4TwIZxHbryx/TcUH5gEBYA13rKumvTwwZXCFXejQTKjzkAoDMYc1gAhXaloCBem8RsQz1/iAVgU37MAQC9IIBQC2DaojTmtUkzeNWDqHyV34cM65QfwwAAFkCHLQAoPwALIMAC6ALWEryjSeWf8nwfAPTGAhgVhFouVOXHHAAACyBAEbsO08x3fQeAvD0d5/hHCgCGCvgCAMCA8f8CDABatG6NN+gY2wAAAABJRU5ErkJggg==');
191
+ }
192
+ .admin-color-light .ui-datepicker th {
193
+ border-color: #fff;
194
+ }
195
+ .admin-color-light .ui-datepicker .ui-datepicker-title,
196
+ .admin-color-light .ui-datepicker td .ui-state-default,
197
+ .admin-color-light .ui-datepicker th {
198
+ color: #555;
199
+ }
200
+ .admin-color-light .ui-datepicker td .ui-state-active,
201
+ .admin-color-light .ui-datepicker td .ui-state-hover {
202
+ color: #fff;
203
+ background: #888;
204
+ }
205
+ .admin-color-light .ui-datepicker td.ui-state-disabled,
206
+ .admin-color-light .ui-datepicker td.ui-state-disabled .ui-state-default {
207
+ color: #ccc;
208
+ }
css/style.css CHANGED
@@ -34,9 +34,10 @@
34
  /* Clone */
35
  .rwmb-clone {
36
  min-height: 24px;
37
- margin-bottom: 5px;
38
  position: relative;
39
  clear: both;
 
40
  }
41
  .rwmb-clone > input[type='radio'],
42
  .rwmb-clone > input[type='checkbox'] {
34
  /* Clone */
35
  .rwmb-clone {
36
  min-height: 24px;
37
+ margin-bottom: 10px;
38
  position: relative;
39
  clear: both;
40
+ background: #fff;
41
  }
42
  .rwmb-clone > input[type='radio'],
43
  .rwmb-clone > input[type='checkbox'] {
inc/fields/date.php CHANGED
@@ -16,7 +16,8 @@ if ( ! class_exists( 'RWMB_Date_Field' ) )
16
  $url = RWMB_CSS_URL . 'jqueryui';
17
  wp_register_style( 'jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17' );
18
  wp_register_style( 'jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17' );
19
- wp_enqueue_style( 'jquery-ui-datepicker', "{$url}/jquery.ui.datepicker.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
 
20
 
21
  // Load localized scripts
22
  $locale = str_replace( '_', '-', get_locale() );
16
  $url = RWMB_CSS_URL . 'jqueryui';
17
  wp_register_style( 'jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17' );
18
  wp_register_style( 'jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17' );
19
+ wp_register_style( 'wp-datepicker', RWMB_CSS_URL ."datepicker.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
20
+ wp_enqueue_style( 'jquery-ui-datepicker', "{$url}/jquery.ui.datepicker.css", array( 'wp-datepicker' ), '1.8.17' );
21
 
22
  // Load localized scripts
23
  $locale = str_replace( '_', '-', get_locale() );
inc/fields/datetime.php CHANGED
@@ -24,7 +24,7 @@ if ( ! class_exists( 'RWMB_Datetime_Field' ) )
24
  * @var array
25
  */
26
  static $time_format_translation = array(
27
- 'H' => 'H', 'HH' => 'H', 'h' => 'H', 'hh' => 'H',
28
  'mm' => 'i', 'ss' => 's', 'l' => 'u', 'tt' => 'a', 'TT' => 'A',
29
  );
30
 
@@ -39,8 +39,9 @@ if ( ! class_exists( 'RWMB_Datetime_Field' ) )
39
  wp_register_style( 'jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17' );
40
  wp_register_style( 'jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17' );
41
  wp_register_style( 'jquery-ui-datepicker', "{$url}/jquery.ui.datepicker.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
 
42
  wp_register_style( 'jquery-ui-slider', "{$url}/jquery.ui.slider.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
43
- wp_enqueue_style( 'jquery-ui-timepicker', "{$url}/jquery-ui-timepicker-addon.min.css", array( 'jquery-ui-datepicker', 'jquery-ui-slider' ), '1.5.0' );
44
 
45
  $url = RWMB_JS_URL . 'jqueryui';
46
  wp_register_script( 'jquery-ui-timepicker', "{$url}/jquery-ui-timepicker-addon.min.js", array( 'jquery-ui-datepicker', 'jquery-ui-slider' ), '1.5.0', true );
24
  * @var array
25
  */
26
  static $time_format_translation = array(
27
+ 'H' => 'G', 'HH' => 'H', 'h' => 'g', 'hh' => 'h',
28
  'mm' => 'i', 'ss' => 's', 'l' => 'u', 'tt' => 'a', 'TT' => 'A',
29
  );
30
 
39
  wp_register_style( 'jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17' );
40
  wp_register_style( 'jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17' );
41
  wp_register_style( 'jquery-ui-datepicker', "{$url}/jquery.ui.datepicker.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
42
+ wp_register_style( 'wp-datepicker', RWMB_CSS_URL ."datepicker.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
43
  wp_register_style( 'jquery-ui-slider', "{$url}/jquery.ui.slider.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
44
+ wp_enqueue_style( 'jquery-ui-timepicker', "{$url}/jquery-ui-timepicker-addon.min.css", array( 'jquery-ui-datepicker', 'jquery-ui-slider', 'wp-datepicker' ), '1.5.0' );
45
 
46
  $url = RWMB_JS_URL . 'jqueryui';
47
  wp_register_script( 'jquery-ui-timepicker', "{$url}/jquery-ui-timepicker-addon.min.js", array( 'jquery-ui-datepicker', 'jquery-ui-slider' ), '1.5.0', true );
inc/fields/divider.php CHANGED
@@ -26,7 +26,8 @@ if ( ! class_exists( 'RWMB_Divider_Field' ) )
26
  */
27
  static function begin_html( $meta, $field )
28
  {
29
- return '<hr>';
 
30
  }
31
 
32
  /**
26
  */
27
  static function begin_html( $meta, $field )
28
  {
29
+ $attributes = empty( $field['id'] ) ? '' : " id='{$field['id']}'";
30
+ return "<hr$attributes>";
31
  }
32
 
33
  /**
inc/fields/heading.php CHANGED
@@ -26,7 +26,8 @@ if ( ! class_exists( 'RWMB_Heading_Field' ) )
26
  */
27
  static function begin_html( $meta, $field )
28
  {
29
- return sprintf( '<h4>%s</h4>', $field['name'] );
 
30
  }
31
 
32
  /**
26
  */
27
  static function begin_html( $meta, $field )
28
  {
29
+ $attributes = empty( $field['id'] ) ? '' : " id='{$field['id']}'";
30
+ return sprintf( '<h4%s>%s</h4>', $attributes, $field['name'] );
31
  }
32
 
33
  /**
inc/fields/hidden.php CHANGED
@@ -17,10 +17,10 @@ if ( ! class_exists( 'RWMB_Hidden_Field' ) )
17
  static function html( $meta, $field )
18
  {
19
  return sprintf(
20
- '<input type="hidden" class="rwmb-hidden" name="%s" id="%s" value="%s" />',
21
  $field['field_name'],
22
  $field['id'],
23
- $meta
24
  );
25
  }
26
  }
17
  static function html( $meta, $field )
18
  {
19
  return sprintf(
20
+ '<input type="hidden" class="rwmb-hidden" name="%s" id="%s" value="%s">',
21
  $field['field_name'],
22
  $field['id'],
23
+ $field['std']
24
  );
25
  }
26
  }
inc/helpers.php CHANGED
@@ -60,6 +60,8 @@ if ( ! class_exists( 'RWMB_Helper' ) )
60
  'type' => 'text',
61
  'multiple' => false,
62
  ) );
 
 
63
 
64
  // Always set 'multiple' true for following field types
65
  if ( in_array( $args['type'], array( 'checkbox_list', 'file', 'file_advanced', 'image', 'image_advanced', 'plupload_image', 'thickbox_image' ) ) )
@@ -137,6 +139,10 @@ if ( ! class_exists( 'RWMB_Helper' ) )
137
  );
138
  $meta = RWMB_Map_Field::the_value( $field, $args, $post_id );
139
  }
 
 
 
 
140
  return apply_filters( 'rwmb_meta', $meta, $key, $args, $post_id );
141
  }
142
  }
60
  'type' => 'text',
61
  'multiple' => false,
62
  ) );
63
+
64
+
65
 
66
  // Always set 'multiple' true for following field types
67
  if ( in_array( $args['type'], array( 'checkbox_list', 'file', 'file_advanced', 'image', 'image_advanced', 'plupload_image', 'thickbox_image' ) ) )
139
  );
140
  $meta = RWMB_Map_Field::the_value( $field, $args, $post_id );
141
  }
142
+ elseif ( 'oembed' == $args['type'] )
143
+ {
144
+ $meta = ( $embed = @wp_oembed_get( $meta ) ) ? $embed : $meta;
145
+ }
146
  return apply_filters( 'rwmb_meta', $meta, $key, $args, $post_id );
147
  }
148
  }
inc/meta-box.php CHANGED
@@ -86,13 +86,21 @@ if ( ! class_exists( 'RW_Meta_Box' ) )
86
  // Hide meta box if it's set 'default_hidden'
87
  add_filter( 'default_hidden_meta_boxes', array( $this, 'hide' ), 10, 2 );
88
 
89
- // Save post meta
90
- add_action( 'save_post', array( $this, 'save_post' ) );
91
-
92
- // Attachment uses other hooks
93
- // @see wp_update_post(), wp_insert_attachment()
94
- add_action( 'edit_attachment', array( $this, 'save_post' ) );
95
- add_action( 'add_attachment', array( $this, 'save_post' ) );
 
 
 
 
 
 
 
 
96
  }
97
 
98
  /**
86
  // Hide meta box if it's set 'default_hidden'
87
  add_filter( 'default_hidden_meta_boxes', array( $this, 'hide' ), 10, 2 );
88
 
89
+ // Save post meta
90
+ foreach( $this->meta_box['post_types'] as $post_type )
91
+ {
92
+ if( 'attachment' === $post_type )
93
+ {
94
+ // Attachment uses other hooks
95
+ // @see wp_update_post(), wp_insert_attachment()
96
+ add_action( 'edit_attachment', array( $this, 'save_post' ) );
97
+ add_action( 'add_attachment', array( $this, 'save_post' ) );
98
+ }
99
+ else
100
+ {
101
+ add_action( "save_post_{$post_type}", array( $this, 'save_post' ) );
102
+ }
103
+ }
104
  }
105
 
106
  /**
js/clone.js CHANGED
@@ -1,7 +1,90 @@
 
 
1
  jQuery( function ( $ )
2
  {
3
  'use strict';
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  /**
6
  * Clone fields
7
  * @param $container A div container which has all fields
@@ -16,77 +99,23 @@ jQuery( function ( $ )
16
  $clone.insertAfter( $clone_last );
17
  $input = $clone.find( ':input[class|="rwmb"]' );
18
 
19
- // Increment each field type
20
  $input.each( function ()
21
  {
22
- var $this = $( this );
23
-
24
- if ( $this.attr( 'type' ) === 'radio' || $this.attr( 'type' ) === 'checkbox' )
25
  {
26
  // Reset 'checked' attribute
27
- $this.removeAttr( 'checked' );
28
  }
29
  else
30
  {
31
  // Reset value
32
- $this.val( '' );
33
- }
34
-
35
- // Get the field name, and increment
36
- // Not all fields require id, such as 'autocomplete'
37
- var name = $this.attr( 'name' );
38
- if ( name )
39
- {
40
- name = name.replace( /\[(\d+)\]/, function ( match, p1 )
41
- {
42
- return '[' + ( parseInt( p1, 10 ) + 1 ) + ']';
43
- } );
44
-
45
- // Update the "name" attribute
46
- $this.attr( 'name', name );
47
- }
48
-
49
- // Get the field id, and increment
50
- // Not all fields require id, such as 'radio', 'checkbox_list'
51
- var id = $this.attr( 'id' );
52
- if ( id )
53
- {
54
- if ( /_(\d+)/.test( id ) )
55
- {
56
- id = id.replace( /_(\d+)/, function ( match, p1 )
57
- {
58
- return '_' + ( parseInt( p1, 10 ) + 1 );
59
- } );
60
- }
61
- else
62
- {
63
- id += '_1';
64
- }
65
-
66
- // Update the "id" attribute
67
- $this.attr( 'id', id );
68
- }
69
-
70
- // Update the address_button "value" attribute
71
- var $address_button = $clone.find( '.rwmb-map-goto-address-button' );
72
- if ( $address_button )
73
- {
74
- var value = $address_button.attr( 'value' );
75
- if ( /_(\d+)/.test( value ) )
76
- {
77
- value = value.replace( /_(\d+)/, function ( match, p1 )
78
- {
79
- return '_' + ( parseInt( p1, 10 ) + 1 );
80
- } );
81
- }
82
- else
83
- {
84
- value += '_1';
85
- }
86
- $address_button.attr( 'value', value );
87
  }
88
  } );
89
 
 
 
90
  // Toggle remove buttons
91
  toggleRemoveButtons( $input );
92
 
@@ -97,50 +126,31 @@ jQuery( function ( $ )
97
  /**
98
  * Hide remove buttons when there's only 1 of them
99
  *
100
- * @param $el jQuery element. If not supplied, the function will applies for all fields
101
  *
102
  * @return void
103
  */
104
- function toggleRemoveButtons( $el )
105
  {
106
- var $button;
107
- $el = $el || $( '.rwmb-field' );
108
- $el.each( function ()
109
- {
110
- $button = $( this ).find( '.remove-clone' );
111
- if ( $button.length < 2 )
112
- {
113
- $button.hide();
114
- }
115
- else
116
- {
117
- $button.show();
118
- }
119
- } );
120
  }
121
 
122
  /**
123
  * Toggle add button
124
  * Used with [data-max-clone] attribute. When max clone is reached, the add button is hid and vice versa
125
  *
126
- * @param $input jQuery element of input div
127
  *
128
  * @return void
129
  */
130
- function toggleAddButton( $input )
131
  {
132
- var $button = $input.find( '.add-clone' ),
133
- maxClone = parseInt( $input.data( 'max-clone' ) ),
134
- numClone = $input.find( '.rwmb-clone' ).length;
135
 
136
- if ( numClone == maxClone )
137
- {
138
- $button.hide();
139
- }
140
- else
141
- {
142
- $button.show();
143
- }
144
  }
145
 
146
  /**
@@ -154,11 +164,11 @@ jQuery( function ( $ )
154
  $clone_last = $container.find( '.rwmb-clone:last' ),
155
  $clone = $( '<div />' ).addClass( 'rwmb-clone' ),
156
  field_name = $clone_last.find( 'textarea.wp-editor-area' ).attr( 'name' ),
157
- field_id = field_name.replace( /\[(\d+)\]/, '' );
158
 
159
  //Create some global vars
160
  var new_index = 0;
161
- var new_name = field_name.replace( /\[(\d+)\]/, function ( match, p1 )
162
  {
163
  new_index = ( parseInt( p1, 10 ) + 1 );
164
  return '[' + new_index + ']';
@@ -179,13 +189,13 @@ jQuery( function ( $ )
179
  $clone.insertAfter( $clone_last );
180
 
181
  //Replace ID of field with new ID
182
- var new_id = cloned_editor.attr( 'id' ).replace( /\[(\d+)\]/, '[' + new_index + ']' );
183
  cloned_editor.attr( 'id', new_id );
184
 
185
  //Replace all IDs within cloned field
186
  cloned_editor.find( '[id*="' + field_id + '"]' ).each( function ()
187
  {
188
- var id = $( this ).attr( 'id' ).replace( /\[(\d+)\]/, '[' + new_index + ']' );
189
  $( this ).attr( 'id', id );
190
  } );
191
 
@@ -238,48 +248,62 @@ jQuery( function ( $ )
238
 
239
  }
240
 
241
- // Add more clones
242
- $( '#poststuff' ).on( 'click', '.add-clone', function ( e )
243
- {
244
- e.preventDefault();
245
-
246
- var $input = $( this ).closest( '.rwmb-input' );
247
-
248
- if ( $( this ).closest( '.rwmb-field' ).hasClass( 'rwmb-wysiwyg-wrapper' ) )
249
- {
250
- cloneWYSIWYG( $input );
251
- }
252
- else
253
  {
254
- clone( $input );
255
- }
256
 
257
- toggleRemoveButtons( $input );
258
- toggleAddButton( $input );
259
- } )
260
- // Remove clones
261
- .on( 'click', '.remove-clone', function ( e )
262
- {
263
- e.preventDefault();
264
 
265
- var $this = $( this ),
266
- $input = $this.closest( '.rwmb-input' );
 
 
 
 
 
 
 
 
267
 
268
- // Remove clone only if there are 2 or more of them
269
- if ( $input.find( '.rwmb-clone' ).length < 2 )
 
 
 
270
  {
271
- return;
272
- }
273
 
274
- $this.parent().remove();
 
275
 
276
- toggleRemoveButtons( $input );
277
- toggleAddButton( $input )
278
- } );
 
 
279
 
280
- toggleRemoveButtons();
 
 
 
 
281
 
282
- $( '.rwmb-input' ).sortable( {
283
- handle: '.rwmb-clone-icon'
 
 
 
 
 
 
 
 
 
 
 
 
 
284
  } );
285
  } );
1
+ /* global jQuery, rwmb_cloneable_editors */
2
+
3
  jQuery( function ( $ )
4
  {
5
  'use strict';
6
 
7
+ // Object holds all methods related to fields' index when clone
8
+ var cloneIndex = {
9
+ /**
10
+ * Reset index for fields in .rwmb-clone
11
+ * Must be done when add/remove or sort clone
12
+ * @param $container A div container which has all fields
13
+ */
14
+ reset : function ( $container )
15
+ {
16
+ var index = 0;
17
+ $container.find( '.rwmb-clone' ).each( function ()
18
+ {
19
+ cloneIndex.set( $( this ), index++ );
20
+ } );
21
+ },
22
+ /**
23
+ * Set index for fields in a .rwmb-clone
24
+ * @param $clone .rwmb-clone element
25
+ * @param index Index value
26
+ */
27
+ set : function ( $clone, index )
28
+ {
29
+ $clone.find( ':input[class|="rwmb"]' ).each( function ()
30
+ {
31
+ var $field = $( this );
32
+
33
+ // Name attribute
34
+ var name = $field.attr( 'name' );
35
+ if ( name )
36
+ {
37
+ $field.attr( 'name', cloneIndex.replace( index, name, '[', ']', false ) );
38
+ }
39
+
40
+ // ID attribute
41
+ var id = $field.attr( 'id' );
42
+ if ( id )
43
+ {
44
+ $field.attr( 'id', cloneIndex.replace( index, id, '_' ) );
45
+ }
46
+ } );
47
+
48
+ // Address button's value attribute
49
+ var $address = $clone.find( '.rwmb-map-goto-address-button' );
50
+ if ( $address.length )
51
+ {
52
+ var value = $address.attr( 'value' );
53
+ $address.attr( 'value', cloneIndex.replace( index, value, '_' ) );
54
+ }
55
+ },
56
+ /**
57
+ * Replace an attribute of a field with updated index
58
+ * @param index New index value
59
+ * @param value Attribute value
60
+ * @param before String before returned value
61
+ * @param after String after returned value
62
+ * @param alternative Check if attribute does not contain any integer, will reset the attribute?
63
+ * @return string
64
+ */
65
+ replace : function ( index, value, before, after, alternative )
66
+ {
67
+ before = before || '';
68
+ after = after || '';
69
+ alternative = alternative || true;
70
+
71
+ var regex = new RegExp( cloneIndex.escapeRegex( before ) + '(\\d+)' + cloneIndex.escapeRegex( after ) ),
72
+ newValue = before + index + after;
73
+
74
+ return regex.test( value ) ? value.replace( regex, newValue ) : (alternative ? value + newValue : value );
75
+ },
76
+ /**
77
+ * Helper function to escape string in regular expression
78
+ * @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
79
+ * @param string
80
+ * @return string
81
+ */
82
+ escapeRegex: function ( string )
83
+ {
84
+ return string.replace( /[.*+?^${}()|[\]\\]/g, "\\$&" );
85
+ }
86
+ };
87
+
88
  /**
89
  * Clone fields
90
  * @param $container A div container which has all fields
99
  $clone.insertAfter( $clone_last );
100
  $input = $clone.find( ':input[class|="rwmb"]' );
101
 
 
102
  $input.each( function ()
103
  {
104
+ var $field = $( this );
105
+ if ( $field.attr( 'type' ) === 'radio' || $field.attr( 'type' ) === 'checkbox' )
 
106
  {
107
  // Reset 'checked' attribute
108
+ $field.removeAttr( 'checked' );
109
  }
110
  else
111
  {
112
  // Reset value
113
+ $field.val( '' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  }
115
  } );
116
 
117
+ cloneIndex.reset( $container );
118
+
119
  // Toggle remove buttons
120
  toggleRemoveButtons( $input );
121
 
126
  /**
127
  * Hide remove buttons when there's only 1 of them
128
  *
129
+ * @param $container .rwmb-input container
130
  *
131
  * @return void
132
  */
133
+ function toggleRemoveButtons( $container )
134
  {
135
+ var $button = $container.find( '.remove-clone' );
136
+ $button[$button.length < 2 ? 'hide' : 'show']();
 
 
 
 
 
 
 
 
 
 
 
 
137
  }
138
 
139
  /**
140
  * Toggle add button
141
  * Used with [data-max-clone] attribute. When max clone is reached, the add button is hid and vice versa
142
  *
143
+ * @param $container .rwmb-input container
144
  *
145
  * @return void
146
  */
147
+ function toggleAddButton( $container )
148
  {
149
+ var $button = $container.find( '.add-clone' ),
150
+ maxClone = parseInt( $container.data( 'max-clone' ) ),
151
+ numClone = $container.find( '.rwmb-clone' ).length;
152
 
153
+ $button[isNaN( maxClone ) || (maxClone && numClone < maxClone) ? 'show' : 'hide']();
 
 
 
 
 
 
 
154
  }
155
 
156
  /**
164
  $clone_last = $container.find( '.rwmb-clone:last' ),
165
  $clone = $( '<div />' ).addClass( 'rwmb-clone' ),
166
  field_name = $clone_last.find( 'textarea.wp-editor-area' ).attr( 'name' ),
167
+ field_id = field_name.replace( /\[(\d+)]/, '' );
168
 
169
  //Create some global vars
170
  var new_index = 0;
171
+ var new_name = field_name.replace( /\[(\d+)]/, function ( match, p1 )
172
  {
173
  new_index = ( parseInt( p1, 10 ) + 1 );
174
  return '[' + new_index + ']';
189
  $clone.insertAfter( $clone_last );
190
 
191
  //Replace ID of field with new ID
192
+ var new_id = cloned_editor.attr( 'id' ).replace( /\[(\d+)]/, '[' + new_index + ']' );
193
  cloned_editor.attr( 'id', new_id );
194
 
195
  //Replace all IDs within cloned field
196
  cloned_editor.find( '[id*="' + field_id + '"]' ).each( function ()
197
  {
198
+ var id = $( this ).attr( 'id' ).replace( /\[(\d+)]/, '[' + new_index + ']' );
199
  $( this ).attr( 'id', id );
200
  } );
201
 
248
 
249
  }
250
 
251
+ $( '#poststuff' )
252
+ // Add clones
253
+ .on( 'click', '.add-clone', function ( e )
 
 
 
 
 
 
 
 
 
254
  {
255
+ e.preventDefault();
 
256
 
257
+ var $container = $( this ).closest( '.rwmb-input' );
 
 
 
 
 
 
258
 
259
+ cloneIndex.reset( $container );
260
+
261
+ if ( $( this ).closest( '.rwmb-field' ).hasClass( 'rwmb-wysiwyg-wrapper' ) )
262
+ {
263
+ cloneWYSIWYG( $container );
264
+ }
265
+ else
266
+ {
267
+ clone( $container );
268
+ }
269
 
270
+ toggleRemoveButtons( $container );
271
+ toggleAddButton( $container );
272
+ } )
273
+ // Remove clones
274
+ .on( 'click', '.remove-clone', function ( e )
275
  {
276
+ e.preventDefault();
 
277
 
278
+ var $this = $( this ),
279
+ $container = $this.closest( '.rwmb-input' );
280
 
281
+ // Remove clone only if there are 2 or more of them
282
+ if ( $container.find( '.rwmb-clone' ).length < 2 )
283
+ {
284
+ return;
285
+ }
286
 
287
+ $this.parent().remove();
288
+ cloneIndex.reset( $container );
289
+ toggleRemoveButtons( $container );
290
+ toggleAddButton( $container )
291
+ } );
292
 
293
+ $( '.rwmb-input' ).each( function ()
294
+ {
295
+ var $container = $( this );
296
+ cloneIndex.reset( $container );
297
+ toggleRemoveButtons( $container );
298
+ toggleAddButton( $container );
299
+
300
+ $container.sortable( {
301
+ handle : '.rwmb-clone-icon',
302
+ placeholder: ' rwmb-clone rwmb-clone-placeholder',
303
+ update : function ()
304
+ {
305
+ cloneIndex.reset( $container );
306
+ }
307
+ } );
308
  } );
309
  } );
meta-box.php CHANGED
@@ -3,17 +3,19 @@
3
  Plugin Name: Meta Box
4
  Plugin URI: http://metabox.io
5
  Description: Create meta box for editing pages in WordPress. Compatible with custom post types since WP 3.0
6
- Version: 4.5.6
7
  Author: Rilwis
8
  Author URI: http://www.deluxeblogtips.com
9
  License: GPL2+
 
 
10
  */
11
 
12
  // Prevent loading this file directly
13
  defined( 'ABSPATH' ) || exit;
14
 
15
  // Script version, used to add version for scripts and styles
16
- define( 'RWMB_VER', '4.5.6' );
17
 
18
  // Define plugin URLs, for fast enqueuing scripts and styles
19
  if ( ! defined( 'RWMB_URL' ) )
3
  Plugin Name: Meta Box
4
  Plugin URI: http://metabox.io
5
  Description: Create meta box for editing pages in WordPress. Compatible with custom post types since WP 3.0
6
+ Version: 4.5.7
7
  Author: Rilwis
8
  Author URI: http://www.deluxeblogtips.com
9
  License: GPL2+
10
+ Text Domain: meta-box
11
+ Domain Path: /lang/
12
  */
13
 
14
  // Prevent loading this file directly
15
  defined( 'ABSPATH' ) || exit;
16
 
17
  // Script version, used to add version for scripts and styles
18
+ define( 'RWMB_VER', '4.5.7' );
19
 
20
  // Define plugin URLs, for fast enqueuing scripts and styles
21
  if ( ! defined( 'RWMB_URL' ) )
readme.txt CHANGED
@@ -1,53 +1,59 @@
1
  === Meta Box ===
2
- Contributors: rilwis, fitwp, f-j-kaiser, Omnicia, funkedgeek, PerWiklander, ruanmer
3
  Donate link: http://www.deluxeblogtips.com/donate
4
- Tags: meta-box, custom-fields, custom-field, meta, meta-boxes
5
  Requires at least: 3.5
6
- Tested up to: 4.2.3
7
- Stable tag: 4.5.6
8
  License: GPLv2 or later
9
 
10
- Meta Box plugin is a complete tool to create meta box and custom fields in WordPress: lightweight, powerful and easy-to-use.
11
 
12
  == Description ==
13
 
14
- Meta Box plugin provides powerful API to implement custom meta boxes and custom fields in editing pages (add new/edit post) in WordPress. It works with any custom post type and supports lots of field types.
15
 
16
  ### Features
17
 
18
  * Easily register multiple custom meta boxes for posts, pages or custom post types
19
- * Supports a lot of [field types](http://metabox.io/docs/define-fields/)
 
20
  * Has built-in hooks which allow you to change the appearance and behavior of meta boxes
21
- * Easily integrate with themes
 
22
 
23
  ### Documentation
24
 
25
- - [Getting Started](http://metabox.io/docs/getting-started/)
26
- - [Register Meta Boxes](http://metabox.io/docs/registering-meta-boxes/)
27
- - [Define Fields](http://metabox.io/docs/define-fields/)
28
- - [Get Meta Value](http://metabox.io/docs/get-meta-value/)
29
 
30
- See more documentation [here](http://metabox.io/docs/).
31
 
32
- ### Premium Extensions
33
 
34
- - [Meta Box Group](http://metabox.io/plugins/meta-box-group/): Organize custom fields in groups for better appearance and structure. Groups can be cloned.
35
- - [Meta Box Builder](http://metabox.io/plugins/meta-box-builder/): Drag and Drop to create Meta Boxes and Custom Fields has never been easier.
36
- - [Meta Box Template](http://metabox.io/plugins/meta-box-template/): Define custom meta boxes and custom fields easier with templates.
37
- - [Meta Box Tooltip](http://metabox.io/plugins/meta-box-tooltip/): Display help information for fields using beautiful tooltips.
38
- - [Meta Box Show Hide (Javascript)](http://metabox.io/plugins/meta-box-show-hide-javascript/): Toggle meta boxes by page template, post format, taxonomy (including category) via Javascript.
39
- - [Meta Box Tabs](http://metabox.io/plugins/meta-box-tabs/): Create tabs for meta boxes easily. Support 3 WordPress-native tab styles and tab icon.
40
- - [Meta Box Columns](http://metabox.io/plugins/meta-box-columns/): Display fields more beautiful by putting them into 12-columns grid.
41
- - [Meta Box Include Exclude](http://metabox.io/plugins/meta-box-include-exclude/): Show/hide meta boxes by ID, page template, taxonomy or custom function.
 
 
 
 
42
 
43
- See all premium extensions [here](http://metabox.io/plugins/).
44
 
45
  ### Plugin Links
46
 
47
- - [Project Page](http://metabox.io/meta-box/)
48
- - [Documentation](http://metabox.io/docs/)
49
  - [Report Bugs/Issues](https://github.com/rilwis/meta-box/issues)
50
- - [Premium Extensions](http://metabox.io)
51
 
52
  == Installation ==
53
 
@@ -55,7 +61,7 @@ See all premium extensions [here](http://metabox.io/plugins/).
55
  1. Upload `meta-box` to the `/wp-content/plugins/` directory
56
  1. Activate the plugin through the 'Plugins' menu in WordPress
57
 
58
- To getting started with the plugin API, please read [this tutorial](http://metabox.io/docs/getting-started/).
59
 
60
  == Frequently Asked Questions ==
61
 
@@ -69,6 +75,15 @@ To getting started with the plugin API, please read [this tutorial](http://metab
69
 
70
  == Changelog ==
71
 
 
 
 
 
 
 
 
 
 
72
  = 4.5.6 =
73
  * Fix: Warning for timestamp for datetime field.
74
  * Fix: z-index for color picker.
1
  === Meta Box ===
2
+ Contributors: rilwis, fitwp, f-j-kaiser, funkatronic, PerWiklander, ruanmer, Omnicia
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.3.1
7
+ Stable tag: 4.5.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.
11
 
12
  == Description ==
13
 
14
+ **Meta Box plugin provides powerful API to implement custom meta boxes and custom fields for any post type in WordPress**. It extends the default WordPress functionality to add more flexible data to posts, pages or any custom post types which makes your website look like a professional Content Management Systems.
15
 
16
  ### Features
17
 
18
  * Easily register multiple custom meta boxes for posts, pages or custom post types
19
+ * Supports more than 35 [field types](https://metabox.io/docs/define-fields/): (text, textarea, wysiwyg, image, file, post, select, checkbox, radio buttons, date time picker, taxonomy, user, oembed and more to come!)
20
+ * Uses the native WordPress meta data storage and functions for ease of use and fast processing
21
  * Has built-in hooks which allow you to change the appearance and behavior of meta boxes
22
+ * Easily integrate with themes and plugins
23
+ * Compatible with WPML multilingual plugin
24
 
25
  ### Documentation
26
 
27
+ - [Getting Started](https://metabox.io/docs/getting-started/)
28
+ - [Register Meta Boxes](https://metabox.io/docs/registering-meta-boxes/)
29
+ - [Define Fields](https://metabox.io/docs/define-fields/)
30
+ - [Get Meta Value](https://metabox.io/docs/get-meta-value/)
31
 
32
+ See more documentation [here](https://metabox.io/docs/).
33
 
34
+ ### Extensions
35
 
36
+ - [MB Custom Post Type](https://wordpress.org/plugins/mb-custom-post-type/): Create and manage custom post types easily in WordPress with an easy-to-use interface.
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.
40
+ - [Meta Box Group](https://metabox.io/plugins/meta-box-group/): Create repeatable groups of custom fields for better appearance and structure.
41
+ - [Meta Box Builder](https://metabox.io/plugins/meta-box-builder/): Create custom meta boxes and custom fields in WordPress using the drag-and-drop interface.
42
+ - [Meta Box Template](https://metabox.io/plugins/meta-box-template/): Define custom meta boxes and custom fields easier with templates.
43
+ - [Meta Box Tooltip](https://metabox.io/plugins/meta-box-tooltip/): Display help information for fields using beautiful tooltips.
44
+ - [Meta Box Show Hide (Javascript)](https://metabox.io/plugins/meta-box-show-hide-javascript/): Toggle meta boxes by page template, post format, taxonomy (including category) via Javascript.
45
+ - [Meta Box Tabs](https://metabox.io/plugins/meta-box-tabs/): Create tabs for meta boxes easily. Support 3 WordPress-native tab styles and tab icon.
46
+ - [Meta Box Columns](https://metabox.io/plugins/meta-box-columns/): Display fields more beautiful by putting them into 12-columns grid.
47
+ - [Meta Box Include Exclude](https://metabox.io/plugins/meta-box-include-exclude/): Show/hide meta boxes by ID, page template, taxonomy or custom function.
48
 
49
+ See all extensions [here](https://metabox.io/plugins/).
50
 
51
  ### Plugin Links
52
 
53
+ - [Project Page](https://metabox.io)
54
+ - [Documentation](https://metabox.io/docs/)
55
  - [Report Bugs/Issues](https://github.com/rilwis/meta-box/issues)
56
+ - [Premium Extensions](https://metabox.io)
57
 
58
  == Installation ==
59
 
61
  1. Upload `meta-box` to the `/wp-content/plugins/` directory
62
  1. Activate the plugin through the 'Plugins' menu in WordPress
63
 
64
+ To getting started with the plugin API, please read [this tutorial](https://metabox.io/docs/getting-started/).
65
 
66
  == Frequently Asked Questions ==
67
 
75
 
76
  == Changelog ==
77
 
78
+ = 4.5.7 =
79
+ * Fix: Always set std as value for hidden field
80
+ * Fix: `rwmb_meta` now can display rich content from `oembed` field
81
+ * Fix: Wrong format for `datetime` field
82
+ * Fix: Check and reset clone index when add/remove/sort clones
83
+ * Improvement: Optionally display ID attribute for heading and divider
84
+ * Improvement: Adding new style to date field to match WordPress style
85
+ * Improvement: Change saving hooks to specific post types to prevent saving images to wrong post
86
+
87
  = 4.5.6 =
88
  * Fix: Warning for timestamp for datetime field.
89
  * Fix: z-index for color picker.