-
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 presenter, other contributor and wp.tv fields to lessons (#3029)
* Add presenter and other contributor fields to lessons * Fix metabox styles for lessons * Add Lesson video URL meta box * Wire up meta boxes * 💄 sass * Revert making metabox inputs block * Make WP.tv embeds full width
- Loading branch information
1 parent
5249d15
commit 366ba58
Showing
6 changed files
with
198 additions
and
39 deletions.
There are no files selected for viewing
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
24 changes: 24 additions & 0 deletions
24
wp-content/plugins/wporg-learn/views/metabox-lesson-video.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,24 @@ | ||
<?php | ||
/** | ||
* Template for Lesson Video metabox | ||
*/ | ||
|
||
/** @var WP_Post $post */ | ||
?> | ||
|
||
<?php if ( $post->video_url ) { ?> | ||
|
||
<p> | ||
<label for="lesson-video-url"> | ||
<?php esc_html_e( 'This Lesson was converted from a Tutorial, and the WordPress.tv URL was:', 'wporg_learn' ); ?> | ||
</label> | ||
<input type="text" id="lesson-video-url" name="lesson-video-url" value="<?php echo esc_url( $post->video_url ); ?>" readonly /> | ||
</p> | ||
|
||
<?php } else { ?> | ||
|
||
<p><?php esc_html_e( 'If this Lesson was converted from a Tutorial and had a WordPress.tv URL, it would be displayed here.', 'wporg_learn' ); ?></p> | ||
|
||
<?php } ?> | ||
|
||
<?php wp_nonce_field( 'lesson-metaboxes', 'lesson-metabox-nonce' ); ?> |
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
10 changes: 10 additions & 0 deletions
10
wp-content/themes/pub/wporg-learn-2024/src/style/admin.scss
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,10 @@ | ||
// Override Sensei Learning Mode styles, with default admin styles. | ||
.edit-post-meta-boxes-area { | ||
input, | ||
textarea { | ||
border: 1px solid #8c8f94; | ||
padding: 5px; | ||
margin-top: 5px; | ||
width: 100%; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
// Noop, just imports the CSS for webpack. | ||
import './style.scss'; | ||
import './admin.scss'; |
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