[wp-trac] [WordPress Trac] #14581: No magic numbers

WordPress Trac noreply at wordpress.org
Thu Jun 12 01:36:30 UTC 2014


#14581: No magic numbers
------------------------------------+------------------
 Reporter:  ryan                    |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  4.0
Component:  Database                |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------
Changes (by wonderboymusic):

 * keywords:  needs-patch => has-patch dev-feedback
 * milestone:  Future Release => 4.0


Comment:

 There are magic numbers EVERYWHERE - but mainly, comments and multisite.
 [attachment:14581.diff 14581.diff] replace thems throughout core with
 constants: `WP_STATUS_ON` and `WP_STATUS_OFF`. Also, it prepares a bunch
 of SQL queries instead of hard-coding `'0'` and `'1'` in them

--
Ticket URL: <https://core.trac.wordpress.org/ticket/14581#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list