Custom Field Template - Version 0.4.2

Version Description

Download this release

Release Info

Developer Hiroaki Miyashita
Plugin Icon 128x128 Custom Field Template
Version 0.4.2
Comparing to
See all releases

Code changes from version 0.4.1 to 0.4.2

Files changed (2) hide show
  1. custom-field-template.php +5 -5
  2. readme.txt +2 -2
custom-field-template.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Custom Field Template
4
  Plugin URI: http://wordpressgogo.com/development/custom-field-template.html
5
  Description: This plugin adds the default custom fields on the Write Post/Page.
6
  Author: Hiroaki Miyashita
7
- Version: 0.4.1
8
  Author URI: http://wordpressgogo.com/
9
  */
10
 
@@ -255,7 +255,7 @@ mediaButton = true';
255
 
256
  if ( !$value ) $value = "true";
257
 
258
- if( isset( $_REQUEST[ 'post' ] ) ) {
259
  $selected = get_post_meta( $_REQUEST[ 'post' ], $title );
260
  if ( $selected ) {
261
  if ( in_array($value, $selected) ) $checked = 'checked="checked"';
@@ -283,14 +283,14 @@ mediaButton = true';
283
  $title = $name;
284
  $name = $this->sanitize_name( $name );
285
 
286
- if( isset( $_REQUEST[ 'post' ] ) ) {
287
  $selected = get_post_meta( $_REQUEST[ 'post' ], $title );
288
  $selected = $selected[ $sid ];
289
  }
290
  else {
291
  $selected = $default;
292
  }
293
-
294
  if( $hideKey == true ) $hide = ' style="visibility: hidden;"';
295
 
296
  $out .=
@@ -315,7 +315,7 @@ mediaButton = true';
315
  $title = $name;
316
  $name = $this->sanitize_name( $name );
317
 
318
- if( isset( $_REQUEST[ 'post' ] ) ) {
319
  $selected = get_post_meta( $_REQUEST[ 'post' ], $title );
320
  if ( $selected ) {
321
  $selected = $selected[ $sid ];
4
  Plugin URI: http://wordpressgogo.com/development/custom-field-template.html
5
  Description: This plugin adds the default custom fields on the Write Post/Page.
6
  Author: Hiroaki Miyashita
7
+ Version: 0.4.2
8
  Author URI: http://wordpressgogo.com/
9
  */
10
 
255
 
256
  if ( !$value ) $value = "true";
257
 
258
+ if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 ) {
259
  $selected = get_post_meta( $_REQUEST[ 'post' ], $title );
260
  if ( $selected ) {
261
  if ( in_array($value, $selected) ) $checked = 'checked="checked"';
283
  $title = $name;
284
  $name = $this->sanitize_name( $name );
285
 
286
+ if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 ) {
287
  $selected = get_post_meta( $_REQUEST[ 'post' ], $title );
288
  $selected = $selected[ $sid ];
289
  }
290
  else {
291
  $selected = $default;
292
  }
293
+
294
  if( $hideKey == true ) $hide = ' style="visibility: hidden;"';
295
 
296
  $out .=
315
  $title = $name;
316
  $name = $this->sanitize_name( $name );
317
 
318
+ if( isset( $_REQUEST[ 'post' ] ) && $_REQUEST[ 'post' ] > 0 ) {
319
  $selected = get_post_meta( $_REQUEST[ 'post' ], $title );
320
  if ( $selected ) {
321
  $selected = $selected[ $sid ];
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Custom Field Template ===
2
  Contributors: Hiroaki Miyashita
3
  Donate link: http://wordpressgogo.com/development/custom-field-template.html
4
- Tags: custom, fields, field, template
5
  Requires at least: 2.1
6
  Tested up to: 2.6.2
7
- Stable tag: 0.4.1
8
 
9
  This plugin adds the default custom fields on the Write Post/Page.
10
 
1
  === Custom Field Template ===
2
  Contributors: Hiroaki Miyashita
3
  Donate link: http://wordpressgogo.com/development/custom-field-template.html
4
+ Tags: custom, fields, field, template, meta
5
  Requires at least: 2.1
6
  Tested up to: 2.6.2
7
+ Stable tag: 0.4.2
8
 
9
  This plugin adds the default custom fields on the Write Post/Page.
10