输出WordPress链接管理器的“已禁用”消息。

原型

wp_link_manager_disabled_message()

源文件

路径:wp-admin/includes/bookmark.php

<?php
...
function wp_link_manager_disabled_message() {
	global $pagenow;
	if ( 'link-manager.php' != $pagenow && 'link-add.php' != $pagenow && 'link.php' != $pagenow )
		return;
	add_filter( 'pre_option_link_manager_enabled', '__return_true', 100 );
	$really_can_manage_links = current_user_can( 'manage_links' );
	remove_filter( 'pre_option_link_manager_enabled', '__return_true', 100 );
	if ( $really_can_manage_links && current_user_can( 'install_plugins' ) ) {
		$link = network_admin_url( 'plugin-install.php?tab=search&amp;s=Link+Manager' );
		wp_die( sprintf( __( 'If you are looking to use the link manager, please install the <a href="%s">Link Manager</a> plugin.' ), $link ) );
	}
	wp_die( __( 'Sorry, you are not allowed to edit the links for this site.' ) );
}
...
?>

其他

英文文档:https://developer.wordpress.org/reference/functions/wp_link_manager_disabled_message/