Skip to content

Commit 701c778

Browse files
committed
Fix domain check, now is more exactly
1 parent 3ebaa54 commit 701c778

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

inc/autoload/class-add-site-status-labels.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Add status labels to blogs.
44
*
55
* @since 2015-07-14
6-
* @version 2015-09-03
6+
* @version 2015-12-03
77
* @package WordPress
88
*/
99

@@ -51,6 +51,9 @@ public function __construct() {
5151
*/
5252
public function check_external_url( $haystack, $needle ) {
5353

54+
// Remove last string for exactly check.
55+
$needle = rtrim( $needle, '/' );
56+
5457
if ( FALSE === strpos(
5558
$haystack,
5659
str_replace( array( 'http://', 'https://', '//' ), '', $needle )

multisite-enhancements.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Multisite Enhancements
44
* Description: Enhance Multisite for Network Admins with different topics
55
* Plugin URI: https://github.com/bueltge/WordPress-Multisite-Enhancements
6-
* Version: 1.3.0
6+
* Version: 1.3.1
77
* Author: Frank Bültge
88
* Author URI: http://bueltge.de
99
* License: GPLv2+

readme.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ I'm German and my English might be gruesome here and there.
9393
So please be patient with me and let me know of typos or grammatical parts. Thanks
9494

9595
== Changelog ==
96+
= 1.3.1 (2015-12-03) =
97+
* Enhance the external domain check for more exactly check, that's also work on root domain of multisite. Props Matt [Thread](https://wordpress.org/support/topic/main-blog-being-tagged-as-external-domain)
98+
9699
= 1.3.0 (2015-11-28) =
97100
* Add new functionality to filter plugin list live.
98101
* Improve status label filter `multisite_enhancements_status_label`, now with the parameters `$blogname` and `$blog`.

0 commit comments

Comments
 (0)