MonsterInsights_Skin

The Google Analytics for WordPress by MonsterInsights MonsterInsights Skin class.

Defined (1)

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

/includes/admin/licensing/skin.php  
  1. class MonsterInsights_Skin extends WP_Upgrader_Skin { 
  2.  
  3. /** 
  4. * Primary class constructor. 
  5. * @since 6.0.0 
  6. * @param array $args Empty array of args (we will use defaults). 
  7. */ 
  8. public function __construct( $args = array() ) { 
  9.  
  10. parent::__construct(); 
  11.  
  12.  
  13. /** 
  14. * Set the upgrader object and store it as a property in the parent class. 
  15. * @since 6.0.0 
  16. * @param object $upgrader The upgrader object (passed by reference). 
  17. */ 
  18. public function set_upgrader( &$upgrader ) { 
  19.  
  20. if ( is_object( $upgrader ) ) { 
  21. $this->upgrader =& $upgrader; 
  22.  
  23.  
  24. /** 
  25. * Set the upgrader result and store it as a property in the parent class. 
  26. * @since 6.0.0 
  27. * @param object $result The result of the install process. 
  28. */ 
  29. public function set_result( $result ) { 
  30.  
  31. $this->result = $result; 
  32.  
  33.  
  34. /** 
  35. * Empty out the header of its HTML content and only check to see if it has 
  36. * been performed or not. 
  37. * @since 6.0.0 
  38. */ 
  39. public function header() {} 
  40.  
  41. /** 
  42. * Empty out the footer of its HTML contents. 
  43. * @since 6.0.0 
  44. */ 
  45. function footer() {} 
  46.  
  47. /** 
  48. * Instead of outputting HTML for errors, json_encode the errors and send them 
  49. * back to the Ajax script for processing. 
  50. * @since 6.0.0 
  51. * @param array $errors Array of errors with the install process. 
  52. */ 
  53. function error( $errors ) { 
  54.  
  55. if ( ! empty( $errors ) ) { 
  56. echo json_encode( array( 'error' => esc_html__( 'There was an error installing the addon. Please try again.', 'google-analytics-for-wordpress' ) ) ); 
  57. die; 
  58.  
  59.  
  60. /** 
  61. * Empty out the feedback method to prevent outputting HTML strings as the install 
  62. * is progressing. 
  63. * @since 6.0.0 
  64. * @param string $string The feedback string. 
  65. */ 
  66. function feedback( $string ) { 
  67.  
  68.