WordPress has a reputation of being very portable but after reading a recent article on WPGarage.com, there is a certain condition in which the data in WordPress can become non-portable. It has to do with the serialization of data. However, they offer up a few different ways in which to deal with the problem so that you don’t lose data via a database dump. ∞
By Jeffro on April 10, 2012
Yesterday on Twitter, I was informed of a new WordPress code snippets library that sprang up called WPFunction.me. The site has an easy to use interface for grabbing code snippets. While at first, it seems as though you need to perform a lot of scrolling to select code snippets and get the code, you can alleviate the scrolling by clicking on the preview link.
However, if you decide that this snippets website is not your cup of tea, check out the list of WordPress Code Snippet repositories put together by CatsWhoCode.com.
By Jeffro on January 16, 2012
WP-Snippets has gone through a few changes as of late. Among them is a responsive design, a button to mark snippets as favorites, better ways of filtering snippets, and a few other enhancements. WP-Snippets is one of those really cool ideas that I talked about during the early days of WordPress Weekly and I’m stoked to see someone out there actually turn the idea into a reality.
By Jeffro on December 30, 2011
How many of you still update your themes footer every year to change the copyright date? Thanks to a small snippet of code, you can add this to your footer.php file which will negate the need to manually change the copyright information every year. The code snippet is php the_time(‘Y’) An excellent primer for how to use this snippet within the footer.php file is explained via Lorelle VanFossen.
By Jeffro on September 12, 2011
What was your inspiration for creating WPSeek?
The first idea of wpseek wasn’t actually to create a public search engine for WordPress developers. When I finished creating a little Firefox add-on called “WordPress Helper”  some years back, I was using wpseek as a kind of search result page for requests made with the “WordPress Helper” add-on. The idea was that users can highlight functions, template tags or whatever on any page they browse and a mouse click would bring them to a wpseek result page with all of the information that was related to the search term. Having dynamic result pages for various WordPress-related search queries was basically the birth of wpseek as it is now.
How many times have you found yourself using the site for reference?
Well, I find myself using it quite often along with the official Codex and core files while writing plugins. For easy use, I added wpseek to Firefox’ search engines on the upper right so I can look up any function without getting too distracted from writing the actual plugin. Personally I find it pretty handy, and so I hope it is for the majority of users. I think the most useful information for me is the compatibility info (when has a function been introduced and deprecated in WP core). That saved me quite some time I guess. Oh well, where’s the non-narcissistic smilie?
Behind the scenes, can you tell us a little bit about how the site works?
Basically it is a search engine like Google, Yahoo or Bing. The only difference is that you cannot search porn. And it’s a bit more specific and niche business. Apart from that the usage is like with any other search engine: enter a search term (a function, template tag or hook) and the site gives you all the information it has that is related to your search term. This includes general information about the function, code snippets, version info, external links to the Codex, user discussions on the wp.org forums and user notes posted on wpseek.com. There are 8 crawlers doing their job for the site, running periodically from hourly to monthly. Some of them are collecting WP code data from local copies and repositories, others are posting on Twitter occasionally notifying my followers of new WP releases or new functions added to the wpseek database. Recently I wrote a blog post about some of the (publicly visible) bots running on wpseek for those who are interested: http://wpseek.com/blog/2011/twitter-and-the-wpseek-bot/105/
In terms of updating the site with functions, is it automatic or do you have to add everything regarding the function to the site yourself?
Everyone knows that coders (like I am) are lazy folks so everything wpseek does is automated. Means that the foundation of wpseek is – as stated above already – several crawlers and tasks that run periodically in order to catch information related to WordPress code. wpseek currently holds a database of about WP 5,000 functions and 1,500 hooks. It would be impossible for me to keep this data up-to-date on an hourly basis. I do review all the stuff, though. Just to keep track of bugs and inaccurate data.
I noticed that WPSeek has an API. What can interested parties do with your API?
The API allows everyone to get all the data that’s stored on the wpseek databases and that can be found on the result pages. Which means function info, code snippets, similar functions etc. The goal was to be able to make wpseek available for any platform. You could set up an iPhone/iPad code lookup app or a web app to lookup function version compatibility including auto-complete. You could actually fork wpseek.com and make your own. Luckily seekwp.com is already taken. For anyone who’s interested, you can find the API (along with a jQuery plugin) here: http://wpseek.com/api/ Feel free to play and do whatever you like with it!
Do you think WPSeek.com is a better reference to use for help rather than the Codex or do they work hand in hand with each other?
wpseek.com is definitely just one of the MANY WordPress resources out there! And I’m not just saying this because I don’t have another non-narcissistic smilie at hand. The great advantage of the official Codex is that it’s community-driven. wpseek is basically a one-man-show. I usually search the Codex for usage examples. They have a lot in there. More than that, the Codex is like a huge manual for WordPress users while wpseek is just a code search engine. So, yeah, they go hand in hand with each other, just like all WordPress resources out there. I wouldn’t mind a catchall-codex.wordpressp.org-to-wpseek.com redirect, though.
Any last thoughts you wanted to share?
1. Good to see you back posting on WPTavern, Jeff!
2. Thanks Andreas Petermann for the regex-o-rama!
By Jeffro on September 27, 2010
Inspired by an article that explains how to bypass WordPress core functions in order to implement custom gravatars, Chip Bennett explains how to properly work with custom gravatars without having to bypass any core functionality. Using Chips tutorial, creating custom avatars for your users is a cinch. Always better to work WITH core instead of against it, especially when it’s much easier to accomplish the task.
By Jeffro on May 26, 2009
As most of you are aware, I ended up choosing to edit a child theme of the Theme Hybrid framework called Hybrid News. Out of the gate, using a child theme that is built on top of a framework certainly has a learning curve. For instance, if I installed a plugin where the directions told me to place a line of code in a certain theme template file, I couldn’t do that in this child theme since it’s primary purpose is to be compiled mostly of CSS without touching the core of the framework which holds the theme together.
Instead, it’s up to me to figure out how to add that plugins code to my child themes functions.php file. Something which requires I as an end user to know about filters, hooks, or other weird developing terms. In this instance, I believe child themes have raised the technical bar. I know if I put in a support query, Justin will be right there to answer it but I feel like a loony for having to rely on support in order to accomplish something which was easy before hand. I know some would argue that functions of a plugin should be added to a custom functions.php anyway to prevent it disappearing if a theme upgrade were to occur.
Other than this hurdle, I don’t have much to complain about. The experience has gone over rather well and it was nice to just edit the CSS of a theme for once without having to edit 5 separate template pages.
So should their be an easier way to customize where and when a plugins output will show up in a theme by implementing an interface of sorts for these plugin functions or should I just buckle down and learn a thing or two regarding functions.php, hooks, filters, and those other funky terms?