* @since 1.48.0 */ namespace AdvancedAds\Ads\Types; use AdvancedAds\Ads\Ad_Plain; use AdvancedAds\Interfaces\Ad_Type; use AdvancedAds\Utilities\Conditional; defined( 'ABSPATH' ) || exit; /** * Type Plain. */ class Plain implements Ad_Type { /** * Get the unique identifier (ID) of the ad type. * * @return string The unique ID of the ad type. */ public function get_id(): string { return 'plain'; } /** * Get the class name of the object as a string. * * @return string */ public function get_classname(): string { return Ad_Plain::class; } /** * Get the title or name of the ad type. * * @return string The title of the ad type. */ public function get_title(): string { return __( 'Plain Text and Code', 'advanced-ads' ); } /** * Get a description of the ad type. * * @return string The description of the ad type. */ public function get_description(): string { return __( 'Any ad network, Amazon, customized AdSense codes, shortcodes, and code like JavaScript, HTML or PHP.', 'advanced-ads' ); } /** * Check if this ad type requires premium. * * @return bool True if premium is required; otherwise, false. */ public function is_premium(): bool { return false; } /** * Get the URL for upgrading to this ad type. * * @return string The upgrade URL for the ad type. */ public function get_upgrade_url(): string { return ''; } /** * Get the URL for upgrading to this ad type. * * @return string The upgrade URL for the ad type. */ public function get_image(): string { return ADVADS_BASE_URL . 'assets/img/ad-types/plain.svg'; } /** * Check if this ad type has size parameters. * * @return bool True if has size parameters; otherwise, false. */ public function has_size(): bool { return true; } /** * Output for the ad parameters metabox * * @param Ad_Plain $ad Ad instance. * * @return void */ public function render_parameters( $ad ): void { $content = $ad->get_content() ?? ''; ?>

error_unfiltered_html( $ad ); ?> render_php_allow( $ad ); $this->render_shortcodes_allow( $ad ); ?>
is_php_allowed() ); ?> /> <?php ?>)', 'advanced-ads' ), [ 'code' => [], ] ); ?>

%s', defined( 'DISALLOW_FILE_EDIT' ) && DISALLOW_FILE_EDIT ? 'DISALLOW_FILE_EDIT' : 'ADVANCED_ADS_DISALLOW_PHP' ) ); ?>


is_shortcode_allowed() ); ?>
/>

get_id() ) ); $user = wp_get_current_user(); $current_user_id = $user->ID; if ( Conditional::can_author_unfiltered_html( $author_id ) ) { return; } ?>

caps['administrator'] ) // A superadmin won't be listed in the author dropdown if he's registered as something other than admin on a blog of the network. ) { printf( '', esc_attr( $current_user_id ), esc_html__( 'Assign ad to me', 'advanced-ads' ) ); } } ?>