Support » Plugin: Multisite Enhancements » Main blog being tagged as external domain

Viewing 10 replies - 1 through 10 (of 10 total)
  • bump

    Plugin Author Frank

    (@bueltge)

    This is a new function, is a icon from the icon-font of the WP core to identifier the status of the site, external URL and/or set to noindex.

    See also the description of the plugin – “Add status to each site in the admin bar to identifier fast if the site noindex status and external url.”

    That was the point of my post. My site is not external and is indexed.

    Plugin Author Frank

    (@bueltge)

    I think is the root, right? That is the URL, a domain, a external address. The other sites is often as subdomain or subfolder active. Also support Multisite different domains.

    Maybe you add a screenshot.

    Sorry I don’t understand your question. Yes, it is the root domain in a multisite subfolder setup that is being flagged as external. How are you determining if a site is external or not? I wasn’t even aware you could add external sites…?

    So it looks like the issue is here:

    public function check_external_url( $haystack, $needle ) {
    
    	if ( FALSE === strpos(
    			$haystack,
    			str_replace( array( 'http://', 'https://', '//' ), '', $needle )
    		)
    	) {
    		return TRUE;
    	}
    
    	return FALSE;
    }

    In my debugging, $admin_bar->user->domain comes through in $needle with a slash on the end, where as $blog->siteurl for $haystack does not.

    I just added a “/” to the end of $haystack for a quick fix.

    public function check_external_url( $haystack, $needle ) {
    
    	if ( FALSE === strpos(
    			$haystack.'/',
    			str_replace( array( 'http://', 'https://', '//' ), '', $needle )
    		)
    	) {
    		return TRUE;
    	}
    
    	return FALSE;
    }
    Plugin Author Frank

    (@bueltge)

    Currently I check this with this function, right.
    The main blog have a domain, a external url. This is the point, that I add the icon. But do you think, is not helpful? Only in additional urls, not inside the main-url of the install?

    Thanks again.

    I do not have any external domains.

    Plugin Author Frank

    (@bueltge)

    Hi Matt.
    I have debugged this and now I understand it. I have also enhanced the source, that the check is more exactly, the last string was the topic. Thx.

    The new version is released, hope that helps you.
    best.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Main blog being tagged as external domain’ is closed to new replies.