# bbp-core/1.0.8/includes/hooks/actions.php

Forumax – AI Powered Advanced Community Forum Plugin, version 1.0.8. 37 lines.

- Page: https://pluginprobe.com/plugins/bbp-core/1.0.8/code/includes/hooks/actions.php
- Raw: https://pluginprobe.com/plugins/bbp-core/1.0.8/raw/includes/hooks/actions.php
- Modified: 2023-07-13T11:19:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/bbp-core/1.0.8/code/includes/hooks/actions.php#L10-L20`.

```php
<?php
// Hooks.
add_action( 'bbpc-resolved-topics', 'bbpc_resolved_topics', 10, 2 );

// functions
function bbpc_resolved_topics( $content = '', $topic_id = 0 ) {

	if ( empty( $topic_id ) ) {
		$topic_id = bbp_get_topic_id( $topic_id );
	}

	$open            = '';
	$close           = '';
	$resolved        = '';
	$has_best_answer = '';

	$obj = features\bbp_solved_topic();

	if ( $obj->is_solved( $topic_id ) || $obj->has_best_answer( $topic_id ) ) {
		$open  = '<div class="solved-topic-bar">';
		$close = '</div>';
	}

	if ( $obj->is_solved( $topic_id ) ) {
		$resolved = '<span class="accepted-ans-mark"><i class="icon_check_alt"></i> ' . esc_html__( 'Resolved', 'ama-core' ) . '</span>';
	}

	$content = $content . $open . $resolved . $has_best_answer . $close;

	$allowed_html = [
		'div'  => [ 'class' => [] ],
		'span' => [ 'class' => [] ],
		'i'    => [ 'class' => [] ],
	];

	echo wp_kses( $content, $allowed_html );
}
```
