get_current_blog_id()
Retrieve the current site ID.
Description #Description
Return #Return
(int) Site ID.
Source #Source
File: wp-includes/load.php
function get_current_blog_id() { global $blog_id; return absint( $blog_id ); }
Expand full source code Collapse full source code View on Trac
Changelog #Changelog
Version | Description |
---|---|
3.1.0 | Introduced. |
Related #Related
Uses #Uses
Uses | Description |
---|---|
wp-includes/functions.php: absint() |
Convert a value to non-negative integer. |
Used By #Used By
Used By | Description |
---|---|
wp-includes/ms-site.php: wp_initialize_site() |
Runs the initialization routine for a given site. |
wp-includes/ms-site.php: wp_uninitialize_site() |
Runs the uninitialization routine for a given site. |
wp-includes/ms-site.php: wp_is_site_initialized() |
Checks whether a site is initialized. |
wp-includes/embed.php: get_oembed_response_data_for_url() |
Retrieves the oEmbed response data for a given URL. |
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::get_roles_data() |
Gets the available roles data. |
wp-includes/class-wp-roles.php: WP_Roles::for_site() |
Sets the site to operate on. Defaults to the current site. |
wp-includes/functions.php: get_main_site_id() |
Gets the main site ID. |
wp-includes/ms-blogs.php: clean_site_details_cache() |
Cleans the site details cache for a site. |
wp-includes/ms-site.php: get_site() |
Retrieves site data given a site ID or site object. |
wp-includes/general-template.php: has_custom_logo() |
Determines whether the site has a custom logo. |
wp-includes/general-template.php: get_custom_logo() |
Returns a custom logo, linked to home. |
wp-includes/functions.php: _wp_upload_dir() |
A non-filtered, non-cached version of wp_upload_dir() that doesn’t check the path. |
wp-includes/user.php: wp_get_users_with_no_role() |
Get the user IDs of all users with no role on this site. |
wp-includes/class-wp-user-query.php: WP_User_Query::fill_query_vars() |
Fills in missing query variables with default values. |
wp-includes/customize/class-wp-customize-nav-menu-setting.php: WP_Customize_Nav_Menu_Setting::filter_nav_menu_options() |
Filters the nav_menu_options option to include this menu’s auto_add preference. |
wp-includes/customize/class-wp-customize-nav-menu-setting.php: WP_Customize_Nav_Menu_Setting::value() |
Get the instance data for a given widget setting. |
wp-includes/customize/class-wp-customize-nav-menu-setting.php: WP_Customize_Nav_Menu_Setting::preview() |
Handle previewing the setting. |
wp-includes/customize/class-wp-customize-nav-menu-setting.php: WP_Customize_Nav_Menu_Setting::filter_wp_get_nav_menus() |
Filters the wp_get_nav_menus() result to ensure the inserted menu object is included, and the deleted one is removed. |
wp-includes/customize/class-wp-customize-nav-menu-setting.php: WP_Customize_Nav_Menu_Setting::filter_wp_get_nav_menu_object() |
Filters the wp_get_nav_menu_object() result to supply the previewed menu object. |
wp-includes/customize/class-wp-customize-nav-menu-item-setting.php: WP_Customize_Nav_Menu_Item_Setting::value() |
Get the instance data for a given nav_menu_item setting. |
wp-includes/customize/class-wp-customize-nav-menu-item-setting.php: WP_Customize_Nav_Menu_Item_Setting::preview() |
Handle previewing the setting. |
wp-includes/general-template.php: get_site_icon_url() |
Returns the Site Icon URL. |
wp-includes/class-wp-customize-setting.php: WP_Customize_Setting::is_current_blog_previewed() |
Return true if the current site is not the same as the previewed site. |
wp-admin/includes/ms.php: _access_denied_splash() |
Displays an access denied message when a user tries to view a site’s dashboard they do not have access to. |
wp-admin/includes/ms.php: wpmu_delete_blog() |
Delete a site. |
wp-admin/includes/dashboard.php: wp_dashboard_quick_press() |
The Quick Draft widget display and creation of drafts. |
wp-admin/includes/upgrade.php: wp_upgrade() |
Runs WordPress Upgrade functions. |
wp-admin/includes/user.php: wp_delete_user() |
Remove user and optionally reassign posts and links to another user. |
wp-admin/includes/class-wp-themes-list-table.php: WP_Themes_List_Table::no_items() | |
wp-admin/includes/ajax-actions.php: wp_ajax_autocomplete_user() |
Ajax handler for user autocomplete. |
wp-includes/class-wp-user.php: WP_User::get_role_caps() |
Retrieves all of the capabilities of the roles of the user, and merges them with individual user capabilities. |
wp-includes/cache.php: WP_Object_Cache::__construct() |
Sets up object properties; PHP 5 style constructor. |
wp-includes/deprecated.php: get_users_of_blog() |
Get users for the site. |
wp-includes/class-wp-theme.php: WP_Theme::get_allowed_on_site() |
Returns array of stylesheet names of themes allowed on the site. |
wp-includes/load.php: wp_start_object_cache() |
Start the WordPress object cache. |
wp-includes/functions.php: is_main_site() |
Determine whether a site is the main site of the current network. |
wp-includes/functions.php: wp_upload_dir() |
Returns an array containing the current upload directory’s path and URL. |
wp-includes/link-template.php: get_dashboard_url() |
Retrieves the URL to the user’s dashboard. |
wp-includes/class-wp-admin-bar.php: WP_Admin_Bar::initialize() | |
wp-includes/admin-bar.php: wp_admin_bar_site_menu() |
Add the “Site Name” menu. |
wp-includes/class-wp-customize-setting.php: WP_Customize_Setting::preview() |
Add filters to supply the setting’s value when accessed. |
wp-includes/user.php: get_blogs_of_user() |
Get the sites a user belongs to. |
wp-includes/user.php: is_user_member_of_blog() |
Find out whether a user is a member of a given blog. |
wp-includes/user.php: count_users() |
Count number of users who have each of the user roles. |
wp-includes/user.php: wp_dropdown_users() |
Create dropdown HTML content of users. |
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: add_existing_user_to_blog() |
Add a user to a blog based on details from maybe_add_existing_user_to_blog(). |
wp-includes/ms-functions.php: update_blog_public() |
Update this blog’s ‘public’ setting in the global blogs table. |
wp-includes/ms-functions.php: get_active_blog_for_user() |
Get one of a user’s active blogs |
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/ms-blogs.php: refresh_blog_details() |
Clear the blog details cache. |
wp-includes/ms-blogs.php: get_blog_option() |
Retrieve option value for a given blog id based on name of option. |
wp-includes/ms-blogs.php: add_blog_option() |
Add a new option for a given blog id. |
wp-includes/ms-blogs.php: delete_blog_option() |
Removes option by name for a given blog id. Prevents removal of protected WordPress options. |
wp-includes/ms-blogs.php: update_blog_option() |
Update an option for a particular blog. |
wp-includes/ms-blogs.php: wpmu_update_blogs_date() |
Update the last_updated field for the current site. |
wp-includes/ms-blogs.php: get_blog_details() |
Retrieve the details for a blog from the blogs table and blog options. |
wp-includes/ms-default-constants.php: ms_upload_constants() |
Defines Multisite upload constants. |
wp-includes/script-loader.php: wp_just_in_time_script_localization() |
Load localized data on print rather than initialization. |
User Contributed Notes #User Contributed Notes
You must log in before being able to contribute a note or feedback.
Example