product:permalink from a hook doesn’t paginate
-
Have discovered that the “plugged in”
{+product:permalink+}and{+product:post_title+}obstruct the pagination shortcode if injected from a hook, i.e:this works:
[mla_gallery attachment_category=prints-a3 posts_per_page=4 mla_rollover_text="[+product:post_title+]" mla_link_href="{+product:permalink+}"] [mla_gallery attachment_category=prints-a3 posts_per_page=4 mla_output="paginate_links,prev_next"]but a hook like this doesn’t:
add_filter( 'mla_gallery_attributes', 'ew_gallery_attributes', 10, 1 ); function ew_gallery_attributes( $attr ) { if ( !isset( attr['mla_output'] ) ) { $attr['mla_rollover_text'] = "{+product:post_title+}"; $attr['mla_link_href'] = "{+product:permalink+}"; } return $attr; }as it only works on the 1st page, but messing the expanded pagination, like this:
<a class="page-numbers" title="[+product:post_title+]" href="[+product:permalink+]?mla_paginate_current=2" tabindex="-1">2</a>The behavior is the same with the
mla_gallery_raw_attributeshook.Bumped into this, as was looking to get boilerplate params consolidated into a hook, to simplify markup across pages and allow tweaking multiple MLA galleries on-the-fly.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘product:permalink from a hook doesn’t paginate’ is closed to new replies.