0.5.2 fix error code

This commit is contained in:
ulaulaman 2018-01-27 19:29:07 +01:00 committed by GitHub
parent 15b19c008a
commit 94c49ad06d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 12 deletions

View File

@ -2,7 +2,7 @@
/* /*
Plugin Name: Co-Authors Widget (develop) Plugin Name: Co-Authors Widget (develop)
Description: The plugin add a widget and a shortcode in order to show authors of an article. It is compatible with Co-Authors Plus. (developing version) Description: The plugin add a widget and a shortcode in order to show authors of an article. It is compatible with Co-Authors Plus. (developing version)
Version: 0.5 Version: 0.5.2
Author: Gianluigi Filippelli Author: Gianluigi Filippelli
Author URI: http://dropseaofulaula.blogspot.it/ Author URI: http://dropseaofulaula.blogspot.it/
Plugin URI: https://github.com/ulaulaman/widget-for-co-authors Plugin URI: https://github.com/ulaulaman/widget-for-co-authors
@ -11,11 +11,10 @@ License: GPLv2 or later
/* ------------------------------------------------------ */ /* ------------------------------------------------------ */
# --------------------------------------------------------- # ---------------------------------------------------------
// Load translations // Load translations
add_action('plugins_loaded', 'wan_load_textdomain'); add_action('plugins_loaded', 'caw_load_translations');
function wan_load_textdomain() { function caw_load_translations() {
load_plugin_textdomain( 'co-authors-widget', false, dirname( plugin_basename(__FILE__) ) . '/languages/' ); load_plugin_textdomain( 'co-authors-widget', false, dirname( plugin_basename(__FILE__) ) . '/lang/' );
} }
# Shortcode to show authors # Shortcode to show authors
@ -29,8 +28,8 @@ function blog_avatars() {
if ( function_exists( 'get_coauthors' ) ) { if ( function_exists( 'get_coauthors' ) ) {
$coauthors = get_coauthors(); $coauthors = get_coauthors();
$user_posts = get_author_posts_url( $coauthor->ID, $coauthor->user_nicename ); $user_posts = get_author_posts_url( $coauthor->ID, $coauthor->user_nicename );
$show_profile = __( 'Show profile', 'text-domain' );; $show_profile = __( 'Show profile', 'co-authors-widget' );
$hide_profile = __( 'Hide profile', 'text-domain' );; $hide_profile = __( 'Hide profile', 'co-authors-widget' );
$i = 0; $i = 0;
foreach ( $coauthors as $coauthor ) { foreach ( $coauthors as $coauthor ) {
$i++; $i++;
@ -45,10 +44,10 @@ if ( function_exists( 'get_coauthors' ) ) {
</p> </p>
</div> </div>
<label for="<?php echo $i; ?>" class="read-more-trigger_closed"> <label for="<?php echo $i; ?>" class="read-more-trigger_closed">
<strong>+ <?php echo $show_profile; ?></strong> <strong>+ <?php printf( $show_profile ); ?></strong>
</label> </label>
<label for="<?php echo $i; ?>" class="read-more-trigger_opened"> <label for="<?php echo $i; ?>" class="read-more-trigger_opened">
<strong>- <?php echo $hide_profile; ?></strong> <strong>- <?php printf( $hide_profile ); ?></strong>
</label> </label>
</div> </div>
<?php <?php
@ -92,10 +91,10 @@ parent::__construct(
'blog_widget', 'blog_widget',
// Widget name in UI // Widget name in UI
__('Authors', 'blog_widget_domain'), __('Authors', 'co-authors-widget'),
// Widget description // Widget description
array( 'description' => __( 'Show avatars and names of the authors', 'blog_widget_domain' ), ) array( 'description' => __( 'Show avatars and names of the authors', 'co-authors-widget' ), )
); );
} }
@ -119,7 +118,7 @@ if ( isset( $instance[ 'title' ] ) ) {
$title = $instance[ 'title' ]; $title = $instance[ 'title' ];
} }
else { else {
$title = __( 'Written by', 'blog_widget_domain' ); $title = __( 'Written by', 'co-authors-widget' );
} }
// Widget form // Widget form