The sidebar description runs through esc_html()
, so you cannot pass HTML directly. But you can use the filter esc_html
to insert your desired content.
Here is a simple example:
add_action( 'widgets_init', function() {
$desc = "Read the <a href="http://wordpress.stackexchange.com/q/189749/73">explanation</a>!";
$placeholder="PLACEHOLDER";
register_sidebar([
'id' => 'wpse-189749',
'name' => 'Link description',
'description' => $placeholder
]);
add_action( 'widgets_admin_page', function() use ( $desc, $placeholder ) {
add_filter( 'esc_html', function( $safe_text, $text ) use ( $desc, $placeholder ) {
if ( $text !== $placeholder )
return $safe_text;
remove_filter( current_filter(), __FUNCTION__ );
return $desc;
}, 10, 2 );
});
});
Result: