message_room( $room_name, $from_name, "Plugin enabled successfully." ); if ( ! empty( $r ) ) { $successful = true; } } catch ( Anpbp_HipChat_Exception $e ) { // token must have failed } if ( $successful !== true ) { $error = __( 'Bad auth token or room name.', ANBPH_TEXTDOMAINN ); } else if ( empty( $from_name ) ) { $error = __( 'Please enter a "From Name"', ANBPH_TEXTDOMAIN ); } else if (strlen( $from_name ) > 15) { $error = __( 'From Name" must be less than 15 characters.', ANBPH_TEXTDOMAIN ); } else if ( empty( $room_name ) ) { $error = __( 'Please enter a "Room Name"', ANBPH_TEXTDOMAIN ); } else {; $updated = __( 'Settings saved! Auth token is valid and room exists.', ANBPH_TEXTDOMAIN ); } } ?>

'. $updated .'
'; } if ( ! empty( $error ) ) { echo '
'. $error .'
'; } _e( 'Click the button to check if the integration is okay. This will send a message ot the room.', ANBPH_TEXTDOMAIN ); submit_button( 'Check Integration', 'primary', 'anbph_check_integration' ); ?>