Skip to content

Commit

Permalink
Add custom elements & attributes to mt_kses_elements
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Dec 18, 2023
1 parent 42b2c46 commit 8d088de
Showing 1 changed file with 43 additions and 32 deletions.
75 changes: 43 additions & 32 deletions src/my-tickets.php
Original file line number Diff line number Diff line change
Expand Up @@ -1117,17 +1117,17 @@ function mt_check_permissions() {
*/
function mt_kses_elements() {
$elements = array(
'h2' => array(),
'h3' => array(),
'h4' => array(),
'label' => array(
'h2' => array(),
'h3' => array(),
'h4' => array(),
'label' => array(
'for' => array(),
),
'option' => array(
'option' => array(
'value' => array(),
'selected' => array(),
),
'select' => array(
'select' => array(
'id' => array(),
'aria-describedby' => array(),
'aria-labelledby' => array(),
Expand All @@ -1139,7 +1139,18 @@ function mt_kses_elements() {
'readonly' => array(),
'autocomplete' => array(),
),
'input' => array(
'duet-date-picker' => array(
'identifier' => array(),
'first-day-of-week' => array(),
'name' => array(),
'value' => array(),
'required' => array(),
),
'label' => array(
'for' => array(),
'class' => array(),
),
'input' => array(
'id' => array(),
'class' => array(),
'aria-describedby' => array(),
Expand All @@ -1158,7 +1169,7 @@ function mt_kses_elements() {
'step' => array(),
'placeholder' => array(),
),
'textarea' => array(
'textarea' => array(
'id' => array(),
'class' => array(),
'cols' => array(),
Expand All @@ -1170,14 +1181,14 @@ function mt_kses_elements() {
'readonly' => array(),
'name' => array(),
),
'form' => array(
'form' => array(
'id' => array(),
'name' => array(),
'action' => array(),
'method' => array(),
'class' => array(),
),
'button' => array(
'button' => array(
'name' => array(),
'disabled' => array(),
'type' => array(),
Expand All @@ -1191,15 +1202,15 @@ function mt_kses_elements() {
'data-ticket' => array(),
'data-payment' => array(),
),
'ul' => array(
'ul' => array(
'class' => array(),
),
'fieldset' => array(),
'legend' => array(),
'li' => array(
'fieldset' => array(),
'legend' => array(),
'li' => array(
'class' => array(),
),
'span' => array(
'span' => array(
'id' => array(),
'class' => array(),
'itemprop' => array(),
Expand All @@ -1208,29 +1219,29 @@ function mt_kses_elements() {
'aria-live' => array(),
'aria-hidden' => array(),
),
'strong' => array(
'strong' => array(
'id' => array(),
'class' => array(),
),
'code' => array(
'code' => array(
'id' => array(),
'class' => array(),
),
'p' => array(
'p' => array(
'class' => array(),
),
'em' => array(
'em' => array(
'id' => array(),
),
'div' => array(
'div' => array(
'class' => array(),
'aria-live' => array(),
'id' => array(),
'role' => array(),
'data-default' => array(),
'aria-labelledby' => array(),
),
'img' => array(
'img' => array(
'class' => true,
'src' => true,
'alt' => true,
Expand All @@ -1240,36 +1251,36 @@ function mt_kses_elements() {
'longdesc' => true,
'tabindex' => true,
),
'br' => array(),
'table' => array(
'br' => array(),
'table' => array(
'class' => array(),
'id' => array(),
),
'caption' => array(),
'thead' => array(),
'tfoot' => array(),
'tbody' => array(),
'tr' => array(
'caption' => array(),
'thead' => array(),
'tfoot' => array(),
'tbody' => array(),
'tr' => array(
'class' => array(),
'id' => array(),
),
'th' => array(
'th' => array(
'scope' => array(),
'class' => array(),
'id' => array(),
),
'td' => array(
'td' => array(
'class' => array(),
'id' => array(),
'aria-live' => array(),
),
'a' => array(
'a' => array(
'aria-labelledby' => true,
'aria-describedby' => true,
'href' => true,
'class' => true,
),
'pre' => array(),
'pre' => array(),
);

return $elements;
Expand Down

0 comments on commit 8d088de

Please sign in to comment.