Changeset 22026 for trunk/wp-admin/includes/plugin-install.php
- Timestamp:
- 09/27/2012 12:47:01 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/plugin-install.php
r21996 r22026 156 156 157 157 /** 158 * Show a username form for the favorites page 159 * @since 3.5.0 160 * 161 */ 162 function install_plugins_favorites_form() { 163 $user = ! empty( $_GET['user'] ) ? stripslashes( $_GET['user'] ) : get_user_option( 'wporg_favorites' ); 164 ?> 165 <p class="install-help"><?php _e( 'If you have marked plugins as favorites on WordPress.org, you can browse them here.' ); ?></p> 166 <form method="get" action=""> 167 <input type="hidden" name="tab" value="favorites" /> 168 <p> 169 <label for="user"><?php _e( 'Your WordPress.org username:' ); ?></label> 170 <input type="search" id="user" name="user" value="<?php echo esc_attr( $user ); ?>" /> 171 <input type="submit" class="button" value="<?php esc_attr_e( 'Get Favorites' ); ?>" /> 172 </p> 173 </form> 174 <?php 175 } 176 177 /** 158 178 * Display plugin content based on plugin list. 159 179 * … … 163 183 global $wp_list_table; 164 184 185 if ( current_filter() == 'install_plugins_favorites' && empty( $_GET['user'] ) && ! get_user_option( 'wporg_favorites' ) ) 186 return; 187 165 188 $wp_list_table->display(); 166 189 } 167 add_action('install_plugins_search', 'display_plugins_table'); 168 add_action('install_plugins_featured', 'display_plugins_table'); 169 add_action('install_plugins_popular', 'display_plugins_table'); 170 add_action('install_plugins_new', 'display_plugins_table'); 190 add_action( 'install_plugins_search', 'display_plugins_table' ); 191 add_action( 'install_plugins_featured', 'display_plugins_table' ); 192 add_action( 'install_plugins_popular', 'display_plugins_table' ); 193 add_action( 'install_plugins_new', 'display_plugins_table' ); 194 add_action( 'install_plugins_favorites', 'display_plugins_table' ); 171 195 172 196 /**
Note: See TracChangeset
for help on using the changeset viewer.