-
Notifications
You must be signed in to change notification settings - Fork 30
Enhancement: Add new acf/fields/icon_picker/{tab_name}/icons
filter
#177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Enhancement: Add new acf/fields/icon_picker/{tab_name}/icons
filter
#177
Conversation
$custom_icons = apply_filters( 'acf/fields/icon_picker/' . $name . '/icons', array(), $field ); | ||
|
||
if ( is_array( $custom_icons ) && ! empty( $custom_icons ) ) { | ||
$this->render_icon_list_tab( $name, $custom_icons ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PHPStan is right about this: The function only supports one argument.
Since I carried the code over from upstream, it looks like it's a bug there.
This means that the newly introduced acf/fields/icon_picker/{tab_name}/icons
filter won't actually work there. This leaves us with two options:
- We punt this PR for now (until it's fixed upstream), or
- we fix it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's fix it here.
Work in progress. Testing instructions to follow.
Corresponds to this changeset: https://plugins.trac.wordpress.org/changeset/3289772/advanced-custom-fields/tags/6.4.1/includes/fields/class-acf-field-icon_picker.php