Determines whether Multisite is enabled.
Return
bool True if Multisite is enabled, false otherwise.More Information
Usage
if ( is_multisite() ) { echo 'Multisite is enabled'; }
Source
function is_multisite() {
if ( defined( 'MULTISITE' ) ) {
return MULTISITE;
}
if ( defined( 'SUBDOMAIN_INSTALL' ) || defined( 'VHOST' ) || defined( 'SUNRISE' ) ) {
return true;
}
return false;
}
Related
Used by | Description |
---|---|
user_can_for_site()wp-includes/capabilities.php | Returns whether a particular user has the specified capability for a given site. |
current_user_can_for_site()wp-includes/capabilities.php | Returns whether the current user has the specified capability for a given site. |
wp_prime_network_option_caches()wp-includes/option.php | Primes specific network options into the cache with a single database query. |
WP_Plugin_Dependencies::check_plugin_dependencies_during_ajax()wp-includes/class-wp-plugin-dependencies.php | Checks plugin dependencies after a plugin is installed via AJAX. |
WP_Plugin_Dependencies::display_admin_notice_for_unmet_dependencies()wp-includes/class-wp-plugin-dependencies.php | Displays an admin notice if dependencies are not installed. |
WP_Plugins_List_Table::add_dependencies_to_dependent_plugin_row()wp-admin/includes/class-wp-plugins-list-table.php | Prints a list of other plugins that the plugin depends on. |
wp_is_password_reset_allowed_for_user()wp-includes/user.php | Checks if password reset is allowed for a specific user. |
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_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. |
validate_plugin_requirements()wp-admin/includes/plugin.php | Validates the plugin requirements for WordPress version and PHP version. |
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 | Handles site health check to get directories and database sizes via AJAX. |
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 | Renders 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 | Handles installing a theme via AJAX. |
wp_ajax_install_plugin()wp-admin/includes/ajax-actions.php | Handles installing a plugin via AJAX. |
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. |
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. |
Plugin_Upgrader::bulk_upgrade()wp-admin/includes/class-plugin-upgrader.php | Upgrades several plugins at once. |
Theme_Upgrader::bulk_upgrade()wp-admin/includes/class-theme-upgrader.php | Upgrades several themes 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 | Generates the list table rows. |
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 | |
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 | Performs an action 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 |
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-in plugins 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 | Delete 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 | Generates the list table rows. |
WP_Users_List_Table::single_row()wp-admin/includes/class-wp-users-list-table.php | Generates 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 | Retrieves 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 | Handles getting themes from themes_api() via AJAX. |
wp_ajax_wp_compression_test()wp-admin/includes/ajax-actions.php | Handles compression testing via AJAX. |
wp_ajax_autocomplete_user()wp-admin/includes/ajax-actions.php | Handles user autocomplete via AJAX. |
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. |
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. |
switch_theme()wp-includes/theme.php | Switches the theme. |
wp_get_themes()wp-includes/theme.php | Returns an array of WP_Theme objects based on the arguments. |
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 | Redirects to the installer if WordPress is not installed. |
wp_get_active_and_valid_plugins()wp-includes/load.php | Retrieves 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. |
get_dashboard_url()wp-includes/link-template.php | Retrieves the URL to the user’s dashboard. |
wp_initial_constants()wp-includes/default-constants.php | Defines initial WordPress constants. |
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 primes caches of certain often requested network options if is_multisite() . |
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_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_active_blog_for_user()wp-includes/ms-functions.php | Gets one of a user’s active blogs. |
get_user_count()wp-includes/user.php | Returns the number of active users in your installation. |
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. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.