#16309 closed defect (bug) (invalid)
add_filter('the_content', 'myfunction') doesn't work when multi site.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 3.1 |
Component: | Plugins | Keywords: | add_filter |
Focuses: | Cc: |
Description
I wrote simple plugin code to test the issue.
function myfunction($content) { $content = 'test'.$content; return $content; } add_filter('the_content', 'myfunction');
The code works single wordpress and main site when multi site setting. However, child-sites when multi site setting.
WP 3.0 and 3.1 have same issue.
Attachments (1)
Change History (7)
#1
@
14 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
#2
@
14 years ago
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.
#3
@
14 years ago
- Component changed from General to Plugins
- Resolution invalid deleted
- Status changed from closed to reopened
#4
@
14 years ago
- Resolution set to invalid
- Status changed from reopened to closed
You're not activating the plugin on each of the child sites.
The plugin needs to be network activated, otherwise it isn't included apart from the main site. Plugins are maintained on a per-site basis by default.
For additional help, please try the multisite support forums: http://wordpress.org/support/forum/multisite/.
The plugin needs to be network activated, otherwise it isn't included apart from the main site. Plugins are maintained on a per-site basis by default.
For additional help, please try the multisite support forums: http://wordpress.org/support/forum/multisite/.