Plugin Updates
This commit is contained in:
@@ -70,8 +70,7 @@ function render_block_core_categories( $attributes ) {
|
||||
function build_dropdown_script_block_core_categories( $dropdown_id ) {
|
||||
ob_start();
|
||||
?>
|
||||
<script type='text/javascript'>
|
||||
/* <![CDATA[ */
|
||||
<script>
|
||||
( function() {
|
||||
var dropdown = document.getElementById( '<?php echo esc_js( $dropdown_id ); ?>' );
|
||||
function onCatChange() {
|
||||
@@ -81,10 +80,9 @@ function build_dropdown_script_block_core_categories( $dropdown_id ) {
|
||||
}
|
||||
dropdown.onchange = onCatChange;
|
||||
})();
|
||||
/* ]]> */
|
||||
</script>
|
||||
<?php
|
||||
return ob_get_clean();
|
||||
return wp_get_inline_script_tag( str_replace( array( '<script>', '</script>' ), '', ob_get_clean() ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user