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(). '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-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 ClassicPress admin CSS file. |
wp-includes/general-template.php: wp_register() |
Display the Registration or Admin link. |
wp-includes/script-loader.php: wp_default_scripts() |
Register all ClassicPress scripts. |
wp-includes/widgets/class-wp-widget-media-video.php: WP_Widget_Media_Video::__construct() |
Constructor. |
wp-includes/widgets/class-wp-widget-media-audio.php: WP_Widget_Media_Audio::__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/widgets/class-wp-widget-media.php: WP_Widget_Media::__construct() |
Constructor. |
wp-includes/media.php: wp_enqueue_media() |
Enqueues all scripts, styles, settings, and templates necessary to use all media JS APIs. |
wp-includes/media.php: wp_plupload_default_settings() |
Prints default Plupload arguments. |
wp-includes/pluggable.php: wp_safe_redirect() |
Performs a safe (local) redirect, using wp_redirect(). |
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_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/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() |
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/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/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/embed.php: the_embed_site_title() |
Prints the necessary markup for the site title in an embed template. |
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() |
Notify the site administrator via email when a request is confirmed. |
wp-includes/user.php: send_confirmation_on_profile_email() |
Send a confirmation request email when a change of user email address is attempted. |
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::customize_pane_settings() |
Print JavaScript settings for parent window. |
wp-includes/class-wp-customize-manager.php: WP_Customize_Manager::filter_iframe_security_headers() |
Filter the X-Frame-Options and Content-Security-Policy headers to ensure frontend can load in customizer. |
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/class-wp-editor.php: _WP_Editors::editor_js() |
Print (output) the TinyMCE configuration and initialization scripts. |
wp-admin/custom-background.php: Custom_Background::admin_page() |
Display the custom background page. |
wp-admin/press-this.php: wp_load_press_this() | |
wp-admin/custom-header.php: Custom_Image_Header::help() |
Adds contextual help. |
wp-admin/custom-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() | |
wp-admin/includes/class-wp-plugins-list-table.php: WP_Plugins_List_Table::no_items() | |
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/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/media.php: media_upload_max_image_resize() |
Displays the checkbox to scale images. |
wp-admin/includes/class-wp-list-table.php: WP_List_Table::comments_bubble() |
Display a comment count bubble |
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() | |
wp-admin/includes/media.php: wp_iframe() |
Adds the iframe to display content for 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/update-core.php: update_core() |
Upgrades the core of ClassicPress. |
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/class-theme-installer-skin.php: Theme_Installer_Skin::after() | |
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/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/theme.php: get_theme_update_available() |
Retrieve the update link if there is a theme update available. |
wp-admin/includes/theme.php: wp_prepare_themes_for_js() |
Prepare themes for JavaScript. |
wp-admin/includes/class-walker-nav-menu-edit.php: Walker_Nav_Menu_Edit::start_el() |
Start the element output. |
wp-admin/includes/plugin.php: _security_page_action_links() |
Plugin action links filter for Security page. |
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/class-wp-themes-list-table.php: WP_Themes_List_Table::no_items() | |
wp-admin/includes/class-plugin-installer-skin.php: Plugin_Installer_Skin::after() | |
wp-admin/includes/file.php: wp_edit_theme_plugin_file() |
Attempt 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() |
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/revision.php: wp_prepare_revisions_for_js() |
Prepare revisions for JavaScript. |
Changelog
Version | Description |
---|---|
WP-2.6.0 | Introduced. |