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

For trunk.

See #29808

Built from https://develop.svn.wordpress.org/trunk@30820


git-svn-id: http://core.svn.wordpress.org/trunk@30810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2014-12-11 09:39:23 +00:00
parent 5e3e3d0e0f
commit 31b74e57da
1 changed files with 5 additions and 2 deletions

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 );