Custom Field Template - Version 2.5

Version Description

  • Code cleaning.
Download this release

Release Info

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

Code changes from version 2.4.9 to 2.5

Files changed (2) hide show
  1. custom-field-template.php +5 -4
  2. readme.txt +5 -2
custom-field-template.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://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
  Author URI: https://wpgogo.com/
8
- Version: 2.4.9
9
  Text Domain: custom-field-template
10
  Domain Path: /
11
  */
@@ -15,7 +15,7 @@ This program is based on the rc:custom_field_gui plugin written by Joshua Sigar.
15
  I appreciate your efforts, Joshua.
16
  */
17
 
18
- /* Copyright 2008 -2019 Hiroaki Miyashita
19
 
20
  This program is free software; you can redistribute it and/or modify
21
  it under the terms of the GNU General Public License as published by
@@ -46,6 +46,7 @@ class custom_field_template {
46
  add_action( 'add_meta_boxes', array(&$this, 'custom_field_template_add_meta_boxes') );
47
  add_action( 'edit_form_advanced', array(&$this, 'custom_field_template_edit_form_advanced') );
48
  add_action( 'edit_page_form', array(&$this, 'custom_field_template_edit_form_advanced') );
 
49
 
50
  //add_action( 'edit_post', array(&$this, 'edit_meta_value'), 100 );
51
  add_action( 'save_post', array(&$this, 'edit_meta_value'), 100, 2 );
@@ -2608,7 +2609,7 @@ jQuery(this).addClass("closed");
2608
 
2609
  if ( isset($data['multipleButton']) && $data['multipleButton'] == true ) :
2610
  $addfield .= ' <span>';
2611
- if ( isset($post_id) ) $addbutton = $this->get_post_meta( $post_id, $title, true )-1;
2612
  if ( !isset($addbutton) || $addbutton<=0 ) $addbutton = 0;
2613
  if ( $data['cftnum']/2 == $addbutton ) :
2614
  if ( substr($wp_version, 0, 3) < '3.3' ) :
@@ -3293,7 +3294,7 @@ jQuery("#edButtonPreview").trigger("click"); }' . "\n";*/
3293
  if ($Temp = strtok($Str,"\r\n")) {
3294
  $sn = -1;
3295
  do {
3296
- switch ($Temp{0}) {
3297
  case ';':
3298
  case '#':
3299
  break;
5
  Description: This plugin adds the default custom fields on the Write Post/Page.
6
  Author: Hiroaki Miyashita
7
  Author URI: https://wpgogo.com/
8
+ Version: 2.5
9
  Text Domain: custom-field-template
10
  Domain Path: /
11
  */
15
  I appreciate your efforts, Joshua.
16
  */
17
 
18
+ /* Copyright 2008 -2020 Hiroaki Miyashita
19
 
20
  This program is free software; you can redistribute it and/or modify
21
  it under the terms of the GNU General Public License as published by
46
  add_action( 'add_meta_boxes', array(&$this, 'custom_field_template_add_meta_boxes') );
47
  add_action( 'edit_form_advanced', array(&$this, 'custom_field_template_edit_form_advanced') );
48
  add_action( 'edit_page_form', array(&$this, 'custom_field_template_edit_form_advanced') );
49
+ add_action( 'block_editor_meta_box_hidden_fields', array( &$this, 'custom_field_template_edit_form_advanced' ) );
50
 
51
  //add_action( 'edit_post', array(&$this, 'edit_meta_value'), 100 );
52
  add_action( 'save_post', array(&$this, 'edit_meta_value'), 100, 2 );
2609
 
2610
  if ( isset($data['multipleButton']) && $data['multipleButton'] == true ) :
2611
  $addfield .= ' <span>';
2612
+ if ( isset($post_id) ) $addbutton = (int)$this->get_post_meta( $post_id, $title, true )-1;
2613
  if ( !isset($addbutton) || $addbutton<=0 ) $addbutton = 0;
2614
  if ( $data['cftnum']/2 == $addbutton ) :
2615
  if ( substr($wp_version, 0, 3) < '3.3' ) :
3294
  if ($Temp = strtok($Str,"\r\n")) {
3295
  $sn = -1;
3296
  do {
3297
+ switch ($Temp[0]) {
3298
  case ';':
3299
  case '#':
3300
  break;
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Hiroaki Miyashita
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WN7Y2442JPRU6
4
  Tags: custom field, custom fields, custom, fields, field, template, meta, custom field template, custom post type, acf, advanced
5
  Requires at least: 2.1
6
- Tested up to: 5.2.3
7
- Stable tag: 2.4.9
8
  License: GPLv2 or later
9
 
10
  The Custom Field Template plugin extends the functionality of custom fields.
@@ -114,6 +114,9 @@ See the default template and modify it.
114
 
115
  == Changelog ==
116
 
 
 
 
117
  = 2.4.9 =
118
  * Bugfix: Auto Hook of `the_content()`.
119
 
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WN7Y2442JPRU6
4
  Tags: custom field, custom fields, custom, fields, field, template, meta, custom field template, custom post type, acf, advanced
5
  Requires at least: 2.1
6
+ Tested up to: 5.4.2
7
+ Stable tag: 2.5
8
  License: GPLv2 or later
9
 
10
  The Custom Field Template plugin extends the functionality of custom fields.
114
 
115
  == Changelog ==
116
 
117
+ = 2.5 =
118
+ * Code cleaning.
119
+
120
  = 2.4.9 =
121
  * Bugfix: Auto Hook of `the_content()`.
122