install_plugins_favorites_form

Show a username form for the favorites page.

Description

install_plugins_favorites_form(); 

Usage

  1. if ( !function_exists( 'install_plugins_favorites_form' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/plugin-install.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = install_plugins_favorites_form(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/plugin-install.php  
  1. function install_plugins_favorites_form() { 
  2. $user = get_user_option( 'wporg_favorites' ); 
  3. $action = 'save_wporg_username_' . get_current_user_id(); 
  4. ?> 
  5. <p class="install-help"><?php _e( 'If you have marked plugins as favorites on WordPress.org, you can browse them here.' ); ?></p> 
  6. <form method="get"> 
  7. <input type="hidden" name="tab" value="favorites" /> 
  8. <p> 
  9. <label for="user"><?php _e( 'Your WordPress.org username:' ); ?></label> 
  10. <input type="search" id="user" name="user" value="<?php echo esc_attr( $user ); ?>" /> 
  11. <input type="submit" class="button" value="<?php esc_attr_e( 'Get Favorites' ); ?>" /> 
  12. <input type="hidden" id="wporg-username-nonce" name="_wpnonce" value="<?php echo esc_attr( wp_create_nonce( $action ) ); ?>" /> 
  13. </p> 
  14. </form> 
  15. <?php