install_plugins_favorites_form() - WordPress 函数参考中文文档

返回介绍

install_plugins_favorites_form()

发布于 2017-09-11 字数2030 浏览 847 评论 0

install_plugins_favorites_form()

Show a username form for the favorites page


描述


源代码

File: wp-admin/includes/plugin-install.php

function install_plugins_favorites_form() {
	$user   = get_user_option( 'wporg_favorites' );
	$action = 'save_wporg_username_' . get_current_user_id();
	?>
	<p class="install-help"><?php _e( 'If you have marked plugins as favorites on WordPress.org, you can browse them here.' ); ?></p>
	<form method="get">
		<input type="hidden" name="tab" value="favorites" />
		<p>
			<label for="user"><?php _e( 'Your WordPress.org username:' ); ?></label>
			<input type="search" id="user" name="user" value="<?php echo esc_attr( $user ); ?>" />
			<input type="submit" class="button" value="<?php esc_attr_e( 'Get Favorites' ); ?>" />
			<input type="hidden" id="wporg-username-nonce" name="_wpnonce" value="<?php echo esc_attr( wp_create_nonce( $action ) ); ?>" />
		</p>
	</form>
	<?php
}

更新日志

Version 描述
3.5.0 Introduced.

相关函数

Uses

  • wp-includes/l10n.php:
    _e()
  • wp-includes/l10n.php:
    esc_attr_e()
  • wp-includes/formatting.php:
    esc_attr()
  • wp-includes/pluggable.php:
    wp_create_nonce()
  • wp-includes/user.php:
    get_user_option()
  • wp-includes/user.php:
    get_current_user_id()
  • Show 1 more use
    Hide more uses


User Contributed Notes

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!