HEX
Server: Apache/2.4.65 (Debian)
System: Linux kubikelcreative 5.10.0-35-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64
User: www-data (33)
PHP: 8.4.13
Disabled: NONE
Upload Files
File: /var/www/Gosurya/WP2/wp-content/themes/my-listing/includes/shortcodes/icon.php
<?php

namespace MyListing\Shortcodes;

if ( ! defined('ABSPATH') ) {
	exit;
}

class Icon {

	public
		$name = '27-icon',
		$title = '',
		$description = '',
	    $attributes = ['icon' => 'icon-add-circle-1'],
	    $data = ['pack' => 'font-awesome'];

	public function __construct() {
		$this->title = __( 'Icon', 'my-listing' );
		$this->description = __( 'Select an icon to include in your content.', 'my-listing' );

		add_shortcode($this->name, [$this, 'add_shortcode']);
	}

	public function add_shortcode( $atts, $content = null ) {
		$atts = shortcode_atts( $this->attributes, $atts );
		return c27()->get_icon_markup( $atts['icon'] );
	}

	public function output_options() { ?>
		<div class="form-group">
			<label><?php _e( 'Select Icon', 'my-listing' ) ?> {{shortcode.attributes.icon}}</label>
			<iconpicker v-model="shortcode.attributes.icon"></iconpicker>
		</div>
	<?php }
}