user_id = $user_id; $this->profileID = get_user_meta($user_id, BASE . 'link', true); $this->user_data = get_userdata($user_id); $this->meta = Meta::forPost($this->profileID); // Set badge URL - this would be your badge image path $this->badge_url = JVB_URL . 'assets/images/badges/edmonton-ink-badge.png'; } /** * Get the HTML embed code * * @return string The HTML code for embedding */ public function getEmbedCode():string { $profile_url = get_permalink($this->profileID); $display_name = $this->user_data->display_name; $city = jvbArtistCity($this->profileID); $type = jvbArtistType($this->profileID); // Get artist's top styles for more precise microdata $styles = $this->getArtistStyles(); $style_text = ! empty($styles) ? implode(', ', $styles) : ''; // Escape all values for safety $profile_url = esc_url($profile_url); $display_name = esc_html($display_name); $badge_url = esc_url($this->badge_url); $city = esc_html($city); $type = esc_html($type); $style_text = esc_html($style_text); // Generate a unique ID for the container $container_id = 'jvbnk-badge-' . $this->user_id; // Legacy Tattoo Removal URL $legacy_url = 'https://legacytattooremoval.ca'; // Build HTML with structured data for SEO return <<
$display_name - edmonton.ink Verified Artist
$display_name
$type in $city
edmonton.ink Verified
Powered by Legacy Tattoo Removal
HTML; } /** * Get a more compact embed code (just image + link) * * @return string The HTML code for minimal embedding */ public function getMinimalEmbedCode():string { $profile_url = esc_url(get_permalink($this->profileID)); $display_name = esc_html($this->user_data->display_name); $badge_url = esc_url($this->badge_url); $container_id = 'jvb-badge' . $this->user_id; $legacy_url = 'https://legacytattooremoval.ca'; return <<
$display_name - edmonton.ink Verified Artist
Legacy Tattoo Removal
HTML; } /** * Get the artist's top styles * * @return array Array of style names */ protected function getArtistStyles():array { $styles = []; $top_styles = $this->meta->get('top_style'); if (!empty($top_styles)) { $style_ids = explode(',', $top_styles); foreach ($style_ids as $style_id) { $term = get_term((int) $style_id, BASE . 'style'); if ($term && !is_wp_error($term)) { $styles[] = html_entity_decode($term->name); } } } return $styles; } /** * Get image-only embed code with embedded backlinks * * @return string The HTML code for image-only embedding */ public function getImageOnlyEmbedCode():string { $profile_url = esc_url(get_permalink($this->profileID)); $display_name = esc_html($this->user_data->display_name); $badge_url = esc_url($this->badge_url); $container_id = 'jvb-badge-img-' . $this->user_id; $legacy_url = 'https://legacytattooremoval.ca'; return <<
$display_name - edmonton.ink Verified Artist | Legacy Tattoo Removal Legacy Tattoo Removal
HTML; } /** * Generate the embed code display with preview and copy functionality * * @return string HTML for the embed code UI component */ public function generateUIComponent():string { $embed_code = htmlspecialchars($this->getEmbedCode(), ENT_QUOTES, 'UTF-8'); $minimal_code = htmlspecialchars($this->getMinimalEmbedCode(), ENT_QUOTES, 'UTF-8'); $image_only_code = htmlspecialchars($this->getImageOnlyEmbedCode(), ENT_QUOTES, 'UTF-8'); $preview = $this->getEmbedCode(); return <<

Embed Code for Your Website

Copy this code to your website to show your edmonton.ink verified status and link back to your profile.

$preview
{$this->getMinimalEmbedCode()}
{$this->getImageOnlyEmbedCode()}

Note: This image contains clickable areas - the badge links to your edmonton.ink profile, while the bottom area links to Legacy Tattoo Removal.

Pro Tips:

HTML; } }