|
wp-includes/ms-site.php:
wp_initialize_site()
|
Runs the initialization routine for a given site.
|
|
wp-includes/class-wp-user.php:
WP_User::for_site()
|
Sets the site to operate on. Defaults to the current site.
|
|
wp-includes/class-wp-roles.php:
WP_Roles::for_site()
|
Sets the site to operate on. Defaults to the current site.
|
|
wp-includes/user.php:
wp_get_users_with_no_role()
|
Get the user IDs of all users with no role on this site.
|
|
wp-admin/includes/deprecated.php:
get_author_user_ids()
|
Get all user IDs.
|
|
wp-admin/includes/deprecated.php:
get_editable_user_ids()
|
Gets the IDs of any users who can edit posts.
|
|
wp-admin/includes/deprecated.php:
get_nonauthor_user_ids()
|
Gets all users who are not authors.
|
|
wp-includes/class-wp-user.php:
WP_User::update_user_level_from_caps()
|
Update the maximum user level for the user.
|
|
wp-includes/class-wp-user.php:
WP_User::remove_all_caps()
|
Remove all of the capabilities of the user.
|
|
wp-includes/class-wp-user.php:
WP_User::_init_caps()
|
Set up capability object properties.
|
|
wp-includes/deprecated.php:
get_users_of_blog()
|
Get users for the site.
|
|
wp-includes/class-wp-user-query.php:
WP_User_Query::prepare_query()
|
Prepare the query variables.
|
|
wp-includes/user.php:
update_user_option()
|
Update user option with global blog capability.
|
|
wp-includes/user.php:
delete_user_option()
|
Delete user option with global blog capability.
|
|
wp-includes/user.php:
count_users()
|
Count number of users who have each of the user roles.
|
|
wp-includes/user.php:
get_user_option()
|
Retrieve user option that can be either per Site or per Network.
|
|
wp-includes/ms-deprecated.php:
is_user_option_local()
|
Check whether a usermeta key has to do with the current blog.
|
|
wp-includes/ms-functions.php:
get_most_recent_post_of_user()
|
Get a user’s most recent post.
|
|
wp-includes/ms-deprecated.php:
install_blog()
|
Install an empty blog.
|
|
wp-includes/ms-functions.php:
wpmu_validate_blog_signup()
|
Processes new site registrations.
|
|
wp-includes/ms-deprecated.php:
get_blog_list()
|
Deprecated functionality to retrieve a list of all sites.
|
|
wp-includes/ms-blogs.php:
switch_to_blog()
|
Switch the current blog.
|
|
wp-includes/ms-blogs.php:
restore_current_blog()
|
Restore the current blog, after calling switch_to_blog().
|
|
wp-includes/wp-db.php:
wpdb::tables()
|
Returns an array of WordPress tables.
|
|
wp-includes/wp-db.php:
wpdb::set_prefix()
|
Sets the table prefix for the WordPress tables.
|
|
wp-includes/wp-db.php:
wpdb::set_blog_id()
|
Sets blog id.
|
Create a table while installing the plugin. Get the database table prefix with $wpdb->get_blog_prefix();
register_activation_hook( __FILE__, 'myplugin_activation' ); function myplugin_activation() { // Get access to global database access class global $wpdb; // Create table on main blog in network mode or single blog myplugin_create_table( $wpdb->get_blog_prefix() ); } function myplugin_create_table( $prefix ) { // Prepare SQL query to create database table // using function parameter $creation_query = 'CREATE TABLE IF NOT EXISTS ' . $prefix . 'myplugin_bug_data ( `bug_id` int(20) NOT NULL AUTO_INCREMENT, `bug_description` text, `bug_version` varchar(10) DEFAULT NULL, `bug_report_date` date DEFAULT NULL, `bug_status` int(3) NOT NULL DEFAULT 0, PRIMARY KEY (`bug_id`) );'; global $wpdb; $wpdb->query( $creation_query ); }Expand full source codeCollapse full source code