On this page
get_last_updated( mixed $deprecated = '', int $start, int $quantity = 40 ): array
Get a list of most recently updated blogs.
Parameters
$deprecatedmixed Optional-
Not used.
Default:
'' $startint Optional-
Number of blogs to offset the query. Used to build LIMIT clause.
Can be used for pagination. Default 0. $quantityint Optional-
The maximum number of blogs to retrieve.
Default:
40
Return
array The list of blogs.
Source
File: wp-includes/ms-blogs.php. View all references
function get_last_updated( $deprecated = '', $start = 0, $quantity = 40 ) {
global $wpdb;
if ( ! empty( $deprecated ) ) {
_deprecated_argument( __FUNCTION__, 'MU' ); // Never used.
}
return $wpdb->get_results( $wpdb->prepare( "SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' AND last_updated != '0000-00-00 00:00:00' ORDER BY last_updated DESC limit %d, %d", get_current_network_id(), $start, $quantity ), ARRAY_A );
}
Related
Uses
| Uses | Description |
|---|---|
| get_current_network_id() wp-includes/load.php | Retrieves the current network ID. |
| _deprecated_argument() wp-includes/functions.php | Marks a function argument as deprecated and inform when it has been used. |
| wpdb::get_results() wp-includes/class-wpdb.php | Retrieves an entire SQL result set from the database (i.e., many rows). |
| wpdb::prepare() wp-includes/class-wpdb.php | Prepares a SQL query for safe execution. |
Changelog
| Version | Description |
|---|---|
| MU (3.0.0) | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_last_updated