Version Description
- Bugfix: strip slashes.
- Bugfix: misjudgment of Autho Hook of
the_content()
.
Download this release
Release Info
Developer | Hiroaki Miyashita |
Plugin | Custom Field Template |
Version | 1.5.7 |
Comparing to | |
See all releases |
Code changes from version 1.5.6 to 1.5.7
- custom-field-template.php +23 -6
- readme.txt +5 -1
custom-field-template.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Custom Field Template
|
|
4 |
Plugin URI: http://wpgogo.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: 1.5.
|
8 |
Author URI: http://wpgogo.com/
|
9 |
*/
|
10 |
|
@@ -13,6 +13,23 @@ This program is based on the rc:custom_field_gui plugin written by Joshua Sigar.
|
|
13 |
I appreciate your efforts, Joshua.
|
14 |
*/
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
class custom_field_template {
|
17 |
var $is_excerpt;
|
18 |
|
@@ -603,7 +620,7 @@ type = file';
|
|
603 |
endif;
|
604 |
endforeach;
|
605 |
endif;
|
606 |
-
elseif ( $
|
607 |
if ( is_category() || is_single() ) :
|
608 |
if ( $options['hook'][$i]['use_php'] ) :
|
609 |
$options['hook'][$i]['content'] = stripcslashes($options['hook'][$i]['content']);
|
@@ -616,7 +633,7 @@ type = file';
|
|
616 |
else
|
617 |
$content = $options['hook'][$i]['content'] . $content;
|
618 |
endif;
|
619 |
-
elseif ( $
|
620 |
if ( is_page() ) :
|
621 |
if ( $options['hook'][$i]['use_php'] ) :
|
622 |
$options['hook'][$i]['content'] = stripcslashes($options['hook'][$i]['content']);
|
@@ -1419,7 +1436,7 @@ jQuery(this).addClass("closed");
|
|
1419 |
|
1420 |
if ( !empty($label) && !$options['custom_field_template_replace_keys_by_labels'] && $cftnum == 0 )
|
1421 |
$out .= '<p class="label">' . stripcslashes($label) . '</p>';
|
1422 |
-
$out .= '<label for="' . $id . '" class="selectit"><input id="' . $id . '" name="' . $name . '[' . $sid . '][' . $cftnum . ']" value="' . attribute_escape(trim($value)) . '"' . $checked . ' type="checkbox"' . $class . $style . $event_output . ' /> ';
|
1423 |
if ( $valueLabel )
|
1424 |
$out .= stripcslashes(trim($valueLabel));
|
1425 |
else
|
@@ -1495,7 +1512,7 @@ jQuery(this).addClass("closed");
|
|
1495 |
$checked = ( stripcslashes(trim( $val )) == trim( $selected ) ) ? 'checked="checked"' : '';
|
1496 |
|
1497 |
$out .=
|
1498 |
-
'<label for="' . $id . '" class="selectit"><input name="' . $name . '[' . $sid . '][' . $cftnum . ']" value="' . attribute_escape(trim($val)) . '" ' . $checked . ' type="radio"' . $class . $style . $event_output . ' /> ';
|
1499 |
if ( $valueLabel[$i] )
|
1500 |
$out .= stripcslashes(trim($valueLabel[$i]));
|
1501 |
else
|
@@ -1570,7 +1587,7 @@ jQuery(this).addClass("closed");
|
|
1570 |
foreach( $values as $val ) {
|
1571 |
$checked = ( stripcslashes(trim( $val )) == trim( $selected ) ) ? 'selected="selected"' : '';
|
1572 |
|
1573 |
-
$out .= '<option value="' . attribute_escape(trim($val)) . '" ' . $checked . '>';
|
1574 |
if ( $valueLabel[$i] )
|
1575 |
$out .= stripcslashes(trim($valueLabel[$i]));
|
1576 |
else
|
4 |
Plugin URI: http://wpgogo.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: 1.5.7
|
8 |
Author URI: http://wpgogo.com/
|
9 |
*/
|
10 |
|
13 |
I appreciate your efforts, Joshua.
|
14 |
*/
|
15 |
|
16 |
+
/* Copyright 2008 -2010 Hiroaki Miyashita
|
17 |
+
|
18 |
+
This program is free software; you can redistribute it and/or modify
|
19 |
+
it under the terms of the GNU General Public License as published by
|
20 |
+
the Free Software Foundation; either version 2 of the License, or
|
21 |
+
(at your option) any later version.
|
22 |
+
|
23 |
+
This program is distributed in the hope that it will be useful,
|
24 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
25 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
26 |
+
GNU General Public License for more details.
|
27 |
+
|
28 |
+
You should have received a copy of the GNU General Public License
|
29 |
+
along with this program; if not, write to the Free Software
|
30 |
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
31 |
+
*/
|
32 |
+
|
33 |
class custom_field_template {
|
34 |
var $is_excerpt;
|
35 |
|
620 |
endif;
|
621 |
endforeach;
|
622 |
endif;
|
623 |
+
elseif ( $options['hook'][$i]['post_type']=='post' ) :
|
624 |
if ( is_category() || is_single() ) :
|
625 |
if ( $options['hook'][$i]['use_php'] ) :
|
626 |
$options['hook'][$i]['content'] = stripcslashes($options['hook'][$i]['content']);
|
633 |
else
|
634 |
$content = $options['hook'][$i]['content'] . $content;
|
635 |
endif;
|
636 |
+
elseif ( $options['hook'][$i]['post_type']=='page' ) :
|
637 |
if ( is_page() ) :
|
638 |
if ( $options['hook'][$i]['use_php'] ) :
|
639 |
$options['hook'][$i]['content'] = stripcslashes($options['hook'][$i]['content']);
|
1436 |
|
1437 |
if ( !empty($label) && !$options['custom_field_template_replace_keys_by_labels'] && $cftnum == 0 )
|
1438 |
$out .= '<p class="label">' . stripcslashes($label) . '</p>';
|
1439 |
+
$out .= '<label for="' . $id . '" class="selectit"><input id="' . $id . '" name="' . $name . '[' . $sid . '][' . $cftnum . ']" value="' . attribute_escape(stripcslashes(trim($value))) . '"' . $checked . ' type="checkbox"' . $class . $style . $event_output . ' /> ';
|
1440 |
if ( $valueLabel )
|
1441 |
$out .= stripcslashes(trim($valueLabel));
|
1442 |
else
|
1512 |
$checked = ( stripcslashes(trim( $val )) == trim( $selected ) ) ? 'checked="checked"' : '';
|
1513 |
|
1514 |
$out .=
|
1515 |
+
'<label for="' . $id . '" class="selectit"><input name="' . $name . '[' . $sid . '][' . $cftnum . ']" value="' . attribute_escape(trim(stripcslashes($val))) . '" ' . $checked . ' type="radio"' . $class . $style . $event_output . ' /> ';
|
1516 |
if ( $valueLabel[$i] )
|
1517 |
$out .= stripcslashes(trim($valueLabel[$i]));
|
1518 |
else
|
1587 |
foreach( $values as $val ) {
|
1588 |
$checked = ( stripcslashes(trim( $val )) == trim( $selected ) ) ? 'selected="selected"' : '';
|
1589 |
|
1590 |
+
$out .= '<option value="' . attribute_escape(stripcslashes(trim($val))) . '" ' . $checked . '>';
|
1591 |
if ( $valueLabel[$i] )
|
1592 |
$out .= stripcslashes(trim($valueLabel[$i]));
|
1593 |
else
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://wpgogo.com/development/custom-field-template.html
|
|
4 |
Tags: custom, fields, field, template, meta, custom field, custom fields, custom field template
|
5 |
Requires at least: 2.1
|
6 |
Tested up to: 2.9.1
|
7 |
-
Stable tag: 1.5.
|
8 |
|
9 |
This plugin adds the default custom fields on the Write Post/Page.
|
10 |
|
@@ -98,6 +98,10 @@ See the default template and modify it.
|
|
98 |
|
99 |
== Changelog ==
|
100 |
|
|
|
|
|
|
|
|
|
101 |
= 1.5.6 =
|
102 |
* Bugfix: disable the default custom fields in the page edit screen.
|
103 |
* Bugfix: compatible with old WordPress versions.
|
4 |
Tags: custom, fields, field, template, meta, custom field, custom fields, custom field template
|
5 |
Requires at least: 2.1
|
6 |
Tested up to: 2.9.1
|
7 |
+
Stable tag: 1.5.7
|
8 |
|
9 |
This plugin adds the default custom fields on the Write Post/Page.
|
10 |
|
98 |
|
99 |
== Changelog ==
|
100 |
|
101 |
+
= 1.5.7 =
|
102 |
+
* Bugfix: strip slashes.
|
103 |
+
* Bugfix: misjudgment of Autho Hook of `the_content()`.
|
104 |
+
|
105 |
= 1.5.6 =
|
106 |
* Bugfix: disable the default custom fields in the page edit screen.
|
107 |
* Bugfix: compatible with old WordPress versions.
|