| 1 |
<?php |
| 2 |
/** |
| 3 |
* Renders the Campaign Creator metabox. |
| 4 |
* |
| 5 |
* @author Eric Daams |
| 6 |
* @copyright Copyright (c) 2019, Studio 164a |
| 7 |
* @package Charitable/Admin Views/Metaboxes |
| 8 |
* @since 1.2.0 |
| 9 |
* @version 1.2.0 |
| 10 |
*/ |
| 11 |
|
| 12 |
global $post; |
| 13 |
|
| 14 |
$creator = new Charitable_User( $post->post_author ); |
| 15 |
$campaign = new Charitable_Campaign( $post ); |
| 16 |
|
| 17 |
?> |
| 18 |
<div id="charitable-campaign-creator-metabox-wrap" class="charitable-metabox-wrap"> |
| 19 |
<div id="campaign-creator" class="charitable-media-block"> |
| 20 |
<div class="creator-avatar charitable-media-image"> |
| 21 |
<?php echo $creator->get_avatar(); ?> |
| 22 |
</div><!--.creator-avatar--> |
| 23 |
<div class="creator-facts charitable-media-body"> |
| 24 |
<h3 class="creator-name"><a href="<?php echo admin_url( 'user-edit.php?user_id=' . $creator->ID ); ?>"><?php printf( '%s (%s %d)', $creator->display_name, __( 'User ID', 'charitable-ambassadors' ), $creator->ID ); ?></a></h3> |
| 25 |
<p><?php printf( '%s %s', _x( 'Joined on', 'joined on date', 'charitable-ambassadors' ), date_i18n( 'F Y', strtotime( $creator->user_registered ) ) ); ?></p> |
| 26 |
<ul> |
| 27 |
<li><a href="<?php echo get_author_posts_url( $creator->ID ); ?>"><?php _e( 'Public Profile', 'charitable-ambassadors' ); ?></a></li> |
| 28 |
<li><a href="<?php echo admin_url( 'user-edit.php?user_id=' . $creator->ID ); ?>"><?php _e( 'Edit Profile', 'charitable' ); ?></a></li> |
| 29 |
</ul> |
| 30 |
</div><!--.creator-facts--> |
| 31 |
</div><!--#campaign-creator--> |
| 32 |
<div id="charitable-post-author-wrap" class="charitable-metabox charitable-select-wrap"> |
| 33 |
<label for="post_author"><?php _e( 'Change the campaign creator' ); ?></label> |
| 34 |
<?php |
| 35 |
wp_dropdown_users( array( |
| 36 |
'name' => 'post_author', |
| 37 |
'selected' => $post->post_author, |
| 38 |
) ); |
| 39 |
?> |
| 40 |
</div> |
| 41 |
</div><!--#charitable-campaign-description-metabox-wrap--> |
| 42 |
|