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 disp

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745183432a4615525.html

相关推荐

  • Edit plugin&#39;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 disp

    10小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信