[wp-trac] [WordPress Trac] #27208: Make add_filter and add_action available in wp-config.php

WordPress Trac noreply at wordpress.org
Tue Feb 25 17:00:28 UTC 2014


#27208: Make add_filter and add_action available in wp-config.php
-------------------------------+------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Bootstrap/Load     |     Version:  3.8.1
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------

Comment (by Denis-de-Bernardy):

 Replying to [comment:4 nacin]:
 > While I can see the benefits, there is also a huge can of worms here. I
 don't have much of a desire for this to be a thing.

 Can you elaborate on that a bit? I honestly fail to see what could go
 wrong. I can only see benefits — especially in the context I just
 mentioned, i.e. integration between WP and third-party apps. Merely
 changing that `require` into `require_once` would be good enough for my
 sake. Can you please do at least that, so I don't need to worry about
 future compatibility of my `$wp_filter` hack?

 > Side note, functions.php isn't needed. A callback doesn't need to exist
 until the hook is run, not when it is added.

 In that case the second patch is the one to use.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27208#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list