the_meta_key
Filters the HTML output of the li element in the post custom fields list.
Usage
add_filter( 'the_meta_key', 'wp_kama_the_meta_key_filter', 10, 3 );
/**
* Function for `the_meta_key` filter-hook.
*
* @param string $html The HTML output for the li element.
* @param string $key Meta key.
* @param string $value Meta value.
*
* @return string
*/
function wp_kama_the_meta_key_filter( $html, $key, $value ){
// filter...
return $html;
}
- $html(string)
- The HTML output for the li element.
- $key(string)
- Meta key.
- $value(string)
- Meta value.
Changelog
| Since 2.2.0 | Introduced. |
Where the hook is called
the_meta_key
wp-includes/post-template.php 1158
$li_html .= apply_filters( 'the_meta_key', $html, $key, $value );