Sunday, April 12, 2015

Difference between apply_filters and apply_filters_ref_array

I have come up explaining the use of apply_filters and apply_filters_ref_array hooks .

apply_filters
The callback functions attached to filter hook $tag are invoked by calling this function. This function can be used to create a new filter hook by simply calling this function with the name of the new hook specified using the $tag parameter.

Wednesday, April 8, 2015

Difference between do_action and do_action_ref_array

Many of us may get confused when using do_action and do_action_ref_array hooks as they both looks identical. But, there must be something different for both this hooks when comes to implementation and yes they do. Lets know what make them different from one another.

Tuesday, April 7, 2015

Wordpress - do_action and add_action

Wordpress has many hooks, among which do_action and add_action are most significant. Guys who are beginners to wordpress really needs to know the difference between this two hooks. Because this plays the vital role in creating plugins. Lets know what is the basic difference between do_action and add_action.

do_action 

Allows you to create a new action. This is much like apply_filters() with the exception that nothing is returned and only the functions or methods are called.
<?php do_action( $tag, $arg ); ?>

Difference between add_filter and apply_filters

In wordpress, apply_filters and add_filter are two different hooks.

apply_filters
The callback functions attached to filter hook $tag are invoked by calling this function. This function can be used to create a new filter hook by simply calling this function with the name of the new hook specified using the $tag parameter.