Let’s see if we can break it down so it’s easy to understand.
You have a PHP function named ‘cm_title’:
function cm_title($text) {
return 'TESTING ' . $text;
}
It only does 1 thing. It takes what it is given, ‘$text’, and returns that $text with the words ‘Testing ‘ prepended to it.
How does WordPress know what ‘$text’ is?
It knows/assigns data to the $text parameter because of this WP filter:
add_filter('the_title', 'cm_title');
This filter is checked by WP when it is building ‘the_title’. So just before WP spits out ‘the_title’ it checks to see if there is a filter to use. In this case we are telling WP to apply this filter (the function ‘cm_title’) before spitting out the title.
All that to say WP sends what it has so far for ‘the_title’ (ie. ‘This is a Post About me’) and runs it through this filter before spitting it out.
So in this case, ‘This is a Post About me’ is the data in the $text parameter in the cm_title function.
Your end result becomes ‘TESTING This is a Post About me’.
Does that help clear it up?