PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.2.0
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.2.0
4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 3.5.2 All 199 releases
betterdocs / views / admin / email / body.php

body.php in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 4.2.0, at views/admin/email/body.php

98 lines 3.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 $from_date = isset( $args['views']['from_date'] ) ? date( 'M j, Y', strtotime( $args['views']['from_date'] ) ) : ''; //phpcs:ignore
3 $to_date = isset( $args['views']['to_date'] ) ? date( 'M j, Y', strtotime( $args['views']['to_date'] ) ) : ''; //phpcs:ignore
4 ?>
5 <tr style="background: #26d67d">
6 <td style="padding: 20px 40px">
7 <table style="width: 100%; border-spacing: 0;">
8 <tr>
9 <td>
10 <img src="https://betterdocs.co/wp-content/uploads/2022/12/BetterDocs-logo-white.png" style="max-width: 100%; height: 35px" alt="logo" />
11 </td>
12 <td align="right">
13 <span style="font-size: 12px; line-height: 1em; text-align: right; color: #fff; flex-direction: column; column-gap: 5px;">
14 <span style="display:block; margin-bottom: 5px; font-weight: 600; font-size: 18px;">
15 <?php echo wp_sprintf( '%s %s', esc_html__( 'Last', 'betterdocs' ), esc_html( $days ) ); ?>
16 </span>
17 <span>
18 <?php
19 if ( $frequency == 'betterdocs_daily' ) {
20 echo esc_html( $from_date );
21 } else {
22 echo wp_sprintf( '%s - %s', esc_html( $from_date ), esc_html( $to_date ) );
23 }
24 ?>
25 </span>
26 </span>
27 </td>
28 </tr>
29 </table>
30 </td>
31 </tr>
32 <tr style="background: #f7f9fb"> <!-- tr table body wrapper start -->
33 <td style="padding: 50px">
34 <table cellpadding="0" cellspacing="0" border="0" align="center">
35 <tbody>
36 <tr>
37 <td style="text-align: center; font-size: 20px; font-weight: bold; padding-bottom: 40px;">
38 <?php
39 printf(
40 // translators: %s is the website name.
41 esc_html__( 'Your Documentation Performance of %s Website', 'betterdocs' ),
42 esc_html( $bloginfo )
43 );
44 ?>
45 </td>
46 </tr>
47 <?php
48 $_analytics_body = [
49 'overview' => function () use ( $frequency, $args, $report_email ) {
50 betterdocs()->views->get(
51 'admin/email/analytics/overview',
52 [
53 'frequency' => $frequency,
54 'args' => $args,
55 'report_email' => $report_email
56 ]
57 );
58 },
59 'leading-docs' => function () use ( $frequency, $args ) {
60 betterdocs()->views->get(
61 'admin/email/analytics/leading-docs',
62 [
63 'frequency' => $frequency,
64 'args' => $args['docs']['current_data'],
65 'total_reactions' => $args['docs']['total_current_reactions']
66 ]
67 );
68 },
69 'search-keyword' => function () use ( $frequency, $args ) {
70 betterdocs()->views->get(
71 'admin/email/analytics/search-keyword',
72 [
73 'frequency' => $frequency,
74 'keywords' => $args['search']['keywords']
75 ]
76 );
77 }
78
79 ];
80
81 $_analytics_body = apply_filters( 'betterdocs_analytics_reporting_tables', $_analytics_body, $args, $frequency, $report_email );
82
83 if ( is_array( $_analytics_body ) ) {
84 foreach ( $_analytics_body as $_analytics_func ) {
85 $_analytics_func();
86 }
87 }
88
89 betterdocs()->views->get(
90 'admin/email/pro',
91 [
92 'analytics_url' => admin_url( 'admin.php?page=betterdocs-analytics' ),
93 'is_pro' => betterdocs()->is_pro_active()
94 ]
95 );
96
97 // body is completed in admin/email/footer.
98