*/ namespace AdvancedAds\Pro\Modules\bbPress\Admin; use AdvancedAds\Utilities\WordPress; use AdvancedAds\Framework\Interfaces\Integration_Interface; defined( 'ABSPATH' ) || exit; /** * Class Admin */ class Admin implements Integration_Interface { /** * Hook into WordPress. * * @return void */ public function hooks(): void { add_action( 'advanced-ads-placement-options-after', [ $this, 'bbpress_comment' ], 10, 2 ); add_action( 'advanced-ads-placement-options-after', [ $this, 'bbpress_static' ], 10, 2 ); } /** * Add position setting for static content placement * * @param string $slug the placement slug. * @param Placement $placement the placement. * * @return void */ public function bbpress_static( $slug, $placement ): void { // Early bail!! if ( ! $placement->is_type( 'bbPress static' ) ) { return; } $hooks = $this->get_bbpress_static_hooks(); ob_start(); ?> is_type( 'bbPress comment' ) ) { return; } $comment_hooks = $this->get_bbpress_comment_hooks(); ob_start(); ?>


[ 'template after replies loop', 'template before replies loop', ], __( 'single forum page', 'advanced-ads-pro' ) => [ 'template after single forum', 'template before single forum', ], __( 'forums page', 'advanced-ads-pro' ) => [ 'template after forums loop', 'template before forums loop', ], ]; } /** * Get bbpress comment hooks * * @return array */ private function get_bbpress_comment_hooks(): array { return [ __( 'forum topic page', 'advanced-ads-pro' ) => [ 'theme after reply content', 'theme before reply content', 'theme after reply author admin details', ], ]; } }