Skip to content

Commit fb653d7

Browse files
[#148] Fixing some small bugs
1 parent 6e7f815 commit fb653d7

File tree

4 files changed

+35
-34
lines changed

4 files changed

+35
-34
lines changed

wp-content/themes/wp-starter/blocks/dialog/block.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"attributes": {
1010
"align": {
1111
"type": "string",
12-
"default": "full"
12+
"default": "wide"
1313
}
1414
},
1515
"supports": {

wp-content/themes/wp-starter/blocks/dialog/editor.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313

1414
.acfbt-dialog-label {
15-
@apply block cursor-pointer;
15+
@apply mb-24 block cursor-pointer;
1616
}
1717

1818
.acfbt-dialog-checkbox {

wp-content/themes/wp-starter/blocks/dialog/render.php

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -35,39 +35,39 @@
3535
<?php endif; ?>
3636
>
3737

38-
<dialog
39-
<?php block_attrs( $block ); ?>
40-
<?php if ( ! is_admin() ) : ?>
41-
x-ref="dialogRef"
42-
@keydown.escape.prevent="handleDialogClose()"
43-
@click="handleDialogClick(event)"
44-
<?php endif; ?>
45-
>
46-
<?php if ( ! is_admin() ) : ?>
47-
<button
48-
class="acf-dialog-close"
49-
@click="handleDialogClose()"
50-
>
51-
<span class="sr-only"><?php esc_html_e( 'Close', 'wp-site-starter' ); ?></span>
52-
</button>
53-
<?php endif; ?>
54-
55-
<div class="inner">
56-
<?php if ( is_admin() ) : ?>
57-
<label for="<?php echo esc_attr( $cbx_id ); ?>" class="acfbt-dialog-close">
38+
<dialog
39+
<?php block_attrs( $block ); ?>
40+
<?php if ( ! is_admin() ) : ?>
41+
x-ref="dialogRef"
42+
@keydown.escape.prevent="handleDialogClose()"
43+
@click="handleDialogClick(event)"
44+
<?php endif; ?>
45+
>
46+
<?php if ( ! is_admin() ) : ?>
47+
<button
48+
class="acf-dialog-close"
49+
@click="handleDialogClose()"
50+
>
5851
<span class="sr-only"><?php esc_html_e( 'Close', 'wp-site-starter' ); ?></span>
59-
</label>
52+
</button>
6053
<?php endif; ?>
61-
<?php inner_blocks(); ?>
62-
</div>
63-
</dialog>
6454

65-
<button
66-
class="btn-default"
67-
<?php if ( ! is_admin() ) : ?>
68-
@click="$refs.dialogRef.showModal(), openDialog = true"
69-
<?php endif; ?>
70-
>
71-
<?php esc_html_e( $button_text ? $button_text : 'Open', 'wp-site-starter' ); ?>
72-
</button>
55+
<div class="inner">
56+
<?php if ( is_admin() ) : ?>
57+
<label for="<?php echo esc_attr( $cbx_id ); ?>" class="acfbt-dialog-close">
58+
<span class="sr-only"><?php esc_html_e( 'Close', 'wp-site-starter' ); ?></span>
59+
</label>
60+
<?php endif; ?>
61+
<?php inner_blocks(); ?>
62+
</div>
63+
</dialog>
64+
65+
<button
66+
class="btn-default"
67+
<?php if ( ! is_admin() ) : ?>
68+
@click="$refs.dialogRef.showModal(), openDialog = true"
69+
<?php endif; ?>
70+
>
71+
<?php esc_html_e( $button_text ? $button_text : 'Open', 'wp-site-starter' ); ?>
72+
</button>
7373
</div>

wp-content/themes/wp-starter/blocks/dialog/render.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
</div>
5858
</dialog>
5959

60+
6061
<button
6162
class="btn-default"
6263
{% if function('is_admin') == false %}

0 commit comments

Comments
 (0)