• 19-05-2021, 03:05:02
    #1
    Merhaba arkadaşlar aşağıdaki dosyayı " ' tırnak sorunlarından dolayı kullanamıyorum. Wordpress function dosyasına eklenmiyor Yardımcı olursanız çok sevinirim.

    function your_prefix_post_date( $output ) {
    $output = ”;
    $format = apply_filters( ‘astra_post_date_format’, ” );
    $modified_date = esc_html( get_the_modified_date( $format ) );
    $updatetxt = “Last Updated on”;
    $postedtxt = “Posted on”;
    $u_time = get_the_time(‘U’);
    $u_modified_time = get_the_modified_time(‘U’);
    $modified_on = sprintf(
    esc_html( ‘%s’, ‘%s’),
    $modified_date
    );
    
    if ($u_modified_time >= $u_time + 86400) {
    $output .= ”;
    $output .= ‘ ‘ . $updatetxt . ”;
    $output .= ‘ ‘ . $modified_on . ”;
    $output .= ”;
    return $output;
    }
    
    else {
    
    $output .= ”;
    $output .= ‘ ‘ . $postedtxt . ”;
    $output .= ‘ ‘ . $modified_on . ”;
    $output .= ”;
    return $output;
    }
    }
    add_filter( ‘astra_post_date’, ‘your_prefix_post_date’ );
    add_filter( ‘astra_post_meta_separator’, ‘__return_false’ );
    tırnakları düzeltince de

    $format = apply_filters( ‘astra_post_date_format’, ” );
    bu kısmı hata verdi.

    Eğer düzeltirseniz çok sevinirim teşekkürler.
  • Kabul Edilen Cevap
    • 0 Beğeni
      şöyle deneyiniz

      function your_prefix_post_date( $output ) {
      $output = "";
      $format = apply_filters( 'astra_post_date_format', ” );
      $modified_date = esc_html( get_the_modified_date( $format ) );
      $updatetxt = “Last Updated on"";
      $postedtxt = “Posted on"";
      $u_time = get_the_time('U');
      $u_modified_time = get_the_modified_time('U');
      $modified_on = sprintf(
      esc_html( '%s', '%s'),
      $modified_date
      );

      if ($u_modified_time >= $u_time + 86400) {
      $output .= "";
      $output .= ' ' . $updatetxt . "";
      $output .= ' ' . $modified_on . "";
      $output .= "";
      return $output;
      }

      else {

      $output .= "";
      $output .= ' ' . $postedtxt . "";
      $output .= ' ' . $modified_on . "";
      $output .= "";
      return $output;
      }
      }
      add_filter( 'astra_post_date', 'your_prefix_post_date' );
      add_filter( 'astra_post_meta_separator', '__return_false' );
  • 19-05-2021, 03:24:34
    #2
    Bu cevap, konu sahibi tarafından kabul edilebilir bir cevap olarak işaretlendi.
    şöyle deneyiniz

    function your_prefix_post_date( $output ) {
    $output = "";
    $format = apply_filters( 'astra_post_date_format', ” );
    $modified_date = esc_html( get_the_modified_date( $format ) );
    $updatetxt = “Last Updated on"";
    $postedtxt = “Posted on"";
    $u_time = get_the_time('U');
    $u_modified_time = get_the_modified_time('U');
    $modified_on = sprintf(
    esc_html( '%s', '%s'),
    $modified_date
    );

    if ($u_modified_time >= $u_time + 86400) {
    $output .= "";
    $output .= ' ' . $updatetxt . "";
    $output .= ' ' . $modified_on . "";
    $output .= "";
    return $output;
    }

    else {

    $output .= "";
    $output .= ' ' . $postedtxt . "";
    $output .= ' ' . $modified_on . "";
    $output .= "";
    return $output;
    }
    }
    add_filter( 'astra_post_date', 'your_prefix_post_date' );
    add_filter( 'astra_post_meta_separator', '__return_false' );
  • 19-05-2021, 03:26:44
    #3
    ealgan adlı üyeden alıntı: mesajı görüntüle
    şöyle deneyiniz

    function your_prefix_post_date( $output ) {
    $output = "";
    $format = apply_filters( 'astra_post_date_format', ” );
    $modified_date = esc_html( get_the_modified_date( $format ) );
    $updatetxt = “Last Updated on"";
    $postedtxt = “Posted on"";
    $u_time = get_the_time('U');
    $u_modified_time = get_the_modified_time('U');
    $modified_on = sprintf(
    esc_html( '%s', '%s'),
    $modified_date
    );

    if ($u_modified_time >= $u_time + 86400) {
    $output .= "";
    $output .= ' ' . $updatetxt . "";
    $output .= ' ' . $modified_on . "";
    $output .= "";
    return $output;
    }

    else {

    $output .= "";
    $output .= ' ' . $postedtxt . "";
    $output .= ' ' . $modified_on . "";
    $output .= "";
    return $output;
    }
    }
    add_filter( 'astra_post_date', 'your_prefix_post_date' );
    add_filter( 'astra_post_meta_separator', '__return_false' );
    cok teşekkür ederim