<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="https://brooke.codes/wp-content/plugins/pretty-rss-feeds/xslt/pretty-feed.xsl" type="text/xsl" media="screen" ?><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>Uncategorized &#8211; &lt;Brooke&gt; &lt;Codes&gt;</title>
	<atom:link href="https://brooke.codes/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>https://brooke.codes</link>
	<description>The Tech Blog of Brooke. </description>
	<lastBuildDate>Sat, 29 Mar 2025 08:22:40 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Some Reflection</title>
		<link>https://brooke.codes/2025/03/28/some-reflection/</link>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Sat, 29 Mar 2025 06:08:18 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=1695</guid>

					<description><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2025/03/IMG_20220302_175927-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image" alt="IMG 20220302" decoding="async" />I spent some time this week moving this site from WordPress.com to a self-hosted WordPress instance. As part of that process I ended up reviewing this blog which has content going back from 2011. The older content is a lot of code snippets, and plugin releases which has me thinking about how the internet has [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2025/03/IMG_20220302_175927-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image" alt="IMG 20220302" decoding="async" />
<p class="wp-block-paragraph">I spent some time this week moving this site from WordPress.com to a self-hosted WordPress instance. As part of that process I ended up reviewing this blog which has content going back from 2011. </p>



<p class="wp-block-paragraph">The older content is a lot of code snippets, and plugin releases which has me thinking about how the internet has changed so much over the past 15ish years. We have moved to systems like GitHub and Reddit and that long form blogging is mostly a thing of the past. I understand the appeal of having all the content in one place, but it brings back the age old question of who owns and controls our data. </p>



<p class="wp-block-paragraph">For me, I remain a fan of open technologies (like git itself) and plan to bring back this blog. In fact, the process revealed I have lots of posts in draft form here, so more to come, stay tuned!</p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>O Christmas Tree! O Christmas Tree!</title>
		<link>https://brooke.codes/2016/12/20/o-christmas-tree-o-christmas-tree/</link>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Wed, 21 Dec 2016 04:58:44 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[maker]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=710</guid>

					<description><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2016/12/star_featured-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image" alt="Star featured" decoding="async" />Last year while making popcorn and cranberry chains the only thing missing from the tree was a star. One was made posthaste. However, it was missing a very important feature, lighting up. We couldn&#8217;t let that happen two years in a row so this year we added a color changing light to our homemade star. [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2016/12/star_featured-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image" alt="Star featured" decoding="async" loading="lazy" />
<p class="wp-block-paragraph">Last year while making popcorn and cranberry chains the only thing missing from the tree was a star. One was made posthaste. However, it was missing a very important feature, lighting up. We couldn&#8217;t let that happen two years in a row so this year we added a color changing light to our homemade star.</p>



<span id="more-710"></span>



<p class="wp-block-paragraph">The hardware is a <a href="https://www.adafruit.com/product/1501">Trinket</a> and single <a href="https://www.adafruit.com/product/1260">Flora NeoPixel</a>&nbsp;both from Adafruit.</p>



<p class="wp-block-paragraph">The software is&nbsp;a slightly modified rainbow effect from the NeoPixel&nbsp;stand test included&nbsp;in<a href="https://github.com/adafruit/Adafruit_NeoPixel"> the library.</a></p>



<p class="wp-block-paragraph"><strong>Happy</strong> <strong>Holidays</strong>!</p>



<figure class="wp-block-image"><img decoding="async" src="https://brooke.codes/wp-content/uploads/2016/12/img_20161220_1914410.jpg" alt="IMG_20161220_1914410.jpg" class="wp-image-714"/></figure>



<figure class="wp-block-video"><video height="1080" style="aspect-ratio: 1920 / 1080;" width="1920" controls src="https://brooke.codes/wp-content/uploads/2016/12/mov_20161220_1914049.mp4"></video></figure>
]]></content:encoded>
					
		
		<enclosure url="https://brooke.codes/wp-content/uploads/2016/12/mov_20161220_1914049.mp4" length="30800344" type="video/mp4" />

			</item>
		<item>
		<title>I&#8217;m thinkin&#8217; about my doorbell</title>
		<link>https://brooke.codes/2016/03/04/im-thinkin-about-my-doorbell/</link>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Fri, 04 Mar 2016 08:20:31 +0000</pubDate>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[laser]]></category>
		<category><![CDATA[laser-cutting]]></category>
		<category><![CDATA[maker]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=498</guid>

					<description><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2016/03/doorbell_featured-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image" alt="Doorbell featured" decoding="async" loading="lazy" />Laser Cut Doorbell enclosure for Flic I recently bought a set of Flic buttons for my home. At my house these are mostly used to control my music or easy turn on/off my lights. Another great feature was being able to place one outside to be used as a doorbell. When clicked once a bell [&#8230;]]]></description>
										<content:encoded><![CDATA[<img width="150" height="150" src="https://brooke.codes/wp-content/uploads/2016/03/doorbell_featured-150x150.jpg" class="attachment-thumbnail size-thumbnail wp-post-image" alt="Doorbell featured" decoding="async" loading="lazy" />
<h3 class="wp-block-heading"><strong>Laser Cut Doorbell enclosure for Flic</strong></h3>



<p class="wp-block-paragraph">I recently bought a set of <a href="https://flic.io">Flic buttons </a>for my home. At my house these are mostly used to control my music or easy turn on/off my lights. Another great feature was being able to place one outside to be used as a doorbell.</p>



<span id="more-498"></span>



<p class="wp-block-paragraph">When clicked once a bell is sounded though the Flic app using a tablet. I had a friend recently buy one for this purpose at his home and we were talking about a way to enclose it. Enter this laser cut enclosure.</p>



<figure class="wp-block-gallery has-nested-images columns-3 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://brooke.codes/wp-content/uploads/2016/03/doorbell1.jpg"><img loading="lazy" decoding="async" width="1024" height="576" data-id="525" src="https://brooke.codes/wp-content/uploads/2016/03/doorbell1-1024x576.jpg" alt="" class="wp-image-525" srcset="https://brooke.codes/wp-content/uploads/2016/03/doorbell1-1024x576.jpg 1024w, https://brooke.codes/wp-content/uploads/2016/03/doorbell1-300x169.jpg 300w, https://brooke.codes/wp-content/uploads/2016/03/doorbell1-768x432.jpg 768w, https://brooke.codes/wp-content/uploads/2016/03/doorbell1.jpg 1138w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://brooke.codes/wp-content/uploads/2016/03/doorbell3.jpg"><img loading="lazy" decoding="async" width="1024" height="576" data-id="527" src="https://brooke.codes/wp-content/uploads/2016/03/doorbell3-1024x576.jpg" alt="" class="wp-image-527" srcset="https://brooke.codes/wp-content/uploads/2016/03/doorbell3-1024x576.jpg 1024w, https://brooke.codes/wp-content/uploads/2016/03/doorbell3-300x169.jpg 300w, https://brooke.codes/wp-content/uploads/2016/03/doorbell3-768x432.jpg 768w, https://brooke.codes/wp-content/uploads/2016/03/doorbell3.jpg 1138w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><a href="https://brooke.codes/wp-content/uploads/2016/03/doorbell2.jpg"><img loading="lazy" decoding="async" width="1024" height="576" data-id="524" src="https://brooke.codes/wp-content/uploads/2016/03/doorbell2-1024x576.jpg" alt="" class="wp-image-524" srcset="https://brooke.codes/wp-content/uploads/2016/03/doorbell2-1024x576.jpg 1024w, https://brooke.codes/wp-content/uploads/2016/03/doorbell2-300x169.jpg 300w, https://brooke.codes/wp-content/uploads/2016/03/doorbell2-768x432.jpg 768w, https://brooke.codes/wp-content/uploads/2016/03/doorbell2.jpg 1138w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="640" height="840" data-id="526" src="https://brooke.codes/wp-content/uploads/2016/03/doorbell4.jpg" alt="" class="wp-image-526" srcset="https://brooke.codes/wp-content/uploads/2016/03/doorbell4.jpg 640w, https://brooke.codes/wp-content/uploads/2016/03/doorbell4-229x300.jpg 229w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>
</figure>



<p class="wp-block-paragraph">Things didn&#8217;t work out perfectly with the sides but the enclosure still works without sites. The bell can be rung by pressing the button though the case. I have<a href="https://brooke.codes/wp-content/uploads/2016/03/doorbell.zip"> uploaded the EPS file</a> if anyone want to use it as a base for their design. They are released under Creative Commons Share-Alike. Included are two files both of which may not be perfect. The one printed is the one marked printed.</p>



<p class="wp-block-paragraph">P.S. I do realize this is the first time I&#8217;ve posted in over two years. As I find my place in the maker/creator space expect more post in the future.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>I&#8217;m an Automattician</title>
		<link>https://brooke.codes/2013/12/14/im-an-automattician/</link>
					<comments>https://brooke.codes/2013/12/14/im-an-automattician/#comments</comments>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Sun, 15 Dec 2013 03:03:41 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://tech.bandonrandon.com/?p=446</guid>

					<description><![CDATA[I have been holding off on posting this because it just seems too good to be true. This October I joined the amazing staff at Automattic full time. This is the bunch of people who are behind WordPress and WordPress.com.  I&#8217;ve joined as a Happiness Engineer on the Store team. I hope this means that [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">I have been holding off on posting this because it just seems too good to be true. This October I joined the amazing staff at <a href="https://automattic.com">Automattic</a> full time. This is the bunch of people who are behind WordPress and WordPress.com.  I&#8217;ve joined as a Happiness Engineer on the Store team. I hope this means that I&#8217;ll have a little more time to work on my plugins and attend WordCamps.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://brooke.codes/2013/12/14/im-an-automattician/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>MobileESP for WordPress 1.5.3 released</title>
		<link>https://brooke.codes/2013/08/15/mobileesp-for-wordpress-1-5-3-released/</link>
					<comments>https://brooke.codes/2013/08/15/mobileesp-for-wordpress-1-5-3-released/#comments</comments>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Thu, 15 Aug 2013 18:56:27 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=366</guid>

					<description><![CDATA[I recently released MobileEPS for WordPress 1.5.1 which came with MAJOR changes. The slogan for this revision was &#8220;minor version number, major changes.&#8221; I later learned that one of these changes broke the plugin for people who weren&#8217;t using PHP 5.3  or above. So I released 1.5.3 to fix that issue. I strongly recommend everyone [&#8230;]]]></description>
										<content:encoded><![CDATA[
<blockquote class="wp-block-quote is-style-info-notice is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>Note: </strong>This post refers to code and a project from <em>many</em> years ago <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f631.png" alt="😱" class="wp-smiley" style="height: 1em; max-height: 1em;" />. The content was edited in March of 2025 to remove dead links, improve clarity, or fix formatting, but no other edits were made. Enjoy this time capsule into the past.</p>
</blockquote>



<p class="wp-block-paragraph">I recently released <a href="https://brooke.codes/past-projects/mobileesp4wp/" data-type="page" data-id="148">MobileEPS for WordPress </a>1.5.1 which came with MAJOR changes. The slogan for this revision was &#8220;minor version number, major changes.&#8221; I later learned that one of these changes broke the plugin for people who weren&#8217;t using PHP 5.3  or above. So I released 1.5.3 to fix that issue.</p>



<p class="wp-block-paragraph"><strong>I strongly recommend everyone who is using the plugin upgrade to this version.</strong></p>



<p class="wp-block-paragraph">Some major changes are the plugin now uses the&nbsp; <code>template_redirect</code> hook instead of no hook. What this means is you can now access your admin page with the plugin installed and that it&#8217;s being more &#8220;smart&#8221; about when to check for the redirect. For security it also now sanitizes the user input when setting the cookie and looking at wp_options.</p>



<p class="wp-block-paragraph">I also added a new banner image to the <a href="https://wordpress.org/plugins/mobileesp-for-wordpress/">repo page</a>. Thanks much to my friend<a href="http://greyrain.com/"> Felix</a> who let me use is drawing as the main image.</p>



<p class="wp-block-paragraph">Check it out and let me know if you have any questions or problems.</p>



<p class="wp-block-paragraph">&nbsp;</p>



<p class="wp-block-paragraph">&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://brooke.codes/2013/08/15/mobileesp-for-wordpress-1-5-3-released/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Spammer say the darnest things</title>
		<link>https://brooke.codes/2013/05/18/spammer-say-the-darnest-things/</link>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Sat, 18 May 2013 20:39:59 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=335</guid>

					<description><![CDATA[I recently posted a post about my thoughts on so called &#8220;logo software&#8221; and found this gem in my comment spam. &#8220;Big fan of these logos. If i’m really honest using photoshop for logo design will give it a more refined and professional look. What did you use for these?&#8221; [sic] I should point out [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">I recently posted a <a href="https://brooke.codes/2013/04/26/software-does-not-make-you-a-designer/">post</a> about my thoughts on so called &#8220;logo software&#8221; and found this gem in my comment spam.</p>



<blockquote class="wp-block-quote is-style-default is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><em>&#8220;Big fan of these logos. If i’m really honest using photoshop for logo design will give it a more refined and professional look. What did you use for these?&#8221; [sic]</em></p>
</blockquote>



<p class="wp-block-paragraph">I should point out that 1) I posed no logos and&nbsp; 2) using Photoshop for logos is a horrible idea</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Unlisted</title>
		<link>https://brooke.codes/2013/04/03/unlisted/</link>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Wed, 03 Apr 2013 23:01:38 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=322</guid>

					<description><![CDATA[As a business owner when I do a web search for my phone number many of the results are from directory services that post information on my business. For some businesses this may be fine, however, for me there are a few problems with this. The information is just wrong, I changed the name of my business [&#8230;]]]></description>
										<content:encoded><![CDATA[
<blockquote class="wp-block-quote is-style-info-notice is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>Note: </strong>This post is from <em>many</em> years ago <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f631.png" alt="😱" class="wp-smiley" style="height: 1em; max-height: 1em;" />. The content was edited in March of 2025 to remove dead links, improve clarity, or fix formatting, but no other edits were made. Enjoy this time capsule into the past.</p>
</blockquote>


<p>As a business owner when I do a web search for my phone number many of the results are from directory services that post information on my business. For some businesses this may be fine, however, for me there are a few problems with this.</p>
<ol>
<li><span style="line-height:16px;">The information is just wrong, I changed the name of my business and moved locations but the listings keep the old information. </span></li>
<li>I work from my home and don&#8217;t love the fact that a few dozen sites think is okay to post my personal information on line</li>
<li>This is done without my consent, I have NO IDEA where these services are getting my information  My best guess is from the public directory of registered businesses. The public directory clearly states &#8220;FOR NO COMMERCIAL USE ONLY&#8221; meaning that the information shouldn&#8217;t be used for these listings</li>
<li>I would rather have my company come up in search results rather than them.</li>
</ol>
<h2>Removal Instructions:</h2>
<p>To remove your site you first need to find all the places you are listed. <a href="https://www.yext.com/pl/whitepages/index.html">yext </a>and google are both good tools for this.</p>
<p>I&#8217;ve had good luck with calling and requesting removal as well as email customer support. This can be tedious and time consuming but for me it&#8217;s worth it.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Mobile EPS for WordPress 1.4</title>
		<link>https://brooke.codes/2013/02/27/mobile-eps-for-wordpress-1-4/</link>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Wed, 27 Feb 2013 08:30:47 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=302</guid>

					<description><![CDATA[I just committed Mobile ESP for WP 1.4. This is a Minor Update that updates the Library to the latest version. No other changes have been made. With HTML5 and responsive themes becoming the new standard (even with my own development) I&#8217;m wondering if this plugin is worth keeping updated but it&#8217;s the least I [&#8230;]]]></description>
										<content:encoded><![CDATA[
<blockquote class="wp-block-quote is-style-info-notice is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>Note: </strong>This post refers to code and a project from <em>many</em> years ago <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f631.png" alt="😱" class="wp-smiley" style="height: 1em; max-height: 1em;" />. The content was edited in March of 2025 to remove dead links, improve clarity, or fix formatting, but no other edits were made. Enjoy this time capsule into the past.</p>
</blockquote>


<p>I just committed Mobile ESP for WP 1.4. This is a Minor Update that updates the Library to the latest version. No other changes have been made.</p>
<p>With HTML5 and responsive themes becoming the new standard (even with my own development) I&#8217;m wondering if this plugin is worth keeping updated but it&#8217;s the least I can do to keep the lib updated. Let me know if you have any issue or concerns with 1.4.</p>]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Three new projects posted</title>
		<link>https://brooke.codes/2011/01/11/three-new-projects-posted/</link>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Wed, 12 Jan 2011 05:04:28 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=163</guid>

					<description><![CDATA[I&#8217;ve just posted three new projects and created a projects page and a contact page. The Projects: busAlert.me a site that will notify the user by text or voice when their King County Metro Bus is arriving. MobileESP for WordPress this is a simple WordPress plugin that redirects mobile visitors Stripr this is a content [&#8230;]]]></description>
										<content:encoded><![CDATA[
<blockquote class="wp-block-quote is-style-info-notice is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>Note: </strong>This post refers to code and a project from <em>many</em> years ago <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f631.png" alt="😱" class="wp-smiley" style="height: 1em; max-height: 1em;" />. The content was edited in March of 2025 to remove dead links, improve clarity, or fix formatting, but no other edits were made. Enjoy this time capsule into the past.</p>
</blockquote>



<p class="wp-block-paragraph">I&#8217;ve just posted three new projects and created a <a title="Projects" href="https://brooke.codes/projects/">projects page</a> and a contact page.</p>



<h3 class="wp-block-heading">The Projects:</h3>



<p class="wp-block-paragraph"><a href="https://brooke.codes/past-projects/busalert-me/" data-type="page" data-id="117">busAlert.me</a> a site that will notify the user by text or voice when their King County Metro Bus is arriving.</p>



<p class="wp-block-paragraph"><a href="https://brooke.codes/past-projects/mobileesp4wp/" data-type="page" data-id="148">MobileESP for WordPress</a> this is a simple WordPress plugin that redirects mobile visitors</p>



<p class="wp-block-paragraph"><a href="https://brooke.codes/past-projects/stripr/" data-type="page" data-id="132">Stripr</a> this is a content stripper. The main function is to prepare documents for print.</p>



<h3 class="wp-block-heading">Contacting me:</h3>



<p class="wp-block-paragraph">Well contacting me just got easier. &nbsp;Just visit the contact page.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Earth Hour Your Website</title>
		<link>https://brooke.codes/2010/03/23/earth-hour-your-website/</link>
		
		<dc:creator><![CDATA[Brooke.]]></dc:creator>
		<pubDate>Wed, 24 Mar 2010 06:28:48 +0000</pubDate>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[wp-plugins]]></category>
		<guid isPermaLink="false">https://brooke.codes/?p=57</guid>

					<description><![CDATA[Earth Hour is quickly approaching, this year’s date, March 27th at 8:30pm. Well the team at Brave New Code wrote a fantastic WordPress plugin that will turn your site “off” for earth hour. This is great if your site is ran by WordPress. My problem, only my blog is WordPress everything else is custom code. [&#8230;]]]></description>
										<content:encoded><![CDATA[
<blockquote class="wp-block-quote is-style-info-notice is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>Note: </strong>This post refers to code and a project from <em>many</em> years ago <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f631.png" alt="😱" class="wp-smiley" style="height: 1em; max-height: 1em;" />. The content was edited in March of 2025 to remove dead links, improve clarity, or fix formatting, but no other edits were made. Enjoy this time capsule into the past.</p>
</blockquote>



<p class="wp-block-paragraph">Earth Hour is quickly approaching, this year’s date, March 27<sup>th</sup> at 8:30pm. Well the team at <a href="http://www.bravenewcode.com">Brave New Code </a>wrote a fantastic WordPress plugin that will turn your site “off” for earth hour. This is great if your site is ran by WordPress. My problem, only my blog is WordPress everything else is custom code.</p>



<p class="wp-block-paragraph">My Solution was to modify their script to a simple php file. Basically it does the same thing as the plugin but outside of WordPress. The download also replaces your site with a message letting the user know that it&#8217;s Earth Hour.</p>



<p class="wp-block-paragraph"><strong>THE SOURCE</strong>:</p>



<p class="wp-block-paragraph">Don&#8217;t want my code just add this to your site&#8217;s header or wherever you want the earth hour to be displayed.</p>



<p class="wp-block-paragraph">If you&#8217;re not in GMT set your offset with <code>$GMT_offset</code>.</p>



<p class="wp-block-paragraph">You may also echo out $earth_hour_minutes for the amount of minutes left in Earth Hour.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: php; title: ; notranslate">
// Basic time settings
$GMT_offset = &quot;0&quot;;
$start_time = gmmktime( 20, 30, 0, 3, 27, 2010 );
$end_time = $start_time + 60 * 60;
// adjust for local time
$adjusted_time = time() + $GMT_offset*60*60;
$in_earth_hour = ( $adjusted_time &gt;= $start_time;
$adjusted_time &lt;= $end_time );
$earth_hour_minutes = ($end_time - $adjusted_time)/60;

if ($in_earth_hour){

//Do this during earth hour
die(); //stop the rest of your site from running
}
</pre></div>]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
