Compare commits
7 Commits
Author | SHA1 | Date |
---|---|---|
ulaulaman | e906f96f2b | |
ulaulaman | 84aa3905d0 | |
ulaulaman | cfb14707dc | |
ulaulaman | 8c933d19f4 | |
ulaulaman | 27632072d5 | |
ulaulaman | 96904dafae | |
ulaulaman | 098a784998 |
32
README.md
32
README.md
|
@ -11,17 +11,25 @@ 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
|
||||||
0.6 add author's info also in case Co-Authors Plus doesn't installed<br/>
|
* 2021.1013
|
||||||
0.5.3 add the correct lang files<br/>
|
* Add command for version number in css enqueue
|
||||||
0.5.2 fix error code in domain name in widget<br/>
|
* Update style
|
||||||
0.5.1 fix error code in domain name for messages<br/>
|
* 2021.1012 New style for show avatar
|
||||||
0.5 support for translations<br/>
|
* 2021.1007 Best indentation and test new style
|
||||||
0.4 translation italian messages in english<br/>
|
|
||||||
0.3.1 test with wp 4.9.2<br/>
|
## 2020.0922
|
||||||
0.3 add profile link and css<br/>
|
* 0.6 add author's info also in case Co-Authors Plus doesn't installed
|
||||||
0.2 creation of the widget to show authors' avatars<br/>
|
* 0.5.3 add the correct lang files
|
||||||
0.1 creation of the shortcode to add post's authors
|
* 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
|
||||||
|
|
||||||
# Screenshot
|
# Screenshot
|
||||||
<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>
|
![Screenshot](assets/screenshot-1.jpg)
|
||||||
|
<div align="center"><em>The result of the widget in a multiple authors post</em></div>
|
||||||
|
|
|
@ -9,3 +9,28 @@
|
||||||
.read-more-state:checked ~ .read-more-trigger_closed {
|
.read-more-state:checked ~ .read-more-trigger_closed {
|
||||||
display: none;
|
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;
|
||||||
|
}
|
25
readme.txt
25
readme.txt
|
@ -24,13 +24,18 @@ 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 ==
|
||||||
0.6 add author's info also in case Co-Authors Plus doesn't installed
|
* 2021.1013
|
||||||
0.5.3 add the correct lang files
|
* Add command for version number in css enqueue
|
||||||
0.5.2 fix error code in domain name in widget
|
* Update style
|
||||||
0.5.1 fix error code in domain name for messages
|
* 2021.1012 New style for show avatar
|
||||||
0.5 support for translations
|
* 2021.1007 Best indentation and test new style
|
||||||
0.4 translation italian messages in english
|
* 0.6 add author's info also in case Co-Authors Plus doesn't installed
|
||||||
0.3.1 test with wp 4.9.2
|
* 0.5.3 add the correct lang files
|
||||||
0.3 add profile link and css
|
* 0.5.2 fix error code in domain name in widget
|
||||||
0.2 creation of the widget to show authors' avatars
|
* 0.5.1 fix error code in domain name for messages
|
||||||
0.1 creation of the shortcode to add post's authors
|
* 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
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
Plugin Name: Co-Authors Widget Dev
|
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.
|
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.1008
|
Version: 2021.1012
|
||||||
Author: Gianluigi Filippelli
|
Author: Gianluigi Filippelli
|
||||||
Author URI: http://dropseaofulaula.blogspot.it/
|
Author URI: http://dropseaofulaula.blogspot.it/
|
||||||
Plugin URI: https://gitea.it/ulaulaman/widget-for-co-authors-dev
|
Plugin URI: https://gitea.it/ulaulaman/widget-for-co-authors-dev
|
||||||
|
@ -10,9 +10,6 @@ Gitea Plugin URI: https://gitea.it/ulaulaman/widget-for-co-authors-dev
|
||||||
License: GPLv2 or later
|
License: GPLv2 or later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ------------------------------------------------------ */
|
|
||||||
# ---------------------------------------------------------
|
|
||||||
|
|
||||||
// Load translations
|
// Load translations
|
||||||
add_action( 'plugins_loaded', 'caw_load_translations' );
|
add_action( 'plugins_loaded', 'caw_load_translations' );
|
||||||
function caw_load_translations() {
|
function caw_load_translations() {
|
||||||
|
@ -42,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">
|
||||||
<p><div style="float:left; padding: 5px;"><?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></p>
|
<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>
|
||||||
|
@ -60,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">
|
||||||
<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 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>
|
||||||
|
@ -74,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' );
|
||||||
|
|
Loading…
Reference in New Issue