Skip to content

Commit

Permalink
add escape on css
Browse files Browse the repository at this point in the history
  • Loading branch information
ptesei committed Jun 1, 2024
1 parent 87564f9 commit 38ae770
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .plugin-data
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "0.1.1",
"version": "0.1.2",
"slug": "mosne-dark-palette"
}
2 changes: 1 addition & 1 deletion mosne-dark-palette.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Description: Create and apply your dark palette in an accessibility-friendly manner using the new Interactivity API.
* Requires at least: 6.5
* Requires PHP: 7.4
* Version: 0.1.1
* Version: 0.1.2
* Author: Mosne
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mosne-dark-palette",
"version": "0.1.0",
"version": "0.1.2",
"description": "Create and apply your dark palette in an a11y friendly way using the new Interactivity API.",
"author": "mosne",
"license": "GPL-2s.0-or-later",
Expand Down
10 changes: 5 additions & 5 deletions src/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
foreach ( $attributes['darkColorsPalette'] as $color ) {
$dark_colors .= sprintf(
'--mosne-dark-palette-%s: %s;',
$color['slug'],
$color['color']
esc_attr( $color['slug'] ),
esc_attr( $color['color'] )
);
$colors .= sprintf(
'--wp--preset--color--%s: var(--mosne-dark-palette-%s, %s);',
$color['slug'],
$color['slug'],
$color['color']
esc_attr( $color['slug'] ),
esc_attr( $color['slug'] ),
esc_attr( $color['color'] )
);
}
}
Expand Down

0 comments on commit 38ae770

Please sign in to comment.