Changeset 11043
- Timestamp:
- 04/22/2009 01:30:15 AM (16 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-header.php
r10869 r11043 111 111 </div> 112 112 113 <?php favorite_actions( ); ?>113 <?php favorite_actions($hook_suffix); ?> 114 114 </div> 115 115 </div> -
trunk/wp-admin/includes/template.php
r11027 r11043 3188 3188 * @since unknown 3189 3189 */ 3190 function favorite_actions() { 3190 function favorite_actions( $screen = null ) { 3191 switch ( $screen ) { 3192 case 'edit-pages.php': 3193 $default_action = array('page-new.php' => array(__('New Page'), 'edit_pages')); 3194 break; 3195 case 'upload.php': 3196 $default_action = array('media-new.php' => array(__('New Media'), 'upload_files')); 3197 break; 3198 case 'link-manager.php': 3199 $default_action = array('link-add.php' => array(__('New Link'), 'manage_links')); 3200 break; 3201 case 'users.php': 3202 $default_action = array('user-new.php' => array(__('New User'), 'create_users')); 3203 break; 3204 case 'plugins.php': 3205 $default_action = array('plugin-install.php' => array(__('Install Plugins'), 'install_plugins')); 3206 break; 3207 case 'themes.php': 3208 $default_action = array('theme-install.php' => array(__('Install Themes'), 'install_themes')); 3209 break; 3210 default: 3211 $default_action = array('post-new.php' => array(__('New Post'), 'edit_posts')); 3212 break; 3213 } 3214 3191 3215 $actions = array( 3192 3216 'post-new.php' => array(__('New Post'), 'edit_posts'), … … 3197 3221 ); 3198 3222 3223 $default_key = array_keys($default_action); 3224 $default_key = $default_key[0]; 3225 if ( isset($actions[$default_key]) ) 3226 unset($actions[$default_key]); 3227 $actions = array_merge($default_action, $actions); 3199 3228 $actions = apply_filters('favorite_actions', $actions); 3200 3229
Note: See TracChangeset
for help on using the changeset viewer.