Skip to content

Commit

Permalink
pre_option_home now checks to make sure the URL is actually the one u…
Browse files Browse the repository at this point in the history
…sed for the domain mapping before changing it.
  • Loading branch information
Cameron Terry committed Jul 27, 2016
1 parent e50de83 commit f23ce26
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion inc/urls.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,15 @@ function dark_matter_post_row_actions( $actions ) {
return $actions;
}

function dark_matter_admin_pre_option_home() {
function dark_matter_admin_pre_option_home( $value ) {
global $current_blog;

$original_domain = dark_matter_api_get_domain_original();

if ( false === stripos( $value, $original_domain ) ) {
return $value;
}

$primary_domain = dark_matter_api_get_domain_primary();

if ( empty( $primary_domain ) ) {
Expand Down
5 changes: 5 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ Dark Matter has been tested to ensure it functions correctly with the following

== Changelog ==

= 1.0.0 Release Candidate 1 =

* pre_option_home now checks to make sure the URL is actually the one used for the domain mapping before changing it.
* This should improve the issue where Network Admin "Visit Sites" was being mapped for all websites and not just the one the user is looking at.

= 0.11.0 (Beta) =

* Completely rewritten the redirects logic to fix the following issues;
Expand Down

0 comments on commit f23ce26

Please sign in to comment.