Skip to content

Commit

Permalink
Fix double quote issue in #1088
Browse files Browse the repository at this point in the history
Closes #1088, #1089
  • Loading branch information
danieliser committed Jan 29, 2025
1 parent 7757a54 commit 17a4cf8
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions templates/popup.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,19 @@
* @copyright Copyright (c) 2024, Code Atlantic LLC
*/

$labelledby = pum_get_popup_title() !== '' ? 'aria-labelledby="pum_popup_title_' . pum_get_popup_id() . '"' : '';
$has_title = pum_get_popup_title() !== '';

?>
<div id="pum-<?php pum_popup_ID(); ?>" role="dialog" aria-modal="false" <?php echo esc_attr( $labelledby ); ?> class="<?php pum_popup_classes(); ?>" <?php pum_popup_data_attr(); ?>>
<div
id="pum-<?php pum_popup_ID(); ?>"
role="dialog"
aria-modal="false"
<?php if ( $has_title ) : ?>
aria-labelledby="pum_popup_title_<?php pum_popup_ID(); ?>"
<?php endif; ?>
class="<?php pum_popup_classes(); ?>"
<?php pum_popup_data_attr(); ?>
>

<div id="popmake-<?php pum_popup_ID(); ?>" class="<?php pum_popup_classes( null, 'container' ); ?>">

Expand All @@ -21,7 +30,7 @@
* Render the title if not empty.
*/
?>
<?php if ( pum_get_popup_title() !== '' ) : ?>
<?php if ( $has_title ) : ?>
<div id="pum_popup_title_<?php pum_popup_ID(); ?>" class="<?php pum_popup_classes( null, 'title' ); ?>">
<?php pum_popup_title(); ?>
</div>
Expand Down

0 comments on commit 17a4cf8

Please sign in to comment.