<?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>Austin Passy &#187; Plugin</title> <atom:link href="http://austinpassy.com/tag/plugin/feed/" rel="self" type="application/rss+xml" /><link>http://austinpassy.com</link> <description>Los Angeles WordPress developer</description> <lastBuildDate>Wed, 25 Jan 2012 03:36:15 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Announcing Featured Image Column plugin</title><link>http://austinpassy.com/general/announcing-featured-image-column-plugin/</link> <comments>http://austinpassy.com/general/announcing-featured-image-column-plugin/#comments</comments> <pubDate>Mon, 19 Sep 2011 16:51:44 +0000</pubDate> <dc:creator>frosty</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Plugin]]></category> <category><![CDATA[WordPress]]></category><guid isPermaLink="false">http://austinpassy.com/?p=2370</guid> <description><![CDATA[Over this past weekend I organized WordCamp LA. Saturdays camp went very well as did developer day on Sunday. Sunday yielded so good conversations and some even better idea&#8217;s from the likes of Marty and Mike. Will add a link &#8230; <a href="http://austinpassy.com/general/announcing-featured-image-column-plugin/"><span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Over this past weekend I organized <a href="http://wordcamp.la">WordCamp LA</a>. Saturdays camp went very well as did developer day on Sunday. Sunday yielded so good conversations and some even better idea&#8217;s from the likes of <a href="http://twitter.com/#!/MartyThornley">Marty</a> and <a href="http://twitter.com/#!/GetSource">Mike</a>. <em>Will add a link once it&#8217;s out</em>.</p><p>Mike asked about adding the posts featured image (if available) in a column next to the title into core. And while that a great idea (and I think there is a <a href="http://core.trac.wordcamp.org">trac</a> ticket for that), I though it would be an easy plugin to create. So I started Sunday and finalized it some time this week when I got repository access and uploaded the <a href="http://wordpress.org/extend/plugins/featured-image-column/">first version</a>.</p><p>So <a href="http://austinpassy.com/wordpress-plugins/featured-image-column/" title="Featured Image Column">go grab it</a> and let me know what you think.</p><p><img src="http://cdn.austinpassy.com/wp-content/uploads/2011/09/featured-image-gallery-plugin-1024x536.png" alt="" title="Featured Image Gallery plugin" width="1024" height="536" class="alignnone size-large wp-image-2371" /></p> ]]></content:encoded> <wfw:commentRss>http://austinpassy.com/general/announcing-featured-image-column-plugin/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Announcing YouTube&#8482; White Label Shortcode Plugin</title><link>http://austinpassy.com/general/announcing-youtube-white-label-shortcode-plugin/</link> <comments>http://austinpassy.com/general/announcing-youtube-white-label-shortcode-plugin/#comments</comments> <pubDate>Mon, 16 May 2011 17:07:24 +0000</pubDate> <dc:creator>frosty</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Plugin]]></category> <category><![CDATA[shortcode]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[YouTube]]></category><guid isPermaLink="false">http://austinpassy.com/?p=2262</guid> <description><![CDATA[Over the weekend I came across some code YouTube attaches to the new iframe HTML5 embeder. With a few additional arguments added you can control the way you see your videos. So I created a shortcode that takes full advantage &#8230; <a href="http://austinpassy.com/general/announcing-youtube-white-label-shortcode-plugin/"><span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Over the weekend I came across some code YouTube attaches to the new iframe HTML5 embeder. With a few additional arguments added you can control the way you see your videos. So I created a shortcode that takes full advantage of this.</p><p>The <em>YouTube White Label Shortcode</em> allows your to generate a shortcode with the proper inputs with the simple to use generator you&#8217;ll find in a metabox on your post and post edit screen. Grab the latest version <a href="http://austinpassy.com/wordpress-plugins/youtube-white-label-shortcode">here</a> and let me know what you think.</p> ]]></content:encoded> <wfw:commentRss>http://austinpassy.com/general/announcing-youtube-white-label-shortcode-plugin/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Applying the Hover Intent javascript to chill out the admin bar</title><link>http://austinpassy.com/snippets/wordpress/plugin/applying-the-hover-intent-javascript-to-chill-out-the-admin-bar/</link> <comments>http://austinpassy.com/snippets/wordpress/plugin/applying-the-hover-intent-javascript-to-chill-out-the-admin-bar/#comments</comments> <pubDate>Tue, 03 May 2011 18:04:48 +0000</pubDate> <dc:creator>frosty</dc:creator> <category><![CDATA[Plugin]]></category> <category><![CDATA[Admin Bar]]></category> <category><![CDATA[jQuery]]></category><guid isPermaLink="false">http://austinpassy.com/?post_type=snippets&#038;p=2208</guid> <description><![CDATA[This has been bothering me for some time now, and I saw Ryan Imel tweet something while I was out a few days back. So I favored it and finally got to download his plugin. After downloading plugin I noticed &#8230; <a href="http://austinpassy.com/snippets/wordpress/plugin/applying-the-hover-intent-javascript-to-chill-out-the-admin-bar/"><span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>This has been bothering me for some time now, and I saw Ryan Imel tweet something while I was out a few days back. So I favored it and finally got to <a href="http://ryanimel.com/admin-bar-hover-intent-wordpress-plugin/" title="Admin Bar Hover Intent">download his plugin</a>.</p><p>After downloading plugin I noticed some of the scripts were not loading properly, so I quickly rewrote his plugin into a small class.</p><blockquote><p>Super awesome!! That always bothered me. I don&#8217;t know why I didn&#8217;t think of this first.</p><p>You had some issues with it loading the proper files. So I quickly rewrote it for my own use, have a look and see if you&#8217;d like to apply the changes before you push to SVN.</p></blockquote><h3>My version &#8211; <em>you still need his files</em></h3><pre>
add_action( 'plugins_loaded', 'admin_bar_hover_activate' );

function admin_bar_hover_activate() {
	$hover = new Admin_Bar_Hover_Intent();
}

if ( !class_exists( 'Admin_Bar_Hover_Intent' ) ) {
    class Admin_Bar_Hover_Intent {

		const version	= '0.1';

		function Admin_Bar_Hover_Intent() {
			$this->__construct();
		}

		function __construct() {
			add_action( 'wp_print_scripts', array( __CLASS__ , 'enqueue_scripts' ) );
			add_action( 'init', array( __CLASS__ , 'enqueue_style' ) );
		}

		function enqueue_scripts() {
			if ( is_admin_bar_showing() ) {
				wp_enqueue_script( 'jquery' );
				wp_enqueue_script( 'hoverintent', esc_url( plugins_url( 'hoverintent.min.js', __FILE__ ) ), array( 'jquery' ), '1.0', true );
				wp_enqueue_script( 'rwi-adminbar-scripts', esc_url( plugins_url( 'rwi-adminbar-scripts.js', __FILE__ ) ), array( 'jquery' ), Admin_Bar_Hover_Intent::version, true );
			}
		}

		function enqueue_style() {
			if ( is_admin_bar_showing() )
				wp_enqueue_style( 'rwi-adminbar', esc_url( plugins_url( 'rwi-adminbar.css', __FILE__ ) ), null, Admin_Bar_Hover_Intent::version, 'screen' );
		}
	}
};
</pre><p>Just replace the text inside <code>rwi-adminbar-hoverintent.php</code> with the above code.</p> ]]></content:encoded> <wfw:commentRss>http://austinpassy.com/snippets/wordpress/plugin/applying-the-hover-intent-javascript-to-chill-out-the-admin-bar/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Modifying Tweetable plugin to work with PrettyLinkPro &amp; Twitter Friendly Links</title><link>http://austinpassy.com/snippets/wordpress/plugin/modifying-tweetable-plugin-to-work-with-prettylinkpro-twitter-friendly-links/</link> <comments>http://austinpassy.com/snippets/wordpress/plugin/modifying-tweetable-plugin-to-work-with-prettylinkpro-twitter-friendly-links/#comments</comments> <pubDate>Wed, 20 Apr 2011 19:36:45 +0000</pubDate> <dc:creator>frosty</dc:creator> <category><![CDATA[Plugin]]></category> <category><![CDATA[hack]]></category> <category><![CDATA[WordPress]]></category><guid isPermaLink="false">http://austinpassy.com/?post_type=snippets&#038;p=2204</guid> <description><![CDATA[A new version of Tweetable (A WordPress URL shrink-er and auto tweet-er) was released, and I thought I'd add some modifications to the plugin. <a href="http://austinpassy.com/snippets/wordpress/plugin/modifying-tweetable-plugin-to-work-with-prettylinkpro-twitter-friendly-links/"><span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>A little over a year ago <a href="http://austinpassy.com/2010/02/how-i-hacked-tweetable-for-a-personal-url-shortener/">I modified tweetable</a> to shorten my auto published URLs with <code>domain.com/?p=<strong>ID</strong></code>. Now, I was using that for awhile but then turned to <a href="http://kovshenin.com/712">Twitter Friendly Links</a> to use just the <strong>ID</strong> base with out the post or page query string (<code>?p=</code> <code>?page=</code> <code>?attachment=</code>).</p><p>After some time I started to play with <a href="http://blairwilliams.com">Blair&#8217;s</a> <a href="http://wordpress.org/extend/plugins/pretty-link/">PrettyLink</a> and <a href="http://frosty.me/pretty-link">PrettyLinkPro</a> on a few other domain I&#8217;ve got. Well with the latest version of tweetable (<del datetime="2011-04-22T05:29:02+00:00">1.9</del><ins datetime="2011-04-22T05:29:02+00:00">1.2.0</ins>) released this week I thought I check to see what was new and what I needed to modify in my pre-existing code. Turn&#8217;s out a new j.mp API was implemented, and that didn&#8217;t do much for me. I also recently just purchased <code>frosty.me</code> and thought it would be great to auto shirk links with my new short dot me domain using <a href="http://frosty.me/pretty-link">PrettyLink</a> and tweetable.</p><p>Just link before we are going to be editing two files: <sup>1</sup> <code>mh_twitter_class.php</code> and <sup>2</sup> <code>admin_menus.php</code>.</p><h3>File number 1</h3><p><small>Find line <abbr title="Approximately">388</abbr> and add <code>global $post;</code> after the public function. <strong>You&#8217;ll also want to change the <code>$shortener</code> default value, by removing it completely, leaving <code>$shortener</code> ONLY!</strong></small></p><pre>
public function shorten_url($the_url, $shortener, $api_key='', $user='') {
	<strong>global $post;</strong>
</pre><p><small>Find line <abbr title="Approximately">427</abbr> and add this code (the parts in <strong>bold</strong> were added). Be sure to replace the <del>deleted</del> variable with the one provided in your pretty link tool page.</small></p><pre>
	} elseif ($shortener=="yourls" &#038;&#038; isset($api_key) &#038;&#038; isset($user)) {
		//Pass a string in the form of "user@domain.com" as the username, and the password as the API key
		$yourls = explode('@', $user);
		$url = "http://{$yourls[1]}/yourls-api.php?username={$yourls[0]}&#038;password={$api_key}&#038;format=simple&#038;action=shorturl&#038;url={$the_url}";
		$response = $this->send_request($url, 'GET');

	<strong>/**
	 * @ added by Austin Passy
	 * @ link http://austinpassy.com
	 */
	<del datetime="2011-04-22T05:32:18+00:00">} elseif ($shortener=="self") {
		$url = url_to_postid( $the_url );
		$response = get_home_url( '/?=' ) . $url;</del>
<ins datetime="2011-04-22T05:32:18+00:00">
	} elseif ($shortener=="self") {
		$url = url_to_postid( $the_url );
		if ( 'post' == get_post_type() )
			$shortlink = wp_get_shortlink();
		elseif ( 'page' == get_post_type() )
			$shortlink = home_url( "?page_id={$url}" );
		elseif ( 'attachment' == $post->post_type )
			$shortlink = home_url( "?attachment_id={$url}" );
		$response = $shortlink;
</ins>
	} elseif ($shortener=="twitterfriendlylinks" &#038;&#038; function_exists( 'twitter_link' ) ) {
		$url = twitter_link();
		$response = $url;
	} elseif ($shortener=="prettylinkpro" &#038;&#038; function_exists( 'prlipro_pretty_link' ) ) {
		global $prli_blogurl;
		$url = "{$prli_blogurl}/index.php?action=prli_endpoint_url&#038;k=<del datetime="2011-04-20T19:25:15+00:00">445e75096450c647eb707s7c45545a56</del>&#038;url={$the_url}";
		$response = $this->send_request($url, 'GET');
	// END</strong>
	} else {
		$url = "http://is.gd/api.php?longurl={$the_url}";
		$response = $this->send_request($url, 'GET');
	}
</pre><h3>File number 2</h3><p><small>Find line <abbr title="Approximately">380</abbr> and add this code (the parts in <strong>bold</strong> were added):</small></p><pre>
	&lt;option value="yourls" &lt;?php if ($setting_url_shortener=='yourls') { echo 'selected="selected"'; } ?>>YOURLS&lt;/option>
    &lt;?php
    <strong>/**
	 * @ added by Austin Passy
	 * @ link http://austinpassy.com
	 */ ?>
	&lt;option value="self" &lt;?php if ($setting_url_shortener=='self') { echo 'selected="selected"'; } ?>>SELF (?p=ID)&lt;/option>
	&lt;option value="twitterfriendlylinks" &lt;?php if ($setting_url_shortener=='twitterfriendlylinks' ) { echo 'selected="selected"'; } ?>>Twitter Friendly Links&lt;/option>
	&lt;option value="prettylinkpro" &lt;?php if ($setting_url_shortener=='prettylinkpro' ) { echo 'selected="selected"'; } ?>>Pretty Link Pro&lt;/option>
    &lt;?php /**END */ ?>
	&lt;/select>
    &lt;?php $error_class = ' style="background:#F3898C;border:1px solid #F00;color:#222;padding:5px 10px;"'; ?>
    &lt;?php if ($setting_url_shortener=='twitterfriendlylinks' &#038;&#038; !function_exists( 'twitter_link' ) ) { ?>
    &lt;span class="description"&lt;?php echo $error_class; ?>>Requires &lt;a href="http://wordpress.org/extend/plugins/twitter-friendly-links/">Twitter Friendly Links&lt;/a>. Please install or change settings&lt;/span>
	&lt;?php } ?>
    &lt;?php if ($setting_url_shortener=='prettylinkpro' &#038;&#038; !function_exists( 'prlipro_pretty_link' )) { ?>
    &lt;span class="description"&lt;?php echo $error_class; ?>>Requires &lt;a href="http://frosty.me/pretty-link">Pretty Link Pro&lt;/a>. Please install or change settings&lt;/span>
	&lt;?php } ?>
	&lt;br />Specify which URL shortener should be used by Tweetable.</strong>
	&lt;/td>&lt;/tr>
</pre><p>Now upload those two files, or if editing them inside of WordPress (by going to <code>/wp-admin/plugin-editor.php/</code>), and save them. Then apply the new changes in the Tweetable settings page and your done. Next time you post a entry the URL used will be your domain with the default ugly permalink, an ID or random number generated by Twitter Friendly Links or a shortlink with a possible different domain (like my frosty.me domain) by <a href="http://frosty.me/pretty-link">PrettyLink</a>!</p> ]]></content:encoded> <wfw:commentRss>http://austinpassy.com/snippets/wordpress/plugin/modifying-tweetable-plugin-to-work-with-prettylinkpro-twitter-friendly-links/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Introducing &#8220;Hide and Catch Email&#8221; Version 0.3</title><link>http://austinpassy.com/general/introducing-hide-and-catch-email-version-0-3/</link> <comments>http://austinpassy.com/general/introducing-hide-and-catch-email-version-0-3/#comments</comments> <pubDate>Sat, 12 Mar 2011 02:22:24 +0000</pubDate> <dc:creator>frosty</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Plugin]]></category> <category><![CDATA[WordPress]]></category><guid isPermaLink="false">http://austinpassy.com/?p=1909</guid> <description><![CDATA[It&#8217;s been some time, but I&#8217;ve finally updated my Hide and Catch Email WordPress plugin. It&#8217;s been rewritten from the ground up, including my first OOP development. Some files have been removed and some have been added. Grab the plugin &#8230; <a href="http://austinpassy.com/general/introducing-hide-and-catch-email-version-0-3/"><span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>It&#8217;s been some time, but I&#8217;ve finally updated my <em>Hide and Catch Email</em> WordPress plugin. It&#8217;s been rewritten from the ground up, including my first <strong>OOP</strong> development. Some files have been removed and some have been added.</p><p>Grab the plugin <a href="http://wordpress.org/extend/plugins/hide-and-catch-email">here</a>.</p><a href='http://austinpassy.com/general/introducing-hide-and-catch-email-version-0-3/attachment/screenshot-1/' title='screenshot-1'><img width="250" height="220" src="http://cdn.austinpassy.com/wp-content/uploads/2011/03/screenshot-1-250x220.png" class="attachment-medium" alt="screenshot-1" title="screenshot-1" /></a> <a href='http://austinpassy.com/general/introducing-hide-and-catch-email-version-0-3/attachment/screenshot-3/' title='screenshot-3'><img width="250" height="262" src="http://cdn.austinpassy.com/wp-content/uploads/2011/03/screenshot-3-250x262.png" class="attachment-medium" alt="screenshot-3" title="screenshot-3" /></a><h3>Removed</h3><ul><li>Removed the settings page.</li><li>Removed the shortcode <code>[replace]</code>.</li><li>Removed javascript and stylesheet files.</li></ul><h3>Added</h3><ul><li>Added metabox controller to all post/page &amp; post_type pages.</li><li>Added a note after the content for users who are logged in on posts that are hidden from public view.</li></ul><h3>Future release/notes</h3><ul><li>I&#8217;ve built in AJAX replacement, but haven&#8217;t had time to get it working cross browser. So for the time being, it&#8217;s a simple page refresh.</li><li>Speaking of page refresh, the header already sent error should be fixed now.</li></ul><p>If you&#8217;ve got anything to add or you notice any issues please let me know! And if this plugin has helped you in anyway please <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&#038;hosted_button_id=F8F3JJ9ERQBYS">consider donating</a>.</p> ]]></content:encoded> <wfw:commentRss>http://austinpassy.com/general/introducing-hide-and-catch-email-version-0-3/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>HTML walks into a bar and says &#8220;hellos&#8221;</title><link>http://austinpassy.com/general/html-walks-into-a-bar-and-says-hellos/</link> <comments>http://austinpassy.com/general/html-walks-into-a-bar-and-says-hellos/#comments</comments> <pubDate>Mon, 20 Dec 2010 23:12:51 +0000</pubDate> <dc:creator>frosty</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Hellos Bar]]></category> <category><![CDATA[Plugin]]></category> <category><![CDATA[post_type]]></category><guid isPermaLink="false">http://austinpassy.com/?p=1673</guid> <description><![CDATA[Over the wet and rainy weekend I compiled a little plugin for WordPress called Hellos Bar. It&#8217;s a announcement like plugin using WordPress Custom Post Types. Adding a post to the CPT hellobar, and activating the plugin in the settings &#8230; <a href="http://austinpassy.com/general/html-walks-into-a-bar-and-says-hellos/"><span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Over the wet and rainy weekend I compiled a little plugin for WordPress called Hellos Bar. It&#8217;s a announcement like plugin using WordPress Custom Post Types.</p><p>Adding a post to the <abbr title="Custom Post Type">CPT</abbr> <code>hellobar</code>, <strong>and</strong> activating the plugin in the settings page will insert one random post from the post list in a fixed position at the top of the browser screen. Using jQuery the bar will drop down after about 5 seconds.</p><p>I&#8217;ve created a demo over at <a href="http://wpwag.com">wpWag</a> if you want to see a working copy.</p><h4>Testing</h4><p class="note"> Please take note that I am still testing this plugin, and have a long way to go before it&#8217;s where it needs to be. So if you&#8217;ve got suggestions, please feel free to leave your comments here or on the plugin page: <a href="http://austinpassy.com/wordpress-plugins/hellos-bar">austinpassy.com/wordpress-plugins/hellos-bar/</a>.</p><h4>The Future</h4><p>This plugin is brand new and has some future planes.</p><ol><li>Saved bar position with cookie settings.</li><li>Post and page per post ID.</li><li>Per post on/off toggle.</li><li>&#8230;.</li></ol> ]]></content:encoded> <wfw:commentRss>http://austinpassy.com/general/html-walks-into-a-bar-and-says-hellos/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Custom Login &#8211; Version 0.8</title><link>http://austinpassy.com/general/custom-login-version-0-8/</link> <comments>http://austinpassy.com/general/custom-login-version-0-8/#comments</comments> <pubDate>Thu, 16 Sep 2010 22:28:32 +0000</pubDate> <dc:creator>frosty</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Custom Login]]></category> <category><![CDATA[Plugin]]></category><guid isPermaLink="false">http://austinpassy.com/?p=1617</guid> <description><![CDATA[I just uploaded my Custom Login plugin to 0.8. This new release entails a full rewrite from the ground up. You should see the new version soon enough. Some features include: Removal of the uninstall script. Removed wpads. Cleaned up &#8230; <a href="http://austinpassy.com/general/custom-login-version-0-8/"><span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>I just uploaded my Custom Login plugin to <code>0.8</code>. This new release entails a full rewrite from the ground up.</p><p>You should see the new version soon enough. Some features include:</p><ul><li>Removal of the uninstall script.</li><li>Removed <a href="http://wpads.net">wpads</a>.</li><li>Cleaned up options.</li><li>Removed <code>easing.js</code>, <code>farbtastic.js</code>, <code>dock.js</code></li><li>Removed unused images.</li><li>Added <code>license.txt</code>, <code>readme.html</code>.</li><li>Added ability to move meta-boxes with the built in WordPress jQuery movables. Organize the layout, and even close/hide boxes. <strong>Note</strong>: <em>I haven&#8217;t been able to figure out how to create a multiple column layout, it&#8217;s set with CSS right now. So if you move a box it will forever be changed</em>.</li></ul><p><a href="http://wordpress.org/extend/plugins/custom-login/" title="Custom Login download">Grab the latest version from WordPress</a></p><p><strong>Important! Users will have to re-save their settings after updating to version 0.8.</strong>. The option name array&#8217;s changed and there for will delete your old options.</p><p><small>Maybe you know how to migrate old option names? If so let me know.</small></p> ]]></content:encoded> <wfw:commentRss>http://austinpassy.com/general/custom-login-version-0-8/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Announcing &#8220;Hide and Catch Email&#8221; A WP plugin</title><link>http://austinpassy.com/general/announcing-hide-and-catch-email-a-wp-plugin/</link> <comments>http://austinpassy.com/general/announcing-hide-and-catch-email-a-wp-plugin/#comments</comments> <pubDate>Wed, 01 Sep 2010 19:12:47 +0000</pubDate> <dc:creator>frosty</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[email]]></category> <category><![CDATA[Plugin]]></category> <category><![CDATA[WordPress]]></category><guid isPermaLink="false">http://austinpassy.com/?p=1301</guid> <description><![CDATA[I&#8217;ve been working on the plugin for some time, and first put it in place on my site in April on my presentation page from WordCamp Orange County. I wanted to collect some emails from parties who were interested in &#8230; <a href="http://austinpassy.com/general/announcing-hide-and-catch-email-a-wp-plugin/"><span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>I&#8217;ve been working on the plugin for some time, and first put it in place on my site in April on my <a href="http://austinpassy.com/presentations/wordcamp/orange-county/">presentation page</a> from <a href="http://www.ocwordcamp.com" class="external" title="WordCampOC">WordCamp Orange County</a>.</p><p>I wanted to collect some emails from parties who were interested in viewing the presentation and ask them if they might be interested in <a href="http://2010.wordcamp.la" class="external" title="WordCampLA" >WordCampLA</a>, <em>since I am the lead organizer</em>. The one you see on that page is modified for my use. I kind of put it out and forgot about it for a bit.</p><p>When I was putting together the sponsorship levels for WordCampLA I thought this may come in handy again. Last year I put the sponsorship levels in a <code>zip</code> file and put it up for download, but with  didn&#8217;t know who was interested or who downloaded the files for that matter. So, I decided a page with hidden content would suit this particular situation best.</p><p>As of right now there are no options to control the plugin, though you do have a setting page where you need to activate it. There are some other things on that page but don&#8217;t really apply right now.</p><h4>Use</h4><p>Just input your shortcode before and after the content needing to be replaced like so:</p><pre>[replace]xxxxxxxxxxxxxxxxxx[/replace]</pre><p>There are also two shortcode options at his time, you can control who can view the content by entering <code>capability="level_10"</code> which by default is set at level 10, and the text that show before the form by entering <code>text="Some text"</code></p><pre>[replace capability="level_8" text="Hello"]xxxxxxxxxxxxxxxxxx[/replace]</pre><p>Please leave any feedback or problems on this post or the <a href="http://austinpassy.com/wordpress-plugins/hide-and-catch-emails">Plugin page</a> itself.</p> ]]></content:encoded> <wfw:commentRss>http://austinpassy.com/general/announcing-hide-and-catch-email-a-wp-plugin/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Auto change &quot;WP&quot; and incorrect WordPress spellings</title><link>http://austinpassy.com/snippets/auto-change-wp-and-incorrect-wordpress-spellings/</link> <comments>http://austinpassy.com/snippets/auto-change-wp-and-incorrect-wordpress-spellings/#comments</comments> <pubDate>Thu, 06 May 2010 20:30:17 +0000</pubDate> <dc:creator>frosty</dc:creator> <category><![CDATA[Snippets]]></category> <category><![CDATA[function]]></category> <category><![CDATA[Plugin]]></category> <category><![CDATA[spelling]]></category> <category><![CDATA[WordPress]]></category><guid isPermaLink="false">http://wpwag.com/?p=59</guid> <description><![CDATA[For the WordPress noobs, they are unfamiliar with the correct and proper spelling of WordPress, which is capital W and a capital P, all one word. <a href="http://austinpassy.com/snippets/auto-change-wp-and-incorrect-wordpress-spellings/"><span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>For the WordPress noobs, they are unfamiliar with the correct and proper spelling of WordPress, which is capital <strong>W</strong> and a capital <strong>P</strong>, all one word.</p><p>So how about adding a function into your theme that will auto correct any misspellings?</p><h3>And now, the simple (redundant code)</h3><pre>
function wpwag_spell_wordpress_correct($text) {
	$text = str_replace('Wordpress', 'WordPress', $text);
	$text = str_replace('wordpress', 'WordPress', $text);
	$text = str_replace('wordPress', 'WordPress', $text);
	$text = str_replace('word-press', 'WordPress', $text);
	$text = str_replace('wOrdpRess', 'WordPress', $text);
	$text = str_replace('wp', 'WordPress', $text);
	$text = str_replace('WP', 'WordPress', $text);

	return $text;
}
</pre><p>As you can see, we&#8217;re just copying multiple code, and trying to find all the matches in which one might write WordPress incorrectly.</p><h3>So now, the more advances replacement</h3><p class="alert"> I&#8217;ve added to the function, so that it <strong>won&#8217;t</strong> replace w<span>p</span> inside of an image.</p><pre>
function wpwag_spell_wordpress_correct($text) {
	<ins datetime="2010-05-07T02:47:08+00:00">$ignore = '/([^<>]+)< [^>]+>|< [^>]+>([^<>]+)/'; //image pattern

	if ( preg_match_all($ignore,$text,$replace,PREG_PATTERN_ORDER|PREG_OFFSET_CAPTURE) ) {
		return $text;
	} else {</ins>

	$pattern[] = '/\bword[- ]?press\b/i';
	$pattern[] = '/\bWP\b/i';

	$replace = 'WordPress';

        //removed "foreach" as suggested by @utkarshkukreti <a class="external" href="http://twitter.com/utkarshkukreti/statuses/13507951722">here</a>
	//foreach ( $pattern as $patterns )
		$text = preg_replace($pattern,$replace, $text);

	return $text;
        <ins datetime="2010-05-07T02:47:08+00:00">}</ins>
}
</pre><p>This code is using regular expression, and an array of patterns. The first is looking for words matching <code>word<span>press</span></code> or <code>word-<span>press</span></code> with case <em>insensitive</em> matches.<br /> While the second is looking for case <em>insensitive</em> matches to <code>W<span>P</span></code>.</p><h4>Pretty simple so far</h4><p>Now we need to add either of the above code to your theme&#8217;s <code>function.php</code> file, then add the necessary filter! To do so just add this line:</p><pre>
add_filter( 'the_content', 'wpwag_spell_wordpress_correct', 10, 1 );
</pre><p><strong>Now, if you&#8217;d like, you can also replace incorrect spellings in other area&#8217;s of WordPress.</strong> For example just add in any of the following filters you&#8217;d like.</p><pre>
add_filter( 'comment_text', 'wpwag_spell_wordpress_correct', 10, 1 );
add_filter( 'the_title', 'wpwag_spell_wordpress_correct', 10, 1 );
</pre><p><em>Just to name a few</em></p><p>That&#8217;s it!</p><p>Now I&#8217;d also like to mention you can create this as a plugin, or even download the multiple plugins that are already out there that do this very thing.</p><ol><li><a class="external" href="http://wordpress.org/extend/plugins/kih-wordpress-auto-correct/" title="WordPress Auto Correct &ndash; A plugin" rel="nofollow">WordPress Auto Correct</a></li><li><a class="external" href="http://wordpress.org/extend/plugins/ozhs-correctly-spell-wordpress/" title="Ozh' Correctly Spell WordPress &ndash; A plugin" rel="nofollow">Ozh&#8217; Correctly Spell WordPress</a></li><li><a class="external" href="http://wordpress.org/extend/plugins/its-wordpress/" title="It's WordPress &ndash; A plugin" rel="nofollow">It&#8217;s WordPress</a></li></ol><p>If you&#8217;re interested in adding this function as a plugin, just use the code below..</p><pre>
< ?php //remove space between '<' and '?'
/**
 * Plugin Name: W<span>PWag's Spell WordPress Correctly
 * Plugin URI: http://wpwag.com/tips-tricks/auto-change-wp-and-incorrect-wordpress-spellings/
 * Description: Writes WordPress as it should be written. &ldquo;WordPress&rdquo;.
 * Version: 0.2
 * Author: Austin Passy
 * Author URI: http://austinpassy.com/
 */

function wpwag_spell_wordpress_correct($text) {
	/** advanced *don't match the following **/
	$ignore = '/([^<>]+)< [^>]+>|< [^>]+>([^<>]+)/'; //image pattern

	if ( preg_match_all($ignore,$text,$replace,PREG_PATTERN_ORDER|PREG_OFFSET_CAPTURE) ) {
		return $text;
	} else {

	$pattern[] = '/\bword[- ]?press\b/i';
	$pattern[] = '/\bWP\b/i';

	$replace = 'WordPress';

	//foreach ( $pattern as $patterns )
		$text = preg_replace($pattern,$replace, $text);

	return $text;
	}
}
add_filter( 'the_content', 'wpwag_spell_wordpress_correct', 10, 1 );
?>
</pre></p> ]]></content:encoded> <wfw:commentRss>http://austinpassy.com/snippets/auto-change-wp-and-incorrect-wordpress-spellings/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Comment validation with jQuery Validate: reloaded!</title><link>http://austinpassy.com/general/comment-validation-with-jquery-validate-reloaded/</link> <comments>http://austinpassy.com/general/comment-validation-with-jquery-validate-reloaded/#comments</comments> <pubDate>Wed, 21 Apr 2010 23:42:51 +0000</pubDate> <dc:creator>frosty</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Comment Validation]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[Plugin]]></category> <category><![CDATA[WordPress]]></category><guid isPermaLink="false">http://austinpassy.com/?p=1169</guid> <description><![CDATA[Ok! Finally after submitting my plugin to the WordPress repository they accepted the plugin.]]></description> <content:encoded><![CDATA[<p>Ok! Finally after submitting my <a title="Validation for WordPress comments" rel="bookmark" href="http://austinpassy.com/wordpress-plugins/comment-validation-reloaded/">plugin</a> to the <a class="external" title="CVR for WordPress in the WP repository" href="http://wordpress.org/extend/plugins/comment-validation-reloaded/">WordPress repository</a> they accepted the plugin.</p> ]]></content:encoded> <wfw:commentRss>http://austinpassy.com/general/comment-validation-with-jquery-validate-reloaded/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 27/73 queries in 0.028 seconds using disk: basic
Object Caching 1290/1397 objects using disk: basic
Content Delivery Network via cdn.austinpassy.com

Served from: austinpassy.com @ 2012-02-04 07:08:35 -->
