Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: plugins_per_page

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
351
352 $plugins = &$$plugin_array_name;
353
354 //Paging.
355 $total_this_page = "total_{$status}_plugins";
356 $total_this_page = $$total_this_page;
357 $plugins_per_page = (int) get_user_option( 'plugins_per_page', 0, false );
358 if ( empty( $plugins_per_page ) || $plugins_per_page < 1 )
359      $plugins_per_page = 999;
360 $plugins_per_page = apply_filters( 'plugins_per_page', $plugins_per_page );
361
362 $start = ($page - 1) * $plugins_per_page;
363
364 $page_links = paginate_links( array(
365      'base' => add_query_arg( 'paged', '%#%' ),
366      'format' => '',
367      'prev_text' => __('&laquo;'),
368      'next_text' => __('&raquo;'),
369      'total' => ceil($total_this_page / $plugins_per_page),