最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Edit plugin's HTML output with Hooks

programmeradmin0浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论