#35911 closed defect (bug) (fixed)
Simplify the credits page with an if/else statment
| Reported by: | ramiy | Owned by: | ocean90 |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.6 |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | 2nd-opinion dev-feedback |
| Cc: | Focuses: | administration |
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
@
11 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.
#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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Sorry, this is the latest patch