Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In the doxygen for hook_libraries_info(), the library name is supposed to be given in
* - name: The official, human-readable name of the library.
, which also seems consistent with the actual implementation. However all of the examples have the library name given in $library['title']
.
Lastly, neither of these is actually used in the display given when running drush libraries-list
.
Comment | File | Size | Author |
---|---|---|---|
#1 | name-vs-title.patch | 1.57 KB | tstoeckler |
Comments
Comment #1
tstoeckler'name' is the correct key. We used to have 'title' but we thought it best to be in line with what e.g. Drupal modules use. The examples in libraries.api.php still using 'title' is a bug (see attached patch).
drush libraries-list lists the machine name, because that is useful for developers, as that is what you need to call e.g. libraries_load() with.
Please note that this reasoning is not set in stone, so if you have any improvements regarding this, please share them.
Comment #2
bfroehle CreditAttribution: bfroehle commentedComment #3
tstoecklerThanks for noticing and reviewing!
Committed #1 to DRUPAL-7--2.
http://drupal.org/cvs?commit=502758