I'm trying to add the ability to configure pane region locking through the IPE. I've tried add a link like so but it just throws an ajax error. I thought using code below might bring up the form used by panels_renderer_editor.class. This code is placed within the panels_ipe.module file function template_preprocess_panels_ipe_pane_wrapper

  // Add option to configure locking in IPE (Need to create permission)
  // if (user_access('administer panels styles')) {
    $vars['links']['locking'] = array(
      'title' => '<span>' . t('Lock') . '</span>',
      'href' => $renderer->get_url('lock', 'pane', $pane->pid),
      'html' => TRUE,
      'attributes' => array(
        'class' => array('ctools-use-modal', 'panels-ipe-hide-bar'),
        'title' => t('Locking'),
      ),
    );
  // }

I've tried a few other ways to achieve this but still getting stuck, if you could offer any advice on the best way to achieve this, that would be a great help.