Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: update_{$meta_type}_metadata_cache

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
1033       * The dynamic portion of the hook, `$meta_type`, refers to the meta object type
1034       * (post, comment, term, user, or any other type with an associated meta table).
1035       * Returning a non-null value will effectively short-circuit the function.
1036       *
1037       * @since 5.0.0
1038       *
1039       * @param mixed $check      Whether to allow updating the meta cache of the given type.
1040       * @param int[] $object_ids Array of object IDs to update the meta cache for.
1041       */
1042      $check = apply_filters( "update_{$meta_type}_metadata_cache", null, $object_ids );
1043      if ( null !== $check ) {
1044           return (bool) $check;
1045      }
1046
1047      $cache_key      = $meta_type . '_meta';
1048      $non_cached_ids = array();
1049      $cache          = array();
1050      $cache_values   = wp_cache_get_multiple( $object_ids, $cache_key );
1051