[wp-trac] [WordPress Trac] #39631: Pagination prepareLinkPreview() Changesets Customizer
WordPress Trac
noreply at wordpress.org
Tue Jan 31 21:49:38 UTC 2017
#39631: Pagination prepareLinkPreview() Changesets Customizer
-------------------------------+-----------------------------------------
Reporter: nwp_developer | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: 4.7
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses: javascript, administration
-------------------------------+-----------------------------------------
Comment (by nwp_developer):
Most sites use paginate_links() for blog home pagination like below
<<Previous [1][2][3] Next>>
See https://codex.wordpress.org/Function_Reference/paginate_links.
However, with the introduction of changesets and disabling external links,
the pagination links have their url changed to a changeset url. This
prevents previewing blog excerpts in customizer. Since blog pagination is
linking internally in the site it should be excluded from
prepareLinkPreview(). The only exclusions are admin bar, #, #id.
{{{
// Skip links in admin bar.
if ( $( element ).closest( '#wpadminbar' ).length ) {
return;
}
// Ignore links with href="#" or href="#id".
if ( '#' === $( element ).attr( 'href' ).substr( 0, 1 ) ) {
return;
}
}}}
Replying to [comment:1 westonruter]:
> @nwp_developer can you clarify what you mean by pagination? Please also
give examples.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39631#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list