* @since 1.48.2 */ namespace AdvancedAds\Compatibility; use AdvancedAds\Abstracts\Ad; use AdvancedAds\Interfaces\Ad_Interface; defined( 'ABSPATH' ) || exit; /** * Peepso Ad. */ class Peepso_Ad extends Ad implements Ad_Interface { /** * Prepare output for frontend. * * @return string */ public function prepare_frontend_output(): string { $content = $this->get_content(); $image_url = wp_get_attachment_image_url( $this->get_prop( 'image_id' ), 'full' ); $image_url = $image_url[0] ?? null; $avatar_url = wp_get_attachment_image_url( $this->get_prop( 'avatar_id' ), 'full' ); $avatar_url = $avatar_url[0] ?? null; $url = $this->get_url() ?? '#'; $title = $this->get_title() ?? ''; $title_override = $this->get_prop( 'title_override' ) ?? ''; if ( $title_override && '' !== $title_override ) { $title = $title_override; } ob_start(); ?>
get_content(); $allow_tags = \PeepSo::get_option_new( 'advanced_ads_allow_all_tags' ); echo $allow_tags ? $content // phpcs:ignore : wpautop( strip_tags( $content, \PeepSoAdvancedAdsAdTypePeepSo::get_allowed_html() ) ); // phpcs:ignore ?>