[wp-trac] [WordPress Trac] #9605: screen_options for plugins
WordPress Trac
wp-trac at lists.automattic.com
Tue Apr 21 09:16:27 GMT 2009
#9605: screen_options for plugins
-----------------------------+----------------------------------------------
Reporter: arena | Owner: anonymous
Type: feature request | Status: new
Priority: high | Milestone: Unassigned
Component: Administration | Version: 2.8
Severity: normal | Keywords: has-patch
-----------------------------+----------------------------------------------
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];
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9605>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list