mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-16 04:22:37 +00:00
19 lines
422 B
PHP
19 lines
422 B
PHP
|
<?php
|
||
|
|
||
|
class NodeHorizontalGroupSanitizer extends NodeSanitizer implements NodeTypeSanitizerInterface {
|
||
|
/**
|
||
|
* @param $data
|
||
|
* @return mixed
|
||
|
*/
|
||
|
public function sanitize( $data ) {
|
||
|
foreach ( $data[ 'labels' ] as $key => $label ) {
|
||
|
$sanitizedLabel = $this->sanitizeElementData( $label, '<a>' );
|
||
|
if ( !empty( $sanitizedLabel ) ) {
|
||
|
$data[ 'labels' ][ $key ] = $sanitizedLabel;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return $data;
|
||
|
}
|
||
|
}
|