[wp-hackers] Top level menus with different submenu titles

Viper007Bond lists at viper007bond.com
Thu May 18 08:51:49 GMT 2006


But hows does that differ from the documented way? i.e. how does that 
not make an item in the submenu row called "podPress"?

- Viper

Dan Kuykendall wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I accomplished this in podpress without having to go back and remove
> some submenu
> 
> Relevant code
> 
> if (function_exists('add_menu_page')) {
>   add_menu_page(__('podPress'), __('podPress'), $permission_needed,
> 'podpress/podpress_feed.php');
> }
> 
> if (function_exists('add_submenu_page')) {
> 
>   add_submenu_page('podpress/podpress_feed.php', __('Feed/iTunes
> Settings'), __('Feed/iTunes Settings'), $permission_needed,
> 'podpress/podpress_feed.php');
> 
>   add_submenu_page('podpress/podpress_feed.php', __('General Settings'),
> __('General Settings'), $permission_needed,
> 'podpress/podpress_general.php');
> 
>   add_submenu_page('podpress/podpress_feed.php', __('Player Settings'),
> __('Player Settings'), $permission_needed, 'podpress/podpress_players.php');
>   if($podPress->settings['enableStats'] == true) {
> 
>     add_submenu_page('podpress/podpress_feed.php', __('Stats'),
> __('Stats'), $permission_needed, 'podpress/podpress_stats.php');
>   }
> }
> 			}
> 		}
> 
> 
> Viper007Bond wrote:
>> So I guess my previous e-mail didn't come through, but that's okay as I
>> figured it out anyway.
>>
>> When you make a new top-level menu (yes, I'm sure I really need one) and
>> then another page as a submenu under it, a submenu is also made with the
>> title of the top-level menu. I didn't want that.
>>
>> So, I thought I'd share the code I came up with:
>>
>> http://files.viper007bond.com/wordpress/menu_test.phps
>>
>> Enjoy and feel free to provide improvement suggestions. :)
>>
>> - Viper007Bond
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
> 
> - --
> Dan Kuykendall (aka Seek3r)
> http://www.mightyseek.com
> 
> In God we trust, all others we virus scan.
> Programmer - an organism that turns coffee into software.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFEbBN/K8FkGutbdPMRAsIFAJ0cKvmqBFwT7dqkQiz9eoXATz7S6QCgmNeH
> csAkatzv8kZH/cjp92T35FM=
> =gnVM
> -----END PGP SIGNATURE-----
> _______________________________________________
> 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