‘bloginfo’ filter hook just flat not working
-
The following code:
addfilter(‘bloginfo’,’strtoupper’);
results in lower-case bloginfo calls.
I’m trying to make a second copy of WordPress share a database with another copy. The main thing that’s in my way is the directories specified in wp_options. So I’m trying to use a filter on bloginfo to strip the string “/wpress” out of any URL I get from a call to bloginfo. Here’s my code:
function dwr_filter_wpress($info, $content) {
preg_replace(‘/\/wpress/’,”,$content);
return $content;
}
add_filter(‘bloginfo’, ‘dwr_filter_wpress’, 1, 2);As far as I can tell, this returns an unfiltered $content.
If anyone has a suggestion for another way I could accomplish this, I’m very interested in hearing it. I was considering making a copy of wp_options with different URLs specified, and pointing to it in my second WP install’s copy of wp-settings.php:
$wpdb->options = $table_prefix . ‘options2’;
Any thoughts?
- The topic ‘‘bloginfo’ filter hook just flat not working’ is closed to new replies.