Nice work Chriss.
I do think keeping this code is necessary.
// Event to display (in the frontend) the YouTube URL as entered in the category form
function onK2CategoryDisplay(&$category, &$params, $limitstart)
{
$mainframe = JFactory::getApplication();
// Get the output of the K2 plugin fields (the data entered by your site maintainers)
$plugins = new K2Parameter($category->plugins, '', $this->pluginName);
$output = $plugins->get('videoURL_cat');
return $output;
}
// Event to display (in the frontend) the YouTube URL as entered in the user form
function onK2UserDisplay(&$user, &$params, $limitstart)
{
$mainframe = JFactory::getApplication();
// Get the output of the K2 plugin fields (the data entered by your site maintainers)
$plugins = new K2Parameter($user->plugins, '', $this->pluginName);
$output = $plugins->get('videoURL_user');
return $output;
}