Posted by bitspike on October 23, 2012 at 6:02pm
7 followers
| Project: | Drupal core |
| Version: | 8.x-dev |
| Component: | documentation |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | needs backport to D7, Novice |
Issue Summary
API page: http://api.drupal.org/api/drupal/core!includes!common.inc/function/drupal_add_js/8
API page: http://api.drupal.org/api/drupal/includes!common.inc/function/drupal_add_js/7
On the "parameters" paragraph of the documentation, the first line describing the the $data parameter should be (changes/corrections underlined):
$data: (optional) If given, the value depends on the $options[type] parameter:
instead of:
$data: (optional) If given, the value depends on the $options parameter:
P.S.:Since I am relatively new in Drupal development please double-check the correction above before you fix it.
Comments
#1
We need to consider D8 first.
#2
Seems to be fixed now.
#3
I don't see how it is fixed. It looks the same to me. Please explain so I won't reopen issue without a reason.
#4
Sorry I read the issue description wrong.
#5
attached is the solution on d8
#6
#5 looks good to me. Patch applys well and changes are made like in issue summary.
#7
Good catch! It needs to say $options['type'] though, not $options[type].
#8
hope thats ok now
#9
#10
Actually if the options parameter is a string, then it will be interpreted as the type:
So saying
$options['type']isn't always right.We could say something like
(optional) If given, the value depends on the $options parameter, or $options['type'] if $options is passed as an associative array.#11
#12
Ok you are right and your sentence is more precise.
#13
#14
The last submitted patch, minor_documentation_correction-1821024-12.patch, failed testing.
#15
#12: minor_documentation_correction-1821024-12.patch queued for re-testing.
#16
Looks good, thanks! I'll get this committed sometime soon.
#17
Sorry for the delay in committing this -- there's a big Views sprint going on and commits are delaying their patch reviews, so postponing a few days.
#18
Thanks again! Committed to 8.x and 7.x.
#19
Automatically closed -- issue fixed for 2 weeks with no activity.