[wp-hackers] 2.7 Wireframes

Otto otto at ottodestruct.com
Wed Oct 15 13:45:04 GMT 2008


It would be nice if submenus could have their own icons too. I did it
already by putting an IMG in the menutitle, but a more direct approach
would be nice.

Here's the code that works for me in the current trunk:

$menutitle = '';
if ( version_compare( $wp_version, '2.6.999', '>' ) ) {
	$menutitle = '<img
src="'.plugins_url(dirname(plugin_basename(__FILE__))).'/clock.png"
style="margin-right:4px;" />';
}
$menutitle .= __('Timezone', TIMEZONE_DOMAIN);
add_options_page(__('Timezone Configuration', TIMEZONE_DOMAIN),
$menutitle , 'manage_options', 'timezone-config', 'timezone_conf');
		
Change I made is here:
http://plugins.trac.wordpress.org/changeset/68946/automatic-timezone/trunk/timezone.php



On Wed, Oct 15, 2008 at 7:25 AM, Ozh <ozh at planetozh.com> wrote:
>>I prefer the add_*_page version though. As we currently have for
>>add_menu_page - [9182]
>
> Actually, me too :)
> More simple.
>
> Ozh
>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list