Download & Extend

Rename #href to #path

Project:Drupal core
Version:8.x-dev
Component:base system
Category:task
Priority:normal
Assigned:Unassigned
Status:needs review
Issue tags:API clean-up, Favorite-of-Dries

Issue Summary

theme_menu_link() and drupal_pre_render_link() use the #href array key to specify a Drupal path that is passed as the second parameter for l($text, $path, $options).

Most places in core use the term “path” when referring to internal paths. I suggest renaming #href to #path.

drupal_pre_render_link() was added in #602522: Links in renderable arrays and forms (e.g. "Operations") are not alterable and theme_menu_link() in #283723: Make menu_tree_output() return renderable output.

AttachmentSizeStatusTest resultOperations
href-path-1.patch32.63 KBIdlePassed on all environments.View details | Re-test

Comments

#1

Reroll.

AttachmentSizeStatusTest resultOperations
href-path-2.patch35.68 KBIdlePASSED: [[SimpleTest]]: [MySQL] 17,379 pass(es).View details | Re-test

#2

Issue tags:+Favorite-of-Dries

That makes a ton of sense, IMO. Let's see what the tests say.

#3

subscribing. Not sure how this fits in the "no API/interface changes" period we're kind-of in.

#4

Version:7.x-dev» 8.x-dev
Component:theme system» base system

Yes, it makes a ton of sense, but 1) it's 2-3 months past API clean-up freeze 2) breaks already ported modules and 3) we have a lot more pressing issues in the queue. If this would've been ready during slush, I would have RTBC'ed it immediately.

#5

AttachmentSizeStatusTest resultOperations
href-path-3.patch26.8 KBIdlePASSED: [[SimpleTest]]: [MySQL] 33,635 pass(es).View details | Re-test

#6

AttachmentSizeStatusTest resultOperations
href-path-4.patch27.54 KBIdlePASSED: [[SimpleTest]]: [MySQL] 34,103 pass(es).View details | Re-test

#7

AttachmentSizeStatusTest resultOperations
href-path-6.patch28.07 KBIdleFAILED: [[SimpleTest]]: [MySQL] 35,711 pass(es), 7 fail(s), and 3 exception(s).View details | Re-test

#8

Status:needs review» needs work

The last submitted patch, href-path-6.patch, failed testing.

#9

Status:needs work» needs review
AttachmentSizeStatusTest resultOperations
href-path-7.patch26.75 KBIdlePASSED: [[SimpleTest]]: [MySQL] 35,723 pass(es).View details | Re-test