Theme Mentor – inspired by Theme-Check

Today I finally released the first version of Theme Mentor - a theme review plugin inspired by the almighty Theme-Check. Over the last year I have spent more than 200 hours fixing themes for the WordPress.org repository gone through the Theme-Check tests. There are numerous issues not covered by Theme-Check, easy to miss during your review or development process. Truth is, most of them are absolutely valid and an algorithm couldn't be built so smart to determine whether it is a real error or not. Few of the problems covered by the first Theme Mentor version: <link> or <script> tags… Continue Reading

Document Feedback for WordPress

Most large knowledge databases online provide a large amount of articles ending with a small text block: "Was this resource helpful?", which is pretty handy for site owners to decide on most and least valuable posts. Since WordPress is a CMS heavily focused on blogging and content creation, the new Document Feedback plugin is the solution to these problems in the WordPress context. Daniel Bachhuber from Automattic had this plugin started and I realized that had been a missing functionality in the overall plugin repository at the moment. I was lucky to get several commits of mine into the plugin… Continue Reading

Including scripts and styles properly

Since this has been a discussed topic over support forums and IRC this week, a very quick scripts and style guide for WordPress. The function for including a stylesheet is wp_enqueue_style: [php]wp_enqueue_style( $handle, $src, $deps, $ver, $media );[/php] You can define the handle for the style (as a reference for other styles later), the location, dependent styles (when you need a style to be loaded after other styles), it's version if needed and the type of stylesheet (all, print, screen, handheld) Each script is included via wp_enqueue_script: [php]wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer );[/php] The first four arguments are identical,… Continue Reading

Overcome the WordPress Autosave Limitations

WordPress includes a handy feature called 'autosave' that periodically persists an autosave version of a post at the moment of writing. Since accidents happen, it's always good to have some recent version of a long text instead of starting from scratch when you don't have the proper backup. Autosave is handy, but since WordPress is no longer 'yet another blogging platform', it lacks important extensions to that feature. When you work with custom post types (or even plain old posts and pages), you might need to alter the standard save behavior. Therefore you take advantage of the save_post hook. Then… Continue Reading

Add a TinyMCE button to WordPress post editor

Most themes and large plugin utilize the WordPress Shortcode API by adding code snippets that could be parsed inside of a page or post. One of the handy ways to present a UI behavior for your customers is by embedding the functionality to the TinyMCE editor as an extra button. You need to create two files and embed them in your theme/plugin or create an extra piece of code (say, via another plugin) to trigger this behavior. The first file should be the JavaScript logic behind the button (as TinyMCE interaction is entirely JS-driven) and the second one is the… Continue Reading

DX Plugin Base v.1.1 released

I've released a major update of my DX Plugin Base plugin which servers as a skeleton for WordPress plugin creation. Some of the old code has been refactored and simplified and a few new features have been added as well. Currently the list of code snippets working and included in the sample plugin base is: custom post types and taxonomies setup sample admin menu and subpage example of the Settings API in the admin pages - creating 2 options with a validation hooked function for further use registration of activate/deactivate hooks adding 2 metaboxes on pages - on the right… Continue Reading

swpMVC – WordPress Rails-alike framework

Just noticed on Twitter this one: [blackbirdpie url="https://twitter.com/dimensionmedia/statuses/239848270657118208"] I'm very fond of more abstract development practices and a good MVC modeling with ActiveRecord has always been a pleasure to see. Since WP itself has too much procedural programming with global variables, this one as a concept looks very neat. I don't believe it would have any influence at all for the core or for smaller plugins, but at least could be a great start for a larger plugin (some eCommerce or real estate framework). Continue Reading

Plugin Base Skeleton

I got tired working on plugins and writing the same code snippets all over again, looking in the same old tutorial sites or my favorite WP 3 Plugin Dev book. So I released a startup script for plugins - http://wordpress.org/extend/plugins/dx-plugin-base/ . It contains most of the important snippets required for every plugin - registration of custom post types or taxonomies, registering activation and deactivation hooks, admin pages, metaboxes. I'm going to add widget/shortcode registration with some samples. This would make it easier to use it as a new plugin startup script and save some time about it. I also brainstorm on the… Continue Reading

Theme submission steps – presentation

The WPORG theme reviewers' mailing list got an interesting email from Chip where he shared an awesome SlideShare presentation. The WordPress.org reviewers are volunteers and they help each other with technical and philosophical questions on the WordPress platform, best practices designing and structuring a theme or a framework, obsolete and modern functions, security and more. It's a great pleasure getting in touch with these guys and sharing experience. About the presentation - an anonymous (at least not popular reviewer or theme author) speaker has shared on SlideShare this great walkthrough for creating a theme from scratch and all the important steps… Continue Reading