Changeset 3046138
- Timestamp:
- 03/06/2024 07:55:23 AM (2 years ago)
- Location:
- acf-quickedit-fields
- Files:
-
- 16 edited
- 1 copied
-
tags/3.3.4 (copied) (copied from acf-quickedit-fields/trunk)
-
tags/3.3.4/include/ACFQuickEdit/Admin/Admin.php (modified) (1 diff)
-
tags/3.3.4/include/ACFQuickEdit/Admin/Feature.php (modified) (2 diffs)
-
tags/3.3.4/include/ACFQuickEdit/Fields/DateTimePickerField.php (modified) (1 diff)
-
tags/3.3.4/include/ACFQuickEdit/Fields/Traits/InputRadio.php (modified) (2 diffs)
-
tags/3.3.4/include/version.php (modified) (1 diff)
-
tags/3.3.4/index.php (modified) (1 diff)
-
tags/3.3.4/languages/acf-quickedit-fields.pot (modified) (4 diffs)
-
tags/3.3.4/readme.txt (modified) (2 diffs)
-
trunk/include/ACFQuickEdit/Admin/Admin.php (modified) (1 diff)
-
trunk/include/ACFQuickEdit/Admin/Feature.php (modified) (2 diffs)
-
trunk/include/ACFQuickEdit/Fields/DateTimePickerField.php (modified) (1 diff)
-
trunk/include/ACFQuickEdit/Fields/Traits/InputRadio.php (modified) (2 diffs)
-
trunk/include/version.php (modified) (1 diff)
-
trunk/index.php (modified) (1 diff)
-
trunk/languages/acf-quickedit-fields.pot (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
acf-quickedit-fields/tags/3.3.4/include/ACFQuickEdit/Admin/Admin.php
r3044352 r3046138 156 156 add_action( 'load-users.php', [ $this, 'enqueue_columns_assets' ] ); 157 157 add_action( 'acf/field_group/admin_enqueue_scripts', [ $this, 'enqueue_fieldgroup_assets' ] ); 158 159 }160 161 public function is_field_group_saving() {162 return isset( $_SERVER ) && isset( $_SERVER['REQUEST_METHOD'] )163 && isset( $_POST['action'] ) && isset( $_POST['_acf_screen'] )164 && 'POST' === $_SERVER['REQUEST_METHOD']165 && 'editpost' === wp_unslash( $_POST['action'] )166 && 'field_group' === wp_unslash( $_POST['_acf_screen'] );167 158 } 168 159 -
acf-quickedit-fields/tags/3.3.4/include/ACFQuickEdit/Admin/Feature.php
r3044352 r3046138 41 41 $this->admin = Admin::instance(); 42 42 43 43 44 if ( wp_doing_ajax() ) { 44 add_action( 'admin_init', [ $this, 'init_fields' ] ); 45 } else if ( ! $this->admin->is_field_group_saving() ) { 46 add_action( 'current_screen', [ $this, 'init_fields' ] ); 45 $actions = array_merge( 46 apply_filters( 'acf_quick_edit_post_ajax_actions', [ 'inline-save' ] ), 47 apply_filters( 'acf_quick_edit_term_ajax_actions', [ 'inline-save-tax' ] ), 48 [ 'get_acf_post_meta' ] 49 ); 50 if ( isset( $_REQUEST['action'] ) && in_array( $_REQUEST['action'], $actions ) ) { 51 add_action( 'admin_init', [ $this, 'init_fields' ] ); 52 } 53 } else { 54 add_action( 'current_screen', [ $this, 'current_screen' ] ); 47 55 } 48 56 … … 52 60 } 53 61 62 /** 63 * @filter current_screen 64 */ 65 public function current_screen( $current_screen ) { 66 global $pagenow; 67 if ( 68 in_array( $pagenow, [ 'edit.php', 'edit-tags.php', 'users.php', 'upload.php' ] ) 69 && 'acf-field-group' !== $current_screen->post_type 70 ) { 71 $this->init_fields(); 72 } 73 } 54 74 55 75 /** -
acf-quickedit-fields/tags/3.3.4/include/ACFQuickEdit/Fields/DateTimePickerField.php
r2907571 r3046138 13 13 protected function _render_column( $object_id ) { 14 14 15 $value = $this->get_value( $object_id, false );15 $value = (string) $this->get_value( $object_id, false ); 16 16 17 if ( is_null( $value )) {17 if ( '' === $value ) { 18 18 return $this->__no_value(); 19 19 } -
acf-quickedit-fields/tags/3.3.4/include/ACFQuickEdit/Fields/Traits/InputRadio.php
r3044352 r3046138 29 29 30 30 if ( $acf_field['allow_null'] ) { 31 $id = $this->core->prefix( $acf_field['key'] . '---none' ); 31 32 $output .= sprintf( '<li><label for="%s">', $id ); 32 33 $output .= sprintf( '<input %s />%s', acf_esc_attr( [ … … 45 46 foreach( $acf_field['choices'] as $name => $value) { 46 47 47 $id = $this->core->prefix( $acf_field['key'] . '-' . $name);48 $id = $this->core->prefix( $acf_field['key'] . '-' . sanitize_key( $name ) ); 48 49 49 50 $output .= sprintf( '<li><label for="%s">', $id ); -
acf-quickedit-fields/tags/3.3.4/include/version.php
r3044352 r3046138 1 <?php return "3.3. 3";1 <?php return "3.3.4"; -
acf-quickedit-fields/tags/3.3.4/index.php
r3044352 r3046138 6 6 Description: Show Advanced Custom Fields in post list table. Edit field values in Quick Edit and / or Bulk edit. 7 7 Author: Jörn Lund 8 Version: 3.3. 38 Version: 3.3.4 9 9 Author URI: https://github.com/mcguffin 10 10 License: GPL3 -
acf-quickedit-fields/tags/3.3.4/languages/acf-quickedit-fields.pot
r3044352 r3046138 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: ACF QuickEdit Fields 3.3. 3\n"5 "Project-Id-Version: ACF QuickEdit Fields 3.3.4\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/acf-quickedit-fields\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2024-03-0 3T10:11:05+00:00\n"12 "POT-Creation-Date: 2024-03-06T07:54:58+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.10.0\n" … … 41 41 42 42 #. Translators: 1: ACF Pro URL, 2: plugins page url 43 #: include/ACFQuickEdit/Admin/Admin.php:2 5543 #: include/ACFQuickEdit/Admin/Admin.php:246 44 44 msgid "The <strong>ACF QuickEdit Fields</strong> plugin requires <a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">ACF version 5.6 or later</a>. You can disable and uninstall it on the <a href=\"%2$s\">plugins page</a>." 45 45 msgstr "" … … 189 189 190 190 #: include/ACFQuickEdit/Fields/Field.php:492 191 #: include/ACFQuickEdit/Fields/Traits/InputRadio.php:4 0191 #: include/ACFQuickEdit/Fields/Traits/InputRadio.php:41 192 192 #: include/ACFQuickEdit/Fields/TrueFalseField.php:38 193 193 msgid "(No value)" -
acf-quickedit-fields/tags/3.3.4/readme.txt
r3044352 r3046138 6 6 Tested up to: 6.3 7 7 Requires PHP: 7.2 8 Stable tag: 3.3. 38 Stable tag: 3.3.4 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 105 105 106 106 == Changelog == 107 108 = 3.3.4 = 109 - Performance: Skip feature init on edit post 110 - Fix: PHP warning, None label not clickable in radio fields 111 - Fix: show no value in datetime fields 107 112 108 113 = 3.3.3 = -
acf-quickedit-fields/trunk/include/ACFQuickEdit/Admin/Admin.php
r3044352 r3046138 156 156 add_action( 'load-users.php', [ $this, 'enqueue_columns_assets' ] ); 157 157 add_action( 'acf/field_group/admin_enqueue_scripts', [ $this, 'enqueue_fieldgroup_assets' ] ); 158 159 }160 161 public function is_field_group_saving() {162 return isset( $_SERVER ) && isset( $_SERVER['REQUEST_METHOD'] )163 && isset( $_POST['action'] ) && isset( $_POST['_acf_screen'] )164 && 'POST' === $_SERVER['REQUEST_METHOD']165 && 'editpost' === wp_unslash( $_POST['action'] )166 && 'field_group' === wp_unslash( $_POST['_acf_screen'] );167 158 } 168 159 -
acf-quickedit-fields/trunk/include/ACFQuickEdit/Admin/Feature.php
r3044352 r3046138 41 41 $this->admin = Admin::instance(); 42 42 43 43 44 if ( wp_doing_ajax() ) { 44 add_action( 'admin_init', [ $this, 'init_fields' ] ); 45 } else if ( ! $this->admin->is_field_group_saving() ) { 46 add_action( 'current_screen', [ $this, 'init_fields' ] ); 45 $actions = array_merge( 46 apply_filters( 'acf_quick_edit_post_ajax_actions', [ 'inline-save' ] ), 47 apply_filters( 'acf_quick_edit_term_ajax_actions', [ 'inline-save-tax' ] ), 48 [ 'get_acf_post_meta' ] 49 ); 50 if ( isset( $_REQUEST['action'] ) && in_array( $_REQUEST['action'], $actions ) ) { 51 add_action( 'admin_init', [ $this, 'init_fields' ] ); 52 } 53 } else { 54 add_action( 'current_screen', [ $this, 'current_screen' ] ); 47 55 } 48 56 … … 52 60 } 53 61 62 /** 63 * @filter current_screen 64 */ 65 public function current_screen( $current_screen ) { 66 global $pagenow; 67 if ( 68 in_array( $pagenow, [ 'edit.php', 'edit-tags.php', 'users.php', 'upload.php' ] ) 69 && 'acf-field-group' !== $current_screen->post_type 70 ) { 71 $this->init_fields(); 72 } 73 } 54 74 55 75 /** -
acf-quickedit-fields/trunk/include/ACFQuickEdit/Fields/DateTimePickerField.php
r2907571 r3046138 13 13 protected function _render_column( $object_id ) { 14 14 15 $value = $this->get_value( $object_id, false );15 $value = (string) $this->get_value( $object_id, false ); 16 16 17 if ( is_null( $value )) {17 if ( '' === $value ) { 18 18 return $this->__no_value(); 19 19 } -
acf-quickedit-fields/trunk/include/ACFQuickEdit/Fields/Traits/InputRadio.php
r3044352 r3046138 29 29 30 30 if ( $acf_field['allow_null'] ) { 31 $id = $this->core->prefix( $acf_field['key'] . '---none' ); 31 32 $output .= sprintf( '<li><label for="%s">', $id ); 32 33 $output .= sprintf( '<input %s />%s', acf_esc_attr( [ … … 45 46 foreach( $acf_field['choices'] as $name => $value) { 46 47 47 $id = $this->core->prefix( $acf_field['key'] . '-' . $name);48 $id = $this->core->prefix( $acf_field['key'] . '-' . sanitize_key( $name ) ); 48 49 49 50 $output .= sprintf( '<li><label for="%s">', $id ); -
acf-quickedit-fields/trunk/include/version.php
r3044352 r3046138 1 <?php return "3.3. 3";1 <?php return "3.3.4"; -
acf-quickedit-fields/trunk/index.php
r3044352 r3046138 6 6 Description: Show Advanced Custom Fields in post list table. Edit field values in Quick Edit and / or Bulk edit. 7 7 Author: Jörn Lund 8 Version: 3.3. 38 Version: 3.3.4 9 9 Author URI: https://github.com/mcguffin 10 10 License: GPL3 -
acf-quickedit-fields/trunk/languages/acf-quickedit-fields.pot
r3044352 r3046138 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: ACF QuickEdit Fields 3.3. 3\n"5 "Project-Id-Version: ACF QuickEdit Fields 3.3.4\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/acf-quickedit-fields\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2024-03-0 3T10:11:05+00:00\n"12 "POT-Creation-Date: 2024-03-06T07:54:58+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.10.0\n" … … 41 41 42 42 #. Translators: 1: ACF Pro URL, 2: plugins page url 43 #: include/ACFQuickEdit/Admin/Admin.php:2 5543 #: include/ACFQuickEdit/Admin/Admin.php:246 44 44 msgid "The <strong>ACF QuickEdit Fields</strong> plugin requires <a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">ACF version 5.6 or later</a>. You can disable and uninstall it on the <a href=\"%2$s\">plugins page</a>." 45 45 msgstr "" … … 189 189 190 190 #: include/ACFQuickEdit/Fields/Field.php:492 191 #: include/ACFQuickEdit/Fields/Traits/InputRadio.php:4 0191 #: include/ACFQuickEdit/Fields/Traits/InputRadio.php:41 192 192 #: include/ACFQuickEdit/Fields/TrueFalseField.php:38 193 193 msgid "(No value)" -
acf-quickedit-fields/trunk/readme.txt
r3044352 r3046138 6 6 Tested up to: 6.3 7 7 Requires PHP: 7.2 8 Stable tag: 3.3. 38 Stable tag: 3.3.4 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 105 105 106 106 == Changelog == 107 108 = 3.3.4 = 109 - Performance: Skip feature init on edit post 110 - Fix: PHP warning, None label not clickable in radio fields 111 - Fix: show no value in datetime fields 107 112 108 113 = 3.3.3 =
Note: See TracChangeset
for help on using the changeset viewer.