Compare commits

...

3 Commits

Author SHA1 Message Date
ulaulaman 84aa3905d0 Update readme 2021-10-13 00:58:45 +02:00
ulaulaman cfb14707dc 2021.1013 - New version 2021-10-13 00:58:27 +02:00
ulaulaman 8c933d19f4 Update avatar style 2021-10-13 00:57:58 +02:00
4 changed files with 30 additions and 11 deletions

View File

@ -11,6 +11,9 @@ The plugin add also a slider in order to show user's profile. If you want change
3. Add the widget to your sidebar or the shortcode to your posts or pages. 3. Add the widget to your sidebar or the shortcode to your posts or pages.
# Changelog # Changelog
* 2021.1013
* Add command for version number in css enqueue
* Update style
* 2021.1012 New style for show avatar * 2021.1012 New style for show avatar
* 2021.1007 Best indentation and test new style * 2021.1007 Best indentation and test new style
@ -28,5 +31,5 @@ The plugin add also a slider in order to show user's profile. If you want change
# Screenshot # Screenshot
![Screenshot](assets/screenshot-1.jpg) <div align="center">![Screenshot](assets/screenshot-1.jpg)<br/>
<em>The result of the widget in a multiple authors post</em> <em>The result of the widget in a multiple authors post</em></div>

View File

@ -11,22 +11,26 @@
} }
.avatar { .avatar {
background-color: #f9f9f9; display: block;
border: 1px solid #cccccc;
padding: 3px; padding: 3px;
margin-left: auto;
margin-right: auto;
vertical-align: baseline;
font: 11px/1.4em Arial, sans-serif; font: 11px/1.4em Arial, sans-serif;
text-align: center; text-align: center;
vertical-align: baseline; vertical-align: baseline;
} }
.avatarimg { .avatarimg {
border: 1px solid #cccccc;
vertical-align:middle; vertical-align:middle;
margin-bottom: 3px; margin-bottom: 3px;
width:92%; width:92%;
} }
.right { .right {
margin: 0.5em 0pt 0.5em 0.8em;
float:right; float:right;
} }
.left {
float:left;
}

View File

@ -24,6 +24,9 @@ The plugin add also a slider in order to show user's profile. If you want change
1. The result of the widget in a multiple authors post (italian language) 1. The result of the widget in a multiple authors post (italian language)
== Changelog == == Changelog ==
* 2021.1013
* Add command for version number in css enqueue
* Update style
* 2021.1012 New style for show avatar * 2021.1012 New style for show avatar
* 2021.1007 Best indentation and test new style * 2021.1007 Best indentation and test new style
* 0.6 add author's info also in case Co-Authors Plus doesn't installed * 0.6 add author's info also in case Co-Authors Plus doesn't installed

View File

@ -39,8 +39,12 @@ function blog_avatars() {
<div class="block-item-text"> <div class="block-item-text">
<input type="checkbox" hidden class="read-more-state" id="<?php echo $i; ?>" /> <input type="checkbox" hidden class="read-more-state" id="<?php echo $i; ?>" />
<div class="read-more-wrap"> <div class="read-more-wrap">
<div class="avatar right"><?php echo coauthors_get_avatar( $coauthor, 65 ); ?> <div class="avatar">
<a href="<?php echo get_author_posts_url( $coauthor->ID, $coauthor->user_nicename ); ?>"><?php echo $coauthor->display_name; ?></a></div><span class="read-more-target"><?php echo $coauthor->description; ?></span> <div class="avatarimg left" style="width:50%;"><?php echo coauthors_get_avatar( $coauthor, 65 ); ?>
<a href="<?php echo get_author_posts_url( $coauthor->ID, $coauthor->user_nicename ); ?>"><?php echo $coauthor->display_name; ?></a>
</div>
<span class="read-more-target"><?php echo $coauthor->description; ?></span>
</div>
</div> </div>
<label for="<?php echo $i; ?>" class="read-more-trigger_closed"> <label for="<?php echo $i; ?>" class="read-more-trigger_closed">
<strong>+ <?php printf( $show_profile ); ?></strong> <strong>+ <?php printf( $show_profile ); ?></strong>
@ -57,7 +61,12 @@ function blog_avatars() {
<div class="block-item-text"> <div class="block-item-text">
<input type="checkbox" hidden class="read-more-state" id="<?php echo $i; ?>" /> <input type="checkbox" hidden class="read-more-state" id="<?php echo $i; ?>" />
<div class="read-more-wrap"> <div class="read-more-wrap">
<div class="avatar right"><?php echo get_avatar( get_the_author_meta( 'user_email' ), 65 ); ?><a href="<?php echo get_the_author_meta( 'user_url' ); ?>"><?php echo get_the_author_meta( 'display_name' ); ?></a></div><span class="read-more-target"><?php echo get_the_author_meta( 'description' ); ?></span> <div class="avatar">
<div class="avatarimg left"><?php echo get_avatar( get_the_author_meta( 'user_email' ), 65 ); ?>
<a href="<?php echo get_the_author_meta( 'user_url' ); ?>"><?php echo get_the_author_meta( 'display_name' ); ?></a>
</div>
<span class="read-more-target"><?php echo get_the_author_meta( 'description' ); ?></span>
</div>
</div> </div>
<label for="<?php echo $i; ?>" class="read-more-trigger_closed"> <label for="<?php echo $i; ?>" class="read-more-trigger_closed">
<strong>+ <?php printf( $show_profile ); ?></strong> <strong>+ <?php printf( $show_profile ); ?></strong>
@ -71,7 +80,7 @@ function blog_avatars() {
} }
function blog_enqueue() { function blog_enqueue() {
wp_register_style( 'blog-spoiler-style', plugins_url('/blog-spoiler.css', __FILE__) ); wp_register_style( 'blog-spoiler-style', plugins_url('/blog-spoiler.css', __FILE__), rand(111,9999), '1' );
wp_enqueue_style( 'blog-spoiler-style' ); wp_enqueue_style( 'blog-spoiler-style' );
} }
add_action( 'wp_enqueue_scripts', 'blog_enqueue' ); add_action( 'wp_enqueue_scripts', 'blog_enqueue' );