admin_url( string $path = '', string $scheme = 'admin' )
Retrieves the URL to the admin area for the current site.
Description #Description
Parameters #Parameters
- $path
-
(string) (Optional) path relative to the admin URL.
Default value: ''
- $scheme
-
(string) (Optional) The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
Default value: 'admin'
Return #Return
(string) Admin URL link with optional path appended.
Source #Source
File: wp-includes/link-template.php
function admin_url( $path = '', $scheme = 'admin' ) { return get_admin_url( null, $path, $scheme ); }
Expand full source code Collapse full source code View on Trac
Changelog #Changelog
Version | Description |
---|---|
2.6.0 | Introduced. |
Related #Related
Uses #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
Used By | Description |
---|---|
wp-admin/includes/post.php: the_block_editor_meta_boxes() |
Renders the meta boxes forms. |
wp-includes/user.php: _wp_privacy_send_request_confirmation_notification() |
Notify the site administrator via email when a request is confirmed. |
wp-admin/includes/misc.php: WP_Privacy_Policy_Content::notice() |
Add a notice with a link to the guide when editing the privacy policy page. |
wp-admin/includes/misc.php: WP_Privacy_Policy_Content::policy_text_changed_notice() |
Output a warning when some privacy info has changed. |
wp-admin/includes/user.php: WP_Privacy_Data_Export_Requests_Table::column_next_steps() |
Displays the next steps column. |
wp-admin/includes/user.php: WP_Privacy_Data_Removal_Requests_Table::column_next_steps() |
Next steps column. |
wp-admin/includes/user.php: WP_Privacy_Requests_Table::get_views() |
Get an associative array ( id => link ) with the list of views available on this table. |
wp-admin/press-this.php: wp_load_press_this() | |
wp-admin/includes/file.php: wp_edit_theme_plugin_file() |
Attempt to edit a file for a theme or plugin. |
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-widget-media.php: WP_Widget_Media::__construct() |
Constructor. |
wp-includes/widgets/class-wp-widget-media-image.php: WP_Widget_Media_Image::__construct() |
Constructor. |
wp-admin/includes/dashboard.php: wp_print_community_events_markup() |
Prints the markup for the Community Events section of the Events and News Dashboard widget. |
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-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-includes/embed.php: the_embed_site_title() |
Prints the necessary markup for the site title in an embed template. |
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/class-wp-customize-manager.php: WP_Customize_Manager::customize_pane_settings() |
Print JavaScript settings for parent window. |
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/network.php: network_step1() |
Prints step 1 for Network installation process. |
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/theme.php: wp_prepare_themes_for_js() |
Prepare themes for JavaScript. |
wp-admin/includes/theme.php: get_theme_update_available() |
Retrieve the update link if there is a theme update available. |
wp-admin/includes/class-wp-plugins-list-table.php: WP_Plugins_List_Table::no_items() | |
wp-admin/includes/class-theme-upgrader-skin.php: Theme_Upgrader_Skin::after() | |
wp-admin/includes/class-theme-installer-skin.php: Theme_Installer_Skin::after() | |
wp-admin/includes/class-plugin-installer-skin.php: Plugin_Installer_Skin::after() | |
wp-admin/includes/class-wp-list-table.php: WP_List_Table::comments_bubble() |
Display a comment count bubble |
wp-includes/user.php: send_confirmation_on_profile_email() |
Send a confirmation request email when a change of user email address is attempted. |
wp-admin/includes/image-edit.php: wp_image_editor() |
Loads the WP image-editing interface. |
wp-admin/includes/dashboard.php: wp_welcome_panel() |
Displays a welcome panel to introduce users to WordPress. |
wp-admin/includes/dashboard.php: wp_dashboard_quota() |
Display 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/plugin.php: menu_page_url() |
Get the url to access a particular menu page based on the slug it was registered with. |
wp-admin/includes/upgrade.php: wp_install_defaults() |
Creates the initial content for a newly-installed site. |
wp-admin/includes/template.php: iframe_header() |
Generic Iframe header for use with Thickbox |
wp-admin/includes/class-wp-themes-list-table.php: WP_Themes_List_Table::no_items() | |
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: 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_max_image_resize() |
Displays the checkbox to scale images. |
wp-admin/includes/media.php: media_upload_form() |
Outputs the legacy media upload form. |
wp-admin/includes/media.php: wp_iframe() |
Adds the iframe to display content for the media upload page |
wp-admin/includes/media.php: get_upload_iframe_src() | |
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/ajax-actions.php: wp_ajax_query_themes() |
Ajax handler for getting themes from themes_api(). |
wp-admin/includes/update-core.php: update_core() |
Upgrades the core of WordPress. |
wp-admin/includes/revision.php: wp_prepare_revisions_for_js() |
Prepare revisions for JavaScript. |
wp-admin/includes/meta-boxes.php: post_submit_meta_box() |
Displays post submit form fields. |
wp-admin/includes/class-wp-comments-list-table.php: WP_Comments_List_Table::column_author() | |
wp-admin/includes/class-wp-comments-list-table.php: WP_Comments_List_Table::get_views() | |
wp-admin/includes/class-walker-nav-menu-edit.php: Walker_Nav_Menu_Edit::start_el() |
Start the element output. |
wp-admin/custom-header.php: Custom_Image_Header::step_1() |
Display first step of custom header image page. |
wp-admin/custom-header.php: Custom_Image_Header::help() |
Adds contextual help. |
wp-admin/custom-background.php: Custom_Background::admin_page() |
Display the custom background page. |
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/theme.php: _wp_customize_loader_settings() |
Adds settings for the customize-loader script. |
wp-includes/pluggable.php: wp_notify_postauthor() |
Notify an author (and/or others) of a comment/trackback/pingback on a post. |
wp-includes/pluggable.php: wp_safe_redirect() |
Performs a safe (local) redirect, using wp_redirect(). |
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() |
Makes sure that a user was referred from another admin page. |
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() |
Display the Registration or Admin link. |
wp-includes/deprecated.php: wp_admin_bar_dashboard_view_site_menu() |
Add the “Dashboard”/”Visit Site” menu. |
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/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: 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: network_admin_url() |
Retrieves the URL to the admin area for the network. |
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/admin-bar.php: wp_admin_bar_site_menu() |
Add the “Site Name” menu. |
wp-includes/admin-bar.php: wp_admin_bar_my_sites_menu() |
Add the “My Sites/[Site Name]” menu and all submenus. |
wp-includes/admin-bar.php: wp_admin_bar_new_content_menu() |
Add “Add New” menu. |
wp-includes/admin-bar.php: wp_admin_bar_comments_menu() |
Add edit comments link with awaiting moderation count bubble. |
wp-includes/admin-bar.php: wp_admin_bar_appearance_menu() |
Add appearance submenu items to the “Site Name” menu. |
wp-includes/option.php: wp_user_settings() |
Saves and restores user interface settings stored in a cookie. |
wp-includes/media.php: wp_plupload_default_settings() |
Prints default Plupload arguments. |
wp-includes/media.php: wp_enqueue_media() |
Enqueues all scripts, styles, settings, and templates necessary to use all media JS APIs. |
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() |
Add a new user to a blog by visiting /newbloguser/{key}/. |
wp-includes/script-loader.php: wp_default_scripts() |
Register all WordPress scripts. |
wp-includes/class-wp-editor.php: _WP_Editors::editor_js() |
Print (output) the TinyMCE configuration and initialization scripts. |
wp-includes/media-template.php: wp_print_media_templates() |
Prints the templates used in the media manager. |
User Contributed Notes #User Contributed Notes
You must log in before being able to contribute a note or feedback.
Examples
Output: http://example.com/wp-admin/ (or https protocol when appropriate)
Output: https://example.com/wp-admin/edit-tags.php?taxonomy=category
Usage
Default Usage