Plugin Directory

Changeset 3416753


Ignore:
Timestamp:
12/10/2025 08:10:56 PM (4 months ago)
Author:
Molongui
Message:

5.2.3 (2025-12-10)

  • Fixed: Several bugs related to wrong author data retrieval.
Location:
molongui-authorship/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • molongui-authorship/trunk/README.txt

    r3415571 r3416753  
    253253
    254254<strong>Important</strong>: If you use a caching plugin, please clear your cache after updating any plugins.
     255
     256= 5.2.3 (2025-12-10) =
     257
     258* **Fixed**: Several bugs related to wrong author data retrieval.
    255259
    256260= 5.2.2 (2025-12-09) =
  • molongui-authorship/trunk/changelog.txt

    r3415571 r3416753  
    22
    33== Changelog ==
     4
     5= 5.2.3 (2025-12-10) =
     6
     7* **Fixed**: Several bugs related to wrong author data retrieval.
    48
    59= 5.2.2 (2025-12-09) =
  • molongui-authorship/trunk/includes/authors.php

    r3415065 r3416753  
    2525        if ( !empty( $wp_query->query_vars['guest-author-name'] ) )
    2626        {
    27             if ( $guest = self::get_author_by( 'name', $wp_query->query_vars['guest-author-name'], 'guest', false ) )
     27            $guest = self::get_author_by( 'name', $wp_query->query_vars['guest-author-name'], 'guest', false );
     28
     29            if ( $guest instanceof Author )
    2830            {
    2931                $authors[0]       = new \stdClass();
    30                 $authors[0]->id   = (int)$guest->ID;
     32                $authors[0]->id   = (int) $guest->get_id();
    3133                $authors[0]->type = 'guest';
    32                 $authors[0]->ref  = 'guest-'.$guest->ID;
     34                $authors[0]->ref  = 'guest-'.$guest->get_id();
    3335            }
    3436            else
    3537            {
    36                 if ( $user = self::get_author_by( 'user_nicename', $wp_query->query_vars['guest-author-name'] ) )
     38                $user = self::get_author_by( 'user_nicename', $wp_query->query_vars['guest-author-name'] );
     39
     40                if ( $user instanceof Author )
    3741                {
    3842                    $authors[0]       = new \stdClass();
    39                     $authors[0]->id   = (int)$user->ID;
     43                    $authors[0]->id   = (int) $user->get_id();
    4044                    $authors[0]->type = 'user';
    41                     $authors[0]->ref  = 'user-'.$user->ID;
     45                    $authors[0]->ref  = 'user-'.$user->get_id();
    4246                }
    4347            }
     
    5155            if ( $user = self::get_author_by( 'user_nicename', $wp_query->query_vars['author_name'] ) )
    5256            {
    53                 $authors[0]->id  = (int)$user->ID;
    54                 $authors[0]->ref = 'user-'.$user->ID;
     57                $authors[0]->id  = (int) $user->get_id();
     58                $authors[0]->ref = 'user-'.$user->get_id();
    5559            }
    5660        }
     
    235239        {
    236240            $guest = self::get_author_by( 'name', $nicename, 'guest', false );
    237             if ( $guest )
     241            if ( $guest instanceof Author )
    238242            {
    239243                return 'guest';
    240244            }
    241245            $user = self::get_author_by( 'user_nicename', $nicename, 'user', false );
    242             if ( $user )
     246            if ( $user instanceof Author )
    243247            {
    244248                return 'user';
  • molongui-authorship/trunk/includes/compat/plugins/wpdiscuz.php

    r3415065 r3416753  
    6161    $email = $comment->comment_author_email;
    6262    if ( !$email ) return $commentAuthorUrl;
    63     if ( $guest = Authors::get_author_by( '_molongui_guest_author_mail', $email, 'guest' ) )
     63    $guest = Authors::get_author_by( '_molongui_guest_author_mail', $email, 'guest' );
     64    if ( $guest instanceof Author )
    6465    {
    65         $author = new Author( $guest->ID, 'guest' );
    66         $commentAuthorUrl = $author->get_archive_url();
     66        $commentAuthorUrl = $guest->get_archive_url();
    6767    }
    6868    return $commentAuthorUrl;
  • molongui-authorship/trunk/includes/compat/plugins/yoast.php

    r3415065 r3416753  
    139139        {
    140140            $guest = Molongui\Authorship\Authors::get_author_by( 'name', $author, 'guest', false );
    141             if ( $guest )
     141            if ( $guest instanceof Author )
    142142            {
    143                 $author = new Molongui\Authorship\Author( $guest->ID, 'guest', $guest );
    144 
    145143                switch ( $key )
    146144                {
     
    184182            {
    185183                $guest = Molongui\Authorship\Authors::get_author_by( 'name', $author, 'guest', false );
    186                 if ( $guest ) $crumbs[$last]['text'] = $prefix . esc_html( $guest->post_title );
     184
     185                if ( $guest instanceof Author )
     186                {
     187                    $crumbs[$last]['text'] = $prefix . esc_html( $guest->get_display_name() );
     188                }
    187189            }
    188190        }
  • molongui-authorship/trunk/molongui-authorship.php

    r3415571 r3416753  
    1313 * Plugin URI:        https://www.molongui.com/wordpress-plugin-post-authors
    1414 * Description:       All-in-One Authorship Solution: Seamless Author Box, Guest Authors, and Co-Authors to enhance your site's authority, credibility, engagement, and SEO.
    15  * Version:           5.2.2
     15 * Version:           5.2.3
    1616 * Requires at least: 5.2
    1717 * Tested up to:      6.9
     
    4444final class MolonguiAuthorship
    4545{
    46     const VERSION = '5.2.2';
     46    const VERSION = '5.2.3';
    4747    use Singleton;
    4848    function __construct()
Note: See TracChangeset for help on using the changeset viewer.