-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tutorial template with wordpress.tv video embed (#2565)
* Add tutorial template with wordpress.tv video embed * Add sidebar meta info
- Loading branch information
1 parent
1112304
commit 1b92568
Showing
3 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
wp-content/themes/pub/wporg-learn-2024/patterns/single-tutorial-embed.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
/** | ||
* Title: Single Tutorial Embed | ||
* Slug: wporg-learn-2024/single-tutorial-embed | ||
* Inserter: no | ||
*/ | ||
|
||
global $wp_embed; | ||
global $post; | ||
|
||
if ( ! isset( $post->video_url ) ) { | ||
return; | ||
} | ||
|
||
?> | ||
|
||
<!-- wp:embed {"url":"<?php echo esc_url( $post->video_url ); ?>","type":"video","providerNameSlug":"wordpress-tv","responsive":true,"className":"wp-embed-aspect-16-9 wp-has-aspect-ratio","autoembed":true} --> | ||
<figure class="wp-block-embed is-type-video is-provider-wordpress-tv wp-block-embed-wordpress-tv wp-embed-aspect-16-9 wp-has-aspect-ratio"> | ||
|
||
<div class="wp-block-embed__wrapper"> | ||
<?php echo $wp_embed->autoembed( $post->video_url ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> | ||
</div> | ||
|
||
</figure> | ||
<!-- /wp:embed --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
wp-content/themes/pub/wporg-learn-2024/templates/single-wporg_workshop.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<!-- wp:template-part {"slug":"header","className":"has-display-contents","tagName":"div"} /--> | ||
|
||
<!-- wp:group {"className":"wporg-breadcrumbs","align":"full","style":{"spacing":{"padding":{"top":"23px","bottom":"23px","left":"var:preset|spacing|edge-space","right":"var:preset|spacing|edge-space"}}},"backgroundColor":"white","layout":{"type":"flex","flexWrap":"wrap","justifyContent":"space-between"}} --> | ||
<div class="wporg-breadcrumbs wp-block-group alignfull has-white-background-color has-background" style="padding-top:23px;padding-right:var(--wp--preset--spacing--edge-space);padding-bottom:23px;padding-left:var(--wp--preset--spacing--edge-space)"> | ||
<!-- wp:wporg/site-breadcrumbs {"fontSize":"small"} /--> | ||
</div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:group {"tagName":"main","layout":{"type":"constrained"},"className":"entry-content","style":{"spacing":{"blockGap":"0px"}}} --> | ||
<main class="wp-block-group entry-content"> | ||
|
||
<!-- wp:group {"align":"full","style":{"spacing":{"padding":{"left":"var:preset|spacing|edge-space","right":"var:preset|spacing|edge-space","top":"var:preset|spacing|30","bottom":"var:preset|spacing|50"}}},"layout":{"type":"constrained"}} --> | ||
<div class="wp-block-group alignfull" style="padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--edge-space);padding-bottom:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--edge-space)"> | ||
|
||
<!-- wp:group {"layout":{"type":"constrained"},"style":{"spacing":{"margin":{"bottom":"var:preset|spacing|40"}}}} --> | ||
<div class="wp-block-group" style="margin-bottom:var(--wp--preset--spacing--40)"> | ||
|
||
<!-- wp:post-title {"level":1} /--> | ||
|
||
</div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:pattern {"slug":"wporg-learn-2024/single-tutorial-embed"} /--> | ||
|
||
<!-- wp:columns {"align":"wide","style":{"spacing":{"blockGap":{"left":"var:preset|spacing|40"},"margin":{"top":"var:preset|spacing|40"}}}} --> | ||
<div class="wp-block-columns alignwide" style="margin-top:var(--wp--preset--spacing--40)"> | ||
|
||
<!-- wp:column {"width":"75%","layout":{"type":"constrained","justifyContent":"left"}} --> | ||
<div class="wp-block-column" style="flex-basis:75%"> | ||
|
||
<!-- wp:post-content {"layout":{"inherit":true}} /--> | ||
|
||
</div> | ||
<!-- /wp:column --> | ||
|
||
<!-- wp:column {"width":"25%"} --> | ||
<div class="wp-block-column" style="flex-basis:25%"> | ||
|
||
<!-- wp:pattern {"slug":"wporg-learn-2024/sidebar-meta-info"} /--> | ||
|
||
</div> | ||
<!-- /wp:column --> | ||
|
||
</div> | ||
<!-- /wp:columns --> | ||
|
||
</div> | ||
<!-- /wp:group --> | ||
|
||
</main> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:template-part {"slug":"footer"} /--> |