Skip to content

Commit

Permalink
WordCamp CPT: Add a "Day of Event" page to new sites
Browse files Browse the repository at this point in the history
This is a new page that will use the Day of Event template.
  • Loading branch information
ryelle committed Jan 6, 2020
1 parent 8beabf5 commit 07d9768
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
18 changes: 18 additions & 0 deletions public_html/wp-content/plugins/wcpt/stubs/page/day-of-event.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!-- wp:paragraph -->
<p><?php echo esc_html( get_wordcamp_date_range( $wordcamp ) ); ?><br>
<?php echo nl2br( esc_html( get_wordcamp_location( $wordcamp ) ) ); ?></p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2><?php esc_html_e( 'Schedule', 'wordcamporg' ); ?></h2>
<!-- /wp:heading -->

<!-- wp:shortcode -->
[schedule]
<!-- /wp:shortcode -->

<!-- wp:heading -->
<h2><?php esc_html_e( 'Latest Posts', 'wordcamporg' ); ?></h2>
<!-- /wp:heading -->

<!-- wp:latest-posts {"displayPostDate":true} /-->
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,16 @@ protected function get_stub_pages( $wordcamp, $meta ) {
'wc_page_offline' => 'yes',
),
),

array(
'title' => __( 'Day Of Event', 'wordcamporg' ),
'content' => $this->get_stub_content( 'page', 'day-of-event', $wordcamp ),
'status' => 'publish',
'type' => 'page',
'meta' => array(
'_wp_page_template' => 'day-of-event', // Set the page template.
),
),
);

return $pages;
Expand Down

0 comments on commit 07d9768

Please sign in to comment.