255 | | $messages[1] = __('Item added.'); |
256 | | $messages[2] = __('Item deleted.'); |
257 | | $messages[3] = __('Item updated.'); |
258 | | $messages[4] = __('Item not added.'); |
259 | | $messages[5] = __('Item not updated.'); |
260 | | $messages[6] = __('Items deleted.'); |
| 255 | $messages = array(); |
| 256 | $messages['_item'] = array( |
| 257 | 0 => '', // Unused. Messages start at index 1. |
| 258 | 1 => __( 'Item added.' ), |
| 259 | 2 => __( 'Item deleted.' ), |
| 260 | 3 => __( 'Item updated.' ), |
| 261 | 4 => __( 'Item not added.' ), |
| 262 | 5 => __( 'Item not updated.' ), |
| 263 | 6 => __( 'Items deleted.' ) |
| 264 | ); |
| 265 | $messages['category'] = array( |
| 266 | 0 => '', // Unused. Messages start at index 1. |
| 267 | 1 => __( 'Category added.' ), |
| 268 | 2 => __( 'Category deleted.' ), |
| 269 | 3 => __( 'Category updated.' ), |
| 270 | 4 => __( 'Category not added.' ), |
| 271 | 5 => __( 'Category not updated.' ), |
| 272 | 6 => __( 'Categories deleted.' ) |
| 273 | ); |
| 274 | $messages['link_category'] = array( |
| 275 | 0 => '', // Unused. Messages start at index 1. |
| 276 | 1 => __( 'Category added.' ), |
| 277 | 2 => __( 'Category deleted.' ), |
| 278 | 3 => __( 'Category updated.' ), |
| 279 | 4 => __( 'Category not added.' ), |
| 280 | 5 => __( 'Category not updated.' ), |
| 281 | 6 => __( 'Categories deleted.' ) |
| 282 | ); |
| 283 | $messages['post_tag'] = array( |
| 284 | 0 => '', // Unused. Messages start at index 1. |
| 285 | 1 => __( 'Tag added.' ), |
| 286 | 2 => __( 'Tag deleted.' ), |
| 287 | 3 => __( 'Tag updated.' ), |
| 288 | 4 => __( 'Tag not added.' ), |
| 289 | 5 => __( 'Tag not updated.' ), |
| 290 | 6 => __( 'Tags deleted.' ) |
| 291 | ); |
| 292 | |
| 293 | $messages = apply_filters( 'term_updated_messages', $messages ); |
| 294 | |
| 295 | $message = false; |
| 296 | if ( isset( $_REQUEST['message'] ) && ( $msg = (int) $_REQUEST['message'] ) ) { |
| 297 | if ( isset( $messages[$taxonomy][$msg] ) ) |
| 298 | $message = $messages[$taxonomy][$msg]; |
| 299 | elseif ( ! isset( $messages[$taxonomy] ) && isset( $messages['_item'][$msg] ) ) |
| 300 | $message = $messages['_item'][$msg]; |
| 301 | } |