PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.10
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.10
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/models/FrmEmailStats.php +9 -61 6.296.10 View file →
@@ -2,9 +2,8 @@
2 2 /**
3 3 * Stats email class
4 4 *
5 5 * @since 6.7
6 - *
7 6 * @package Formidable
8 7 */
9 8
10 9 if ( ! defined( 'ABSPATH' ) ) {
@@ -91,17 +90,11 @@
91 90 return ob_get_clean();
92 91 }
93 92
94 93 protected function get_content_args() {
95 - $args = parent::get_content_args();
94 + $args = parent::get_content_args();
95 +
96 96 $entries_count = FrmEmailSummaryHelper::get_entries_count( $this->from_date, $this->to_date );
97 - $entries_stat = array(
98 - 'entries' => array(
99 - 'label' => __( 'Entries created', 'formidable' ),
100 - 'count' => $entries_count,
101 - 'compare' => 0,
102 - ),
103 - );
104 97
105 98 $args['inbox_msg'] = $this->has_inbox_msg ? FrmEmailSummaryHelper::get_latest_inbox_message() : false;
106 99 $args['from_date'] = $this->from_date;
107 100 $args['to_date'] = $this->to_date;
@@ -107,9 +100,15 @@
107 100 $args['to_date'] = $this->to_date;
108 101 $args['top_forms'] = FrmEmailSummaryHelper::get_top_forms( $this->from_date, $this->to_date );
109 102 $args['top_forms_label'] = $this->get_top_forms_label();
110 103 $args['dashboard_url'] = site_url() . '/wp-admin/admin.php?page=formidable';
111 - $args['stats'] = isset( $args['stats'] ) ? array_merge( $entries_stat, $args['stats'] ) : $entries_stat;
104 + $args['stats'] = array(
105 + 'entries' => array(
106 + 'label' => __( 'Entries created', 'formidable' ),
107 + 'count' => $entries_count,
108 + 'compare' => 0,
109 + ),
110 + );
112 111
113 112 if ( $this->has_out_of_date_plugins ) {
114 113 $args['out_of_date_plugins'] = FrmEmailSummaryHelper::get_out_of_date_plugins();
115 114 $args['plugins_url'] = site_url() . '/wp-admin/plugins.php';
@@ -124,10 +123,8 @@
124 123 /**
125 124 * Adds entries comparison data.
126 125 *
127 126 * @param array $stats Statistics section data.
128 - *
129 - * @return void
130 127 */
131 128 protected function add_entries_comparison_data( &$stats ) {
132 129 if ( ! $this->has_comparison ) {
133 130 return;
@@ -140,10 +137,8 @@
140 137 /**
141 138 * Adds payments count and total data.
142 139 *
143 140 * @param array $stats Statistics section data.
144 - *
145 - * @return void
146 141 */
147 142 protected function add_payments_data( &$stats ) {
148 143 $payment_data = FrmEmailSummaryHelper::get_payments_data( $this->from_date, $this->to_date );
149 144 $stats['payments_count'] = array(
@@ -202,9 +197,8 @@
202 197 * Gets formatted price.
203 198 *
204 199 * @param float $amount Amount.
205 200 * @param array|string $currency Currency string value or array.
206 - *
207 201 * @return string
208 202 */
209 203 protected function get_formatted_price( $amount, $currency ) {
210 204 if ( ! is_array( $currency ) ) {
@@ -218,9 +212,8 @@
218 212 * Gets comparison diff between 2 values.
219 213 *
220 214 * @param float $current Current value.
221 215 * @param float $prev Previous value.
222 - *
223 216 * @return float
224 217 */
225 218 public function get_compare_diff( $current, $prev ) {
226 219 if ( ! $current && ! $prev ) {
@@ -241,50 +234,5 @@
241 234 *
242 235 * @return string
243 236 */
244 237 abstract protected function get_top_forms_label();
245 -
246 - /**
247 - * @since 6.11.1
248 - *
249 - * @return int
250 - */
251 - public function get_date_range() {
252 - return $this->date_range;
253 - }
254 -
255 - /**
256 - * @since 6.11.1
257 - *
258 - * @return string
259 - */
260 - public function get_from_date() {
261 - return $this->from_date;
262 - }
263 -
264 - /**
265 - * @since 6.11.1
266 - *
267 - * @return string
268 - */
269 - public function get_to_date() {
270 - return $this->to_date;
271 - }
272 -
273 - /**
274 - * @since 6.11.1
275 - *
276 - * @return string
277 - */
278 - public function get_prev_from_date() {
279 - return $this->prev_from_date;
280 - }
281 -
282 - /**
283 - * @since 6.11.1
284 - *
285 - * @return string
286 - */
287 - public function get_prev_to_date() {
288 - return $this->prev_to_date;
289 - }
290 238 }