• Resolved ngthanhdo

    (@ngthanhdo)


    Hello, thank you for best Telegram Plugin, i have a question need to help:

    I want to show Last Edit Author in “Post to Telegram” but i only see {post_author} available, how to show the_modified_author?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Irshad Ahmad

    (@irshadahmad21)

    You can give this code a try and use {cf:modified_author}

    add_filter( 'wptelegram_p2tg_post_data_cf:modified_author_value', function ( $value, $post ) {
        $last_id = get_post_meta( $post->ID, '_edit_last', true );
    
        if ( $last_id ) {
            $last_user = get_userdata( $last_id );
    
            return $last_user->display_name;
        }
    
        return $value;
    }, 10, 2 );
    
    Thread Starter ngthanhdo

    (@ngthanhdo)

    it works pretty well, thanks for the quick help <3

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to show last modified author’ is closed to new replies.