Allow the type argument to be passed through get_the_pagination() as long as its value isn't array.

For trunk.

See #29808


git-svn-id: https://develop.svn.wordpress.org/trunk@30820 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2014-12-11 09:38:18 +00:00
parent 560b6f7978
commit 9dc69a9fa6

View File

@ -2314,8 +2314,11 @@ function get_the_pagination( $args = array() ) {
'next_text' => __( 'Next' ),
'screen_reader_text' => __( 'Posts navigation' ),
) );
// Make sure we get plain links, so we can work with it.
$args['type'] = 'plain';
// Make sure we get a string back. Plain is the next best thing.
if ( isset( $args['type'] ) && 'array' == $args['type'] ) {
$args['type'] = 'plain';
}
// Set up paginated links.
$links = paginate_links( $args );