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.
This module does things in hook_init() which it only needs to do if the current page is actually showing a player.
Don't.
Comments
Comment #1
univate CreditAttribution: univate commentedThe biggest overheads here is checking for the existence of specific files on the server, the issue #880050: Configurable location for mp3players external files. fixes that.
Comment #2
univate CreditAttribution: univate commentedremoving duplicate post
Comment #3
univate CreditAttribution: univate commentedremoving duplicate post
Comment #4
joachim CreditAttribution: joachim commentedYou should only check for the presence of files in hook_requirements; the rest of the time it's safe to assume they are there.
See jquery_ui, for example.
Comment #5
univate CreditAttribution: univate commentedExactly, thats what the patch does in #880050: Configurable location for mp3players external files.
Comment #6
joachim CreditAttribution: joachim commentedThe patch over there moves the file checking, which is good. But the drupal_add_js() calls should be moved to the theme function rather than be always loaded in hook_init() -- might as well done be here as a follow-up.
Comment #7
univate CreditAttribution: univate commentedgiving this issue a meaningful title
Comment #8
jdelaune CreditAttribution: jdelaune commentedCommitted to dev. Thanks.