WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

wp_link_manager_disabled_message() WP 3.5.0

Outputs the 'disabled' message for the WordPress Link Manager.

Хуков нет.

Возвращает

Null. Ничего.

Использование

wp_link_manager_disabled_message();

Заметки

  • Global. Строка. $pagenow

Список изменений

С версии 3.5.0 Введена.

Код wp_link_manager_disabled_message() WP 5.5.1

wp-admin/includes/bookmark.php
<?php
function wp_link_manager_disabled_message() {
	global $pagenow;

	if ( ! in_array( $pagenow, array( 'link-manager.php', 'link-add.php', 'link.php' ), true ) ) {
		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' );
		/* translators: %s: URL to install the Link Manager plugin. */
		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.' ) );
}