Render 'safe_text' settings as 'text' inputs (#37154)
This commit is contained in:
commit
4cbb607631
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: minor
|
||||||
|
Type: tweak
|
||||||
|
|
||||||
|
Make sure 'safe_text' settings are rendered as 'text' inputs for compatibility.
|
|
@ -458,6 +458,20 @@ abstract class WC_Settings_API {
|
||||||
return ob_get_clean();
|
return ob_get_clean();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates HTML for the 'safe_text' input type (mostly used for gateway-related settings).
|
||||||
|
*
|
||||||
|
* @param string $key Field key.
|
||||||
|
* @param array $data Field data.
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 7.6.0
|
||||||
|
*/
|
||||||
|
public function generate_safe_text_html( $key, $data ) {
|
||||||
|
$data['type'] = 'text';
|
||||||
|
return $this->generate_text_html( $key, $data );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate Price Input HTML.
|
* Generate Price Input HTML.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue