Skip to content

Commit 67e0209

Browse files
authored
Merge pull request #466 from codepress/release/7.0.19
Release 7.0.19
2 parents ea6db9a + d4fa20c commit 67e0209

19 files changed

Lines changed: 119 additions & 23 deletions

assets/css/admin-general.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/material/material-symbols-outlined.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
font-style: normal;
44
font-weight: 400;
55
font-display: block;
6-
src: url('../material/material-symbols-outlined.woff2?v=1769590933') format('woff2');
6+
src: url('../material/material-symbols-outlined.woff2?v=1779880414') format('woff2');
77
}
88

99
.ac-material-symbols {
708 Bytes
Binary file not shown.

assets/css/table.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

changelog.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
== Changelog ==
22

3+
= 7.0.19 =
4+
Release Date: May 29th, 2026
5+
6+
* [Fixed] Hardened custom field value deserialization to improve validation of serialized data handling.
7+
38
= 7.0.18 =
49
Release Date: May 19th, 2026
510

classes/Acf/FieldGroupCache.php

Lines changed: 73 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class FieldGroupCache implements Registerable
2424

2525
private const TRANSIENT_KEY = '_ac_acf_field_counts';
2626
private const TRANSIENT_KEY_TABLE_SCREENS = '_ac_acf_group_table_screens';
27+
private const TRANSIENT_KEY_META_KEYS_BY_TYPE = '_ac_acf_meta_keys_by_type';
2728
private const TTL_SECONDS = WEEK_IN_SECONDS;
2829

2930
private QueryFactory $query_factory;
@@ -150,11 +151,80 @@ public function get_count_for_table_screen(TableScreen $table_screen): int
150151
return $this->get_count_for_query((string)$table_screen->get_id(), $query);
151152
}
152153

154+
/**
155+
* @return array<string, string[]> field type => list of meta_keys (field names)
156+
*/
157+
public function get_meta_keys_grouped_by_type(): array
158+
{
159+
$cached = get_transient(self::TRANSIENT_KEY_META_KEYS_BY_TYPE);
160+
161+
if (is_array($cached)) {
162+
return $cached;
163+
}
164+
165+
if ( ! $this->is_acf_available()) {
166+
return [];
167+
}
168+
169+
$result = [];
170+
$seen_groups = [];
171+
172+
foreach ($this->table_ids_factory->create() as $table_id) {
173+
if ( ! $this->table_screen_factory->can_create($table_id)) {
174+
continue;
175+
}
176+
177+
$table_screen = $this->table_screen_factory->create($table_id);
178+
$query = $this->query_factory->create($table_screen);
179+
180+
if ( ! $query) {
181+
continue;
182+
}
183+
184+
foreach ($query->get_groups() as $group) {
185+
$group_key = (string)($group['key'] ?? '');
186+
187+
if ('' === $group_key || isset($seen_groups[$group_key])) {
188+
continue;
189+
}
190+
191+
$seen_groups[$group_key] = true;
192+
193+
$fields = acf_get_fields($group_key);
194+
195+
if ( ! is_array($fields)) {
196+
continue;
197+
}
198+
199+
foreach ($fields as $field) {
200+
if ( ! is_array($field) || empty($field['name']) || empty($field['type'])) {
201+
continue;
202+
}
203+
204+
$type = (string)$field['type'];
205+
$name = (string)$field['name'];
206+
207+
if ( ! isset($result[$type])) {
208+
$result[$type] = [];
209+
}
210+
211+
if ( ! in_array($name, $result[$type], true)) {
212+
$result[$type][] = $name;
213+
}
214+
}
215+
}
216+
}
217+
218+
set_transient(self::TRANSIENT_KEY_META_KEYS_BY_TYPE, $result, self::TTL_SECONDS);
219+
220+
return $result;
221+
}
222+
153223
private function is_acf_available(): bool
154224
{
155225
return function_exists('acf_get_field_groups')
156-
&& function_exists('acf_get_fields')
157-
&& function_exists('acf_get_store');
226+
&& function_exists('acf_get_fields')
227+
&& function_exists('acf_get_store');
158228
}
159229

160230
private function get_count_for_query(string $cache_key, Query $query): int
@@ -185,6 +255,7 @@ public function invalidate(): void
185255
{
186256
delete_transient(self::TRANSIENT_KEY);
187257
delete_transient(self::TRANSIENT_KEY_TABLE_SCREENS);
258+
delete_transient(self::TRANSIENT_KEY_META_KEYS_BY_TYPE);
188259
}
189260

190261
private function count_fields(Query $query): int

classes/Formatter/IdsToCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ private function get_ids_from_string(string $value): ?array
3939
}
4040

4141
if (is_serialized($value)) {
42-
$ids = @unserialize($value);
42+
$ids = @unserialize($value, ['allowed_classes' => false]);
4343

4444
if (is_array($ids)) {
4545
return $this->sanitise_ids($ids);

classes/Setting/ComponentFactory/Post/FeaturedImageDisplay.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected function get_input(Config $config): Input
4040
return OptionFactory::create_select(
4141
self::NAME,
4242
OptionCollection::from_array([
43-
'image' => __('Image'),
43+
'image' => __('Image', 'codepress-admin-columns'),
4444
'filesize' => __('Filesize', 'codepress-admin-columns'),
4545
'dimensions' => __('Dimensions', 'codepress-admin-columns'),
4646
]),

codepress-admin-columns.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/*
33
Plugin Name: Admin Columns
4-
Version: 7.0.18
4+
Version: 7.0.19
55
Description: Add, reorder, and customize columns in your WordPress admin table for any post type, users, and media - no code required.
66
Author: AdminColumns.com
77
Author URI: https://www.admincolumns.com
@@ -41,7 +41,7 @@
4141
}
4242

4343
define('AC_FILE', __FILE__);
44-
define('AC_VERSION', '7.0.18');
44+
define('AC_VERSION', '7.0.19');
4545

4646
require_once ABSPATH . 'wp-admin/includes/plugin.php';
4747

1 Byte
Binary file not shown.

0 commit comments

Comments
 (0)