• 12-05-2021, 19:20:52
    #1
    Aşağıdaki fonksiyonda yorumun yazıldığı tarih görünüyor, tarihin yayına yorumun yazıldığı saati de 19:21 gibi eklemek istiyorum. Nasıl yapabilirim acaba?

    printf( '<a href="%1$s"><time datetime="%2$s">%3$s</time></a>',
        esc_url( get_comment_link( $comment->comment_ID ) ),
        get_comment_time( 'c' ),
        /* translators: 1: date */
        sprintf( __( '%1$s', 'laura' ), get_comment_date() )
    );
    HTML çıktısı: <time datetime="2014-03-21T08:04:40+03:00">21 Mart 2014</time>
  • 12-05-2021, 19:25:52
    #2
    https://developer.wordpress.org/refe..._comment_time/

    printf( '<a href="%1$s"><time datetime="%2$s">%3$s $4$s</time></a>',
        esc_url( get_comment_link( $comment->comment_ID ) ),
        get_comment_time( 'c' ),
        sprintf( __( '%1$s', 'laura' ), get_comment_date() ),
        get_comment_time( 'H:i:s' )
    );
    böyle olması gerek
    • SkyGhostAir
    SkyGhostAir bunu beğendi.
    1 kişi bunu beğendi.
  • 12-05-2021, 19:34:42
    #3
    Misafir adlı üyeden alıntı: mesajı görüntüle
    https://developer.wordpress.org/refe..._comment_time/

    printf( '<a href="%1$s"><time datetime="%2$s">%3$s $4$s</time></a>',
        esc_url( get_comment_link( $comment->comment_ID ) ),
        get_comment_time( 'c' ),
        sprintf( __( '%1$s', 'laura' ), get_comment_date() ),
        get_comment_time( 'H:i:s' )
    );
    böyle olması gerek
    Ben 1 tane get_comment_time var diye içini düzeltmeye çalışıyordum yani c değerini değiştirmeye çalıştım çalıştım olmadı. Şimdi dediğiniz gibi yaptım oldu. $4$s yanlış olmuş sanırım hocam fark edip %4$s olarak ekledim sayfa koda gelince bozuluyordu. Teşekkür ederim.

    Şu konuda bilginiz var mı hocam: https://www.r10.net/php/2814614-wordpress-php-fonksiyon-kodu-reply_text-icerigini-nasil-duzenleyebilirim.html
  • 12-05-2021, 19:45:01
    #4
    evet yanlış yazmışım orayı gözler zorlanıyor artık