[wp-trac] [WordPress Trac] #28105: Feature (with patch): allow system-wide inclusion of code

WordPress Trac noreply at wordpress.org
Mon May 5 09:16:43 UTC 2014


#28105: Feature (with patch): allow system-wide inclusion of code
---------------------------+------------------------------
 Reporter:  DavidAnderson  |       Owner:
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Plugins        |     Version:  trunk
 Severity:  normal         |  Resolution:
 Keywords:  close          |     Focuses:
---------------------------+------------------------------

Comment (by Denis-de-Bernardy):

 Aside — A completely unintrusive approach using `auto_prepend_file` and WP
 API is this:

 {{{
 <?php
 $wp_filter['muplugins_loaded'][~PHP_INT_MAX]['server_wide_loader'] =
 array(
     'function' => 'server_wide_loader',
     'accepted_args' => 0,
 );

 function server_wide_loader() {
     # do stuff
 }
 }}}

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


More information about the wp-trac mailing list