Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-date-query.php

    r45932 r47122  
    274274     * This method only generates debug notices for these cases.
    275275     *
    276      * @since  4.1.0
     276     * @since 4.1.0
    277277     *
    278278     * @param  array $date_query The date_query array.
     
    316316            $max_days_of_year = gmdate( 'z', mktime( 0, 0, 0, 12, 31, $_year ) ) + 1;
    317317        } else {
    318             // otherwise we use the max of 366 (leap-year)
     318            // Otherwise we use the max of 366 (leap-year).
    319319            $max_days_of_year = 366;
    320320        }
     
    676676     * compatibility while retaining the naming convention across Query classes.
    677677     *
    678      * @since  3.7.0
     678     * @since 3.7.0
    679679     *
    680680     * @param  array $query Date query arguments.
     
    693693     * Turns a first-order date query into SQL for a WHERE clause.
    694694     *
    695      * @since  4.1.0
     695     * @since 4.1.0
    696696     *
    697697     * @param  array $query        Date query clause.
     
    746746        );
    747747
    748         // Check of the possible date units and add them to the query
     748        // Check of the possible date units and add them to the query.
    749749        foreach ( $date_units as $sql_part => $query_parts ) {
    750750            foreach ( $query_parts as $query_part ) {
     
    967967        global $wpdb;
    968968
    969         // Have to have at least one
     969        // Have to have at least one.
    970970        if ( ! isset( $hour ) && ! isset( $minute ) && ! isset( $second ) ) {
    971971            return false;
    972972        }
    973973
    974         // Complex combined queries aren't supported for multi-value queries
     974        // Complex combined queries aren't supported for multi-value queries.
    975975        if ( in_array( $compare, array( 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN' ) ) ) {
    976976            $return = array();
     
    994994        }
    995995
    996         // Cases where just one unit is set
     996        // Cases where just one unit is set.
    997997        if ( isset( $hour ) && ! isset( $minute ) && ! isset( $second ) ) {
    998998            $value = $this->build_value( $compare, $hour );
     
    10201020        $time   = '';
    10211021
    1022         // Hour
     1022        // Hour.
    10231023        if ( null !== $hour ) {
    10241024            $format .= '%H.';
     
    10291029        }
    10301030
    1031         // Minute
     1031        // Minute.
    10321032        $format .= '%i';
    10331033        $time   .= sprintf( '%02d', $minute );
Note: See TracChangeset for help on using the changeset viewer.