Retrieves the name of the metadata table for the specified object type.
$typestringrequired
'post', 'comment', 'term', 'user', or any other object type with an associated meta table.function _get_meta_table( $type ) {
global $wpdb;
$table_name = $type . 'meta';
if ( empty( $wpdb->$table_name ) ) {
return false;
}
return $wpdb->$table_name;
}
| Version | Description |
|---|---|
| 2.9.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/_get_meta_table