<?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>Matt Varone</title> <atom:link href="http://www.mattvarone.com/feed/" rel="self" type="application/rss+xml" /><link>http://www.mattvarone.com</link> <description>Creative Developer</description> <lastBuildDate>Wed, 21 Dec 2011 18:44:45 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Simple WordPress Gallery to Slideshow</title><link>http://www.mattvarone.com/wordpress/wordpress-gallery-slideshow/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wordpress-gallery-slideshow</link> <comments>http://www.mattvarone.com/wordpress/wordpress-gallery-slideshow/#comments</comments> <pubDate>Mon, 08 Aug 2011 18:31:13 +0000</pubDate> <dc:creator>Matt</dc:creator> <category><![CDATA[WordPress]]></category> <category><![CDATA[Plugins]]></category> <category><![CDATA[Resources]]></category> <guid
isPermaLink="false">http://www.mattvarone.com/?p=1618</guid> <description><![CDATA[Released a small plugin that turns the built-in WordPress gallery &#8230; <a
href="http://www.mattvarone.com/wordpress/wordpress-gallery-slideshow/" title="Continue Reading">Continue <span
class="meta-nav">&#8594;</span></a><p>This is a post from: <a
href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a
href="http://www.mattvarone.com/wordpress/wordpress-gallery-slideshow/">Simple WordPress Gallery to Slideshow</a></p> ]]></description> <content:encoded><![CDATA[<p>Released a <a
href="http://www.mattvarone.com/featured-content/gallery-to-slideshow/" title="Gallery To Slideshow">small plugin</a> that turns the built-in WordPress gallery into a responsive jQuery slideshow.</p><p><a
href="http://www.mattvarone.com/featured-content/gallery-to-slideshow/" title="Gallery To Slideshow"><img
src="http://www.mattvarone.com/wp-content/uploads/2011/08/screenshot-1.jpg" alt="" title="screenshot-1" width="530" height="588" class="aligncenter size-full wp-image-1619" /><br
/> </a><br
/><p
class="post-box"><a
href="http://www.mattvarone.com/featured-content/gallery-to-slideshow/" title="Gallery To Slideshow">Click here</a> to learn more.</p></p><p>This is a post from: <a
href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a
href="http://www.mattvarone.com/wordpress/wordpress-gallery-slideshow/">Simple WordPress Gallery to Slideshow</a></p> ]]></content:encoded> <wfw:commentRss>http://www.mattvarone.com/wordpress/wordpress-gallery-slideshow/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>List users with WP_User_Query</title><link>http://www.mattvarone.com/wordpress/list-users-with-wp_user_query/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=list-users-with-wp_user_query</link> <comments>http://www.mattvarone.com/wordpress/list-users-with-wp_user_query/#comments</comments> <pubDate>Wed, 03 Aug 2011 01:41:01 +0000</pubDate> <dc:creator>Matt</dc:creator> <category><![CDATA[WordPress]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Template Functions]]></category> <category><![CDATA[Workflow]]></category> <guid
isPermaLink="false">http://www.mattvarone.com/?p=1197</guid> <description><![CDATA[WordPress 3.1 included a new cool class called WP_User_Query. As &#8230; <a
href="http://www.mattvarone.com/wordpress/list-users-with-wp_user_query/" title="Continue Reading">Continue <span
class="meta-nav">&#8594;</span></a><p>This is a post from: <a
href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a
href="http://www.mattvarone.com/wordpress/list-users-with-wp_user_query/">List users with WP_User_Query</a></p> ]]></description> <content:encoded><![CDATA[<p>WordPress 3.1 included a new cool class called <a
href="http://codex.wordpress.org/Function_Reference/WP_User_Query">WP_User_Query</a>. As the name implies, it allows querying the WordPress User database trough it&#8217;s available methods. It&#8217;s a much welcome addition which deprecates <code>WP_User_Search</code> and makes it very easy to retrieve specific users from the database.</p><p>Here is a simple example of <code>WP_User_Query</code> in action:</p><pre class="brush: php; title: ; notranslate">
// prepare arguments
$args  = array(
// search only for Authors role
'role' =&gt; 'Author',
// order results by display_name
'orderby' =&gt; 'display_name',
// check for two meta_values
'meta_query' =&gt; array(
	array(
		// uses compare like WP_Query
		'key' =&gt; 'some_user_meta_key',
		'value' =&gt; 'some user meta value',
		'compare' =&gt; '&gt;'
		),
	array(
		// by default compare is '='
		'key' =&gt; 'some_other_user_meta_key',
		'value' =&gt; 'some other meta value',
		),
	// add more
));
// Create the WP_User_Query object
$wp_user_query = new WP_User_Query($args);
// Get the results
$authors = $wp_user_query-&gt;get_results();
// Check for results
if (!empty($authors))
{
	echo '&lt;ul&gt;';
	// loop trough each author
	foreach ($authors as $author)
	{
		// get all the user's data
		$author_info = get_userdata($author-&gt;ID);
		echo '&lt;li&gt;'.$author_info-&gt;first_name.' '.$author_info-&gt;last_name.'&lt;/li&gt;';
	}
	echo '&lt;/ul&gt;';
} else {
	echo 'No authors found';
}
</pre><h3>Parameters</h3><p>To tweak the search terms the <code>WP_User_Query</code> constructor allows the following parameters:</p><p><strong>blog_id</strong> (int)<br
/> The blog id on a multisite environment. Defaults to the current blog id.</p><p><strong>role</strong> (string)<br
/> The user&#8217;s role.</p><p><strong>meta_key</strong> (string)<br
/> <strong>meta_value</strong> (string)<br
/> <strong>meta_compare</strong> (string)<br
/> Same as <code>WP_Query</code> ( <a
href="http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters" title="Custom Fields">view</a> ).</p><p><strong>include</strong> (array)<br
/> Array of users id to include.</p><p><strong>exclude</strong> (array)<br
/> Array of users id to exclude.</p><p><strong>search</strong> (string)<br
/> Searches for possible string matches on columns <code>user_email</code>, <code>user_login</code>,<code>ID</code>,<code>user_url</code>, <code>user_login</code> and <code>user_nicename</code>.</p><p><strong>orderby</strong> (string)<br
/> <code>login</code>, <code>'nicename'</code>, <code>'email'</code>, <code>'url'</code>, <code>'registered'</code>. Defaults to <code>login</code>.</p><p><strong>order</strong> (string)<br
/> Defaults to <code>ASC</code> (ascending order).</p><p><strong>offset</strong> (int)<br
/> Offset results ( handy for pagination ).</p><p><strong>count_total</strong> (boolean)<br
/> If <code>true</code> returns the total of users found.</p><p><strong>number</strong> (int)<br
/> Limit of users to retrieve.</p><p><strong>fields (all)</strong><br
/> Which fields to return. Defaults to <code>all</code>.</p><h3>Conclusion</h3><p>Now it&#8217;s awesomely simple to create users listings. I would suggest pagination and caching results for websites with lots of users as these queries can get pretty heavy.</p><p>Hope you find the code useful, if you have any comments or suggestions please feel free to leave them in the comments. Thanks for reading!</p><p>This is a post from: <a
href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a
href="http://www.mattvarone.com/wordpress/list-users-with-wp_user_query/">List users with WP_User_Query</a></p> ]]></content:encoded> <wfw:commentRss>http://www.mattvarone.com/wordpress/list-users-with-wp_user_query/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Cleaner output for wp_nav_menu()</title><link>http://www.mattvarone.com/wordpress/cleaner-output-for-wp_nav_menu/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=cleaner-output-for-wp_nav_menu</link> <comments>http://www.mattvarone.com/wordpress/cleaner-output-for-wp_nav_menu/#comments</comments> <pubDate>Fri, 29 Jul 2011 15:38:38 +0000</pubDate> <dc:creator>Matt</dc:creator> <category><![CDATA[WordPress]]></category> <category><![CDATA[Navigation Bars]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Resources]]></category> <category><![CDATA[Template Functions]]></category> <guid
isPermaLink="false">http://www.mattvarone.com/?p=1472</guid> <description><![CDATA[If you are looking for a way to have a &#8230; <a
href="http://www.mattvarone.com/wordpress/cleaner-output-for-wp_nav_menu/" title="Continue Reading">Continue <span
class="meta-nav">&#8594;</span></a><p>This is a post from: <a
href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a
href="http://www.mattvarone.com/wordpress/cleaner-output-for-wp_nav_menu/">Cleaner output for wp_nav_menu()</a></p> ]]></description> <content:encoded><![CDATA[<p>If you are looking for a way to have a clean navigation list without the default classes and ids then the simplest solution I found is to extend the <a
href="http://codex.wordpress.org/Function_Reference/Walker_Class">Walker</a> class with a modified version of the <code>Walker_Nav_Menu</code> class.</p><p>The code below is for my custom <code>Walker</code> which is actually the same code as the navigation Walker shipped with WordPress minus the echo of default CSS classes and ids. To make this work simply drop the code in your theme&#8217;s <code>functions.php</code>.</p><pre class="brush: php; title: ; notranslate">
&lt;?php
class MV_Cleaner_Walker_Nav_Menu extends Walker {
	var $tree_type = array( 'post_type', 'taxonomy', 'custom' );
	var $db_fields = array( 'parent' =&gt; 'menu_item_parent', 'id' =&gt; 'db_id' );
	function start_lvl(&amp;$output, $depth) {
		$indent = str_repeat(&quot;\t&quot;, $depth);
		$output .= &quot;\n$indent&lt;ul class=\&quot;sub-menu\&quot;&gt;\n&quot;;
	}
	function end_lvl(&amp;$output, $depth) {
		$indent = str_repeat(&quot;\t&quot;, $depth);
		$output .= &quot;$indent&lt;/ul&gt;\n&quot;;
	}
	function start_el(&amp;$output, $item, $depth, $args) {
		global $wp_query;
		$indent = ( $depth ) ? str_repeat( &quot;\t&quot;, $depth ) : '';
		$class_names = $value = '';
		$classes = empty( $item-&gt;classes ) ? array() : (array) $item-&gt;classes;
		$classes = in_array( 'current-menu-item', $classes ) ? array( 'current-menu-item' ) : array();
		$class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args ) );
		$class_names = strlen( trim( $class_names ) ) &gt; 0 ? ' class=&quot;' . esc_attr( $class_names ) . '&quot;' : '';
		$id = apply_filters( 'nav_menu_item_id', '', $item, $args );
		$id = strlen( $id ) ? ' id=&quot;' . esc_attr( $id ) . '&quot;' : '';
		$output .= $indent . '&lt;li' . $id . $value . $class_names .'&gt;';
		$attributes  = ! empty( $item-&gt;attr_title ) ? ' title=&quot;'  . esc_attr( $item-&gt;attr_title ) .'&quot;' : '';
		$attributes .= ! empty( $item-&gt;target )     ? ' target=&quot;' . esc_attr( $item-&gt;target     ) .'&quot;' : '';
		$attributes .= ! empty( $item-&gt;xfn )        ? ' rel=&quot;'    . esc_attr( $item-&gt;xfn        ) .'&quot;' : '';
		$attributes .= ! empty( $item-&gt;url )        ? ' href=&quot;'   . esc_attr( $item-&gt;url        ) .'&quot;' : '';
		$item_output = $args-&gt;before;
		$item_output .= '&lt;a'. $attributes .'&gt;';
		$item_output .= $args-&gt;link_before . apply_filters( 'the_title', $item-&gt;title, $item-&gt;ID ) . $args-&gt;link_after;
		$item_output .= '&lt;/a&gt;';
		$item_output .= $args-&gt;after;
		$output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
	}
	function end_el(&amp;$output, $item, $depth) {
		$output .= &quot;&lt;/li&gt;\n&quot;;
	}
}
?&gt;
</pre><p>Then make sure to specify the new custom Walker when calling <code>wp_nav_menu()</code>.</p><pre class="brush: php; title: ; notranslate">
&lt;?php
 wp_nav_menu( array( 'walker' =&gt; new MV_Cleaner_Walker_Nav_Menu() ) );
?&gt;
</pre><p>Example:</p><pre class="brush: php; title: ; notranslate">
&lt;ul id=&quot;menu-main&quot; class=&quot;menu&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.mattvarone.com/about/&quot;&gt;About&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.mattvarone.com/featured-content/&quot;&gt;Featured&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.mattvarone.com/contact/&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.mattvarone.com/blog/&quot;&gt;Blog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre><p>This is a post from: <a
href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a
href="http://www.mattvarone.com/wordpress/cleaner-output-for-wp_nav_menu/">Cleaner output for wp_nav_menu()</a></p> ]]></content:encoded> <wfw:commentRss>http://www.mattvarone.com/wordpress/cleaner-output-for-wp_nav_menu/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>Back In White</title><link>http://www.mattvarone.com/web-design/back-in-white/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=back-in-white</link> <comments>http://www.mattvarone.com/web-design/back-in-white/#comments</comments> <pubDate>Thu, 28 Jul 2011 15:34:19 +0000</pubDate> <dc:creator>Matt</dc:creator> <category><![CDATA[Web Development]]></category> <guid
isPermaLink="false">http://www.mattvarone.com/?p=1425</guid> <description><![CDATA[New revamp of this site. I wanted it to be &#8230; <a
href="http://www.mattvarone.com/web-design/back-in-white/" title="Continue Reading">Continue <span
class="meta-nav">&#8594;</span></a><p>This is a post from: <a
href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a
href="http://www.mattvarone.com/web-design/back-in-white/">Back In White</a></p> ]]></description> <content:encoded><![CDATA[<p>New revamp of this site. I wanted it to be something simple and minimalist. The ultimate force behind this change is to help me write more so I&#8217;m hoping this works :)</p><p>Content is king as they say. I got rid of all the trendy buttons and overdone details. Most importantly I took some time to re-structure the menu and pages hoping to make it a little easier to navigate.</p><p>To celebrate I&#8217;m releasing <a
href="http://www.mattvarone.com/featured-content/shortcodes-pro/" title="Shortcodes Pro Plugin for WordPress">Shortcodes Pro</a> on the <a
href="http://wordpress.org/extend/plugins/shortcodes-pro/">WordPress repository</a>.</p><p>Thanks for stopping by!</p><p>This is a post from: <a
href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a
href="http://www.mattvarone.com/web-design/back-in-white/">Back In White</a></p> ]]></content:encoded> <wfw:commentRss>http://www.mattvarone.com/web-design/back-in-white/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>WP Install: AppleScript for Mac</title><link>http://www.mattvarone.com/wordpress/wp-install-for-mac/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wp-install-for-mac</link> <comments>http://www.mattvarone.com/wordpress/wp-install-for-mac/#comments</comments> <pubDate>Sat, 16 Jul 2011 15:26:02 +0000</pubDate> <dc:creator>Matt</dc:creator> <category><![CDATA[WordPress]]></category> <category><![CDATA[Helpers]]></category> <category><![CDATA[Mac]]></category> <category><![CDATA[Resources]]></category> <category><![CDATA[Tip]]></category> <category><![CDATA[Workflow]]></category> <guid
isPermaLink="false">http://www.mattvarone.com/?p=1271</guid> <description><![CDATA[Little useful ( free ) app to quickly install the &#8230; <a
href="http://www.mattvarone.com/wordpress/wp-install-for-mac/" title="Continue Reading">Continue <span
class="meta-nav">&#8594;</span></a><p>This is a post from: <a
href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a
href="http://www.mattvarone.com/wordpress/wp-install-for-mac/">WP Install: AppleScript for Mac</a></p> ]]></description> <content:encoded><![CDATA[<p><img
class="aligncenter size-full border" title="WPinstall" src="http://www.mattvarone.com/wp-content/uploads/2011/07/WPinstall.jpg" alt="" width="570" height="325" /></p><p>Little useful ( free ) app to quickly install the latest version of WordPress on any given folder. Made from this <a
title="Install WordPress from the OSX Terminal" href="http://www.mattvarone.com/web-design/install-wordpress-from-the-osx-terminal/">shell script</a>.</p><p
class="post-box">Download the app <a
title="WP Install" href="http://www.mattvarone.com/wp-content/uploads/2011/07/WPInstall.zip">Here</a></p><p>Feel free to leave comments and suggestions.</p><p><em>* Awesome icon by TurboMilk</em></p><p>This is a post from: <a
href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a
href="http://www.mattvarone.com/wordpress/wp-install-for-mac/">WP Install: AppleScript for Mac</a></p> ]]></content:encoded> <wfw:commentRss>http://www.mattvarone.com/wordpress/wp-install-for-mac/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Install WordPress from the OSX Terminal</title><link>http://www.mattvarone.com/web-design/install-wordpress-from-the-osx-terminal/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=install-wordpress-from-the-osx-terminal</link> <comments>http://www.mattvarone.com/web-design/install-wordpress-from-the-osx-terminal/#comments</comments> <pubDate>Fri, 15 Jul 2011 14:37:47 +0000</pubDate> <dc:creator>Matt</dc:creator> <category><![CDATA[Web Development]]></category> <category><![CDATA[Helpers]]></category> <category><![CDATA[Resources]]></category> <category><![CDATA[Tip]]></category> <category><![CDATA[Workflow]]></category> <guid
isPermaLink="false">http://www.mattvarone.com/?p=1257</guid> <description><![CDATA[This little snippet comes handy to install the latest version &#8230; <a
href="http://www.mattvarone.com/web-design/install-wordpress-from-the-osx-terminal/" title="Continue Reading">Continue <span
class="meta-nav">&#8594;</span></a><p>This is a post from: <a
href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a
href="http://www.mattvarone.com/web-design/install-wordpress-from-the-osx-terminal/">Install WordPress from the OSX Terminal</a></p> ]]></description> <content:encoded><![CDATA[<p>This little snippet comes handy to install the latest version of WordPress quickly from the terminal. Drop the function on your <code>/Username/.bash_profile</code> and then simply call <code>wp_install</code> from the directory you want to install it.</p><pre class="brush: php; title: ; notranslate">
wp_install() {
        latest=&quot;http://wordpress.org/latest.zip&quot;
        curl -O $latest
        unzip latest.zip
        rm -rf __MACOSX latest.zip
        cp -rf ./wordpress/* ./
        rm -rf ./wordpress/
        mkdir ./wp-content/uploads/
        mv wp-config-sample.php wp-config.php
        touch .htaccess
        mate wp-config.php
        open https://api.wordpress.org/secret-key/1.1/salt/
}
# Note: If you are not a TextMate owner, change the line:
# mate wp-config.php
# to
# vi wp-config.php
</pre><p
class="post-box">Feel free to <a
title="Fork it at GitHub" href="https://github.com/sksmatt/Install-WP-from-Terminal">fork</a> it at GitHub.</p><p>This is a post from: <a
href="http://www.mattvarone.com">Matt Varone</a><br/><br/><a
href="http://www.mattvarone.com/web-design/install-wordpress-from-the-osx-terminal/">Install WordPress from the OSX Terminal</a></p> ]]></content:encoded> <wfw:commentRss>http://www.mattvarone.com/web-design/install-wordpress-from-the-osx-terminal/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> </channel> </rss>
