Make WordPress Core


Ignore:
Timestamp:
05/04/2024 07:23:31 PM (7 weeks 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/media/getAdjacentImageLink.php

    r53480 r58097  
    3333                'current_attachment_index'  => 3,
    3434                'expected_attachment_index' => 2,
    35                 'expected'                  => '<a href=\'http://example.org/?attachment_id=%%ID%%\'><img width="1" height="1" src="' . WP_CONTENT_URL . '/uploads/image2.jpg" class="attachment-thumbnail size-thumbnail" alt="" decoding="async" loading="lazy" /></a>',
     35                'expected'                  => '<a href=\'http://' . WP_TESTS_DOMAIN . '/?attachment_id=%%ID%%\'><img width="1" height="1" src="' . WP_CONTENT_URL . '/uploads/image2.jpg" class="attachment-thumbnail size-thumbnail" alt="" decoding="async" loading="lazy" /></a>',
    3636            ),
    3737            'with text when has previous link' => array(
    3838                'current_attachment_index'  => 3,
    3939                'expected_attachment_index' => 2,
    40                 'expected'                  => '<a href=\'http://example.org/?attachment_id=%%ID%%\'>Some text</a>',
     40                'expected'                  => '<a href=\'http://' . WP_TESTS_DOMAIN . '/?attachment_id=%%ID%%\'>Some text</a>',
    4141                'args'                      => array( 'text' => 'Some text' ),
    4242            ),
     
    4444                'current_attachment_index'  => 4,
    4545                'expected_attachment_index' => 5,
    46                 'expected'                  => '<a href=\'http://example.org/?attachment_id=%%ID%%\'><img width="1" height="1" src="' . WP_CONTENT_URL . '/uploads/image5.jpg" class="attachment-thumbnail size-thumbnail" alt="" decoding="async" loading="lazy" /></a>',
     46                'expected'                  => '<a href=\'http://' . WP_TESTS_DOMAIN . '/?attachment_id=%%ID%%\'><img width="1" height="1" src="' . WP_CONTENT_URL . '/uploads/image5.jpg" class="attachment-thumbnail size-thumbnail" alt="" decoding="async" loading="lazy" /></a>',
    4747                'args'                      => array( 'prev' => false ),
    4848            ),
     
    5050                'current_attachment_index'  => 4,
    5151                'expected_attachment_index' => 5,
    52                 'expected'                  => '<a href=\'http://example.org/?attachment_id=%%ID%%\'>Some text</a>',
     52                'expected'                  => '<a href=\'http://' . WP_TESTS_DOMAIN . '/?attachment_id=%%ID%%\'>Some text</a>',
    5353                'args'                      => array(
    5454                    'prev' => false,
Note: See TracChangeset for help on using the changeset viewer.