Meta Box - Version 4.3.1

Version Description

  • Bug fix: fatal error if ASP open tag is allowed in php.ini
Download this release

Release Info

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

Code changes from version 4.3 to 4.3.1

demo/demo.php CHANGED
@@ -144,6 +144,7 @@ $meta_boxes[] = array(
144
  array(
145
  'type' => 'heading',
146
  'name' => __( 'Heading', 'rwmb' ),
 
147
  ),
148
  // SLIDER
149
  array(
@@ -315,6 +316,7 @@ $meta_boxes[] = array(
315
  // DIVIDER
316
  array(
317
  'type' => 'divider',
 
318
  ),
319
  // FILE UPLOAD
320
  array(
144
  array(
145
  'type' => 'heading',
146
  'name' => __( 'Heading', 'rwmb' ),
147
+ 'id' => 'fake_id', // Not used but needed for plugin
148
  ),
149
  // SLIDER
150
  array(
316
  // DIVIDER
317
  array(
318
  'type' => 'divider',
319
+ 'id' => 'fake_divider_id', // Not used, but needed
320
  ),
321
  // FILE UPLOAD
322
  array(
inc/fields/file-advanced.php CHANGED
@@ -103,17 +103,17 @@ if ( ! class_exists( 'RWMB_File_Advanced_Field' ) )
103
  $i18n_edit = apply_filters( 'rwmb_file_edit_string', _x( 'Edit', 'file upload', 'rwmb' ) );
104
  ?>
105
  <script id="tmpl-rwmb-file-advanced" type="text/html">
106
- <% _.each( attachments, function( attachment ) { %>
107
  <li>
108
- <div class="rwmb-icon"><img src="<% if ( attachment.type == 'image' ){ %><%= attachment.sizes.thumbnail.url %><% } else { %><%= attachment.icon %><% } %>"></div>
109
  <div class="rwmb-info">
110
- <a href="<%= attachment.url %>" target="_blank"><%= attachment.title %></a>
111
- <p><%= attachment.mime %></p>
112
- <a title="<?php echo $i18n_edit; ?>" href="<%= attachment.editLink %>" target="_blank"><?php echo $i18n_edit; ?></a> |
113
- <a title="<?php echo $i18n_delete; ?>" class="rwmb-delete-file" href="#" data-attachment_id="<%= attachment.id %>"><?php echo $i18n_delete; ?></a>
114
  </div>
115
  </li>
116
- <% } );%>
117
  </script>
118
  <?php
119
  }
103
  $i18n_edit = apply_filters( 'rwmb_file_edit_string', _x( 'Edit', 'file upload', 'rwmb' ) );
104
  ?>
105
  <script id="tmpl-rwmb-file-advanced" type="text/html">
106
+ <# _.each( attachments, function( attachment ) { #>
107
  <li>
108
+ <div class="rwmb-icon"><img src="<# if ( attachment.type == 'image' ){ #>{{{ attachment.sizes.thumbnail.url }}}<# } else { #>{{{ attachment.icon }}}<# } #>"></div>
109
  <div class="rwmb-info">
110
+ <a href="{{{ attachment.url }}}" target="_blank">{{{ attachment.title }}}</a>
111
+ <p>{{{ attachment.mime }}}</p>
112
+ <a title="<?php echo $i18n_edit; ?>" href="{{{ attachment.editLink }}}" target="_blank"><?php echo $i18n_edit; ?></a> |
113
+ <a title="<?php echo $i18n_delete; ?>" class="rwmb-delete-file" href="#" data-attachment_id="{{{ attachment.id }}}"><?php echo $i18n_delete; ?></a>
114
  </div>
115
  </li>
116
+ <# } ); #>
117
  </script>
118
  <?php
119
  }
inc/fields/image-advanced.php CHANGED
@@ -108,19 +108,19 @@ if ( ! class_exists( 'RWMB_Image_Advanced_Field' ) )
108
  $i18n_edit = apply_filters( 'rwmb_image_edit_string', _x( 'Edit', 'image upload', 'rwmb' ) );
109
  ?>
110
  <script id="tmpl-rwmb-image-advanced" type="text/html">
111
- <% _.each( attachments, function( attachment ) { %>
112
- <li id="item_<%= attachment.id %>">
113
- <% if ( attachment.sizes.hasOwnProperty( 'thumbnail' ) ) { %>
114
- <img src="<%= attachment.sizes.thumbnail.url %>">
115
- <% } else { %>
116
- <img src="<%= attachment.sizes.full.url %>">
117
- <% } %>
118
  <div class="rwmb-image-bar">
119
- <a title="<?php echo $i18n_edit; ?>" class="rwmb-edit-file" href="<%= attachment.editLink %>" target="_blank"><?php echo $i18n_edit; ?></a> |
120
- <a title="<?php echo $i18n_delete; ?>" class="rwmb-delete-file" href="#" data-attachment_id="<%= attachment.id %>">×</a>
121
  </div>
122
  </li>
123
- <% } );%>
124
  </script>
125
  <?php
126
  }
108
  $i18n_edit = apply_filters( 'rwmb_image_edit_string', _x( 'Edit', 'image upload', 'rwmb' ) );
109
  ?>
110
  <script id="tmpl-rwmb-image-advanced" type="text/html">
111
+ <# _.each( attachments, function( attachment ) { #>
112
+ <li id="item_{{{ attachment.id }}}">
113
+ <# if ( attachment.sizes.hasOwnProperty( 'thumbnail' ) ) { #>
114
+ <img src="{{{ attachment.sizes.thumbnail.url }}}">
115
+ <# } else { #>
116
+ <img src="{{{ attachment.sizes.full.url }}}">
117
+ <# } #>
118
  <div class="rwmb-image-bar">
119
+ <a title="<?php echo $i18n_edit; ?>" class="rwmb-edit-file" href="{{{ attachment.editLink }}}" target="_blank"><?php echo $i18n_edit; ?></a> |
120
+ <a title="<?php echo $i18n_delete; ?>" class="rwmb-delete-file" href="#" data-attachment_id="{{{ attachment.id }}}">×</a>
121
  </div>
122
  </li>
123
+ <# } ); #>
124
  </script>
125
  <?php
126
  }
js/file-advanced.js CHANGED
@@ -73,7 +73,11 @@ jQuery( function( $ )
73
  if ( r.success )
74
  {
75
  $fileList
76
- .append( _.template( template, { attachments: selection } ) )
 
 
 
 
77
  .trigger( 'update.rwmbFile' );
78
  }
79
  }, 'json' );
73
  if ( r.success )
74
  {
75
  $fileList
76
+ .append( _.template( template, { attachments: selection }, {
77
+ evaluate: /<#([\s\S]+?)#>/g,
78
+ interpolate: /\{\{\{([\s\S]+?)\}\}\}/g,
79
+ escape: /\{\{([^\}]+?)\}\}(?!\})/g
80
+ } ) )
81
  .trigger( 'update.rwmbFile' );
82
  }
83
  }, 'json' );
js/image-advanced.js CHANGED
@@ -73,7 +73,11 @@ jQuery( function( $ )
73
  if( r.success )
74
  {
75
  $imageList
76
- .append( _.template( template, { attachments: selection } ) )
 
 
 
 
77
  .trigger('update.rwmbFile');
78
  }
79
  }, 'json' );
73
  if( r.success )
74
  {
75
  $imageList
76
+ .append( _.template( template, { attachments: selection }, {
77
+ evaluate: /<#([\s\S]+?)#>/g,
78
+ interpolate: /\{\{\{([\s\S]+?)\}\}\}/g,
79
+ escape: /\{\{([^\}]+?)\}\}(?!\})/g
80
+ } ) )
81
  .trigger('update.rwmbFile');
82
  }
83
  }, 'json' );
meta-box.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Meta Box
4
  Plugin URI: http://www.deluxeblogtips.com/meta-box
5
  Description: Create meta box for editing pages in WordPress. Compatible with custom post types since WP 3.0
6
- Version: 4.3
7
  Author: Rilwis
8
  Author URI: http://www.deluxeblogtips.com
9
  License: GPL2+
@@ -13,7 +13,7 @@ License: GPL2+
13
  defined( 'ABSPATH' ) || exit;
14
 
15
  // Script version, used to add version for scripts and styles
16
- define( 'RWMB_VER', '4.3' );
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://www.deluxeblogtips.com/meta-box
5
  Description: Create meta box for editing pages in WordPress. Compatible with custom post types since WP 3.0
6
+ Version: 4.3.1
7
  Author: Rilwis
8
  Author URI: http://www.deluxeblogtips.com
9
  License: GPL2+
13
  defined( 'ABSPATH' ) || exit;
14
 
15
  // Script version, used to add version for scripts and styles
16
+ define( 'RWMB_VER', '4.3.1' );
17
 
18
  // Define plugin URLs, for fast enqueuing scripts and styles
19
  if ( ! defined( 'RWMB_URL' ) )
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.deluxeblogtips.com/donate
4
  Tags: meta-box, custom-fields, custom-field, meta, meta-boxes
5
  Requires at least: 3.3
6
  Tested up to: 3.5.1
7
- Stable tag: 4.3
8
 
9
  Meta Box plugin helps you easily implement multiple meta boxes in editing pages in WordPress. Works with custom post types and various field types.
10
 
@@ -71,6 +71,9 @@ To getting started with the plugin API, please read [this tutorial](http://www.d
71
 
72
  == Changelog ==
73
 
 
 
 
74
  = 4.3 =
75
  * Bug fix: show full size image after upload if thumbnail is not available
76
  * Bug fix: new added file not shown
4
  Tags: meta-box, custom-fields, custom-field, meta, meta-boxes
5
  Requires at least: 3.3
6
  Tested up to: 3.5.1
7
+ Stable tag: 4.3.1
8
 
9
  Meta Box plugin helps you easily implement multiple meta boxes in editing pages in WordPress. Works with custom post types and various field types.
10
 
71
 
72
  == Changelog ==
73
 
74
+ = 4.3.1 =
75
+ * Bug fix: fatal error if ASP open tag is allowed in php.ini
76
+
77
  = 4.3 =
78
  * Bug fix: show full size image after upload if thumbnail is not available
79
  * Bug fix: new added file not shown