On this page
_get_meta_table( string $type ): string|false
Retrieves the name of the metadata table for the specified object type.
Parameters
$typestring Required-
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
Source
File: wp-includes/meta.php. View all references
function _get_meta_table( $type ) {
global $wpdb;
$table_name = $type . 'meta';
if ( empty( $wpdb->$table_name ) ) {
return false;
}
return $wpdb->$table_name;
}
Related
Used By
| Used By | Description |
|---|---|
| WP_Meta_Query::get_sql() wp-includes/class-wp-meta-query.php | Generates SQL clauses to be appended to a main query. |
| delete_metadata() wp-includes/meta.php | Deletes metadata for the specified object. |
| get_metadata_by_mid() wp-includes/meta.php | Retrieves metadata by meta ID. |
| update_metadata_by_mid() wp-includes/meta.php | Updates metadata by meta ID. |
| delete_metadata_by_mid() wp-includes/meta.php | Deletes metadata by meta ID. |
| update_meta_cache() wp-includes/meta.php | Updates the metadata cache for the specified objects. |
| add_metadata() wp-includes/meta.php | Adds metadata for the specified object. |
| update_metadata() wp-includes/meta.php | Updates metadata for the specified object. If no value already exists for the specified object ID and metadata key, the metadata will be added. |
Changelog
| Version | Description |
|---|---|
| 2.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/_get_meta_table