id = $id; $this->help_button_text = $help_button_text; $this->help_content = $help_content; $this->wrapper = $wrapper; } /** * Returns the html for the Help Button. * * @return string */ public function get_button_html() { if ( ! $this->id || ! $this->help_button_text || ! $this->help_content ) { return ''; } return sprintf( ' ', esc_attr( $this->id ), $this->help_button_text ); } /** * Returns the html for the Help Panel. * * @return string */ public function get_panel_html() { if ( ! $this->id || ! $this->help_button_text || ! $this->help_content ) { return ''; } $wrapper_start = ''; $wrapper_end = ''; if ( $this->wrapper === 'has-wrapper' ) { $wrapper_start = '
%3$s
%4$s', $wrapper_start, esc_attr( $this->id ), $this->help_content, $wrapper_end ); } }