| 51 | $messages = array(); |
| 52 | $messages['_item'] = array( |
| 53 | 0 => '', // Unused. Messages start at index 1. |
| 54 | 1 => __( 'Item added.' ), |
| 55 | 2 => __( 'Item deleted.' ), |
| 56 | 3 => __( 'Item updated.' ), |
| 57 | 4 => __( 'Item not added.' ), |
| 58 | 5 => __( 'Item not updated.' ), |
| 59 | 6 => __( 'Items deleted.' ) |
| 60 | ); |
| 61 | $messages['category'] = array( |
| 62 | 0 => '', // Unused. Messages start at index 1. |
| 63 | 1 => __( 'Category added.' ), |
| 64 | 2 => __( 'Category deleted.' ), |
| 65 | 3 => __( 'Category updated.' ), |
| 66 | 4 => __( 'Category not added.' ), |
| 67 | 5 => __( 'Category not updated.' ), |
| 68 | 6 => __( 'Categories deleted.' ) |
| 69 | ); |
| 70 | $messages['post_tag'] = array( |
| 71 | 0 => '', // Unused. Messages start at index 1. |
| 72 | 1 => __( 'Tag added.' ), |
| 73 | 2 => __( 'Tag deleted.' ), |
| 74 | 3 => __( 'Tag updated.' ), |
| 75 | 4 => __( 'Tag not added.' ), |
| 76 | 5 => __( 'Tag not updated.' ), |
| 77 | 6 => __( 'Tags deleted.' ) |
| 78 | ); |
| 79 | |
| 81 | * Filter the messages displayed when a tag is updated. |
| 82 | * |
| 83 | * @since 3.7.0 |
| 84 | * |
| 85 | * @param array $messages The messages to be displayed. |
| 86 | */ |
| 87 | $messages = apply_filters( 'term_updated_messages', $messages ); |
| 88 | |
| 89 | $message = false; |
| 90 | if ( isset( $_REQUEST['message'] ) && ( $msg = (int) $_REQUEST['message'] ) ) { |
| 91 | if ( isset( $messages[ $taxonomy ][ $msg ] ) ) |
| 92 | $message = $messages[ $taxonomy ][ $msg ]; |
| 93 | elseif ( ! isset( $messages[ $taxonomy ] ) && isset( $messages['_item'][ $msg ] ) ) |
| 94 | $message = $messages['_item'][ $msg ]; |
| 95 | } |
| 96 | /** |