// ══════════════════════════════════════════════
function remoteminion_icon($name, $size = 24, $fill = 'currentColor') {
$icons = array(
// Navigation
'hamburger' => '',
'close' => '',
// Arrows
'arrow-right' => '',
// Hero stats
'currency-dollar' => '',
'clock' => '',
'shield-check' => '',
// Services
'robot' => '',
'brain' => '',
'plugs' => '',
'chart-line-up' => '',
// Process steps
'lightning' => '',
'gear' => '',
'repeat' => '',
// Why Us
'headset' => '',
// Checkmark (pricing, why-us)
'check' => '',
// Star (testimonials)
'star-fill' => '',
// Contact
'envelope' => '',
'phone' => '',
// Social media
'facebook' => '',
'instagram' => '',
'linkedin' => '',
);
if (!isset($icons[$name])) return '';
// Social icons use 0-24 viewBox, all others use 0-256
$social = array('facebook', 'instagram', 'linkedin');
$viewBox = in_array($name, $social) ? '0 0 24 24' : '0 0 256 256';
return '';
}
// AJAX Contact Form Handler
function remoteminion_handle_contact() {
check_ajax_referer('remoteminion_contact_nonce', 'nonce');
$name = sanitize_text_field($_POST['name'] ?? '');
$email = sanitize_email($_POST['email'] ?? '');
$company = sanitize_text_field($_POST['company'] ?? '');
$message = sanitize_textarea_field($_POST['message'] ?? '');
if (empty($name) || empty($email)) {
wp_send_json_error('Name and email are required.');
}
$to = get_option('admin_email');
$subject = 'New Contact from RemoteMinion.ai: ' . $name;
$body = "Name: $name\nEmail: $email\nCompany: $company\nMessage: $message";
$headers = array('Content-Type: text/plain; charset=UTF-8', 'Reply-To: ' . $email);
$sent = wp_mail($to, $subject, $body, $headers);
wp_insert_post(array(
'post_title' => 'Contact: ' . $name,
'post_content' => $body,
'post_type' => 'remoteminion_lead',
'post_status' => 'private',
));
if ($sent) {
wp_send_json_success('Message sent successfully!');
} else {
wp_send_json_success('Lead captured! (Email delivery may be pending)');
}
}
add_action('wp_ajax_remoteminion_contact', 'remoteminion_handle_contact');
add_action('wp_ajax_nopriv_remoteminion_contact', 'remoteminion_handle_contact');
// Register custom post type for leads
function remoteminion_register_cpt() {
register_post_type('remoteminion_lead', array(
'labels' => array(
'name' => 'Leads',
'singular_name' => 'Lead',
'menu_name' => 'RM Leads',
),
'public' => false,
'show_ui' => true,
'show_in_menu' => true,
'menu_icon' => 'dashicons-email-alt',
'supports' => array('title', 'editor'),
));
}
add_action('init', 'remoteminion_register_cpt');
// Remove admin bar on frontend
add_filter('show_admin_bar', '__return_false');
https://www.remoteminion.ai/wp-sitemap-posts-post-1.xmlhttps://www.remoteminion.ai/wp-sitemap-posts-page-1.xmlhttps://www.remoteminion.ai/wp-sitemap-taxonomies-category-1.xmlhttps://www.remoteminion.ai/wp-sitemap-users-1.xml