#35911 closed defect (bug) (fixed)
Simplify the credits page with an if/else statment
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.6 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Administration | Keywords: | 2nd-opinion dev-feedback |
| Focuses: | administration | Cc: |
Description
in the current page, if we don't receive any data from dotorg API, we exit;.
This can be replaced with a simple if/else statement.
A simple message if no result returned, or a list of contributors if we did get the results from the API.
Attachments (2)
Change History (7)
#1
@
10 years ago
This patch fixes the unclosed <div> when no result receive from the API.
Also, we don't need to call wp-admin/admin-footer.php twice, and we don't need to use the 'exit;' function.
#2
@
10 years ago
- Owner set to ocean90
- Resolution set to fixed
- Status changed from new to closed
In 37434:
#4
@
10 years ago
@ocean90 please review the patch again.
Currently we call the admin-footer.php twice, and use the exit function. It's redundant.
The current code:
if ( ! $credits ) {
...
...
include( ABSPATH . 'wp-admin/admin-footer.php' );
exit;
}
...
...
include( ABSPATH . 'wp-admin/admin-footer.php' );
The new code:
if ( ! $credits ) {
...
...
} else {
...
...
}
include( ABSPATH . 'wp-admin/admin-footer.php' );
Note: See
TracTickets for help on using
tickets.
Sorry, this is the latest patch