WordPress.org

Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#1772 closed enhancement (fixed)

Massive Code Cleanup: template-functions-post.php

Reported by: markjaquith Owned by: markjaquith
Milestone: Priority: lowest
Severity: normal Version: 1.6
Component: Optimization Keywords: bg|has-patch massive-code-cleanup bg|commit
Focuses: Cc:

Description

Part IV of my Emmy-winning series, "Massive Code Cleanup."

This time, the target is template-functions-post.php, which wraps up the template-functions-* section of wp-includes.

As before, the bulk of the work consists of:

  • spaces to tabs
  • two newlines between functions
  • brackets removed for one-line if ()s
  • \t\n => \n
  • [space]\n => \n
  • \t[space] => \t
  • no cramming two lines into one.
  • if/else bracket tab matching
  • foreach : endforeach; and if : else; are for front-of-house code only
  • clean spacing for if, foreach, and for: if ( $condition ) {
  • if ( $something == 'value' ) => if ( 'value' == $something ) as per coding guidelines

Attachments (1)

template-functions-post.php-CLEANUP.diff (20.4 KB) - added by markjaquith 15 years ago.
patch for WP 1.6 SVN

Download all attachments as: .zip

Change History (4)

@markjaquith
15 years ago

patch for WP 1.6 SVN

#1 @markjaquith
15 years ago

  • Status changed from new to assigned

#2 @ryan
15 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [2955]) More massive code cleanups from Mark Jaquith. fixes #1772

#3 @(none)
14 years ago

  • Milestone 2.0 deleted

Milestone 2.0 deleted

Note: See TracTickets for help on using tickets.