Make WordPress Core


Ignore:
Timestamp:
05/04/2024 07:23:31 PM (7 months ago)
Author:
johnbillion
Message:

Bootstrap/Load: Add support for custom ports in multisite site addresses.

This allows a Multisite network to use an address that includes a port name, such as example.com:1234, and adds support for this to the local development environment too. You can now run a Multisite installation on the local development environment, for example at localhost:8889.

This also fixes some bugs with running a single site installation on a port, and updates the testing infrastructure so that the whole test suite runs both with and without a port number.

Props djzone, scribu, nacin, ipstenu, F J Kaiser, jeremyfelt, johnjamesjacoby, spacedmonkey, PerS, Clorith, Blackbam, enrico.sorcinelli, Jules Colle, obliviousharmony, desrosj, johnbillion

Fixes #21077, #52088

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/general/feedLinksExtra.php

    r56559 r58097  
    441441        $expected  = '<link rel="alternate" type="application/rss+xml"';
    442442        $expected .= ' title="Test Blog &raquo; Post with no comments Comments Feed"';
    443         $expected .= ' href="http://example.org/?feed=rss2&#038;p=' . self::$post_no_comment_id . '" />' . "\n";
     443        $expected .= ' href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&#038;p=' . self::$post_no_comment_id . '" />' . "\n";
    444444        $this->assertSame( $expected, get_echo( 'feed_links_extra' ) );
    445445    }
     
    456456        $expected  = '<link rel="alternate" type="application/rss+xml"';
    457457        $expected .= ' title="Test Blog &raquo; Post with no comments Comments Feed"';
    458         $expected .= ' href="http://example.org/?feed=rss2&#038;p=' . self::$post_no_comment_id . '" />' . "\n";
     458        $expected .= ' href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&#038;p=' . self::$post_no_comment_id . '" />' . "\n";
    459459        $this->assertSame( $expected, get_echo( 'feed_links_extra' ) );
    460460    }
     
    471471        $expected  = '<link rel="alternate" type="application/rss+xml"';
    472472        $expected .= ' title="Test Blog &raquo; Post with a comment Comments Feed"';
    473         $expected .= ' href="http://example.org/?feed=rss2&#038;p=' . self::$post_with_comment_id . '" />' . "\n";
     473        $expected .= ' href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&#038;p=' . self::$post_with_comment_id . '" />' . "\n";
    474474        $this->assertSame( $expected, get_echo( 'feed_links_extra' ) );
    475475    }
     
    508508        $expected  = '<link rel="alternate" type="testing/foo"';
    509509        $expected .= ' title="Test Blog &raquo; Post with a comment Comments Feed"';
    510         $expected .= ' href="http://example.org/?feed=foo&#038;p=' . self::$post_with_comment_id . '" />' . "\n";
     510        $expected .= ' href="http://' . WP_TESTS_DOMAIN . '/?feed=foo&#038;p=' . self::$post_with_comment_id . '" />' . "\n";
    511511        $this->assertSame( $expected, get_echo( 'feed_links_extra' ) );
    512512    }
Note: See TracChangeset for help on using the changeset viewer.