Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: delete_{$meta_type}_metadata_by_mid

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1011       *  - `delete_comment_metadata_by_mid`
1012       *  - `delete_term_metadata_by_mid`
1013       *  - `delete_user_metadata_by_mid`
1014       *
1015       * @since 5.0.0
1016       *
1017       * @param null|bool $delete  Whether to allow metadata deletion of the given type.
1018       * @param int       $meta_id Meta ID.
1019       */
1020      $check = apply_filters( "delete_{$meta_type}_metadata_by_mid", null, $meta_id );
1021      if ( null !== $check ) {
1022           return (bool) $check;
1023      }
1024
1025      // Fetch the meta and go on if it's found.
1026      $meta = get_metadata_by_mid( $meta_type, $meta_id );
1027      if ( $meta ) {
1028           $object_id = (int) $meta->{$column};
1029