function brightcove_parse_id in Brightcove Video Connect 7.5
Same name and namespace in other branches
- 6.2 brightcove.module \brightcove_parse_id()
- 6 brightcove.module \brightcove_parse_id()
- 7.7 brightcove.module \brightcove_parse_id()
- 7.2 brightcove.module \brightcove_parse_id()
- 7.3 brightcove.module \brightcove_parse_id()
- 7.4 brightcove.module \brightcove_parse_id()
- 7.6 brightcove.module \brightcove_parse_id()
Parse a field value in form of "title [id:123]" and return 123
Parameters
$id: Video ID in form of "title [id:123]".
Return value
Int value of the ID or NULL if not found.
2 calls to brightcove_parse_id()
- brightcove_field_browser_playlist_validate in brightcove_field/
brightcove_field.module - Validate callback for the playlist field.
- brightcove_field_browser_video_validate in brightcove_field/
brightcove_field.module - Validate callback for the video field.
File
- ./
brightcove.module, line 698 - Brightcove module is an integration layer between any modules using Brightcove API. It makes all necessary checks for the API and makes settings available to the user.
Code
function brightcove_parse_id($id) {
preg_match('/\\[id:([^\\[]*)\\]$/', $id, $matches);
if (count($matches) == 2) {
return $matches[1];
}
return NULL;
}