Version Description
- Bugfix: media blank issue of the custom post type.
Download this release
Release Info
Developer | Hiroaki Miyashita |
Plugin | Custom Field Template |
Version | 1.7.9 |
Comparing to | |
See all releases |
Code changes from version 1.7.8 to 1.7.9
- custom-field-template.php +13 -9
- readme.txt +4 -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.7.
|
8 |
Author URI: http://wpgogo.com/
|
9 |
*/
|
10 |
|
@@ -473,14 +473,15 @@ class custom_field_template {
|
|
473 |
}
|
474 |
|
475 |
function media_send_to_custom_field($html) {
|
476 |
-
$options = $this->get_custom_field_template_data();
|
477 |
-
|
478 |
$out = '<script type="text/javascript">' . "\n" .
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
|
|
|
|
|
|
484 |
|
485 |
echo $out;
|
486 |
exit();
|
@@ -2880,6 +2881,9 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2880 |
function output_custom_field_values($attr) {
|
2881 |
global $post;
|
2882 |
$options = $this->get_custom_field_template_data();
|
|
|
|
|
|
|
2883 |
|
2884 |
if ( !isset($options['custom_field_template_before_list']) ) $options['custom_field_template_before_list'] = '<ul>';
|
2885 |
if ( !isset($options['custom_field_template_after_list']) ) $options['custom_field_template_after_list'] = '</ul>';
|
@@ -2887,7 +2891,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
|
|
2887 |
if ( !isset($options['custom_field_template_after_value']) ) $options['custom_field_template_after_value'] = '</li>';
|
2888 |
|
2889 |
extract(shortcode_atts(array(
|
2890 |
-
'post_id' => $
|
2891 |
'template' => 0,
|
2892 |
'format' => '',
|
2893 |
'key' => '',
|
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.7.9
|
8 |
Author URI: http://wpgogo.com/
|
9 |
*/
|
10 |
|
473 |
}
|
474 |
|
475 |
function media_send_to_custom_field($html) {
|
|
|
|
|
476 |
$out = '<script type="text/javascript">' . "\n" .
|
477 |
+
' /* <![CDATA[ */' . "\n" .
|
478 |
+
' var win = window.dialogArguments || opener || parent || top;' . "\n" .
|
479 |
+
' if ( typeof win.send_to_custom_field == "function" ) ' . "\n" .
|
480 |
+
' win.send_to_custom_field("' . addslashes($html) . '");' . "\n" .
|
481 |
+
' else ' . "\n" .
|
482 |
+
' win.send_to_editor("' . addslashes($html) . '");' . "\n" .
|
483 |
+
'/* ]]> */' . "\n" .
|
484 |
+
'</script>' . "\n";
|
485 |
|
486 |
echo $out;
|
487 |
exit();
|
2881 |
function output_custom_field_values($attr) {
|
2882 |
global $post;
|
2883 |
$options = $this->get_custom_field_template_data();
|
2884 |
+
|
2885 |
+
if ( empty($post->ID) ) $post_id = get_the_ID();
|
2886 |
+
else $post_id = $post->ID;
|
2887 |
|
2888 |
if ( !isset($options['custom_field_template_before_list']) ) $options['custom_field_template_before_list'] = '<ul>';
|
2889 |
if ( !isset($options['custom_field_template_after_list']) ) $options['custom_field_template_after_list'] = '</ul>';
|
2891 |
if ( !isset($options['custom_field_template_after_value']) ) $options['custom_field_template_after_value'] = '</li>';
|
2892 |
|
2893 |
extract(shortcode_atts(array(
|
2894 |
+
'post_id' => $post_id,
|
2895 |
'template' => 0,
|
2896 |
'format' => '',
|
2897 |
'key' => '',
|
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: 3.0.1
|
7 |
-
Stable tag: 1.7.
|
8 |
|
9 |
This plugin adds the default custom fields on the Write Post/Page.
|
10 |
|
@@ -103,6 +103,9 @@ See the default template and modify it.
|
|
103 |
|
104 |
== Changelog ==
|
105 |
|
|
|
|
|
|
|
106 |
= 1.7.8 =
|
107 |
* Updated jquery.datePicker.js
|
108 |
|
4 |
Tags: custom, fields, field, template, meta, custom field, custom fields, custom field template
|
5 |
Requires at least: 2.1
|
6 |
Tested up to: 3.0.1
|
7 |
+
Stable tag: 1.7.9
|
8 |
|
9 |
This plugin adds the default custom fields on the Write Post/Page.
|
10 |
|
103 |
|
104 |
== Changelog ==
|
105 |
|
106 |
+
= 1.7.9 =
|
107 |
+
* Bugfix: media blank issue of the custom post type.
|
108 |
+
|
109 |
= 1.7.8 =
|
110 |
* Updated jquery.datePicker.js
|
111 |
|