Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contributor attendance mode #369

Open
wants to merge 6 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
);
?>
/-->
<?php if ( $attendee->is_remote() ) : ?>
<!-- wp:wporg-translate-events-2024/remote-attendance-icon <?php echo wp_json_encode( array( 'inline_css' => 'margin-left: -8.8%; margin-top: 32px; color: var(--wp--preset--color--blueberry-1);' ) ); ?> /-->
<?php endif; ?>
<!-- wp:column -->
<div class="wp-block-column">
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ function ( Attendee $attendee ) {
);
?>
/-->
<?php if ( $contributor->is_remote() ) : ?>
<!-- wp:wporg-translate-events-2024/remote-attendance-icon <?php echo wp_json_encode( array( 'inline_css' => 'margin-left: -8.8%; margin-top: 32px; color: var(--wp--preset--color--blueberry-1);' ) ); ?> /-->
<?php endif; ?>
<!-- wp:column -->
<div class="wp-block-column">
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
namespace Wporg\TranslationEvents\Theme_2024;

register_block_type(
'wporg-translate-events-2024/remote-attendance-icon',
array(
// phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found
'render_callback' => function ( $attributes ) {
$inline_css = isset( $attributes['inline_css'] ) ? esc_attr( $attributes['inline_css'] ) : '';

return sprintf( '<span class="dashicons dashicons-video-alt2" style="%s"></span>', $inline_css );
},
)
);
1 change: 1 addition & 0 deletions themes/wporg-translate-events-2024/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ function register_blocks(): void {
include_once __DIR__ . '/blocks/pages/events/event-create/index.php';
include_once __DIR__ . '/blocks/event-form/index.php';
include_once __DIR__ . '/blocks/pages/events/event-edit/index.php';
include_once __DIR__ . '/blocks/remote-attendance-icon/index.php';
}

function register_patterns(): void {
Expand Down
Loading