| 1 |
<?php |
| 2 |
|
| 3 |
if ( empty( $args ) || ! is_array( $args ) ) { |
| 4 |
return; |
| 5 |
} |
| 6 |
|
| 7 |
?> |
| 8 |
|
| 9 |
<tr> |
| 10 |
<td style="text-align: left; font-size: 20px; padding-top: 40px;"> |
| 11 |
<?php esc_html_e( 'Top Performing Docs', 'betterdocs' ); ?> |
| 12 |
</td> |
| 13 |
</tr> |
| 14 |
<tr> |
| 15 |
<td style="padding:0"> |
| 16 |
<table style="width: 100%; border-collapse: separate; border-spacing: 2px; padding-top: 20px;"> |
| 17 |
<tr style="background: #fff;"> |
| 18 |
<th style="text-align: left; font-size: 14px; font-weight: 600; color:#6e6e73; text-transform: capitalize; padding: 8px 15px; width: 48%;"> |
| 19 |
<?php esc_html_e( 'Doc Title', 'betterdocs' ); ?> |
| 20 |
</th> |
| 21 |
<th style="text-align: center; font-size: 14px; font-weight: 600; color:#6e6e73; text-transform: capitalize; padding: 8px 8px;"> |
| 22 |
<?php esc_html_e( 'Total Views', 'betterdocs' ); ?> |
| 23 |
</th> |
| 24 |
<th style="text-align: center; font-size: 14px; font-weight: 600; color:#6e6e73; text-transform: capitalize; padding: 8px 8px;"> |
| 25 |
<?php esc_html_e( 'Unique Views', 'betterdocs' ); ?> |
| 26 |
</th> |
| 27 |
<?php |
| 28 |
if ( $total_reactions > 0 ) { |
| 29 |
echo '<th style="text-align: center; font-size: 14px; font-weight: 600; color:#6e6e73; text-transform: capitalize; padding: 8px 15px;">' . esc_html__( 'Reactions', 'betterdocs' ) . '</th>'; |
| 30 |
} |
| 31 |
?> |
| 32 |
</tr> |
| 33 |
<?php |
| 34 |
foreach ( $args as $docs ) { |
| 35 |
betterdocs()->views->get( |
| 36 |
'admin/email/analytics/parts/single-docs', |
| 37 |
[ |
| 38 |
'docs' => $docs, |
| 39 |
'total_reactions' => $total_reactions |
| 40 |
] |
| 41 |
); |
| 42 |
} |
| 43 |
?> |
| 44 |
</table> |
| 45 |
</td> |
| 46 |
</tr> |
| 47 |
|