[wp-trac] [WordPress Trac] #30831: paginate_links() now needs add_args=false
WordPress Trac
noreply at wordpress.org
Wed Feb 11 23:30:39 UTC 2015
#30831: paginate_links() now needs add_args=false
------------------------------------------+-----------------------
Reporter: bobbingwide | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.1.1
Component: Themes | Version: 4.1
Severity: normal | Resolution:
Keywords: has-patch fixed-major commit | Focuses: template
------------------------------------------+-----------------------
Comment (by dd32):
> I've modified your patch slightly so that the $add_args variable is
still set to false if $args['add_args'] is empty. Letting it pass through
as an empty array will pass the if ( $add_args ) tests further down in the
function; an empty array will be passed to add_query_arg(), which will
have no effect on the function output, but is a waste of cycles.
No it won't, as `( array() == false ) === true`, so it'll never enter the
if, since there's no need to set it to false, we should avoid doing so for
clarity.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30831#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list