WordPress.org

Support

Support » Plugins and Hacks » Add filter for content_url

Add filter for content_url

  • 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 );

    http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Ron Rennick
    MultiSite Guru

    @wpmuguru

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

    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 ™.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add filter for content_url’ is closed to new replies.