• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress core a2z

WordPress core a2z

WordPress core only

  • Home
  • Plugins
  • Blocks
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / get_last_updated() – Get a list of most recently updated blogs.

You appear to be a bot. Output may be restricted

Description

Get a list of most recently updated blogs.

Usage

$array = get_last_updated( $deprecated, $start, $quantity );

Parameters

$deprecated
( mixed ) optional – Not used.
$start
( int ) optional – Optional. Number of blogs to offset the query. Used to build LIMIT clause. Can be used for pagination. Default 0.
$quantity
( int ) optional default: 40 – Optional. The maximum number of blogs to retrieve. Default 40.

Returns

array The list of blogs.

Source

File name: wordpress/wp-includes/ms-blogs.php
Lines:

1 to 9 of 9
function get_last_updated( $deprecated = '', $start = 0, $quantity = 40 ) {
  global $wpdb;

  if ( ! empty( $deprecated ) ) {
    _deprecated_argument( get_last_updated, '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 );
}
 

 View on GitHub View on Trac

Published: 25th November 2019 | Last updated: 2nd April 2020

Primary Sidebar

Information

Function name: get_last_updated
Plugin ref: WordPress
Version: 5.6
Sourcefile: wp-includes/ms-blogs.php
File ref: wp-includes/ms-blogs.php
Deprecated?: No
API Letters: G,L,U

Footer

WP-a2z
WordPress core a2z
WordPress core only
WordPress 5.6
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  core.wp-a2z.org
© Copyright WP-a2z 2014-2021. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites