-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add Video Layers on Frontend #14
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous scan continued.
$video_setup = wp_json_encode( | ||
array( | ||
'controls' => $controls, | ||
'autoplay' => $autoplay, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
array( | ||
'controls' => $controls, | ||
'autoplay' => $autoplay, | ||
'loop' => $loop, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'controls' => $controls, | ||
'autoplay' => $autoplay, | ||
'loop' => $loop, | ||
'muted' => $muted, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'autoplay' => $autoplay, | ||
'loop' => $loop, | ||
'muted' => $muted, | ||
'preload' => $preload, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'loop' => $loop, | ||
'muted' => $muted, | ||
'preload' => $preload, | ||
'poster' => $poster, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'muted' => $muted, | ||
'preload' => $preload, | ||
'poster' => $poster, | ||
'fluid' => true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'preload' => $preload, | ||
'poster' => $poster, | ||
'fluid' => true, | ||
'sources' => $sources, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'poster' => $poster, | ||
'fluid' => true, | ||
'sources' => $sources, | ||
'id' => $id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'fluid' => true, | ||
'sources' => $sources, | ||
'id' => $id, | ||
'easydam_meta' => $easydam_meta_data, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<?php endif; ?> | ||
|
||
<!-- Dynamically render shortcodes for form layers --> | ||
<?php if ( ! empty( $easydam_meta_data['layers'] ) ) : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Opening PHP tag must be on a line by itself (Squiz.PHP.EmbeddedPhp.ContentAfterOpen).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previous scan continued.
<!-- Dynamically render shortcodes for form layers --> | ||
<?php if ( ! empty( $easydam_meta_data['layers'] ) ) : | ||
foreach ( $easydam_meta_data['layers'] as $layer ) : | ||
if ( isset( $layer['type'] ) && $layer['type'] === 'form' && ! empty( $layer['gf_id'] ) ) : ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Use Yoda Condition checks, you must (WordPress.PHP.YodaConditions.NotYoda).
<!-- Dynamically render shortcodes for form layers --> | ||
<?php if ( ! empty( $easydam_meta_data['layers'] ) ) : | ||
foreach ( $easydam_meta_data['layers'] as $layer ) : | ||
if ( isset( $layer['type'] ) && $layer['type'] === 'form' && ! empty( $layer['gf_id'] ) ) : ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Closing PHP tag must be on a line by itself (Squiz.PHP.EmbeddedPhp.ContentBeforeEnd).
if ( isset( $layer['type'] ) && $layer['type'] === 'form' && ! empty( $layer['gf_id'] ) ) : ?> | ||
<div id="layer-<?php echo esc_attr( $layer['id'] ); ?>" class="easydam-layer hidden"> | ||
<?php | ||
echo do_shortcode( sprintf( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Opening parenthesis of a multi-line function call must be the last content on the line (PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket).
echo do_shortcode( sprintf( | ||
"[gravityform id='%d' title='false' description='false' ajax='true']", | ||
intval( $layer['gf_id'] ) | ||
) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Closing parenthesis of a multi-line function call must be on a line by itself (PEAR.Functions.FunctionCallSignature.CloseBracketLine).
) ); | ||
?> | ||
</div> | ||
<?php elseif ( isset( $layer['type'] ) && $layer['type'] === 'cta' ) : ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Use Yoda Condition checks, you must (WordPress.PHP.YodaConditions.NotYoda).
<!-- Add sample button for now --> | ||
<button class="cta-button">Call To Action</button> | ||
</div> | ||
<?php endif; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Opening PHP tag must be on a line by itself (Squiz.PHP.EmbeddedPhp.ContentAfterOpen).
</div> | ||
<?php endif; | ||
endforeach; | ||
endif; ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Closing PHP tag must be on a line by itself (Squiz.PHP.EmbeddedPhp.ContentBeforeEnd).
endif; ?> | ||
</div> | ||
</figure> | ||
<?php endif; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 Error: Opening PHP tag must be on a line by itself (Squiz.PHP.EmbeddedPhp.ContentAfterOpen).
GitHub API communication error. Please contact a human. (commit-ID: bac1a68). |
Dismissing review as all inline comments are obsolete by now
@@ -37,9 +37,9 @@ | |||
The minimum version set here should be in line with the minimum WP version | |||
as set in the "Requires at least" tag in the readme.txt file. --> | |||
<rule ref="WordPress.WP.DeprecatedFunctions"> | |||
<properties> | |||
<!-- <properties> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uncommented the phpcs rule.
This PR adds the following features:
render.php
to display the video and gravityform shortcodes on the frontendDemo Recording
Screen.Recording.2024-12-17.at.7.32.38.PM.mov