WordPress.org

Making WordPress.org

Opened 6 months ago

Closed 6 months ago

Last modified 6 months ago

#3310 closed enhancement (fixed)

Cleanup of plugin-single.php and related code

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

Description

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 months ago.
Cleanup patch
plugin-template-cleanup-2.patch (14.8 KB) - added by joostdevalk 6 months ago.
Better version of the patch

Download all attachments as: .zip

Change History (8)

@joostdevalk
6 months ago

Cleanup patch

#1 @obenland
6 months 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?

@joostdevalk
6 months ago

Better version of the patch

#2 @joostdevalk
6 months ago

Done @obenland

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


6 months ago

#4 @obenland
6 months ago

In 6250:

Plugins: Don't show banner for closed plugins.

See #3310.

#5 @obenland
6 months 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 months ago

In 6252:

Plugins: Restore some formatting changes

See #3310.

Note: See TracTickets for help on using tickets.