WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
815 | * - `get_comment_metadata_by_mid` |
816 | * - `get_term_metadata_by_mid` |
817 | * - `get_user_metadata_by_mid` |
818 | * |
819 | * @since 5.0.0 |
820 | * |
821 | * @param stdClass|null $value The value to return. |
822 | * @param int $meta_id Meta ID. |
823 | */ |
824 | $check = apply_filters( "get_{$meta_type}_metadata_by_mid", null, $meta_id ); |
825 | if ( null !== $check ) { |
826 | return $check; |
827 | } |
828 |
|
829 | $id_column = ( 'user' === $meta_type ) ? 'umeta_id' : 'meta_id'; |
830 |
|
831 | $meta = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $table WHERE $id_column = %d", $meta_id ) ); |
832 |
|
833 | if ( empty( $meta ) ) { |