Edit plugin’s HTML output with Hooks

I’m trying to edit the HTML output of a plugin, but I’m not sure how to do it properly.

This is the code

// display the heading
$content .= ‘<h’ . $heading_level . ‘ class=”mbm-book-grid-heading’ . ( $l + 1 ) . ‘”>’ . esc_html($label) . ‘</h’ . $heading_level .’>’;
do_action(‘mbdb_book_grid_post_heading’, $l, $label);

What I want to change is the $label, the new code would look like this

$text_label = explode(‘:’, $label);
$text_label = $text_label[1];
$content .= ‘<h’ . $heading_level . ‘ class=”mbm-book-grid-heading’ . ( $l + 1 ) . ‘”>’ . esc_html($text_label) . ‘</h’ . $heading_level .’>’;

Now, how can I proceed to that by using WordPress Actions and Filters? I’ve never done this before, so I’m a bit confused.

Thanks.

Read more here:: Edit plugin’s HTML output with Hooks

Leave a Reply

Your email address will not be published. Required fields are marked *