is_multisite(): bool
If Multisite is enabled.
Return
bool True if Multisite is enabled, false otherwise.
More Information
Usage
if ( is_multisite() ) { echo 'Multisite is enabled'; }
Source
File: wp-includes/load.php
.
View all references
function is_multisite() {
if ( defined( 'MULTISITE' ) ) {
return MULTISITE;
}
if ( defined( 'SUBDOMAIN_INSTALL' ) || defined( 'VHOST' ) || defined( 'SUNRISE' ) ) {
return true;
}
return false;
}
Related
Used By
Used By | Description |
---|---|
WP_Site_Health::should_suggest_persistent_object_cache() wp-admin/includes/class-wp-site-health.php |
Determines whether to suggest using a persistent object cache. |
wp_maybe_update_user_counts() wp-includes/user.php |
Updates the total count of users on the site if live user counting is enabled. |
wp_update_user_counts() wp-includes/user.php |
Updates the total count of users on the site. |
wp_is_large_user_count() wp-includes/user.php |
Determines whether the site has a large number of users. |
deactivated_plugins_notice() wp-admin/includes/plugin.php |
Renders an admin notice when a plugin was deactivated during an update. |
WP_REST_Site_Health_Controller::register_routes() wp-includes/rest-api/endpoints/class-wp-rest-site-health-controller.php |
Registers API routes. |
WP_REST_Application_Passwords_Controller::get_user() wp-includes/rest-api/endpoints/class-wp-rest-application-passwords-controller.php |
Gets the requested user. |
WP_REST_Plugins_Controller::plugin_status_permission_check() wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php |
Handle updating a plugin’s status. |
WP_REST_Plugins_Controller::handle_plugin_status() wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php |
Handle updating a plugin’s status. |
WP_REST_Plugins_Controller::get_item_schema() wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php |
Retrieves the plugin’s schema, conforming to JSON Schema. |
WP_REST_Plugins_Controller::get_collection_params() wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php |
Retrieves the query params for the collections. |
WP_REST_Plugins_Controller::check_read_permission() wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php |
Checks if the given plugin can be viewed by the current user. |
WP_REST_Plugins_Controller::register_routes() wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php |
Registers the routes for the plugins controller. |
wp_maybe_grant_site_health_caps() wp-includes/capabilities.php |
Filters the user capabilities to grant the ‘view_site_health_checks’ capabilities as necessary. |
WP_Recovery_Mode::is_network_plugin() wp-includes/class-wp-recovery-mode.php |
Checks whether the given extension a network activated plugin. |
WP_Fatal_Error_Handler::display_default_error_template() wp-includes/class-wp-fatal-error-handler.php |
Displays the default PHP error template. |
WP_Fatal_Error_Handler::handle() wp-includes/class-wp-fatal-error-handler.php |
Runs the shutdown handler. |
WP_Debug_Data::debug_data() wp-admin/includes/class-wp-debug-data.php |
Static function for generating site debug data when required. |
WP_Site_Health::get_test_plugin_version() wp-admin/includes/class-wp-site-health.php |
Tests if plugins are outdated, or unnecessary. |
WP_Site_Health::get_test_theme_version() wp-admin/includes/class-wp-site-health.php |
Tests if themes are outdated, or unnecessary. |
WP_Site_Health_Auto_Updates::test_wp_version_check_attached() wp-admin/includes/class-wp-site-health-auto-updates.php |
Checks if updates are intercepted by a filter. |
wp_ajax_health_check_get_sizes() wp-admin/includes/ajax-actions.php |
Ajax handler for site health check to get directories and database sizes. |
is_site_meta_supported() wp-includes/functions.php |
Determines whether site meta is enabled. |
populate_network_meta() wp-admin/includes/schema.php |
Creates WordPress network meta and sets the default values. |
get_oembed_response_data_for_url() wp-includes/embed.php |
Retrieves the oEmbed response data for a given URL. |
WP_REST_Attachments_Controller::check_upload_size() wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php |
Determine if uploaded file exceeds space quota on multisite. |
WP_Roles::get_roles_data() wp-includes/class-wp-roles.php |
Gets the available roles data. |
get_main_site_id() wp-includes/functions.php |
Gets the main site ID. |
WP_Customize_Themes_Panel::content_template() wp-includes/customize/class-wp-customize-themes-panel.php |
An Underscore (JS) template for this panel’s content (but not its container). |
WP_Customize_Themes_Section::render_template() wp-includes/customize/class-wp-customize-themes-section.php |
Render a themes section as a JS template. |
delete_expired_transients() wp-includes/option.php |
Deletes all expired transients. |
WP_REST_Users_Controller::get_user() wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php |
Get the user, if the ID is valid. |
WP_REST_Users_Controller::check_role_update() wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php |
Determines if the current user is allowed to make the desired roles change. |
WP_REST_Users_Controller::delete_item() wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php |
Deletes a single user. |
WP_REST_Users_Controller::create_item() wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php |
Creates a single user. |
register_initial_settings() wp-includes/option.php |
Registers default settings available in WordPress. |
WP_Theme::network_enable_theme() wp-includes/class-wp-theme.php |
Enables a theme for all sites on the current network. |
WP_Theme::network_disable_theme() wp-includes/class-wp-theme.php |
Disables a theme for all sites on the current network. |
get_current_network_id() wp-includes/load.php |
Retrieves the current network ID. |
wp_ajax_install_theme() wp-admin/includes/ajax-actions.php |
Ajax handler for installing a theme. |
wp_ajax_install_plugin() wp-admin/includes/ajax-actions.php |
Ajax handler for installing a plugin. |
has_custom_logo() wp-includes/general-template.php |
Determines whether the site has a custom logo. |
get_custom_logo() wp-includes/general-template.php |
Returns a custom logo, linked to home unless the theme supports removing the link on the home page. |
_wp_upload_dir() wp-includes/functions.php |
A non-filtered, non-cached version of wp_upload_dir() that doesn’t check the path. |
get_rest_url() wp-includes/rest-api.php |
Retrieves the URL to a REST endpoint on a site. |
wp_get_users_with_no_role() wp-includes/user.php |
Gets the user IDs of all users with no role on this site. |
get_password_reset_key() wp-includes/user.php |
Creates, stores, then returns a password reset key for user. |
update_network_option() wp-includes/option.php |
Updates the value of a network option that was already added. |
add_network_option() wp-includes/option.php |
Adds a new network option. |
delete_network_option() wp-includes/option.php |
Removes a network option by name. |
get_network_option() wp-includes/option.php |
Retrieves a network’s option value based on the option name. |
get_site_icon_url() wp-includes/general-template.php |
Returns the Site Icon URL. |
get_main_network_id() wp-includes/functions.php |
Gets the main network ID. |
WP_Customize_Theme_Control::content_template() wp-includes/customize/class-wp-customize-theme-control.php |
Render a JS template for theme display. |
_wp_handle_upload() wp-admin/includes/file.php |
Handles PHP uploads in WordPress. |
retrieve_password() wp-includes/user.php |
Handles sending a password retrieval email to a user. |
network_step2() wp-admin/includes/network.php |
Prints step 2 for Network installation process. |
Theme_Upgrader::bulk_upgrade() wp-admin/includes/class-theme-upgrader.php |
Upgrade several themes at once. |
Plugin_Upgrader::bulk_upgrade() wp-admin/includes/class-plugin-upgrader.php |
Bulk upgrade several plugins at once. |
wp_prepare_themes_for_js() wp-admin/includes/theme.php |
Prepares themes for JavaScript. |
delete_theme() wp-admin/includes/theme.php |
Removes a theme. |
get_theme_update_available() wp-admin/includes/theme.php |
Retrieves the update link if there is a theme update available. |
WP_Plugins_List_Table::get_bulk_actions() wp-admin/includes/class-wp-plugins-list-table.php | |
WP_Plugins_List_Table::display_rows() wp-admin/includes/class-wp-plugins-list-table.php | |
WP_Plugins_List_Table::single_row() wp-admin/includes/class-wp-plugins-list-table.php | |
WP_Plugins_List_Table::__construct() wp-admin/includes/class-wp-plugins-list-table.php |
Constructor. |
WP_Plugins_List_Table::prepare_items() wp-admin/includes/class-wp-plugins-list-table.php | |
WP_Plugins_List_Table::no_items() wp-admin/includes/class-wp-plugins-list-table.php | |
wxr_site_url() wp-admin/includes/export.php |
Returns the URL of the site. |
WP_User_Search::prepare_query() wp-admin/includes/deprecated.php |
Prepares the user search query (legacy). |
get_author_user_ids() wp-admin/includes/deprecated.php |
Get all user IDs. |
get_editable_user_ids() wp-admin/includes/deprecated.php |
Gets the IDs of any users who can edit posts. |
get_nonauthor_user_ids() wp-admin/includes/deprecated.php |
Gets all users who are not authors. |
Plugin_Installer_Skin::after() wp-admin/includes/class-plugin-installer-skin.php |
Action to perform following a plugin install. |
grant_super_admin() wp-includes/capabilities.php |
Grants Super Admin privileges. |
revoke_super_admin() wp-includes/capabilities.php |
Revokes Super Admin privileges. |
save_mod_rewrite_rules() wp-admin/includes/misc.php |
Updates the htaccess file with the current rules if it is writable. |
iis7_save_url_rewrite_rules() wp-admin/includes/misc.php |
Updates the IIS web.config file with the current rules if it is writable. |
update_home_siteurl() wp-admin/includes/misc.php |
Flushes rewrite rules if siteurl, home or page_on_front changed. |
populate_network() wp-admin/includes/schema.php |
Populate network settings. |
wp_get_db_schema() wp-admin/includes/schema.php |
Retrieve the SQL for creating database tables. |
populate_options() wp-admin/includes/schema.php |
Create WordPress options and set the default values. |
update_nag() wp-admin/includes/update.php |
Returns core update notification message. |
wp_plugin_update_row() wp-admin/includes/update.php |
Displays update information for a plugin. |
wp_dashboard_quota() wp-admin/includes/dashboard.php |
Displays file upload quota on dashboard. |
pre_schema_upgrade() wp-admin/includes/upgrade.php |
Runs before the schema is upgraded. |
wp_upgrade() wp-admin/includes/upgrade.php |
Runs WordPress Upgrade functions. |
wp_install_defaults() wp-admin/includes/upgrade.php |
Creates the initial content for a newly-installed site. |
_get_dropins() wp-admin/includes/plugin.php |
Returns drop-ins that WordPress uses. |
is_plugin_active_for_network() wp-admin/includes/plugin.php |
Determines whether the plugin is active for the entire network. |
deactivate_plugins() wp-admin/includes/plugin.php |
Deactivates a single plugin or multiple plugins. |
validate_active_plugins() wp-admin/includes/plugin.php |
Validates active plugins. |
activate_plugin() wp-admin/includes/plugin.php |
Attempts activation of plugin in a “sandbox” and redirects on success. |
edit_user() wp-admin/includes/user.php |
Edit user settings based on contents of $_POST |
wp_delete_user() wp-admin/includes/user.php |
Remove user and optionally reassign posts and links to another user. |
WP_Themes_List_Table::no_items() wp-admin/includes/class-wp-themes-list-table.php | |
WP_Themes_List_Table::display_rows() wp-admin/includes/class-wp-themes-list-table.php | |
WP_Users_List_Table::single_row() wp-admin/includes/class-wp-users-list-table.php |
Generate HTML for a single row on the users.php admin panel. |
WP_Users_List_Table::get_bulk_actions() wp-admin/includes/class-wp-users-list-table.php |
Retrieve an associative array of bulk actions available on this table. |
media_upload_form() wp-admin/includes/media.php |
Outputs the legacy media upload form. |
wp_ajax_query_themes() wp-admin/includes/ajax-actions.php |
Ajax handler for getting themes from themes_api() . |
wp_ajax_autocomplete_user() wp-admin/includes/ajax-actions.php |
Ajax handler for user autocomplete. |
WP_Importer::set_blog() wp-admin/includes/class-wp-importer.php | |
WP_User::has_cap() wp-includes/class-wp-user.php |
Returns whether the user has the specified capability. |
WP_User::get_role_caps() wp-includes/class-wp-user.php |
Retrieves all of the capabilities of the user’s roles, and merges them with individual user capabilities. |
current_user_can_for_blog() wp-includes/capabilities.php |
Returns whether the current user has the specified capability for a given site. |
is_super_admin() wp-includes/capabilities.php |
Determines whether user is a site admin. |
WP_Customize_Manager::enqueue_control_scripts() wp-includes/class-wp-customize-manager.php |
Enqueues scripts for customize controls. |
WP_Customize_Manager::register_controls() wp-includes/class-wp-customize-manager.php |
Registers some default controls. |
map_meta_cap() wp-includes/capabilities.php |
Maps a capability to the primitive capabilities required of the given user to satisfy the capability being checked. |
WP_Object_Cache::__construct() wp-includes/class-wp-object-cache.php |
Sets up object properties; PHP 5 style constructor. |
wp_get_themes() wp-includes/theme.php |
Returns an array of WP_Theme objects based on the arguments. |
load_default_textdomain() wp-includes/l10n.php |
Loads default translated strings based on locale. |
get_locale() wp-includes/l10n.php |
Retrieves the current locale. |
sanitize_option() wp-includes/formatting.php |
Sanitizes various option values based on the nature of the option. |
wp_lostpassword_url() wp-includes/general-template.php |
Returns the URL that allows the user to reset the lost password. |
wp_admin_bar_dashboard_view_site_menu() wp-includes/deprecated.php |
Add the “Dashboard”/”Visit Site” menu. |
WP_Theme::get_allowed_on_site() wp-includes/class-wp-theme.php |
Returns array of stylesheet names of themes allowed on the site. |
WP_Theme::is_allowed() wp-includes/class-wp-theme.php |
Determines whether the theme is allowed (multisite only). |
wp_not_installed() wp-includes/load.php |
Redirect to the installer if WordPress is not installed. |
wp_get_active_and_valid_plugins() wp-includes/load.php |
Retrieve an array of active and valid plugin files. |
is_main_site() wp-includes/functions.php |
Determines whether a site is the main site of the current network. |
is_main_network() wp-includes/functions.php |
Determines whether a network is the main network of the Multisite installation. |
wp_upload_bits() wp-includes/functions.php |
Creates a file in the upload folder with given content. |
wp_initial_constants() wp-includes/default-constants.php |
Defines initial WordPress constants. |
get_dashboard_url() wp-includes/link-template.php |
Retrieves the URL to the user’s dashboard. |
network_site_url() wp-includes/link-template.php |
Retrieves the site URL for the current network. |
network_home_url() wp-includes/link-template.php |
Retrieves the home URL for the current network. |
network_admin_url() wp-includes/link-template.php |
Retrieves the URL to the admin area for the network. |
get_home_url() wp-includes/link-template.php |
Retrieves the URL for a given site where the front end is accessible. |
get_site_url() wp-includes/link-template.php |
Retrieves the URL for a given site where WordPress application files (e.g. wp-blog-header.php or the wp-admin/ folder) are accessible. |
WP_Admin_Bar::initialize() wp-includes/class-wp-admin-bar.php |
Initializes the admin bar. |
wp_version_check() wp-includes/update.php |
Checks WordPress version against the newest version. |
wp_admin_bar_wp_menu() wp-includes/admin-bar.php |
Adds the WordPress logo menu. |
wp_admin_bar_my_account_item() wp-includes/admin-bar.php |
Adds the “My Account” item. |
wp_admin_bar_my_account_menu() wp-includes/admin-bar.php |
Adds the “My Account” submenu items. |
wp_admin_bar_site_menu() wp-includes/admin-bar.php |
Adds the “Site Name” menu. |
wp_admin_bar_my_sites_menu() wp-includes/admin-bar.php |
Adds the “My Sites/[Site Name]” menu and all submenus. |
wp_admin_bar_new_content_menu() wp-includes/admin-bar.php |
Adds “Add New” menu. |
wp_load_alloptions() wp-includes/option.php |
Loads and caches all autoloaded options, if available or all options. |
wp_load_core_site_options() wp-includes/option.php |
Loads and caches certain often requested site options if is_multisite() and a persistent cache is not being used. |
WP_User_Query::prepare_query() wp-includes/class-wp-user-query.php |
Prepares the query variables. |
wp_insert_user() wp-includes/user.php |
Inserts a user into the database. |
get_blogs_of_user() wp-includes/user.php |
Gets the sites a user belongs to. |
is_user_member_of_blog() wp-includes/user.php |
Finds out whether a user is a member of a given blog. |
count_users() wp-includes/user.php |
Counts number of users who have each of the user roles. |
wp_authenticate_spam_check() wp-includes/user.php |
For Multisite blogs, checks if the authenticated user has been marked as a spammer, or if the user’s primary blog has been marked as spam. |
wp_plupload_default_settings() wp-includes/media.php |
Prints default Plupload arguments. |
wp_delete_attachment() wp-includes/post.php |
Trashes or deletes an attachment. |
WP_Rewrite::rewrite_rules() wp-includes/class-wp-rewrite.php |
Constructs rewrite matches and queries from permalink structure. |
redirect_canonical() wp-includes/canonical.php |
Redirects incoming links to the proper URL based on the site url. |
get_dirsize() wp-includes/functions.php |
Gets the size of a directory. |
get_user_count() wp-includes/user.php |
Returns the number of active users in your installation. |
get_active_blog_for_user() wp-includes/ms-functions.php |
Gets one of a user’s active blogs. |
wp_xmlrpc_server::mw_newMediaObject() wp-includes/class-wp-xmlrpc-server.php |
Uploads a file, following your settings. |
wp_xmlrpc_server::blogger_getUsersBlogs() wp-includes/class-wp-xmlrpc-server.php |
Retrieves blogs that user owns. |
wp_xmlrpc_server::wp_getUsersBlogs() wp-includes/class-wp-xmlrpc-server.php |
Retrieves the blogs of the user. |
wpdb::tables() wp-includes/class-wpdb.php |
Returns an array of WordPress tables. |
wpdb::print_error() wp-includes/class-wpdb.php |
Prints SQL/DB error. |
wpdb::init_charset() wp-includes/class-wpdb.php |
Sets $this->charset and $this->collate. |
wpdb::set_prefix() wp-includes/class-wpdb.php |
Sets the table prefix for the WordPress tables. |
wpdb::get_blog_prefix() wp-includes/class-wpdb.php |
Gets blog prefix. |
wp_print_media_templates() wp-includes/media-template.php |
Prints the templates used in the media manager. |
Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |