Skip to content

Commit

Permalink
Higher priority value for https domain alias filters
Browse files Browse the repository at this point in the history
- we need to make sure https domain alias filters are run after the
  polylang filters, so they aren't overridden
  • Loading branch information
Antti Kuosmanen committed Dec 17, 2015
1 parent d623057 commit 9692f43
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions https-domain-alias.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,17 +254,17 @@ function htsda_link_adder_fix( $Hook ) {
// A redirect or link to https may happen from pages served via http
$domain_filter = is_multisite() ? 'htsda_mu_https_domain_rewrite' : 'htsda_https_domain_rewrite';

add_filter( 'login_url', $domain_filter );
add_filter( 'logout_url', $domain_filter );
add_filter( 'admin_url', $domain_filter );
add_filter( 'wp_redirect', $domain_filter );
add_filter( 'plugins_url', $domain_filter );
add_filter( 'content_url', $domain_filter );
add_filter( 'theme_mod_header_image', $domain_filter );
add_filter( 'wp_get_attachment_url', $domain_filter );
add_filter( 'wp_get_attachment_thumb_url', $domain_filter );
add_filter( 'site_url', $domain_filter );
add_filter( 'home_url', 'htsda_home_url_rewrite' );
add_filter( 'login_url', $domain_filter, 20 );
add_filter( 'logout_url', $domain_filter, 20 );
add_filter( 'admin_url', $domain_filter, 20 );
add_filter( 'wp_redirect', $domain_filter, 20 );
add_filter( 'plugins_url', $domain_filter, 20 );
add_filter( 'content_url', $domain_filter, 20 );
add_filter( 'theme_mod_header_image', $domain_filter, 20 );
add_filter( 'wp_get_attachment_url', $domain_filter, 20 );
add_filter( 'wp_get_attachment_thumb_url', $domain_filter, 20 );
add_filter( 'site_url', $domain_filter, 20 );
add_filter( 'home_url', 'htsda_home_url_rewrite', 20 );

// Force relative urls for links created in the wp-admin
add_filter( 'media_send_to_editor', 'htsda_root_relative_media_urls', 10, 3 );
Expand Down

0 comments on commit 9692f43

Please sign in to comment.