maybe_disable_link_manager

The timeline below displays how wordpress function maybe_disable_link_manager has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.3

/**
 * Disables the Link Manager on upgrade if, at the time of upgrade, no links exist in the DB.
 *
 * @since 3.5.0
 *
 * @global int  $wp_current_db_version The old (current) database version.
 * @global wpdb $wpdb                  WordPress database abstraction object.
 */
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);
    }
}

WordPress Version: 4.4

/**
 * Disables the Link Manager on upgrade if, at the time of upgrade, no links exist in the DB.
 *
 * @since 3.5.0
 *
 * @global int  $wp_current_db_version
 * @global wpdb $wpdb WordPress database abstraction object.
 */
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);
    }
}

WordPress Version: 4.3

/**
 * Disables the Link Manager on upgrade if, at the time of upgrade, no links exist in the DB.
 *
 * @since 3.5.0
 *
 * @global int  $wp_current_db_version
 * @global wpdb $wpdb
 */
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);
    }
}

WordPress Version: 4.2

/**
 * Disables the Link Manager on upgrade if, at the time of upgrade, no links exist in the DB.
 *
 * @since 3.5.0
 */
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);
    }
}

WordPress Version: 3.7

/**
 * Disables the Link Manager on upgrade, if at the time of upgrade, no links exist in the DB.
 *
 * @since 3.5.0
 */
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);
    }
}