Changeset 11043 for trunk/wp-admin/includes/template.php
- Timestamp:
- 04/22/2009 01:30:15 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/template.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)