PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.8
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.8
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 +12 -58 6.256.8 View file →
@@ -79,9 +79,9 @@
79 79 $this->prev_from_date = gmdate( 'Y-m-d', strtotime( $this->prev_to_date . '-' . $date_minus . ' days' ) );
80 80 }
81 81
82 82 /**
83 - * @return false|string
83 + * @return mixed
84 84 */
85 85 protected function get_inner_content() {
86 86 $args = $this->get_content_args();
87 87
@@ -93,15 +93,8 @@
93 93 protected function get_content_args() {
94 94 $args = parent::get_content_args();
95 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';
@@ -130,9 +129,9 @@
130 129 if ( ! $this->has_comparison ) {
131 130 return;
132 131 }
133 132
134 - $prev_entries_count = FrmEmailSummaryHelper::get_entries_count( $this->prev_from_date, $this->prev_to_date );
133 + $prev_entries_count = FrmEmailSummaryHelper::get_entries_count( $this->prev_from_date, $this->prev_to_date );
135 134 $stats['entries']['compare'] = $this->get_compare_diff( $stats['entries']['count'], $prev_entries_count );
136 135 }
137 136
138 137 /**
@@ -140,9 +139,9 @@
140 139 *
141 140 * @param array $stats Statistics section data.
142 141 */
143 142 protected function add_payments_data( &$stats ) {
144 - $payment_data = FrmEmailSummaryHelper::get_payments_data( $this->from_date, $this->to_date );
143 + $payment_data = FrmEmailSummaryHelper::get_payments_data( $this->from_date, $this->to_date );
145 144 $stats['payments_count'] = array(
146 145 'label' => __( 'Payments collected', 'formidable' ),
147 146 'count' => $payment_data['count'],
148 147 'compare' => 0,
@@ -159,9 +158,9 @@
159 158 );
160 159 }
161 160
162 161 if ( $this->has_comparison ) {
163 - $prev_payment_data = FrmEmailSummaryHelper::get_payments_data( $this->prev_from_date, $this->prev_to_date );
162 + $prev_payment_data = FrmEmailSummaryHelper::get_payments_data( $this->prev_from_date, $this->prev_to_date );
164 163
165 164 if ( ! $payment_data['count'] && ! $prev_payment_data['count'] ) {
166 165 // Maybe this site doesn't collect payment, hide these sections.
167 166 unset( $stats['payments_count'] );
@@ -197,9 +196,9 @@
197 196 /**
198 197 * Gets formatted price.
199 198 *
200 199 * @param float $amount Amount.
201 - * @param array|string $currency Currency string value or array.
200 + * @param string|array $currency Currency string value or array.
202 201 * @return string
203 202 */
204 203 protected function get_formatted_price( $amount, $currency ) {
205 204 if ( ! is_array( $currency ) ) {
@@ -235,50 +234,5 @@
235 234 *
236 235 * @return string
237 236 */
238 237 abstract protected function get_top_forms_label();
239 -
240 - /**
241 - * @since 6.11.1
242 - *
243 - * @return int
244 - */
245 - public function get_date_range() {
246 - return $this->date_range;
247 - }
248 -
249 - /**
250 - * @since 6.11.1
251 - *
252 - * @return string
253 - */
254 - public function get_from_date() {
255 - return $this->from_date;
256 - }
257 -
258 - /**
259 - * @since 6.11.1
260 - *
261 - * @return string
262 - */
263 - public function get_to_date() {
264 - return $this->to_date;
265 - }
266 -
267 - /**
268 - * @since 6.11.1
269 - *
270 - * @return string
271 - */
272 - public function get_prev_from_date() {
273 - return $this->prev_from_date;
274 - }
275 -
276 - /**
277 - * @since 6.11.1
278 - *
279 - * @return string
280 - */
281 - public function get_prev_to_date() {
282 - return $this->prev_to_date;
283 - }
284 238 }