Compare commits

..

No commits in common. "master" and "2021.1008" have entirely different histories.

4 changed files with 30 additions and 74 deletions

View File

@ -11,25 +11,17 @@ 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.
# Changelog
* 2021.1013
* Add command for version number in css enqueue
* Update style
* 2021.1012 New style for show avatar
* 2021.1007 Best indentation and test new style
## 2020.0922
* 0.6 add author's info also in case Co-Authors Plus doesn't installed
* 0.5.3 add the correct lang files
* 0.5.2 fix error code in domain name in widget
* 0.5.1 fix error code in domain name for messages
* 0.5 support for translations
* 0.4 translation italian messages in english
* 0.3.1 test with wp 4.9.2
* 0.3 add profile link and css
* 0.2 creation of the widget to show authors' avatars
* 0.1 creation of the shortcode to add post's authors
0.6 add author's info also in case Co-Authors Plus doesn't installed<br/>
0.5.3 add the correct lang files<br/>
0.5.2 fix error code in domain name in widget<br/>
0.5.1 fix error code in domain name for messages<br/>
0.5 support for translations<br/>
0.4 translation italian messages in english<br/>
0.3.1 test with wp 4.9.2<br/>
0.3 add profile link and css<br/>
0.2 creation of the widget to show authors' avatars<br/>
0.1 creation of the shortcode to add post's authors
# Screenshot
![Screenshot](assets/screenshot-1.jpg)
<div align="center"><em>The result of the widget in a multiple authors post</em></div>
<div align="center"><img src="https://github.com/ulaulaman/widget-for-co-authors/blob/master/assets/screenshot-1.jpg?raw=true" /><br/>
<em>The result of the widget in a multiple authors post</em></div>

View File

@ -9,28 +9,3 @@
.read-more-state:checked ~ .read-more-trigger_closed {
display: none;
}
.avatar {
display: block;
padding: 3px;
margin-left: auto;
margin-right: auto;
vertical-align: baseline;
font: 11px/1.4em Arial, sans-serif;
text-align: center;
vertical-align: baseline;
}
.avatarimg {
vertical-align:middle;
margin-bottom: 3px;
width:92%;
}
.right {
float:right;
}
.left {
float:left;
}

View File

@ -24,18 +24,13 @@ 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)
== Changelog ==
* 2021.1013
* Add command for version number in css enqueue
* Update style
* 2021.1012 New style for show avatar
* 2021.1007 Best indentation and test new style
* 0.6 add author's info also in case Co-Authors Plus doesn't installed
* 0.5.3 add the correct lang files
* 0.5.2 fix error code in domain name in widget
* 0.5.1 fix error code in domain name for messages
* 0.5 support for translations
* 0.4 translation italian messages in english
* 0.3.1 test with wp 4.9.2
* 0.3 add profile link and css
* 0.2 creation of the widget to show authors' avatars
* 0.1 creation of the shortcode to add post's authors
0.6 add author's info also in case Co-Authors Plus doesn't installed
0.5.3 add the correct lang files
0.5.2 fix error code in domain name in widget
0.5.1 fix error code in domain name for messages
0.5 support for translations
0.4 translation italian messages in english
0.3.1 test with wp 4.9.2
0.3 add profile link and css
0.2 creation of the widget to show authors' avatars
0.1 creation of the shortcode to add post's authors

View File

@ -2,7 +2,7 @@
/*
Plugin Name: Co-Authors Widget Dev
Description: The plugin add a widget and a shortcode in order to show authors of an article. It is compatible with Co-Authors Plus.
Version: 2021.1012
Version: 2021.1008
Author: Gianluigi Filippelli
Author URI: http://dropseaofulaula.blogspot.it/
Plugin URI: https://gitea.it/ulaulaman/widget-for-co-authors-dev
@ -10,6 +10,9 @@ Gitea Plugin URI: https://gitea.it/ulaulaman/widget-for-co-authors-dev
License: GPLv2 or later
*/
/* ------------------------------------------------------ */
# ---------------------------------------------------------
// Load translations
add_action( 'plugins_loaded', 'caw_load_translations' );
function caw_load_translations() {
@ -39,12 +42,8 @@ function blog_avatars() {
<div class="block-item-text">
<input type="checkbox" hidden class="read-more-state" id="<?php echo $i; ?>" />
<div class="read-more-wrap">
<div class="avatar">
<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>
<p><div style="float:left; padding: 5px;"><?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></p>
</div>
<label for="<?php echo $i; ?>" class="read-more-trigger_closed">
<strong>+ <?php printf( $show_profile ); ?></strong>
@ -61,12 +60,7 @@ function blog_avatars() {
<div class="block-item-text">
<input type="checkbox" hidden class="read-more-state" id="<?php echo $i; ?>" />
<div class="read-more-wrap">
<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>
<p><div style="float:left; padding: 5px;"><?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></p>
</div>
<label for="<?php echo $i; ?>" class="read-more-trigger_closed">
<strong>+ <?php printf( $show_profile ); ?></strong>
@ -80,7 +74,7 @@ function blog_avatars() {
}
function blog_enqueue() {
wp_register_style( 'blog-spoiler-style', plugins_url('/blog-spoiler.css', __FILE__), rand(111,9999), '1' );
wp_register_style( 'blog-spoiler-style', plugins_url('/blog-spoiler.css', __FILE__) );
wp_enqueue_style( 'blog-spoiler-style' );
}
add_action( 'wp_enqueue_scripts', 'blog_enqueue' );