返回介绍

self_admin_url()

发布于 2017-09-11 10:20:50 字数 4245 浏览 1550 评论 0 收藏 0

self_admin_url( string $path = '',  string $scheme = 'admin' )

Retrieves the URL to the admin area for either the current site or the network depending on context.


description


参数

$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'


返回值

(string) Admin URL link with optional path appended.


源代码

File: wp-includes/link-template.php

function self_admin_url( $path = '', $scheme = 'admin' ) {
	if ( is_network_admin() )
		return network_admin_url($path, $scheme);
	elseif ( is_user_admin() )
		return user_admin_url($path, $scheme);
	else
		return admin_url($path, $scheme);
}

更新日志

Versiondescription
3.1.0Introduced.

相关函数

Uses

  • wp-includes/load.php: is_network_admin()
  • wp-includes/load.php: is_user_admin()
  • wp-includes/link-template.php: network_admin_url()
  • wp-includes/link-template.php: user_admin_url()
  • wp-includes/link-template.php: admin_url()

Used By

  • wp-admin/includes/file.php: wp_print_request_filesystem_credentials_modal()
  • wp-admin/includes/theme-install.php: install_themes_upload()
  • wp-admin/includes/class-theme-upgrader-skin.php: Theme_Upgrader_Skin::after()
  • wp-admin/includes/class-language-pack-upgrader-skin.php: Language_Pack_Upgrader_Skin::bulk_footer()
  • wp-admin/includes/class-bulk-theme-upgrader-skin.php: Bulk_Theme_Upgrader_Skin::bulk_footer()
  • wp-admin/includes/class-plugin-installer-skin.php: Plugin_Installer_Skin::after()
  • wp-admin/includes/class-theme-installer-skin.php: Theme_Installer_Skin::after()
  • wp-admin/includes/class-bulk-plugin-upgrader-skin.php: Bulk_Plugin_Upgrader_Skin::bulk_footer()
  • wp-admin/includes/class-plugin-upgrader-skin.php: Plugin_Upgrader_Skin::after()
  • wp-admin/includes/ms.php: update_option_new_admin_email()
  • wp-admin/includes/ms.php: send_confirmation_on_profile_email()
  • wp-admin/includes/class-wp-theme-install-list-table.php: WP_Theme_Install_List_Table::install_theme_info()
  • wp-admin/includes/class-wp-theme-install-list-table.php: WP_Theme_Install_List_Table::get_views()
  • wp-admin/includes/class-wp-theme-install-list-table.php: WP_Theme_Install_List_Table::single_row()
  • wp-admin/includes/update.php: wp_plugin_update_row()
  • wp-admin/includes/update.php: wp_theme_update_row()
  • wp-admin/includes/plugin-install.php: install_dashboard()
  • wp-admin/includes/plugin-install.php: install_plugins_upload()
  • wp-admin/includes/plugin-install.php: install_plugin_install_status()
  • wp-admin/includes/class-wp-plugin-install-list-table.php: WP_Plugin_Install_List_Table::display_rows()
  • wp-admin/includes/class-wp-plugin-install-list-table.php: WP_Plugin_Install_List_Table::get_views()
  • wp-admin/update-core.php: core_upgrade_preamble()
  • wp-admin/update-core.php: list_plugin_updates()
  • wp-admin/update-core.php: do_core_upgrade()
  • wp-includes/link-template.php: get_edit_user_link()
  • wp-includes/admin-bar.php: wp_admin_bar_wp_menu()
  • Show 21 more used by Hide more used by

User Contributed Notes

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文