WordPress.org

Make WordPress Core

Changeset 27141


Ignore:
Timestamp:
02/09/2014 02:01:28 AM (4 years ago)
Author:
DrewAPicture
Message:

Improve inline documentation for several 'last_changed'-related functions introduced in [27101] and [27102].

Functions include:

  • get_taxonomy_last_changed()
  • set_taxonomy_last_changed()
  • post_taxonomy_is_fresh()
  • taxonomy_hierarchy_is_fresh()

Fixes #22526, #14485.

File:
1 edited

Legend:

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

    r27125 r27141  
    35073507
    35083508/**
    3509  * Retrieve the 'last_changed' value for the passed taxonomy. Retrieves
    3510  *  from cache, if present
     3509 * Retrieve the 'last_changed' value for the passed taxonomy.
     3510 *
     3511 * Retrieves from cache, if present.
    35113512 *
    35123513 * @since 3.9.0
    35133514 *
    3514  * @param string $taxonomy
    3515  * @return int
     3515 * @param string $taxonomy Taxonomy slug.
     3516 * @return int Unix timestamp with microseconds of the last taxonomy change.
    35163517 */
    35173518function get_taxonomy_last_changed( $taxonomy ) {
     
    35253526
    35263527/**
    3527  * Reset 'last_changed' for the passed taxonomy
     3528 * Reset 'last_changed' time for the passed taxonomy.
    35283529 *
    35293530 * @since 3.9.0
    35303531 *
    3531  * @param string $taxonomy
    3532  * @return int
     3532 * @param string $taxonomy Taxonomy slug.
     3533 * @return int Unix timestamp with microseconds of the last taxonomy change.
    35333534 */
    35343535function set_taxonomy_last_changed( $taxonomy ) {
     
    35383539
    35393540/**
    3540  * Determine if a post's cache for the passed taxonomy
    3541  *  is in sync.
     3541 * Determine if a post's cache for the passed taxonomy is in sync.
     3542 *
     3543 * 'Fresh'-ness is determined based on whether the 'last_changed'
     3544 * times of the passed post and taxonomy are in sync. Times are
     3545 * stored as Unix timestamps with microseconds.
    35423546 *
    35433547 * @since 3.9.0
    35443548 *
    3545  * @param int $id
    3546  * @param string $taxonomy
    3547  * @return boolean
     3549 * @param int    $id       Post ID.
     3550 * @param string $taxonomy Taxonomy slug.
     3551 * @return bool True if the 'last_changed' times are in sync, or 'fresh'.
     3552 *              False if they are out of sync, or not cached.
    35483553 */
    35493554function post_taxonomy_is_fresh( $id, $taxonomy ) {
     
    35583563
    35593564/**
    3560  * Determine if a hierarchy's cache for the passed taxonomy
    3561  *  is in sync.
     3565 * Determine if a hierarchy's cache for the passed taxonomy is in sync.
     3566 *
     3567 * 'Fresh'-ness is determined based on whether the 'last_changed' times
     3568 * of the passed taxonomy and its hierarchy are in sync. Times are
     3569 * stored as Unix timestamps with microseconds.
    35623570 *
    35633571 * @since 3.9.0
    35643572 *
    3565  * @param int $id
    3566  * @param string $taxonomy
    3567  * @return boolean
     3573 * @param int    $id       Post ID.
     3574 * @param string $taxonomy Taxonomy slug.
     3575 * @return bool True if the 'last_changed' times are in sync, or 'fresh'.
     3576 *              False if they are out of sync, or not cached.
    35683577 */
    35693578function taxonomy_hierarchy_is_fresh( $taxonomy ) {
Note: See TracChangeset for help on using the changeset viewer.