Make WordPress Core

Ticket #25552: 25552.4.diff

File 25552.4.diff, 8.5 KB (added by aeg0125, 12 years ago)

Uploaded wrong patch, sorry

  • wp-includes/post-template.php

     
    818818 *
    819819 * @since 1.5.0
    820820 *
    821  * @param array|string $args Optional. Override default arguments.
     821 * @param array|string $args {
     822 *     Override default arguments. Optional.
     823 *
     824 *     @type int    'depth'       Levels of hierarchy to include. Default 0. Accepts 0, -1, 1+ .
     825 *     @type string 'show_date'   Display creation or last modified date. Default ''. Accepts '', 'modified', 'xxx'.
     826 *     @type string 'date_format' Format of date if shown by show_date. Defaults to format from admin options.
     827 *                                Accepts any valid PHP date format.
     828 *     @type int    'child_of'    Display sub-pages of single page only. Default 0. Accepts any page ids.
     829 *     @type string 'exclude'     Pages to exclude from list. Default none. Accepts any page ids.
     830 *     @type string 'title_li'    Description. Default <value>. Accepts <value>, <value>.
     831 *     @type bool   'echo'        Description. Default <value>. Accepts <value>, <value>.
     832 *     @type string 'authors'     Description. Default <value>. Accepts <value>, <value>.
     833 *     @type string 'sort_column' Description. Default <value>. Accepts <value>, <value>.
     834 *     @type string 'link_before' Description. Default <value>. Accepts <value>, <value>.
     835 *     @type string 'link_after'  Description. Default <value>. Accepts <value>, <value>.
     836 *     @type string 'walker'      Description. Default <value>. Accepts <value>, <value>.
     837 *                                (aligned with Description, if wraps to a new line)
     838 * }
    822839 * @return string HTML content, if not displaying.
    823840 */
    824841function wp_list_pages($args = '') {
  • wp-includes/date.php

     
    22/**
    33 * WP_Date_Query will generate a MySQL WHERE clause for the specified date-based parameters.
    44 *
    5  * Initialize the class by passing an array of arrays of parameters. Example:
    6  *
    7  * $date_query = new WP_Date_Query( array(
    8  *              'column' => 'optional, column to query against, default is post_date',
    9  *              'compare' => 'optional, see WP_Date_Query::get_compare()',
    10  *              'relation' => 'optional, OR or AND, how the sub-arrays should be compared, default is AND',
    11  *              array(
    12  *                      'column' => 'see above',
    13  *                      'compare' => 'see above',
    14  *                      'after' => 'string or array, see WP_Date_Query::build_mysql_datetime()',
    15  *                      'before' => 'string or array, see WP_Date_Query::build_mysql_datetime()',
    16  *                      'inclusive' => 'boolean, for after/before, whether exact value should be matched or not',
    17  *                      'year' => '4 digit int',
    18  *                      'month' => 'int, 1-12',
    19  *                      'week' => 'int, 0-53',
    20  *                      'day' => 'int, 1-31',
    21  *                      'hour' => 'int, 0-23',
    22  *                      'minute' => 'int, 0-60',
    23  *                      'second' => 'int, 0-60',
    24  *              ),
    25  *              array(
    26  *                      ...
    27  *              ),
    28  *              ...
    29  * ) );
    30  *
    31  * Then call the get_sql() method to get the MySQL WHERE string:
    32  *
    33  * $where .= $date_query->get_sql();
    34  *
     5 * Initialize the class by passing an array of arrays of parameters.
     6 *
    357 * @link http://codex.wordpress.org/Function_Reference/WP_Query Codex page.
    368 *
    379 * @since 3.7.0
     
    7446        public $compare = '=';
    7547
    7648        /**
    77          * Constructor
     49         * Constructor.
    7850         *
    79          * @param array $date_query A date query parameter array, see class descriptor for further details.
    80          * @param array (optional) $default_column What column name to query against. Defaults to "post_date".
     51         * @param array $date_query {
     52         *     One or more associative arrays of date query parameters.
     53         *
     54         *     @type array {
     55         *         @type string 'column'   Optional. The column to query against, filterable via the 'date_query_valid_columns' filter.
     56         *                                 Default 'post_date' (via @param $default_column). Accepts 'post_date', 'post_date_gmt',
     57         *                                 'post_modified','post_modified_gmt', 'comment_date', 'comment_date_gmt'.
     58         *         @type string 'compare'  Optional. The comparison operator.
     59         *                                 Default '='. Accepts '=', '!=', '>', '>=', '<', '<=', 'IN', 'NOT IN',
     60         *                                 'BETWEEN', 'NOT BETWEEN'.
     61         *         @type string 'relation' Optional. The boolean relationship between the date queryies.
     62         *                                 Default 'OR'. Accepts 'OR', 'AND'.
     63         *         @type array {
     64         *             @type string|array 'before' Optional. Date to retrieve posts before. Accepts strtotime()-compatible string,
     65         *                                         or array of 'year', 'month', 'day' values. {
     66         *                 @type string 'year'  The four-digit year.
     67         *                                      Default empty. Accepts any four-digit year.
     68         *                 @type string 'month' Optional when passing array.The month of the year.
     69         *                                      Default (string:empty)|(array:1). Accepts numbers 1-12.
     70         *                 @type string 'day'   Optional when passing array.The day of the month.
     71         *                                      Default (string:empty)|(array:1). Accepts numbers 1-31.
     72         *             }
     73         *             @type string|array 'after' Optional. Date to retrieve posts before. Accepts strtotime()-compatible string,
     74         *                                        or array of 'year', 'month', 'day' values. {
     75         *                 @type string 'year'  The four-digit year.
     76         *                                      Default empty. Accepts any four-digit year.
     77         *                 @type string 'month' Optional when passing array.The month of the year.
     78         *                                      Default (string:empty)|(array:12). Accepts numbers 1-12.
     79         *                 @type string 'day'   Optional when passing array.The day of the month.
     80         *                                      Default (string:empty)|(array:last day of month). Accepts numbers 1-31.
     81         *             }
     82         *             @type string       'column'    Optional. Used to add a clause comparing a column other than the column specified
     83         *                                            in the top-level 'column' paramater.  Default top-level 'column'. Accepts 'post_date',
     84         *                                            'post_date_gmt', 'post_modified', 'post_modified_gmt', 'comment_date', 'comment_date_gmt'.
     85         *             @type string       'compare'   Optional. The comparison operator.
     86         *                                            Default '='. Accepts '=', '!=', '>', '>=', '<', '<=', 'IN', 'NOT IN',
     87         *                                            'BETWEEN', 'NOT BETWEEN'.
     88         *             @type bool         'inclusive' Optional. Include results from dates specified in 'before' or 'after'.
     89         *                                            Default. Accepts.
     90         *             @type int          'year'      Optional. The four-digit near number.
     91         *                                            Default empty. Accepts any four-digit year.
     92         *             @type int          'month'     Optional. The two-digit month number.
     93         *                                            Default empty. Accepts numbers 1-12.
     94         *             @type int          'week'      Optional. The week number of the year.
     95         *                                            Default empty. Accepts numbers 0-53.
     96         *             @type int          'day'       Optional. The day of the month.
     97         *                                            Default empty. Accepts numbers 1-31.
     98         *             @type int          'hour'      Optional. The hour of the day.
     99         *                                            Default empty. Accepts numbers 0-23.
     100         *             @type int          'minute'    Optional. The minute of the hour.
     101         *                                            Default empty. Accepts numbers 0-60.
     102         *             @type int          'second'    Optional. The second of the minute.
     103         *                                            Default empty. Accepts numbers 0-60.
     104         *         }
     105         *     }
     106         * }
     107         * @param array $default_column Optional. Default column to query against.
     108         *                              Defaults 'post_date'. Accepts 'post_date', 'post_date_gmt', 'post_modified',
     109         *                              'post_modified_gmt', 'comment_date', 'comment_date_gmt'.
    81110         */
    82111        function __construct( $date_query, $default_column = 'post_date' ) {
    83112                if ( empty( $date_query ) || ! is_array( $date_query ) )