Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#3310 closed enhancement (fixed)

Cleanup of plugin-single.php and related code

Reported by: joostdevalk's profile joostdevalk Owned by: obenland's profile obenland
Milestone: Priority: normal
Component: Plugin Directory Keywords: has-patch dev-feedback


The code in the partials plugin-single.php and section-advanced.php is slightly unwieldy and not very DRY. This patch aims to fix that.

It also:

  • No longer has the containing block for closed plugins' icons.
  • Introduces a couple of template functions in class-template.php to retrieve messages so we can maintain these in one place.
  • Cleans up the code style a bit.

Attachments (2)

plugin-template-cleanup.patch (32.6 KB) - added by joostdevalk 6 years ago.
Cleanup patch
plugin-template-cleanup-2.patch (14.8 KB) - added by joostdevalk 6 years ago.
Better version of the patch

Download all attachments as: .zip

Change History (8)

6 years ago

Cleanup patch

#1 @obenland
6 years ago

Thanks for the patch @joostdevalk. By any chance, is this output from a script of some sort?
Most of the alignment and whitespace changes in class-template.php are not conforming to existing code styling guidelines as I understand them.

Would you mind resubmitting a patch without them?

6 years ago

Better version of the patch

#2 @joostdevalk
6 years ago

Done @obenland

This ticket was mentioned in Slack in #meta by joostdevalk. View the logs.

6 years ago

#4 @obenland
6 years ago

In 6250:

Plugins: Don't show banner for closed plugins.

See #3310.

#5 @obenland
6 years ago

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

In 6251:

Plugins: Simplify template logic.

Moves most of the logic into template tags to make the single-plugin template it bit easier to understand.

Props joostdevalk.
Fixes #3310.

#6 @obenland
6 years ago

In 6252:

Plugins: Restore some formatting changes

See #3310.

Note: See TracTickets for help on using tickets.