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