bobbingwide / oik-ajax

Ajaxify paged shortcodes
https://oik-plugins.com/oik-plugins/oik-ajax/
GNU General Public License v2.0
1 stars 0 forks source link

Support ajaxified pagination of shortcodes with nested content #1

Open bobbingwide opened 8 years ago

bobbingwide commented 8 years ago

v0.0.0-alpha.0316 supports an AJAX interface for paginated shortcodes which obtain their data from WordPress posts. This requirement is to support shortcodes which obtain their data from the shortcode content.

e.g.

[bw_csv posts_per_page=3]This,that
one,un
two,deux
...
ten,dix
[/bw_csv]

Proposed solution

Implement filter functions for "oik_shortcode_atts" and "oik_shortcode_content" ( new - see the related issue bobbingwide/oik/issues/22 ) to automatically paginate any content if the posts_per_page parameter is defined on the shortcode.

bobbingwide commented 8 years ago

Caveats

bobbingwide commented 6 years ago

While developing tests for oik-css I discovered a situation where the results of the test differs if oik-ajax is not activated. The filter function for the oik_shortcode_content filter shouldn't trim the content if the posts_per_page parameter is not set.