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.
The README.txt and fboauth_fboauth_actions() function specify a 'theme callback' for generating your own link for a custom action.
However fboauth_action_display() asks for a key 'theme':
286 function fboauth_action_display($action_name, $redirect = NULL, $app_id = NULL) {
287 // Use the default App ID if not specified.
288 $app_id = isset($app_id) ? $app_id : variable_get('fboauth_id', '');
289
290 $action = fboauth_action_load($action_name);
291 $link = fboauth_action_link_properties($action_name, $redirect, $app_id);
292 $theme = isset($action['theme']) ? $action['theme'] : array('fboauth_action__' . $action_name, 'fboauth_action');
293 return theme($theme, array('action' => $action, 'properties' => $link));
294 }
If I'm not mistaken either that should get changed to 'theme callback' or the documentation and initial actions declarations should just be 'theme'.
Thanks for the great work on this module.
Comment | File | Size | Author |
---|---|---|---|
#1 | fboauth_theme_callback.patch | 2.61 KB | quicksketch |
fboauth-theme-callback.patch | 677 bytes | acouch |
Comments
Comment #1
quicksketchThanks, rather than changing the code, we should update the documentation. At one point I had thought that we would also support "theme arguments" in addition to "theme callback", but I decided against that unnecessary abstraction. Just "theme" is the proper key. Some of our code isn't reflecting this change though, as even fboauth_fboauth_actions() attempts to use "theme callback", even though it's not doing anything. Really most modules won't need to specify a theme property anyway, since a suggestion is provided for them already (such as our own theme_fboauth_action__connect() function).
I've committed this patch both branches which clarifies the situation.
Comment #2
quicksketch