Make no mistake; if you have a web form or comment system on your site, the spambots WILL find you. They will pack the form fields with as much rubbish as they can pump out and try to send it on to you, the site owner.… Read the rest
A rather frustrating bug that I became aware of when generating navigational menus for custom post types using wp_list_pages(). The list entries aren’t decorated with useful classes denoting the current item, the parent item, and ancestor(s).
Read about the issue here.… Read the rest
So Yoast’s Google Analytics for WordPress plugin has a somewhat annoying “bug”, or oversight rather , where it rewrites relative link URLS to full URLs, including anchors. For example, <a href=”#anchor”> becomes <a href=”http://planetjon.ca/blah/#anchor”>. There is more information about this on the wordpress forums.… Read the rest
In WordPress, when you make a page or post you give it a title and a url (slug). If you decide to change the url later, WordPress has this convenient feature of remembering the old one and redirecting to the new url so that your links aren’t broken.… Read the rest
A workaround for binding to the intended static scope without using the static:: operator introduced in PHP 5.3.
When calling a parent method, we often want dynamic binding to occur so that any method calls and member references made in this parent method will be looked up starting in the true class of the object being invoked and then in the inheritance tree.… Read the rest
Cutting straight to the point, here’s a quick way with PHP for removing empty values from an array and shifting the indices appropriately. Nothing too fancy but I found it useful at work and figure that I might as well share the tip.… Read the rest