[wp-hackers] setting the themes per page

Dion Hulse (dd32) wordpress at dd32.id.au
Wed Jan 4 05:30:48 UTC 2012


24 is hard coded into the list tables.
I can see it'd be possible to half the render of the tables, set new
pagination, and render again.. but it looks like that'll be rather
hacky.. and I'm not about to attempt to code that up :)

See http://core.trac.wordpress.org/ticket/19469 for adding some kind
of options for it.
There have been discussions about that table, and it may change
slightly in a future release.. so unless it's a "I MUST do this" I'd
just leave it at 24..

On 4 January 2012 16:25, fris <fris at fris.net> wrote:
> That will work for themes per page?
>
> Cause no option is available like in plugins,posts,etc from the drop down
> contextual.
>
>
>
> -----Original Message-----
> From: wp-hackers-bounces at lists.automattic.com
> [mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Braydon
> Sent: Tuesday, January 03, 2012 11:47 PM
> To: wp-hackers at lists.automattic.com
> Subject: Re: [wp-hackers] setting the themes per page
>
> There is a filter "edit_posts_per_page" to change that.
>
> In functions.php adding something like this will set a new default, and
> still have the user option available.
>
> function my_edit_post_per_page() {
>     $per_page = (int) get_user_option( 'edit_post_per_page' );
>     if ( empty( $per_page ) ) {
>         $per_page = 100;
>     }
>     return $per_page;
> }
>
> add_filter( 'edit_posts_per_page', 'my_edit_post_per_page' );
>
> -Braydon
>
> On 01/03/2012 08:23 PM, fris wrote:
>> Anyway we can hook into the themes per page in the admin to change the
>> default of 24 per page?
>>
>> I know of themes_api_args and themes_api filters.
>>
>> Any hints?
>>
>>
>>
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>> !DSPAM:4f03d435271881063054777!
>>
>
>
> --
> Braydon Fuller
> http://braydon.com/
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list