Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: term_updated_messages

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
275      0 => '', // Unused. Messages start at index 1.
276      1 => __( 'Tag added.' ),
277      2 => __( 'Tag deleted.' ),
278      3 => __( 'Tag updated.' ),
279      4 => __( 'Tag not added.' ),
280      5 => __( 'Tag not updated.' ),
281      6 => __( 'Tags deleted.' )
282 );
283
284 $messages = apply_filters( 'term_updated_messages', $messages );
285
286 $message = false;
287 if ( isset( $_REQUEST['message'] ) && ( $msg = (int) $_REQUEST['message'] ) ) {
288      if ( isset( $messages[ $taxonomy ][ $msg ] ) )
289           $message = $messages[ $taxonomy ][ $msg ];
290      elseif ( ! isset( $messages[ $taxonomy ] ) && isset( $messages['_item'][ $msg ] ) )
291           $message = $messages['_item'][ $msg ];
292 }
293