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

apply_filters( 'init' ) is killing output #43

Open
patrickmj opened this issue Aug 12, 2011 · 2 comments
Open

apply_filters( 'init' ) is killing output #43

patrickmj opened this issue Aug 12, 2011 · 2 comments

Comments

@patrickmj
Copy link
Contributor

Imported from Trac ticket #119 reported by boonebgorges on 2011-03-12:

Hey Patrick -

On the latest revs of the 0.5 branch, I'm finding that I can't output anything (I get white screens, with - strangely - nothing in my error log). I traced it to
https://github.com/chnm/anthologize/blob/0.5-branch/includes/class-tei-dom.php#L32
as applied in
f1c6272

I don't think this is a syntactically correct use of apply_filters() http://codex.wordpress.org/Function_Reference/apply_filters What are you trying to do here? Are you trying to get some portion of WP to load? Or some subset of WP's default filters to be applied?

FWIW, you might not have seen this on your own installation because you aren't running any other plugins. Lots of things hook to 'init', so in a real life situation there could be conflicts.

@ghost ghost assigned patrickmj Aug 12, 2011
@patrickmj
Copy link
Contributor Author

I think this should go into a broader bucket of issues related to how TeiDom gets built, and calls for much smarter use of WP filters during that process.

@boonebgorges
Copy link
Collaborator

I think that, at least in this case, the problem may relate to the fact that
@apply_filters( 'init' );
is not proper syntax. (I think the @-sign only serves to suppress the error messages in testing environments.) See http://codex.wordpress.org/Function_Reference/apply_filters

'init' is a WP action that is run in the process of loading the WP codebase http://core.trac.wordpress.org/browser/tags/3.2.1/wp-settings.php#L295; arbitrary functions can be hooked to init by using apply_filters(). The problem in #46 is slightly different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants