Skip to content

Instantly share code, notes, and snippets.

@akther80
Last active August 16, 2024 11:47
Show Gist options
  • Save akther80/b7c09e875163159b612343e77b698f7f to your computer and use it in GitHub Desktop.
Save akther80/b7c09e875163159b612343e77b698f7f to your computer and use it in GitHub Desktop.
Cartzilla - WeDocs content feedback file overwrite
<?php global $post; ?>
<div class="feedback-content">
<div class="wedocs-feedback-wrap wedocs-hide-print text-center border-top mt-5 pt-5">
<?php
$positive = (int) get_post_meta( $post->ID, 'positive', true );
$negative = (int) get_post_meta( $post->ID, 'negative', true );
$positive_title = $positive ? sprintf( _n( '%d person found this useful', '%d persons found this useful', $positive, 'cartzilla' ), number_format_i18n( $positive ) ) : esc_html__( 'No votes yet', 'cartzilla' );
$negative_title = $negative ? sprintf( _n( '%d person found this not useful', '%d persons found this not useful', $negative, 'cartzilla' ), number_format_i18n( $negative ) ) : esc_html__( 'No votes yet', 'cartzilla' );
?>
<h4 class="h6 mb-4"><?php esc_html_e( 'Was this article helpful to you?', 'cartzilla' ); ?></h4>
<span class="vote-link-wrap">
<a href="#" class="wedocs-tip positive btn btn-sm btn-outline-primary mx-1" data-id="<?php the_ID(); ?>" data-type="positive" title="<?php echo esc_attr( $positive_title ); ?>">
<i class="czi-thumb-up mr-1"></i>
<?php esc_html_e( 'Yes, thanks!', 'cartzilla' ); ?>
</a>
<a href="#" class="wedocs-tip negative btn btn-sm btn-outline-primary mx-1" data-id="<?php the_ID(); ?>" data-type="negative" title="<?php echo esc_attr( $negative_title ); ?>">
<i class="czi-thumb-up mr-1"></i>
<?php esc_html_e( 'Not really', 'cartzilla' ); ?>
</a>
</span>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment