• Resolved netzgestaltung

    (@netzgestaltung)


    Hi there,

    i had some error notice on a single page:

    get_the_author was called with an argument that is deprecated since version 2.1 with no alternative available. in /wp-content/plugins/wp-post-comment-rating/common/class-wp-post-comment-rating-common.php:325

    You where using the post ID here to get the authors display name. This seems to not work anymore.

    I researched and found the solution here:
    https://stackoverflow.com/questions/3188901/wordpress-get-author-info-from-post-id

    so i changed line 325:

    removed
    $author = get_the_author($post->ID);

    added
    $author = get_the_author_meta('display_name', $post->post_author);

    and now the notice is gone.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Use of deprecated argument’ is closed to new replies.