Make WordPress Core


Ignore:
Timestamp:
09/03/2015 06:16:35 PM (9 years ago)
Author:
wonderboymusic
Message:

Introduce WP_Comment class to model/strongly-type rows from the comments database table. Inclusion of this class is a pre-req for some more general comment cleanup and sanity.

  • Takes inspiration from WP_Post and adds sanity to comment caching.
  • Clarifies when the current global value for $comment is returned. The current implementation in get_comment() introduces side effects and an occasion stale global value for $comment when comment caches are cleaned.
  • Strongly-types @param docs
  • This class is marked final for now

Props wonderboymusic, nacin.

See #32619.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/template.php

    r33774 r33891  
    744744 * @since 0.71
    745745 *
    746  * @global WP_Locale $wp_locale
    747  * @global object    $comment
     746 * @global WP_Locale  $wp_locale
     747 * @global WP_Comment $comment
    748748 *
    749749 * @param int|bool $edit      Accepts 1|true for editing the date, 0|false for adding the date.
Note: See TracChangeset for help on using the changeset viewer.