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 |
---|---|
619 | * The dynamic portion of the hook, `$meta_type`, refers to the meta |
620 | * object type (comment, post, term, or user). Returning a non-null value |
621 | * will effectively short-circuit the function. |
622 | * |
623 | * @since 5.0.0 |
624 | * |
625 | * @param mixed $value The value get_metadata_by_mid() should return. |
626 | * @param int $meta_id Meta ID. |
627 | */ |
628 | $check = apply_filters( "get_{$meta_type}_metadata_by_mid", null, $meta_id ); |
629 | if ( null !== $check ) { |
630 | return $check; |
631 | } |
632 |
|
633 | $meta = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $table WHERE $id_column = %d", $meta_id ) ); |
634 |
|
635 | if ( empty( $meta ) ) { |
636 | return false; |
637 | } |