File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
plugins/dominant-color-images Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -221,13 +221,13 @@ function dominant_color_admin_script(): void {
221
221
<script type="module">
222
222
const tmpl = document.getElementById( 'tmpl-attachment' );
223
223
if ( tmpl ) {
224
- tmpl.textContent = tmpl.textContent.replace( /^\s*<div[^>]*?(?=>)/, ( match ) => {
225
- let replaced = match.replace( /\sclass="/, " class=\"{{ data.hasTransparency ? \'has-transparency\' : \'not-transparent\' }} " );
226
- replaced += ' data-dominant-color="{{ data.dominantColor }}"';
227
- replaced += ' data-has-transparency="{{ data.hasTransparency }}"';
228
- replaced += ' style="--dominant-color: #{{ data.dominantColor }};"'; // TODO: Potentially there could be a style attribute as well!
229
- return replaced;
230
- } );
224
+ tmpl.textContent = tmpl.textContent.replace( /^\s*<div[^>]*?(?=>)/, ( match ) => {
225
+ let replaced = match.replace( /\sclass="/, " class=\"{{ data.hasTransparency ? \'has-transparency\' : \'not-transparent\' }} " );
226
+ replaced += ' data-dominant-color="{{ data.dominantColor }}"';
227
+ replaced += ' data-has-transparency="{{ data.hasTransparency }}"';
228
+ replaced += ' style="--dominant-color: #{{ data.dominantColor }};"'; // TODO: Potentially there could be a style attribute as well!
229
+ return replaced;
230
+ } );
231
231
}
232
232
</script>
233
233
<?php
You can’t perform that action at this time.
0 commit comments