[resolved] 'bloginfo' filter hook just flat not working (2 posts)

  1. ratbastid
    Posted 9 years ago #

    The following code:


    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) {
    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?

  2. Kafkaesqui

    Posted 9 years ago #

    Try the hook 'bloginfo_url'. It's something I asked for when the url-related stuff was pulled from the regular 'bloginfo' filter (for numerous reasons).

Topic Closed

This topic has been closed to new replies.

About this Topic