Hi all, if you look at the pull-request commit for MDL-26048 you'll see how to add course format callbacks to a 2.4 theme - which is easy.
What I want to show you is how to add the 2.4 callbacks for ALL themes, it's pretty easy, we just use the same method_exists() check that we use with 2.1 vs. 2.2 for main_content()
see it at github (look at header.php)
basically it does this: checks to see if Moodle "knows" about various output objects, if it does, it stores them to a variable, if it doesn't - then it stores NULL to the variable, then later outputs whatever's in the variable.
Now you don't need to store different branches in your theme or drop development support for different versions of Moodle.