[wp-trac] [WordPress Trac] #16309: add_filter('the_content', 'myfunction') doesn't work when multi site.

WordPress Trac wp-trac at lists.automattic.com
Wed Jan 19 19:45:14 UTC 2011


#16309: add_filter('the_content', 'myfunction') doesn't work when multi site.
--------------------------+----------------------
 Reporter:  matsubobo     |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  General       |     Version:  3.1
 Severity:  minor         |  Resolution:  invalid
 Keywords:  add_filter    |
--------------------------+----------------------

Comment (by matsubobo):

 I think I understood how plugin is activated on multi site.

 I also tried following code to analyze the plugin is activated.
 {{{
 function myfunction($content) {
         print 'this block is passed.';
         $content = 'test'.$content;
         return $content;
 }
 add_filter('the_content', 'myfunction');
 }}}

 "'this block is passed."  was displayed but "test" was not displayed on
 child-sites.
 Both "this block is passed" and "test" where displayed on the main site.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16309#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list