function _janrain_capture_get_screen_file in Janrain Registration 7.3
Same name and namespace in other branches
- 7.4 janrain_capture_screens/janrain_capture_screens.module \_janrain_capture_get_screen_file()
- 7.2 janrain_capture_screens/janrain_capture_screens.module \_janrain_capture_get_screen_file()
Gets the appropriate Janrain screen file.
Parameters
string $screen_name: Janrain screen name. @see _janrain_capture_get_screens()
Return value
string|bool Janrain screen uri if file found, FALSE if not.
2 calls to _janrain_capture_get_screen_file()
- janrain_capture_widget_js in includes/
janrain_capture.widget.inc - Returns Capture widget js.
- _janrain_capture_get_screen in ./
janrain_capture.module
File
- janrain_capture_screens/
janrain_capture_screens.module, line 34 - Janrain Capture Admin Screens Module
Code
function _janrain_capture_get_screen_file($screen_name) {
// Serve updated screen if availible.
$screen_machine_name = _janrain_capture_get_screen_machine_name($screen_name);
$updated_screen = variable_get("janrain_capture_screen_{$screen_machine_name}");
if ($updated_screen) {
if ($file = file_load($updated_screen)) {
return $file->uri;
}
}
// Serve default shipped screen if not.
$module_path = drupal_get_path('module', 'janrain_capture');
$file_path = "{$module_path}/janrain-capture-screens/{$screen_name}";
return file_exists($file_path) ? $file_path : FALSE;
}