admin_url( string $path = '', string $scheme = 'admin' )
Retrieves the URL to the admin area for the current site.
Parameters
- $path
-
(Optional) Path relative to the admin URL.
Default value: ''
- $scheme
-
(Optional) The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl().<br> 'http' or 'https' can be passed to force those schemes.
Default value: 'admin'
Return
(string) Admin URL link with optional path appended.
Source
File: wp-includes/link-template.php
function admin_url( $path = '', $scheme = 'admin' ) {
return get_admin_url( null, $path, $scheme );
}
Related
Uses
Uses | Description |
---|---|
wp-includes/link-template.php: get_admin_url() |
Retrieves the URL to the admin area for a given site. |
Used By
Used By | Description |
---|---|
wp-admin/includes/class-wp-automatic-updater.php: WP_Automatic_Updater::send_plugin_theme_email() |
Sends an email upon the completion or failure of a plugin or theme background update. |
wp-admin/includes/class-wp-site-health.php: WP_Site_Health::wp_cron_scheduled_check() |
Runs the scheduled event to check and update the latest site health status for the website. |
wp-admin/includes/class-wp-site-health.php: WP_Site_Health::get_test_classicpress_version() |
Tests for WordPress version and outputs it. |
wp-admin/includes/class-wp-site-health.php: WP_Site_Health::get_test_plugin_version() |
Tests if plugins are outdated, or unnecessary. |
wp-admin/includes/class-wp-site-health.php: WP_Site_Health::get_test_theme_version() |
Tests if themes are outdated, or unnecessary. |
wp-admin/includes/class-wp-site-health.php: WP_Site_Health::get_test_https_status() |
Tests if the site is serving content over HTTPS. |
wp-admin/includes/class-wp-site-health.php: WP_Site_Health::get_test_authorization_header() |
Tests if the Authorization header has the expected values. |
wp-admin/includes/plugin.php: paused_plugins_notice() |
Renders an admin notice in case some plugins have been paused due to errors. |
wp-admin/includes/plugin.php: deactivated_plugins_notice() |
Renders an admin notice when a plugin was deactivated during an update. |
wp-admin/includes/class-wp-privacy-requests-table.php: WP_Privacy_Requests_Table::get_admin_url() |
Normalize the admin URL to the current page (by request_type). |
wp-admin/includes/class-wp-privacy-data-export-requests-list-table.php: WP_Privacy_Data_Export_Requests_List_Table::column_email() |
Actions column. |
wp-admin/includes/class-wp-privacy-data-export-requests-list-table.php: WP_Privacy_Data_Export_Requests_List_Table::column_next_steps() |
Displays the next steps column. |
wp-admin/includes/class-wp-privacy-data-removal-requests-list-table.php: WP_Privacy_Data_Removal_Requests_List_Table::column_email() |
Actions column. |
wp-admin/includes/class-wp-privacy-data-removal-requests-list-table.php: WP_Privacy_Data_Removal_Requests_List_Table::column_next_steps() |
Next steps column. |
wp-admin/includes/dashboard.php: wp_dashboard_site_health() |
Displays the Site Health Status widget. |
wp-admin/includes/theme.php: paused_themes_notice() |
Renders an admin notice in case some themes have been paused due to errors. |
wp-includes/class-wp-recovery-mode.php: WP_Recovery_Mode::handle_exit_recovery_mode() |
Handles a request to exit Recovery Mode. |
wp-includes/script-loader.php: wp_default_packages_inline_scripts() |
Adds inline scripts required for the WordPress JavaScript packages. |
wp-includes/widgets/class-wp-widget-media.php: WP_Widget_Media::get_l10n_defaults() |
Returns the default localized strings used by the widget. |
wp-includes/rest-api.php: rest_add_application_passwords_to_index() |
Adds Application Passwords info to the REST API index. |
wp-includes/deprecated.php: wp_admin_bar_dashboard_view_site_menu() |
Add the “Dashboard”/”Visit Site” menu. |
wp-includes/customize/class-wp-customize-site-icon-control.php: WP_Customize_Site_Icon_Control::content_template() |
Renders a JS template for the content of the site icon control. |
wp-includes/general-template.php: wp_heartbeat_settings() |
Default settings for heartbeat. |
wp-includes/general-template.php: register_admin_color_schemes() |
Registers the default admin color schemes. |
wp-includes/general-template.php: wp_admin_css_uri() |
Displays the URL of a WordPress admin CSS file. |
wp-includes/general-template.php: wp_register() |
Displays the Registration or Admin link. |
wp-includes/script-loader.php: wp_default_scripts() |
Register all ClassicPress scripts. |
wp-includes/widgets/class-wp-widget-media-audio.php: WP_Widget_Media_Audio::__construct() |
Constructor. |
wp-includes/widgets/class-wp-widget-media-video.php: WP_Widget_Media_Video::__construct() |
Constructor. |
wp-includes/widgets/class-wp-nav-menu-widget.php: WP_Nav_Menu_Widget::form() |
Outputs the settings form for the Navigation Menu widget. |
wp-includes/widgets/class-wp-widget-media-image.php: WP_Widget_Media_Image::__construct() |
Constructor. |
wp-includes/pluggable.php: wp_safe_redirect() |
Performs a safe (local) redirect, using wp_redirect(). |
wp-includes/pluggable.php: wp_notify_postauthor() |
Notifies an author (and/or others) of a comment/trackback/pingback on a post. |
wp-includes/pluggable.php: wp_notify_moderator() |
Notifies the moderator of the site about a new comment that is awaiting approval. |
wp-includes/pluggable.php: check_admin_referer() |
Ensures intent by verifying that a user was referred from another admin page with the correct security nonce. |
wp-includes/media-template.php: wp_print_media_templates() |
Prints the templates used in the media manager. |
wp-includes/admin-bar.php: wp_admin_bar_new_content_menu() |
Adds “Add New” menu. |
wp-includes/admin-bar.php: wp_admin_bar_comments_menu() |
Adds edit comments link with awaiting moderation count bubble. |
wp-includes/admin-bar.php: wp_admin_bar_appearance_menu() |
Adds appearance submenu items to the “Site Name” menu. |
wp-includes/admin-bar.php: wp_admin_bar_site_menu() |
Adds the “Site Name” menu. |
wp-includes/admin-bar.php: wp_admin_bar_my_sites_menu() |
Adds the “My Sites/[Site Name]” menu and all submenus. |
wp-includes/class-wp-embed.php: WP_Embed::maybe_run_ajax_cache() |
If a post/page was saved, then output JavaScript to make an Ajax request that will call WP_Embed::cache_oembed(). |
wp-includes/link-template.php: network_admin_url() |
Retrieves the URL to the admin area for the network. |
wp-includes/link-template.php: self_admin_url() |
Retrieves the URL to the admin area for either the current site or the network depending on context. |
wp-includes/link-template.php: get_dashboard_url() |
Retrieves the URL to the user’s dashboard. |
wp-includes/link-template.php: get_edit_post_link() |
Retrieves the edit post link for post. |
wp-includes/link-template.php: get_delete_post_link() |
Retrieves the delete posts link for post. |
wp-includes/link-template.php: get_edit_comment_link() |
Retrieves the edit comment link. |
wp-includes/link-template.php: get_edit_bookmark_link() |
Displays the edit bookmark link. |
wp-includes/link-template.php: get_edit_term_link() |
Retrieves the URL for editing a given term. |
wp-includes/http.php: get_allowed_http_origins() |
Retrieve list of allowed HTTP origins. |
wp-includes/user.php: _wp_privacy_send_request_confirmation_notification() |
Notifies the site administrator via email when a request is confirmed. |
wp-includes/theme.php: _wp_customize_loader_settings() |
Adds settings for the customize-loader script. |
wp-includes/theme.php: wp_customize_url() |
Returns a URL to load the Customizer. |
wp-includes/theme.php: wp_customize_support_script() |
Prints a script to check whether or not the Customizer is supported, and apply either the no-customize-support or customize-support class to the body. |
wp-includes/option.php: wp_user_settings() |
Saves and restores user interface settings stored in a cookie. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::is_cross_domain() |
Determines whether the admin and the frontend are on different domains. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::get_return_url() |
Gets URL to link the user to when closing the Customizer. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::customize_pane_settings() |
Prints JavaScript settings for parent window. |
wp-includes/canonical.php: wp_redirect_admin_locations() |
Redirects a variety of shorthand URLs to the admin. |
wp-includes/ms-functions.php: maybe_add_existing_user_to_blog() |
Adds a new user to a blog by visiting /newbloguser/{key}/. |
wp-includes/class-wp-editor.php: _WP_Editors::editor_js() |
Print (output) the TinyMCE configuration and initialization scripts. |
wp-admin/includes/class-custom-background.php: Custom_Background::admin_page() |
Displays the custom background page. |
wp-admin/press-this.php: wp_load_press_this() | |
wp-admin/includes/class-custom-image-header.php: Custom_Image_Header::help() |
Adds contextual help. |
wp-admin/includes/class-custom-image-header.php: Custom_Image_Header::step_1() |
Display first step of custom header image page. |
wp-admin/includes/class-theme-upgrader-skin.php: Theme_Upgrader_Skin::after() |
Action to perform following a single theme update. |
wp-admin/includes/class-wp-plugins-list-table.php: WP_Plugins_List_Table::no_items() | |
wp-admin/includes/class-wp-privacy-policy-content.php: WP_Privacy_Policy_Content::policy_text_changed_notice() |
Output a warning when some privacy info has changed. |
wp-admin/includes/class-wp-privacy-policy-content.php: WP_Privacy_Policy_Content::notice() |
Add a notice with a link to the guide when editing the privacy policy page. |
wp-admin/includes/class-wp-list-table.php: WP_List_Table::comments_bubble() |
Displays a comment count bubble. |
wp-admin/includes/media.php: media_upload_max_image_resize() |
Displays the checkbox to scale images. |
wp-admin/includes/media.php: media_upload_library_form() |
Outputs the legacy media upload form for the media library. |
wp-admin/includes/media.php: media_upload_flash_bypass() |
Displays the multi-file uploader message. |
wp-admin/includes/media.php: media_upload_form() |
Outputs the legacy media upload form. |
wp-admin/includes/media.php: media_upload_type_form() |
Outputs the legacy media upload form for a given media type. |
wp-admin/includes/media.php: media_upload_type_url_form() |
Outputs the legacy media upload form for external media. |
wp-admin/includes/media.php: media_upload_gallery_form() |
Adds gallery form to upload iframe. |
wp-admin/includes/media.php: get_upload_iframe_src() |
Retrieves the upload iframe source URL. |
wp-admin/includes/media.php: wp_iframe() |
Outputs the iframe to display the media upload page. |
wp-admin/includes/class-wp-comments-list-table.php: WP_Comments_List_Table::get_views() | |
wp-admin/includes/class-wp-comments-list-table.php: WP_Comments_List_Table::column_author() | |
wp-admin/includes/template.php: iframe_header() |
Generic Iframe header for use with Thickbox. |
wp-admin/includes/network.php: network_step1() |
Prints step 1 for Network installation process. |
wp-admin/includes/image-edit.php: wp_image_editor() |
Loads the WP image-editing interface. |
wp-admin/includes/class-wp-posts-list-table.php: WP_Posts_List_Table::handle_row_actions() |
Generates and displays row action links. |
wp-admin/includes/ajax-actions.php: wp_ajax_install_theme() |
Ajax handler for installing a theme. |
wp-admin/includes/ajax-actions.php: wp_ajax_install_plugin() |
Ajax handler for installing a plugin. |
wp-admin/includes/ajax-actions.php: wp_ajax_query_themes() |
Ajax handler for getting themes from themes_api(). |
wp-admin/includes/upgrade.php: wp_install_defaults() |
Creates the initial content for a newly-installed site. |
wp-admin/includes/meta-boxes.php: post_submit_meta_box() |
Displays post submit form fields. |
wp-admin/includes/class-theme-installer-skin.php: Theme_Installer_Skin::after() |
Action to perform following a single theme install. |
wp-admin/includes/class-wp-automatic-updater.php: WP_Automatic_Updater::send_email() |
Sends an email upon the completion or failure of a background core update. |
wp-admin/includes/update-core.php: update_core() |
Upgrades the core of ClassicPress. |
wp-admin/includes/class-walker-nav-menu-edit.php: Walker_Nav_Menu_Edit::start_el() |
Start the element output. |
wp-admin/includes/theme.php: get_theme_update_available() |
Retrieves the update link if there is a theme update available. |
wp-admin/includes/theme.php: wp_prepare_themes_for_js() |
Prepares themes for JavaScript. |
wp-admin/includes/plugin.php: menu_page_url() |
Gets the URL to access a particular menu page based on the slug it was registered with. |
wp-admin/includes/class-wp-themes-list-table.php: WP_Themes_List_Table::no_items() | |
wp-admin/includes/class-plugin-installer-skin.php: Plugin_Installer_Skin::after() |
Action to perform following a plugin install. |
wp-admin/includes/file.php: wp_edit_theme_plugin_file() |
Attempts to edit a file for a theme or plugin. |
wp-admin/includes/post.php: _admin_notice_post_locked() |
Outputs the HTML for the notice to say that someone else is editing or has taken over editing of this post. |
wp-admin/includes/dashboard.php: wp_dashboard_quota() |
Displays file upload quota on dashboard. |
wp-admin/includes/dashboard.php: wp_dashboard_quick_press() |
The Quick Draft widget display and creation of drafts. |
wp-admin/includes/dashboard.php: wp_dashboard_recent_drafts() |
Show recent drafts of the user on the dashboard. |
wp-admin/includes/revision.php: wp_prepare_revisions_for_js() |
Prepare revisions for JavaScript. |
wp-admin/includes/class-wp-users-list-table.php: WP_Users_List_Table::single_row() |
Generate HTML for a single row on the users.php admin panel. |
Changelog
Version | Description |
---|---|
2.6.0 | Introduced. |