Skip to content

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

Draft
wants to merge 23 commits into
base: trunk
Choose a base branch
from

Conversation

ockham
Copy link

@ockham ockham commented Jun 17, 2025

$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 );
Copy link
Author

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.

Copy link
Contributor

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.

@cbravobernal cbravobernal added this to the 6.5.0 milestone Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants