]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/date.php
Wordpress 4.6
[autoinstalls/wordpress.git] / wp-includes / date.php
index e10ef4f861e3e8082be1864a0700b91cbe7149a5..d1f85f8c0d7f8183628f19ceeea929059c0b94a1 100644 (file)
@@ -2,13 +2,13 @@
 /**
  * Class for generating SQL clauses that filter a primary query according to date.
  *
 /**
  * Class for generating SQL clauses that filter a primary query according to date.
  *
- * `WP_Date_Query` is a helper that allows primary query classes, such as {@see WP_Query},
- * to filter their results by date columns, by generating `WHERE` subclauses to be attached
- * to the primary SQL query string.
+ * WP_Date_Query is a helper that allows primary query classes, such as WP_Query, to filter
+ * their results by date columns, by generating `WHERE` subclauses to be attached to the
+ * primary SQL query string.
  *
  * Attempting to filter by an invalid date value (eg month=13) will generate SQL that will
  * return no results. In these cases, a _doing_it_wrong() error notice is also thrown.
  *
  * Attempting to filter by an invalid date value (eg month=13) will generate SQL that will
  * return no results. In these cases, a _doing_it_wrong() error notice is also thrown.
- * See {@link WP_Date_Query::validate_date_values()}.
+ * See WP_Date_Query::validate_date_values().
  *
  * @link https://codex.wordpress.org/Function_Reference/WP_Query Codex page.
  *
  *
  * @link https://codex.wordpress.org/Function_Reference/WP_Query Codex page.
  *
@@ -18,7 +18,7 @@ class WP_Date_Query {
        /**
         * Array of date queries.
         *
        /**
         * Array of date queries.
         *
-        * See {@see WP_Date_Query::__construct()} for information on date query arguments.
+        * See WP_Date_Query::__construct() for information on date query arguments.
         *
         * @since 3.7.0
         * @access public
         *
         * @since 3.7.0
         * @access public
@@ -491,13 +491,13 @@ class WP_Date_Query {
                $valid_columns = array(
                        'post_date', 'post_date_gmt', 'post_modified',
                        'post_modified_gmt', 'comment_date', 'comment_date_gmt',
                $valid_columns = array(
                        'post_date', 'post_date_gmt', 'post_modified',
                        'post_modified_gmt', 'comment_date', 'comment_date_gmt',
-                       'user_registered',
+                       'user_registered', 'registered', 'last_updated',
                );
 
                // Attempt to detect a table prefix.
                if ( false === strpos( $column, '.' ) ) {
                        /**
                );
 
                // Attempt to detect a table prefix.
                if ( false === strpos( $column, '.' ) ) {
                        /**
-                        * Filter the list of valid date query columns.
+                        * Filters the list of valid date query columns.
                         *
                         * @since 3.7.0
                         * @since 4.1.0 Added 'user_registered' to the default recognized columns.
                         *
                         * @since 3.7.0
                         * @since 4.1.0 Added 'user_registered' to the default recognized columns.
@@ -525,6 +525,10 @@ class WP_Date_Query {
                                $wpdb->users => array(
                                        'user_registered',
                                ),
                                $wpdb->users => array(
                                        'user_registered',
                                ),
+                               $wpdb->blogs => array(
+                                       'registered',
+                                       'last_updated',
+                               ),
                        );
 
                        // If it's a known column name, add the appropriate table prefix.
                        );
 
                        // If it's a known column name, add the appropriate table prefix.
@@ -555,7 +559,7 @@ class WP_Date_Query {
                $where = $sql['where'];
 
                /**
                $where = $sql['where'];
 
                /**
-                * Filter the date query WHERE clause.
+                * Filters the date query WHERE clause.
                 *
                 * @since 3.7.0
                 *
                 *
                 * @since 3.7.0
                 *
@@ -568,8 +572,8 @@ class WP_Date_Query {
        /**
         * Generate SQL clauses to be appended to a main query.
         *
        /**
         * Generate SQL clauses to be appended to a main query.
         *
-        * Called by the public {@see WP_Date_Query::get_sql()}, this method
-        * is abstracted out to maintain parity with the other Query classes.
+        * Called by the public WP_Date_Query::get_sql(), this method is abstracted
+        * out to maintain parity with the other Query classes.
         *
         * @since 4.1.0
         * @access protected
         *
         * @since 4.1.0
         * @access protected
@@ -853,7 +857,7 @@ class WP_Date_Query {
         *
         * You can pass an array of values (year, month, etc.) with missing parameter values being defaulted to
         * either the maximum or minimum values (controlled by the $default_to parameter). Alternatively you can
         *
         * You can pass an array of values (year, month, etc.) with missing parameter values being defaulted to
         * either the maximum or minimum values (controlled by the $default_to parameter). Alternatively you can
-        * pass a string that that will be run through strtotime().
+        * pass a string that will be run through strtotime().
         *
         * @since 3.7.0
         * @access public
         *
         * @since 3.7.0
         * @access public