Skip to content

Commit

Permalink
define site message regions for use in theme
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanstegall committed May 31, 2019
1 parent 14a2fc7 commit daf0f84
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
13 changes: 8 additions & 5 deletions inc/custom-types.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,14 @@ function minnpost_deleted_event_args( $args, $post_type ) {
function minnpost_message_regions( $regions ) {
$regions = array(
'header' => __( 'Site Header', 'minnpost-largo' ),
/*'primary' => __( 'Primary Content', 'minnpost-largo' ),
'main' => __( 'Main Content', 'minnpost-largo' ),
'sidebar' => __( 'Main Sidebar', 'minnpost-largo' ),
'primary_sidebar' => __( 'Primary Sidebar', 'minnpost-largo' ),
'footer' => __( 'Site Footer', 'minnpost-largo' ),*/
'article_bottom' => __( 'Article Bottom', 'minnpost-largo' ),
'homepage_middle' => __( 'Homepage Middle', 'minnpost-largo' ),
//'article_middle' => __( 'Article Middle', 'minnpost-largo' ),
'archive_middle' => __( 'Archive Middle', 'minnpost-largo' ),
'user_account' => __( 'User Account', 'minnpost-largo' ),
'email_header' => __( 'Email Header', 'minnpost-largo' ),
'email_middle' => __( 'Email Middle', 'minnpost-largo' ),
'email_footer' => __( 'Email Footer', 'minnpost-largo' ),
);
return $regions;
}
Expand Down
3 changes: 1 addition & 2 deletions template-parts/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@
<?php minnpost_share_buttons( 'bottom' ); ?>

<?php if ( 'on' !== get_post_meta( get_the_ID(), '_mp_remove_newsletter_signup_from_display', true ) ) : ?>
<?php /* TODO: we would change this to instead run the 'message' plugin, which would have content around the shortcode, and would contain the shortcode itself */ ?>
<?php echo do_shortcode( '[newsletter_form placement="instory" content_before="<h3 class=\'a-signup-title\'>Get MinnPost in your email inbox:</h3>" content_after="<p>You can also <a href=\'/subscribe/\'>learn about all our free newsletter options</a>.</p>"]' ); ?>
<?php do_action( 'wp_message_inserter', 'article_bottom' ); ?>
<?php endif; ?>

<?php
Expand Down

0 comments on commit daf0f84

Please sign in to comment.