Opened 16 years ago
Closed 16 years ago
#9605 closed feature request (duplicate)
screen_options for plugins
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | high | |
Severity: | normal | Version: | 2.8 |
Component: | Administration | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
In order to allow plugins to integrate this new wp feature !
function screen_options($screen) { switch ( $screen ) { case 'edit': $per_page_label = __('Posts per page:'); break; case 'edit-pages': $per_page_label = __('Pages per page:'); break; case 'edit-comments': $per_page_label = __('Comments per page:'); break; case 'upload': $per_page_label = __('Media items per page:'); break; case 'categories': $per_page_label = __('Categories per page:'); break; case 'edit-tags': $per_page_label = __('Tags per page:'); break; case 'plugins': $per_page_label = __('Plugins per page:'); break; default: return ''; }
to be replaced by
function screen_options($screen) { $per_page_labels = array(); $per_page_labels['edit'] = __('Posts per page:'); $per_page_labels['edit-pages'] = __('Pages per page:'); $per_page_labels['edit-comments'] = __('Comments per page:'); $per_page_labels['upload'] = __('Media items per page:'); $per_page_labels['categories'] = __('Categories per page:'); $per_page_labels[edit-tags'] = __('Tags per page:'); $per_page_labels['plugins'] = __('Plugins per page:'); $per_page_labels = apply_filters('per_page_labels', $per_page_labels, $screen); if (!isset($per_page_labels[$screen])) return ''; $per_page_label = $per_page_labels[$screen];
Attachments (2)
Change History (15)
#7
@
16 years ago
screen_options() is pretty worthless to plugins until it can allow them to add arbitrary options. Any patches should be in that direction.
#10
@
16 years ago
- Keywords has-patch needs-testing added; needs-patch removed
- Milestone changed from 2.8 to 2.8.1
- Resolution duplicate deleted
- Status changed from closed to reopened
#11
follow-up:
↓ 12
@
16 years ago
- Milestone 2.8.1 deleted
- Resolution set to duplicate
- Status changed from reopened to closed
this patch would break plugins that use that function.
please use #9657
#12
in reply to:
↑ 11
@
16 years ago
- Resolution duplicate deleted
- Status changed from closed to reopened
Replying to Denis-de-Bernardy:
this patch would break plugins that use that function.
please use #9657
Sorry, i don't get it !
Using a filter will make no damage, if the filter is properly coded of course !
Being able to add some options in the option screen tab is (should be) complementary to add new tabs !!!
Note: See
TracTickets for help on using
tickets.
in the new code,
this line :
should be