[wp-trac] [WordPress Trac] #47657: wp_link_pages() args to wrap "a"-tag
WordPress Trac
noreply at wordpress.org
Sat Jul 6 00:33:05 UTC 2019
#47657: wp_link_pages() args to wrap "a"-tag
-----------------------------+-----------------------------
Reporter: sandrowuermli | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version:
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
In the function `wp_link_pages()` the `$args` `link_before` and
`link_after` are confusing for me.
IMHO `link_before` should be before link. Because `pagelink`
is for wrapping the text inside the link: `'pagelink' => '<span
class="test">%</span>'`
for example will be ’<a href="…" class="…"><span
class="test">3</span></a>’.
But you can do the same thing with `'link_before' => '<span
class="test">', 'link_after' => '</span>'`.
If there are new `$args` params, `link_wrap_before` for example, would be
much easier to create a bootstrap pagination for example.
`$args = [ 'link_wrap_before' => '<li class="list-item">',
'link_wrap_after' => '</li>']`
should output:
`<li class="list-item"><a href="…">…</a></li>`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47657>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list