Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#35911 closed defect (bug) (fixed)

Simplify the credits page with an if/else statment

Reported by: ramiy's profile ramiy Owned by: ocean90's profile ocean90
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)

35911.patch (909 bytes) - added by ramiy 9 years ago.
35911.2.patch (949 bytes) - added by ramiy 9 years ago.
Sorry, this is the latest patch

Download all attachments as: .zip

Change History (7)

@ramiy
9 years ago

@ramiy
9 years ago

Sorry, this is the latest patch

#1 @ramiy
9 years ago

This patch fixes the unclosed <div> when no result receive from the API.

Also, we don't need to all wp-admin/admin-footer.php twice, and we don't need to use the 'exit;' function.

Version 0, edited 9 years ago by ramiy (next)

#2 @ocean90
9 years ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

In 37434:

Credits: Add a missing closing tag.

Props ramiy for initial patch.
Fixes #35911.

#3 @ocean90
9 years ago

  • Milestone changed from Awaiting Review to 4.6

#4 @ramiy
9 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' );

#5 @ramiy
9 years ago

  • Keywords 2nd-opinion dev-feedback added
Note: See TracTickets for help on using tickets.