/wp-admin/includes/edit-tag-messages.php

  1. <?php 
  2. /** 
  3. * Edit Tags Administration: Messages 
  4. * 
  5. * @package WordPress 
  6. * @subpackage Administration 
  7. * @since 4.4.0 
  8. */ 
  9.  
  10. $messages = array(); 
  11. // 0 = unused. Messages start at index 1. 
  12. $messages['_item'] = array( 
  13. 0 => '',  
  14. 1 => __( 'Item added.' ),  
  15. 2 => __( 'Item deleted.' ),  
  16. 3 => __( 'Item updated.' ),  
  17. 4 => __( 'Item not added.' ),  
  18. 5 => __( 'Item not updated.' ),  
  19. 6 => __( 'Items deleted.' ),  
  20. ); 
  21.  
  22. $messages['category'] = array( 
  23. 0 => '',  
  24. 1 => __( 'Category added.' ),  
  25. 2 => __( 'Category deleted.' ),  
  26. 3 => __( 'Category updated.' ),  
  27. 4 => __( 'Category not added.' ),  
  28. 5 => __( 'Category not updated.' ),  
  29. 6 => __( 'Categories deleted.' ),  
  30. ); 
  31.  
  32. $messages['post_tag'] = array( 
  33. 0 => '',  
  34. 1 => __( 'Tag added.' ),  
  35. 2 => __( 'Tag deleted.' ),  
  36. 3 => __( 'Tag updated.' ),  
  37. 4 => __( 'Tag not added.' ),  
  38. 5 => __( 'Tag not updated.' ),  
  39. 6 => __( 'Tags deleted.' ),  
  40. ); 
  41.  
  42. /** 
  43. * Filters the messages displayed when a tag is updated. 
  44. * 
  45. * @since 3.7.0 
  46. * 
  47. * @param array $messages The messages to be displayed. 
  48. */ 
  49. $messages = apply_filters( 'term_updated_messages', $messages ); 
  50.  
  51. $message = false; 
  52. if ( isset( $_REQUEST['message'] ) && ( $msg = (int) $_REQUEST['message'] ) ) { 
  53. if ( isset( $messages[ $taxonomy ][ $msg ] ) ) { 
  54. $message = $messages[ $taxonomy ][ $msg ]; 
  55. } elseif ( ! isset( $messages[ $taxonomy ] ) && isset( $messages['_item'][ $msg ] ) ) { 
  56. $message = $messages['_item'][ $msg ]; 
.