WordPress MU Domain Mapping
Add filter for content_url (3 posts)

  1. Gawain Lynch
    Posted 3 years ago #

    Content directory URL not being properly remapped:

    --- a/domain_mapping.php	2012-01-21 16:45:04.000000000 +0000
    +++ b/domain_mapping.php	2013-01-08 11:28:54.000000000 +0000
    @@ -679,6 +679,7 @@
     	add_filter( 'template_directory', 'domain_mapping_post_content' );
     	add_filter( 'template_directory_uri', 'domain_mapping_post_content' );
     	add_filter( 'plugins_url', 'domain_mapping_post_content' );
    +	add_filter( 'content_url', 'domain_mapping_post_content' );
     } else {
     	if ( $wp_version == '2.9.2' ) {
     		add_filter( 'admin_url', 'domain_mapping_adminurl', 10, 2 );


  2. Ron Rennick
    MultiSite Guru
    Plugin Author

    Posted 3 years ago #

    Thanks :) Can you give me an example of where the other filters were not filtering a URL?

  3. Gawain Lynch
    Posted 3 years ago #

    Hi Ron,

    I struck the problem a while ago, and I can't remember the original set of issues, but the most recent one that re-prompted me to upstream was with the calendar plugin from time.ly.

    They install a child/sub-theme that uses WP_CONTENT_URL to set the URL path to image file. Swapping out the constant for content_url() obviously then required that content_url() be filtered.

    I've been running with this in production since August and it Works For Me (tm).

    I'm using nginx too, in the unlikely event that has bearing.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WordPress MU Domain Mapping
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic