wpmu_log_new_registrations

Advertisement

Summery Summery

Logs the user email, IP, and registration date of a new site.

Syntax Syntax

wpmu_log_new_registrations( WP_Site|int $blog_id, int|array $user_id )

Parameters Parameters

$blog_id

(WP_Site|int) (Required) The new site's object or ID.

$user_id

(int|array) (Required) User ID, or array of arguments including 'user_id'.

Source Source

File: wp-includes/ms-functions.php

 *
 * WordPress MS stores a blog's post count as an option so as
 * to avoid extraneous COUNTs when a blog's details are fetched
 * with get_site(). This function is called when posts are published
 * or unpublished to make sure the count stays current.
 *
 * @since MU (3.0.0)
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string $deprecated Not used.
 */
function update_posts_count( $deprecated = '' ) {
	global $wpdb;
	update_option( 'post_count', (int) $wpdb->get_var( "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_status = 'publish' and post_type = 'post'" ) );
}

/**
 * Logs the user email, IP, and registration date of a new site.
 *
 * @since MU (3.0.0)
 * @since 5.1.0 Parameters now support input from the {@see 'wp_initialize_site'} action.
 *
 * @global wpdb $wpdb WordPress database abstraction object.

Advertisement

Changelog Changelog

Changelog
Version Description
MU (3.0.0) MU (3.0.0)
5.1.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.