How to edit or override a Core function?
There is no filter, but you can set the type argument to array when you call paginate_links(), and then you can run a filter on the returned array. Example: $links = array_map( function( $link ) { if ( FALSE === strpos( $link, ‘/page/’ ) ) return str_replace( ‘<a ‘, ‘<a data-page=”1″ ‘, $link ); return … Read more