WordPress Test for Mediors
Test your WordPress knowledge and fill in this quiz.
Test your WordPress knowledge and fill in this quiz.
WordPress contains certain filter hooks for filtering the content, like post title, post content, text widgets etcetera, but it doesn’t contain a hook for filtering the whole page. And sometimes it can be useful to have such a filter. In this tutorial I will show you how. First I will show you just how to
So we have created a way to manipulate the content of the whole page before it’s sent to the browser. Now we will create our custom WP filter, to have a more generic solution, that can be used by other plugins and themes as well. We can create a custom filter hook by using the
WordPress contains certain filter hooks for filtering the content, like post title, post content, text widgets etcetera, but it doesn’t contain a hook for filtering the whole page. And sometimes it can be useful to have such a filter. In this tutorial I will show you how. First I will show you just how to
In this tutorial I will show you an alternative way to add functionality to action and filter hooks by using PHP closures, also called anonymous functions. Normal way with global function Normally we have to create a global function, for example “demo_plugin_show_notice”. Then we add this function to an action, in this case “admin_notices”. When