I'm looking at some plugin code that looks like so:
get_previous_posts_link(__('<span>←</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>←</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>←</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>←</span> Newer', 'gc-sermons')
But what is the second argument ($total_pages
) for? Is there any reason to retain it?
1 Answer
Reset to default 0There'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条)