<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Lightbox &#8211; Snippets</title>
	<atom:link href="http://wp.djtedfunke.com/tag/lightbox/feed/" rel="self" type="application/rss+xml" />
	<link>http://wp.djtedfunke.com</link>
	<description></description>
	<lastBuildDate>Tue, 01 Jan 2019 21:51:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.3</generator>

<image>
	<url>http://wp.djtedfunke.com/wp-content/uploads/2018/12/cropped-front-end_developer-2-512-32x32.png</url>
	<title>Lightbox &#8211; Snippets</title>
	<link>http://wp.djtedfunke.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Lightbox attribute</title>
		<link>http://wp.djtedfunke.com/lightbox-attribute/</link>
		
		<dc:creator><![CDATA[tadej]]></dc:creator>
		<pubDate>Tue, 01 Jan 2019 21:51:54 +0000</pubDate>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[Lightbox]]></category>
		<guid isPermaLink="false">http://wp.djtedfunke.com/?p=119</guid>

					<description><![CDATA[Adds lightbox attribute for image popup:]]></description>
										<content:encoded><![CDATA[
<p>Adds lightbox attribute for image popup:</p>



<pre class="wp-block-code"><code>function add_lightbox_rel($content) {
    global $post;
    $pattern = "/&lt;a(.*?)href=('|\")(.*?).(bmp|gif|jpeg|jpg|png)('|\")(.*?)>/i";
    $replacement = '&lt;a$1href=$2$3.$4$5 rel="lightbox" $6>';
    $content = preg_replace($pattern, $replacement, $content);
    return $content;
}
add_filter("the_content", "add_lightbox_rel");
add_filter("acf_the_content", "add_lightbox_rel");

function add_gallery_rel($attachment_link) {
    global $post;
    $attachment_link = str_replace("&lt;a", "&lt;a rel=\"lightbox\"", $attachment_link);
    return $attachment_link;
}
add_filter("wp_get_attachment_link", "add_gallery_rel");</code></pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
