KnowMyRankingsNotices

The KnowMyRankings KnowMyRankingsNotices class.

Defined (1)

The class is defined in the following location(s).

/includes/KnowMyRankingsNotices.php  
  1. class KnowMyRankingsNotices { 
  2.  
  3. function __construct() { 
  4.  
  5.  
  6. /** 
  7. * Show notice 
  8. *  
  9. */ 
  10.  
  11. public function show_notice( $message, $status = "updated" ) { 
  12.  
  13. if ( is_array( $message ) ) { 
  14.  
  15. $new_message = ""; 
  16.  
  17. foreach ( $message as $key => $value ) { 
  18.  
  19. $new_message .= "$key {$value[0]}<br/>";  
  20.  
  21. $message = $new_message; 
  22.  
  23. printf( "<div class=\"%s below-h2\"><p>%s</p></div>", $status, $message ); 
  24.  
  25.  
  26. /** 
  27. * Add URL error 
  28. *  
  29. */ 
  30.  
  31. public function add_url_error() { 
  32.  
  33. $this->show_notice( __( "Problem adding URL report", "know-my-rankings" ), "error" ); 
  34.  
  35.  
  36. /** 
  37. * Delete URL error 
  38. *  
  39. */ 
  40.  
  41. public function delete_url_error() { 
  42.  
  43. $this->show_notice( __( "Problem deleting URL report", "know-my-rankings" ), "error" ); 
  44.  
  45.  
  46. /** 
  47. * Delete keyword error 
  48. *  
  49. */ 
  50.  
  51. public function delete_keyword_error() { 
  52.  
  53. $this->show_notice( __( "Problem deleting keyword from URL report", "know-my-rankings" ), "error" ); 
  54.  
  55.  
  56. /** 
  57. * Installation Success 
  58. *  
  59. */ 
  60.  
  61. public function installation_success() { 
  62.  
  63. $this->show_notice( __( "The KnowMyRankings plugin installation was successful", "know-my-rankings" ) ); 
  64.