Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add to menu
#4
Choosing a location to have the hook the way the menu function is currently working will be a bit hard. It will be easy to add some hooks before and after the generated LI-elements. I haven’t committed this to the latest dev version (yet) but here’s what you could do:

Open up /admin/inc/theme_functions.php and scroll all the way down (row 362). Here you will find this:
Code:
echo $menu;
Now change it to this:
Code:
exec_action('pre-menuitems');
echo $menu;
exec_action('post-menuitems');
Now use these two hooks (pre-menuitems, post-menuitems) as normal.

I’ll be looking into this a bit for the next GetSimple version. It would be nice to have a little more control over the menu as plugin developers.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply


Messages In This Thread
Add to menu - by jamiewhiskers - 2010-07-19, 12:33:06
Add to menu - by JWH_Matthew - 2010-07-19, 12:42:25
Add to menu - by jamiewhiskers - 2010-07-19, 13:04:35
Add to menu - by Zegnåt - 2010-07-20, 01:33:30
Add to menu - by Carlos - 2010-07-20, 06:22:16
Add to menu - by ccagle8 - 2010-09-22, 03:40:17



Users browsing this thread: 1 Guest(s)