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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Component: Code » Documentation
Status: Active » Fixed
FileSize
2.61 KB

Thanks, 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.

quicksketch’s picture

Title: "theme callback" is not called in fboauth_action_display() » Documentation incorrectly refers to "theme callback"

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.