[wp-hackers] is_admin?

Kaf Oseo kaf at szub.net
Sun Dec 4 08:15:57 GMT 2005


Andy Skelton wrote:
> You need to delay execution by writing your code into a function that
> gets called by an action hook later in the program.

Doing that. Here's a simplification of the code as I have it:

function is__this_admin($text) {
	if(is_admin()) {
		$text = "Paydirt!";
	}
	return $text;
}

add_filter('option_blogname', 'is__this_admin', 42);

When I change to is_home or is_feed or any other conditional function,
it works as expected. Only is_admin seems to always return false.

-Kaf


More information about the wp-hackers mailing list