<?phpclass NectarLove {	public $post_id;	function __construct($post_id = null) {		$this->post_id = $post_id;		add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts'));		add_action('wp_ajax_nectar-love', array($this, 'ajax'));		add_action('wp_ajax_nopriv-nectar-love', array($this, 'ajax'));	}	function enqueue_scripts() {		wp_register_script(			'post-favorite',			get_template_directory_uri() . '/js/post_favorite.js',			array('jquery'),			'1.0',			true		);		global $post;		wp_localize_script(			'post-favorite',			'nectarLove',			array(				'ajaxurl' => admin_url('admin-ajax.php'),				'postID' => $post ? $post->ID : 0,				'rooturl' => home_url()			)		);		wp_enqueue_script('post-favorite');	}	function ajax($post_id = null) {		// Update		if (isset($_POST['loves_id'])) {			$post_id = str_replace(				'nectar-love-',				'',				sanitize_text_field(wp_unslash($_POST['loves_id']))			);			echo $this->love_post($post_id, 'update');		}		// Get		else {			$post_id = str_replace(				'nectar-love-',				'',				sanitize_text_field(wp_unslash($_POST['loves_id']))			);			echo $this->love_post($post_id, 'get');		}		exit;	}	function love_post($post_id, $action = 'get') {		if (!is_numeric($post_id)) {			return;		}		$post_id = absint($post_id);		switch ($action) {			case 'get':				$love_count = get_post_meta($post_id, '_nectar_love', true);				if (!$love_count) {					$love_count = 0;					add_post_meta($post_id, '_nectar_love', $love_count, true);				}				return '<span class="nectar-love-count">' . esc_html($love_count) . '</span>';				break;			case 'update':				$love_count = get_post_meta($post_id, '_nectar_love', true);				$love_count = absint($love_count);				if (isset($_COOKIE['nectar_love_' . $post_id])) {					return '<span class="nectar-love-count">' . esc_html($love_count) . '</span>';				}				$love_count++;				update_post_meta($post_id, '_nectar_love', $love_count);				/*				 * Keep the existing cookie behavior while using a valid				 * future expiration timestamp.				 *				 * 20 years:				 * 20 * 365 * 24 * 60 * 60 seconds				 */				$cookie_expiration = time() + (20 * 365 * 24 * 60 * 60);				setcookie(					'nectar_love_' . $post_id,					(string) $post_id,					$cookie_expiration,					'/'				);				return '<span class="nectar-love-count">' . esc_html($love_count) . '</span>';				break;		}	}	function add_love($unit = '', $show_icon = true) {		global $post;		if (!$post || empty($post->ID)) {			return '';		}		$output = $this->love_post($post->ID);		$class = 'nectar-love';		$icon = 'fa fa-heart-o';		$title = __('Love this', 'wp-candidate');		if (isset($_COOKIE['nectar_love_' . $post->ID])) {			$class = 'nectar-love loved';			$icon = 'fa fa-heart';			$title = __('You already love this!', 'wp-candidate');		}		$heart_icon = '';		if ($show_icon) {			$heart_icon = '<i class="' . esc_attr($icon) . '"></i>';		}		return '<a href="#" class="' . esc_attr($class) . '" id="nectar-love-' . esc_attr($post->ID) . '" title="' . esc_attr($title) . '">' . ' ' . $heart_icon . $output . ' ' . esc_html($unit) . '</a>';	}}global $post_favorite;$post_favorite = new NectarLove();function post_favorite($return = '', $unit = '', $show_icon = true) {	global $post_favorite;	if ($return === 'return') {		return $post_favorite->add_love($unit, $show_icon);	}	echo $post_favorite->add_love($unit, $show_icon);}?><?xml version="1.0" encoding="UTF-8"?>
<!-- This sitemap was dynamically generated on September 6, 2026 at 1:48 am by All in One SEO Pro v4.4.5.1 - the original SEO plugin for WordPress. -->

<?xml-stylesheet type="text/xsl" href="https://www.sd1srec.org/default-sitemap.xsl?sitemap=root"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc><![CDATA[https://www.sd1srec.org/post-sitemap.xml]]></loc>
		<lastmod><![CDATA[2024-03-16T14:04:14+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://www.sd1srec.org/page-sitemap.xml]]></loc>
		<lastmod><![CDATA[2023-10-01T16:38:56+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://www.sd1srec.org/zodonations-sitemap.xml]]></loc>
		<lastmod><![CDATA[2023-09-02T14:38:33+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://www.sd1srec.org/post-archive-sitemap.xml]]></loc>
		<lastmod><![CDATA[2023-09-02T14:38:33+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://www.sd1srec.org/category-sitemap.xml]]></loc>
		<lastmod><![CDATA[2024-03-16T14:04:14+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://www.sd1srec.org/post_tag-sitemap.xml]]></loc>
		<lastmod><![CDATA[2024-03-16T14:04:14+00:00]]></lastmod>
	</sitemap>
</sitemapindex>
