WordPress filter hook
learn_press_pagination_args
Fired by 2 WordPress plugins, running on 60K+ sites between them.
How to use learn_press_pagination_args
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'learn_press_pagination_args', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Argument names come from LearnPress's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
2 plugins that fire learn_press_pagination_args
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
LearnPress60,000+ installs
apply_filters( 'learn_press_pagination_args', array( 'base' => $data['base'] ?? add_query_arg( 'paged', '%#%', '' ), 'format' => $data['format'] ?? '?paged=%#%', 'add_args' => $data['add_args'] ?? '', 'current' => max( 1, $paged ), 'total' => $total_pages, 'prev_text' => '<i class="lp-icon-angle-left"></i>', 'next_text' => '<i class="lp-icon-angle-right"></i>', 'type' => 'list', 'end_size' => 3, 'mid_size' => 3, ) )inc/Helpers/Template.php:389 -
Guto Toolkit for Elementor Addons10+ installs
apply_filters( 'learn_press_pagination_args', array( 'base' => esc_url_raw( str_replace( 999999999, '%#%', get_pagenum_link( 999999999, false ) ) ), 'format' => '', 'add_args' => '', 'current' => max( 1, get_query_var( 'paged' ) ), 'total' => $courses_array->max_num_pages, 'prev_text' => '<i class="bx bx-left-arrow-alt"></i>', 'next_text' => '<i class="bx bx-right-arrow-alt"></i>', 'end_size' => 3, 'mid_size' => 3 ) )includes/el-widgets/life-coaching/lc-course.php:375
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.