Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: edit_{$post_type}_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
1037       *
1038       * Some examples of filter hooks generated here include: 'edit_attachment_per_page',
1039       * 'edit_post_per_page', 'edit_page_per_page', etc.
1040       *
1041       * @since 3.0.0
1042       *
1043       * @param int $posts_per_page Number of posts to display per page for the given post
1044       *                            type. Default 20.
1045       */
1046      $posts_per_page = apply_filters( "edit_{$post_type}_per_page", $posts_per_page );
1047
1048      /**
1049       * Filters the number of posts displayed per page when specifically listing "posts".
1050       *
1051       * @since 2.8.0
1052       *
1053       * @param int    $posts_per_page Number of posts to be displayed. Default 20.
1054       * @param string $post_type      The post type.
1055       */