# Generate the label from a message, if possible
if ( isset( $info['buttonlabel-message'] ) ) {
- $msgInfo = $info['buttonlabel-message'];
-
- if ( is_array( $msgInfo ) ) {
- $msg = array_shift( $msgInfo );
- } else {
- $msg = $msgInfo;
- $msgInfo = [];
- }
-
- $this->buttonLabel = $this->msg( $msg, $msgInfo )->parse();
+ $this->buttonLabel = $this->getMessage( $info['buttonlabel-message'] )->parse();
} elseif ( isset( $info['buttonlabel'] ) ) {
if ( $info['buttonlabel'] === ' ' ) {
// Apparently some things set   directly and in an odd format