'.$closeLink));
// check widget permissions at wordpress db
$widgetDb = KalturaWPModel::getWidget($widgetId, $entryId);
if (!$widgetDb)
wp_die(__('The interactive video was not found (Maybe the post was not published yet?).
'.$closeLink));
if (!KalturaHelpers::userCanEdit((string)$widgetDb["edit_permissions"]))
wp_die(__('You do not have sufficient permissions to access this page.
'.$closeLink));
$kmodel = KalturaModel::getInstance();
if (!$entryId) // for backward compatibility
{
// get the widget from kaltura to find the entry its linked to
$widget = $kmodel->getWidget($widgetId);
$entryId = $widget->entryId;
}
if (!$entryId || !$widgetDb)
wp_die(__('The video was not found.