Pre-render callback: Renders a contextual links placeholder into #markup.
Renders an empty (hence invisible) placeholder div with a data-attribute that contains an identifier ("contextual id"), which allows the JavaScript of the drupal.contextual-links library to dynamically render contextual links.
$element: A structured array with #id containing a "contextual id".
The passed-in element with a contextual link placeholder in '#markup'.
function contextual_pre_render_placeholder($element) {
$element['#markup'] = '<div data-contextual-id="' . $element['#id'] . '"></div>';
return $element;
}