maybe_disable_link_manager

Advertisement

Summery Summery

Disables the Link Manager on upgrade if, at the time of upgrade, no links exist in the DB.

Syntax Syntax

maybe_disable_link_manager()

Source 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 );
	}
}

Advertisement

Changelog Changelog

Changelog
Version Description
3.5.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.