My latest patch: fixing links and breaking modules

My latest patch, based on work originally started by Bèr, was just committed today. It expands on Bèr’s work by not only giving structure to hook_link items, but also to menu items returned from menu_primary_links() and menu_secondary_links(). It also introduces a new hook_link_alter() in the fashion of hook_form_alter(). Additionally, the syntax is influenced by forms api and I threw in a bunch of tweaks to make it very useful, like automatically adding class names to links, the #1 theme problem I run into over and over again.

If you want more details, read up on the docs I wrote (first 3 items) or check out the article I wrote about the practicalness of this patch.

So what’s next? Well I’d like to see theme(‘links’) return an actual list of links instead of a crummy string, so perhaps that…

Sorry. Post that you have

Sorry. Post that you have deleted was mine.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You can use Textile markup to format text.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <img> <pre>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.

More information about formatting options