From 94c49ad06d6ec4ce81b208cc85c03508dacd70c8 Mon Sep 17 00:00:00 2001 From: ulaulaman <34242086+ulaulaman@users.noreply.github.com> Date: Sat, 27 Jan 2018 19:29:07 +0100 Subject: [PATCH] 0.5.2 fix error code --- widget-for-co-authors.php | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/widget-for-co-authors.php b/widget-for-co-authors.php index 4f60610..01c897b 100644 --- a/widget-for-co-authors.php +++ b/widget-for-co-authors.php @@ -2,7 +2,7 @@ /* 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) -Version: 0.5 +Version: 0.5.2 Author: Gianluigi Filippelli Author URI: http://dropseaofulaula.blogspot.it/ Plugin URI: https://github.com/ulaulaman/widget-for-co-authors @@ -11,11 +11,10 @@ License: GPLv2 or later /* ------------------------------------------------------ */ # --------------------------------------------------------- - // Load translations -add_action('plugins_loaded', 'wan_load_textdomain'); -function wan_load_textdomain() { - load_plugin_textdomain( 'co-authors-widget', false, dirname( plugin_basename(__FILE__) ) . '/languages/' ); +add_action('plugins_loaded', 'caw_load_translations'); +function caw_load_translations() { + load_plugin_textdomain( 'co-authors-widget', false, dirname( plugin_basename(__FILE__) ) . '/lang/' ); } # Shortcode to show authors @@ -29,8 +28,8 @@ function blog_avatars() { if ( function_exists( 'get_coauthors' ) ) { $coauthors = get_coauthors(); $user_posts = get_author_posts_url( $coauthor->ID, $coauthor->user_nicename ); - $show_profile = __( 'Show profile', 'text-domain' );; - $hide_profile = __( 'Hide profile', 'text-domain' );; + $show_profile = __( 'Show profile', 'co-authors-widget' ); + $hide_profile = __( 'Hide profile', 'co-authors-widget' ); $i = 0; foreach ( $coauthors as $coauthor ) { $i++; @@ -45,10 +44,10 @@ if ( function_exists( 'get_coauthors' ) ) {

__( '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' ]; } else { -$title = __( 'Written by', 'blog_widget_domain' ); +$title = __( 'Written by', 'co-authors-widget' ); } // Widget form