[wp-hackers] Call to add_action() outside function in theme.php

Charles K. Clarkson cclarkson at htcomp.net
Fri Jan 9 04:47:27 GMT 2009


    I was checking the preview_theme() function in wp-includes/theme.php 
to add a reference page in the codex when I noticed a statement outside 
the the function.

     Is there a good reason for this call to add_action() being located 
outside all function definitions in this file? Shouldn't this be located 
at the top of the file where people would be less likely to miss it?

function preview_theme() {
add_action('setup_theme', 'preview_theme');


Charles Clarkson
Mobile Home Investor
Free Market Advocate

Stephenville, TX
+1 (254) 968-8328

More information about the wp-hackers mailing list