maybe_disable_link_manager() WordPress Function
The maybe_disable_link_manager() function is a utility function that allows you to conditionally disable the link manager in WordPress. This can be useful if you want to disable the link manager on a site that doesn't need it, or if you want to disable the link manager on a development site.
maybe_disable_link_manager() #
Disables the Link Manager on upgrade if, at the time of upgrade, no links exist in the DB.
Source
File: wp-admin/includes/upgrade.php
function maybe_disable_link_manager() { global $wp_current_db_version, $wpdb; if ( $wp_current_db_version >= 22006 && get_option( 'link_manager_enabled' ) && ! $wpdb->get_var( "SELECT link_id FROM $wpdb->links LIMIT 1" ) ) { update_option( 'link_manager_enabled', 0 ); } }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.5.0 | Introduced. |