Using add_filters() , apply_filter(), add_action() and do_action() in extending a plugin

It’s a very broad question, but my approach would look something like this: I’d replace your code with this: <?php my_the_payment_options(); ?> And then in my plugin: function my_the_payment_options() { $payment_options = get_my_available_payment_options(); if ( $payment_options ) : ?> <div class=”payments-options”> <?php foreach ( $payment_options as $k => $v ) call_user_func( $v[‘callback’] ); ?> </div> … Read more

Filter template text

More informations needed, but maybe you’ll find it by using global variables. Like: global $post; var_dump($post);

Replace Text with hyperlinks

This is a fairly complex PHP (rather than WP) issue if you want to take into account all possibilities. If you replace test with <a href=”#”>test</a> you will run into problems if the content already has <a href=”https://wordpress.stackexchange.com/questions/317374/?”>test</a>, because the result will then be <a href=”https://wordpress.stackexchange.com/questions/317374/?”><a href=”#”>test</a></a> So, before you do the replace you will … Read more