Alter core "Configure Block" contextual link path or text?
I was able to accomplish this for Panels by using the following:

/**
 * Implements preprocess_panels_pane().
 */
function hook_preprocess_panels_pane(&amp;$vars) {  
  if ($vars['pane']-&gt;type == 'panels_mini') {
    unset($vars['admin_links']);
    $vars['admin_links'] = '';
  } 

  // Load the currently logged in user.
  global $user;

  if ($vars['pane']-&gt;type == 'block') { 

    // Check if content array is set
    $type = isset(array_keys($vars['content'])[0]) ? array_keys($vars['content'])[0] : '';

    // Check if the pane subtype is a bean
    if (strpos($vars['pane']-&gt;subtype, 'bean-') !== false) {

      // Get path of bean edit link
      $path = isset(array_keys($vars['content']['bean'])[0]) ? array_keys($vars['content']['bean'])[0] : '';
      unset($vars['admin_links']);

      // Check if the user has the 'administrator' or 'content editor' role.
      if (in_array('administrator', $user-&gt;roles)) {
        $vars['admin_links'] = '&lt;div class="contextual-links-wrapper"&gt;&lt;ul class="contextual-links"&gt;&lt;li class="bean-  last"&gt;&lt;a href="/block/' . $path . '/edit?destination="&gt;Edit Block&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;';     
      } else {
        $vars['admin_links'] = '';
      }     
    }         
  }
}