_get_meta_table

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

WordPress Version: 5.4

/**
 * Retrieves the name of the metadata table for the specified object type.
 *
 * @since 2.9.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string $type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
 *                     or any other object type with an associated meta table.
 * @return string|false Metadata table name, or false if no metadata table exists
 */
function _get_meta_table($type)
{
    global $wpdb;
    $table_name = $type . 'meta';
    if (empty($wpdb->{$table_name})) {
        return false;
    }
    return $wpdb->{$table_name};
}

WordPress Version: 9.9

/**
 * Retrieve the name of the metadata table for the specified object type.
 *
 * @since 2.9.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string $type Type of object to get metadata table for (e.g., comment, post, term, or user).
 * @return string|false Metadata table name, or false if no metadata table exists
 */
function _get_meta_table($type)
{
    global $wpdb;
    $table_name = $type . 'meta';
    if (empty($wpdb->{$table_name})) {
        return false;
    }
    return $wpdb->{$table_name};
}

WordPress Version: 9.3

/**
 * Retrieve the name of the metadata table for the specified object type.
 *
 * @since 2.9.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string $type Type of object to get metadata table for (e.g., comment, post, or user)
 * @return string|false Metadata table name, or false if no metadata table exists
 */
function _get_meta_table($type)
{
    global $wpdb;
    $table_name = $type . 'meta';
    if (empty($wpdb->{$table_name})) {
        return false;
    }
    return $wpdb->{$table_name};
}

WordPress Version: .20

/**
 * Retrieve the name of the metadata table for the specified object type.
 *
 * @since 2.9.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string $type Type of object to get metadata table for (e.g., comment, post, term, or user).
 * @return string|false Metadata table name, or false if no metadata table exists
 */
function _get_meta_table($type)
{
    global $wpdb;
    $table_name = $type . 'meta';
    if (empty($wpdb->{$table_name})) {
        return false;
    }
    return $wpdb->{$table_name};
}

WordPress Version: 9.2

/**
 * Retrieve the name of the metadata table for the specified object type.
 *
 * @since 2.9.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string $type Type of object to get metadata table for (e.g., comment, post, or user)
 * @return string|false Metadata table name, or false if no metadata table exists
 */
function _get_meta_table($type)
{
    global $wpdb;
    $table_name = $type . 'meta';
    if (empty($wpdb->{$table_name})) {
        return false;
    }
    return $wpdb->{$table_name};
}

WordPress Version: .10

/**
 * Retrieve the name of the metadata table for the specified object type.
 *
 * @since 2.9.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string $type Type of object to get metadata table for (e.g., comment, post, term, or user).
 * @return string|false Metadata table name, or false if no metadata table exists
 */
function _get_meta_table($type)
{
    global $wpdb;
    $table_name = $type . 'meta';
    if (empty($wpdb->{$table_name})) {
        return false;
    }
    return $wpdb->{$table_name};
}

WordPress Version: 4.3

/**
 * Retrieve the name of the metadata table for the specified object type.
 *
 * @since 2.9.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string $type Type of object to get metadata table for (e.g., comment, post, or user)
 * @return string|false Metadata table name, or false if no metadata table exists
 */
function _get_meta_table($type)
{
    global $wpdb;
    $table_name = $type . 'meta';
    if (empty($wpdb->{$table_name})) {
        return false;
    }
    return $wpdb->{$table_name};
}

WordPress Version: 4.1

/**
 * Retrieve the name of the metadata table for the specified object type.
 *
 * @since 2.9.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string $type Type of object to get metadata table for (e.g., comment, post, or user)
 * @return mixed Metadata table name, or false if no metadata table exists
 */
function _get_meta_table($type)
{
    global $wpdb;
    $table_name = $type . 'meta';
    if (empty($wpdb->{$table_name})) {
        return false;
    }
    return $wpdb->{$table_name};
}

WordPress Version: 3.7

/**
 * Retrieve the name of the metadata table for the specified object type.
 *
 * @since 2.9.0
 * @uses $wpdb WordPress database object for queries.
 *
 * @param string $type Type of object to get metadata table for (e.g., comment, post, or user)
 * @return mixed Metadata table name, or false if no metadata table exists
 */
function _get_meta_table($type)
{
    global $wpdb;
    $table_name = $type . 'meta';
    if (empty($wpdb->{$table_name})) {
        return false;
    }
    return $wpdb->{$table_name};
}