Opened 8 years ago
Closed 8 years ago
#40489 closed enhancement (fixed)
Add network ID parameter to wp_is_large_network()
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Networks and Sites | Keywords: | has-patch has-unit-tests commit |
Focuses: | multisite | Cc: |
Description
Since network options are globally accessible for every network (without involving any expensive switching function), we should add a $network_id
parameter to wp_is_large_network()
that will allow to check those conditions for a network other than the current one.
This enhancement is furthermore required in order to make #40384 and #40385 possible.
Attachments (2)
Change History (6)
#1
@
8 years ago
- Keywords has-patch needs-unit-tests added; needs-patch removed
- Owner set to flixos90
- Status changed from new to assigned
This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.
8 years ago
#3
@
8 years ago
- Keywords has-unit-tests commit added; needs-unit-tests removed
40489.2.diff adds unit tests for the function and the filter:
- One test with data for the default function behavior.
- One test with data for a filter that only allows a maximum of 1000 when using 'users'.
- One test with data for a filter that only allows a maximum of 1000 for a specific network.
All test data includes variants with a different network than the current one, in order to test the actual changes from this ticket.
Note: See
TracTickets for help on using
tickets.
40489.diff adds the
$network_id
parameter to the function as well as to the filter. Are there any objections to doing that in the way it happens in that patch, or in general?We should definitely add thorough unit tests for both the function as well as different usages of the filter to verify things work as expected.