plugin development - Why would one specify multiple arguments when using get_previous_posts_link() which takes only one paramete

I'm looking at some plugin code that looks like so:get_previous_posts_link(__('<span>&larr;<span

I'm looking at some plugin code that looks like so:

get_previous_posts_link(__('<span>&larr;</span> Newer', 'gc-sermons'), $total_pages

When I look at the WP function reference for get_previous_post_link I see that it is defined with only one parameter like so:

get_previous_posts_link( string $label = null )

The first argument passed makes sense with above parameter:

__('<span>&larr;</span> Newer', 'gc-sermons')

But what is the second argument ($total_pages) for? Is there any reason to retain it?

I'm looking at some plugin code that looks like so:

get_previous_posts_link(__('<span>&larr;</span> Newer', 'gc-sermons'), $total_pages

When I look at the WP function reference for get_previous_post_link I see that it is defined with only one parameter like so:

get_previous_posts_link( string $label = null )

The first argument passed makes sense with above parameter:

__('<span>&larr;</span> Newer', 'gc-sermons')

But what is the second argument ($total_pages) for? Is there any reason to retain it?

Share Improve this question asked Jan 22, 2020 at 2:40 davemackeydavemackey 3152 silver badges18 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

There's no reason for it to be there, and it won't do anything. Only the author would know why it's there, but it's likely a mistake.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744814152a4595226.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信