tag) so WordPress.org Plugin Check stays clean. The
* link is a plain external WordPress renders for the URL menu slug;
* core does not add target/rel, so we add them here.
*
* @return void
*/
public static function enqueue() {
static $done = false;
if ($done) return;
$done = true;
$url = wp_json_encode(self::url(), JSON_HEX_TAG | JSON_HEX_AMP);
// Normalise trailing slashes on both sides: WordPress renders the
// external menu URL without a trailing slash, while self::url keeps
// one — a strict === would miss and the link would open same-tab.
$js = '(function(){'
. 'var u=' . $url . ';'
. 'var n=function(s){return (s||"").replace(/\/+$/,"");};'
. 'var a=document.querySelectorAll("#adminmenu a");'
. 'for(var i=0;i