Merged in feature/81-dev-dev01 (pull request #5)
auto-patch 81-dev-dev01-2023-12-05T22_45_26 * auto-patch 81-dev-dev01-2023-12-05T22_45_26
This commit is contained in:
@@ -100,8 +100,6 @@ class WP_Widget_Archives extends WP_Widget {
|
||||
$label = __( 'Select Post' );
|
||||
break;
|
||||
}
|
||||
|
||||
$type_attr = current_theme_supports( 'html5', 'script' ) ? '' : ' type="text/javascript"';
|
||||
?>
|
||||
|
||||
<option value=""><?php echo esc_html( $label ); ?></option>
|
||||
@@ -109,8 +107,8 @@ class WP_Widget_Archives extends WP_Widget {
|
||||
|
||||
</select>
|
||||
|
||||
<script<?php echo $type_attr; ?>>
|
||||
/* <![CDATA[ */
|
||||
<?php ob_start(); ?>
|
||||
<script>
|
||||
(function() {
|
||||
var dropdown = document.getElementById( "<?php echo esc_js( $dropdown_id ); ?>" );
|
||||
function onSelectChange() {
|
||||
@@ -120,9 +118,9 @@ class WP_Widget_Archives extends WP_Widget {
|
||||
}
|
||||
dropdown.onchange = onSelectChange;
|
||||
})();
|
||||
/* ]]> */
|
||||
</script>
|
||||
<?php
|
||||
wp_print_inline_script_tag( wp_remove_surrounding_empty_script_tags( ob_get_clean() ) );
|
||||
} else {
|
||||
$format = current_theme_supports( 'html5', 'navigation-widgets' ) ? 'html5' : 'xhtml';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user