Title: wp_link_manager_disabled_message
Published: April 25, 2014
Last modified: August 20, 2026

---

# wp_link_manager_disabled_message()

## In this article

 * [Source](https://developer.wordpress.org/reference/functions/wp_link_manager_disabled_message/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_link_manager_disabled_message/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_link_manager_disabled_message/?output_format=md#changelog)

This function’s access is marked private. This means it is not intended for use 
by plugin or theme developers, only by core. It is listed here for completeness.

Outputs the ‘disabled’ message for the WordPress Link Manager.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_link_manager_disabled_message/?output_format=md#source)󠁿

    ```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 ) {
    		$plugins = get_plugins();

    		if ( empty( $plugins['link-manager/link-manager.php'] ) ) {
    			if ( current_user_can( 'install_plugins' ) ) {
    				$install_url = wp_nonce_url(
    					self_admin_url( 'update.php?action=install-plugin&plugin=link-manager' ),
    					'install-plugin_link-manager'
    				);

    				wp_die(
    					sprintf(
    						/* translators: %s: A link to install the Link Manager plugin. */
    						__( 'If you are looking to use the link manager, please install the <a href="%s">Link Manager plugin</a>.' ),
    						esc_url( $install_url )
    					)
    				);
    			}
    		} elseif ( is_plugin_inactive( 'link-manager/link-manager.php' ) ) {
    			if ( current_user_can( 'activate_plugins' ) ) {
    				$activate_url = wp_nonce_url(
    					self_admin_url( 'plugins.php?action=activate&plugin=link-manager/link-manager.php' ),
    					'activate-plugin_link-manager/link-manager.php'
    				);

    				wp_die(
    					sprintf(
    						/* translators: %s: A link to activate the Link Manager plugin. */
    						__( 'Please activate the <a href="%s">Link Manager plugin</a> to use the link manager.' ),
    						esc_url( $activate_url )
    					)
    				);
    			}
    		}
    	}

    	wp_die( __( 'Sorry, you are not allowed to edit the links for this site.' ) );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/bookmark.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-admin/includes/bookmark.php#L332)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-admin/includes/bookmark.php#L332-L380)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_link_manager_disabled_message/?output_format=md#related)󠁿

| Uses | Description | 
| [is_plugin_inactive()](https://developer.wordpress.org/reference/functions/is_plugin_inactive/)`wp-admin/includes/plugin.php` |

Determines whether the plugin is inactive.

  | 
| [get_plugins()](https://developer.wordpress.org/reference/functions/get_plugins/)`wp-admin/includes/plugin.php` |

Checks the plugins directory and retrieve all plugin files with plugin data.

  | 
| [self_admin_url()](https://developer.wordpress.org/reference/functions/self_admin_url/)`wp-includes/link-template.php` |

Retrieves the URL to the admin area for either the current site or the network depending on context.

  | 
| [current_user_can()](https://developer.wordpress.org/reference/functions/current_user_can/)`wp-includes/capabilities.php` |

Returns whether the current user has the specified capability.

  | 
| [__()](https://developer.wordpress.org/reference/functions/__/)`wp-includes/l10n.php` |

Retrieves the translation of $text.

  | 
| [esc_url()](https://developer.wordpress.org/reference/functions/esc_url/)`wp-includes/formatting.php` |

Checks and cleans a URL.

  | 
| [wp_die()](https://developer.wordpress.org/reference/functions/wp_die/)`wp-includes/functions.php` |

Kills WordPress execution and displays HTML page with an error message.

  | 
| [wp_nonce_url()](https://developer.wordpress.org/reference/functions/wp_nonce_url/)`wp-includes/functions.php` |

Retrieves URL with nonce added to URL query.

  | 
| [add_filter()](https://developer.wordpress.org/reference/functions/add_filter/)`wp-includes/plugin.php` |

Adds a callback function to a filter hook.

  | 
| [remove_filter()](https://developer.wordpress.org/reference/functions/remove_filter/)`wp-includes/plugin.php` |

Removes a callback function from a filter hook.

  |

[Show 7 more](https://developer.wordpress.org/reference/functions/wp_link_manager_disabled_message/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/wp_link_manager_disabled_message/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_link_manager_disabled_message/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.5.0](https://developer.wordpress.org/reference/since/3.5.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_link_manager_disabled_message%2F)
before being able to contribute a note or feedback.