Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: {$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
962       *
963       * Some examples of filter hooks generated here include: 'edit_attachment_per_page',
964       * 'edit_post_per_page', 'edit_page_per_page', etc.
965       *
966       * @since 3.0.0
967       *
968       * @param int $posts_per_page Number of posts to display per page for the given 'per_page'
969       *                            type. Default 20.
970       */
971      $posts_per_page = apply_filters( $per_page, $posts_per_page );
972
973      /**
974       * Filter the number of posts displayed per page when specifically listing "posts".
975       *
976       * @since 2.8.0
977       *
978       * @param int    $per_page  Number of posts to be displayed. Default 20.
979       * @param string $post_type The post type.
980       */