Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: the_posts_pagination_args

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
2935            * @param array $args {
2936            *     Optional. Default pagination arguments, see paginate_links().
2937            *
2938            *     @type string $screen_reader_text Screen reader text for navigation element.
2939            *                                      Default 'Posts navigation'.
2940            *     @type string $aria_label         ARIA label text for the nav element. Default 'Posts'.
2941            *     @type string $class              Custom class for the nav element. Default 'pagination'.
2942            * }
2943            */
2944           $args = apply_filters( 'the_posts_pagination_args', $args );
2945
2946           // Make sure we get a string back. Plain is the next best thing.
2947           if ( isset( $args['type'] ) && 'array' === $args['type'] ) {
2948                $args['type'] = 'plain';
2949           }
2950
2951           // Set up paginated links.
2952           $links = paginate_links( $args );
2953