Skip to content
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

Discussion: Possible irrelevant data sent in filter? #43

Open
andersrehn opened this issue Jan 9, 2019 · 0 comments
Open

Discussion: Possible irrelevant data sent in filter? #43

andersrehn opened this issue Jan 9, 2019 · 0 comments

Comments

@andersrehn
Copy link

$data['classes'] = implode(' ', apply_filters('Modularity/Module/Classes', array('box', 'box-panel'), $this->post_type, $this->args));

Is it possible to verify what the content of $this->args is? When I run the code I get data which is irrelevant.
The args data is about which sidebar the module was rendered in. I feel that it would be more helpful for third-party developers if the context of the module was somehow presented in the filter callback function.

Possible new uses cases developers could use this hook for is to add extra classes if one acf value of the module is set. Right now that is not possible

Properties which would be nice to pass is:

  • the acf data fields
  • which ID of the module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant