id = $id; $this->link = $link; } /** * Presents the Premium Badge. If a link has been passed, the badge is presented with the link. * Otherwise a static badge is presented. * * @return string The styled Premium Badge. */ public function present() { if ( $this->link !== '' ) { return \sprintf( '%3$s', \esc_attr( $this->id ), \esc_url( $this->link ), 'Premium' // We don't want this string to be translatable. ); } return \sprintf( '%2$s', \esc_attr( $this->id ), 'Premium' // We don't want this string to be translatable. ); } }