Understanding the concept of action and filter in wordpress
##Now understand this code:-
amrt_cust
.add_filter()
for this, this function takes the name of already created filter as first param and callback function as second.apply_filter()
function.Thanks!
$array = array(
0 => 'orange',
1 => 'banana'
);
apply_filters('amrt_cust', $array);
function applynow($array) {
$array[1] = 'grapes';
print_r($array);
die;
}
add_filter('amrt_cust', 'applynow');