Proper and fast unit tests in WordPress

There were unit tests missing in my hacktoberfest project. Unfortunately there is no framework which does proper unit tests for WordPress plugins or themes. Most of them do integration tests so I made another approach to speed up tests and keep them very modular.  Continue reading “Proper and fast unit tests in WordPress”

Hide other users posts in the backend

In WordPress you can hide other users posts in the backend for those who should not see them. Authors see every post but are not capable of editing them, which can be really frustrating. Two short snippets help cleaning up the post lists programatically. Continue reading “Hide other users posts in the backend”

WordPress 4.7: Custom bulk actions, Theme inheritance and more

WordPress 4.7 brought a lot of new features in September and there are more to come. Again there are great things like custom bulk actions, better theme inheritance and many more. But there are also things that might break your customers site which I want to show you.  Continue reading “WordPress 4.7: Custom bulk actions, Theme inheritance and more”

Writing extensible plugins: Early exit

How filters and actions are used in the WordPress Core is very interesting and a nice principle for extensible plugins or themes. Within the last years I stepped several times through the WordPress core and saw some lovely structures. Let me show you some of them so that your plugin or theme is more flexible and makes other developers happy. Continue reading “Writing extensible plugins: Early exit”

get_posts: Order by custom wp_posts column

Some developer like to extend the WordPress tables with a custom wp_posts column. To have it as a sortable column for queries like in get_posts you need to extend WordPress a bit. This article shows how to make custom columns sortable.  Continue reading “get_posts: Order by custom wp_posts column”

wp_text_diff – Highlight text changes as visual control

The wp_text_diff view of revisions is not only a thing for admins but also for guests. Imagine the client can view the differences he made in a form as a visual control. This is a funny and easy way for visitors to verify their changes.  Continue reading “wp_text_diff – Highlight text changes as visual control”

Email Subscription Form without Plugin

Recently someone asked me which plugin is the best for email subscription form popups. First of all WordPress already has things for that and secondly I don’t like those boxes. Anyway here is a solution that is already given in the WordPress Core.  Continue reading “Email Subscription Form without Plugin”

Take control of new bundled plugins and themes

On the WordCamp Frankfurt 2016 I showed some useful constants. One of them was CORE_UPGRADE_SKIP_NEW_BUNDLED which allows you to suppress/control the installation of twenty* themes and akismet with every WordPress update. Let’s take a look how to do that. Continue reading “Take control of new bundled plugins and themes”

All dynamic actions in WordPress

WordPress has an infinite amount of actions and filters. Indeed it comes with dynamic actions that listen on actions for your custom post type, option, plugin or other. This allows you to keep the performance and make the code easy to maintain. In this month I’ll show you some neat little tricks for them. This post starts with an overview over all possible actions and filter. Continue reading “All dynamic actions in WordPress”