Description of the need
Drupal 7 l() function returns a themed link when possible. This means any link made with l() can be themed and preprocessed. Backdrop removed this functionality.
I found needing this when porting Content Lock Drupal 7 module, which makes use of hook_preprocess_link() to alter any link in Drupal.
Right now, in Backdrop, any link created with l() cannot be preprocessed. See also this talk on the forum about this.
Proposed solution
Add Drupal functionality to Backdrop.
Alternatives that have been considered
Right now, the alternatives are to use a hook_preprocess_menu_local_task() function to preprocess local tasks links (theme_menu_local_task doesn't use theme('link') to output its links) and a hook_preprocess_views_view_field() to alter links printed by views (in this case you need to do so by regex, very uncomfortable). Still, many implementations of l() get untouched.
Additional information
Original drupal code includes a 'process' case, which I believe backdrop doesn't have.
Draft of feature description for Press Release (1 paragraph at most)
Backdrop now includes the availability to theme or preprocess any link created with the l() function.
Recent comments
Thanks Alejandro. That was the clues I needed.
Ubercart - Programmatically add product to cart and straight to Checkout
Have you tried uc_cart_add_item()? You need to provide the nid of the product. Then you can use backdrop_goto('cart/checkout'); to send the user to the checkout screen. uc_cart_add_item...
Ubercart - Programmatically add product to cart and straight to Checkout
No problem, let's see how it evolves. I'd be happy to provide a suggested version if i could. I will keep that in mind and try learn this hook chain hopefully very soon. I will...
File hashing uploads made through TinyMCE