PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.5.4
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.5.4
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/helpers/FrmEntriesListHelper.php +5 -41 6.5.15.5.4 View file →
@@ -12,11 +12,8 @@
12 12 * @since 4.07
13 13 */
14 14 public $total_items = 0;
15 15
16 - /**
17 - * @return void
18 - */
19 16 public function prepare_items() {
20 17 global $per_page;
21 18
22 19 $per_page = $this->get_items_per_page( 'formidable_page_formidable_entries_per_page' );
@@ -90,11 +87,8 @@
90 87 )
91 88 );
92 89 }
93 90
94 - /**
95 - * @return void
96 - */
97 91 public function no_items() {
98 92 $s = self::get_param(
99 93 array(
100 94 'param' => 's',
@@ -121,21 +115,15 @@
121 115 }
122 116
123 117 $colspan = $this->get_column_count();
124 118
125 - include FrmAppHelper::plugin_path() . '/classes/views/frm-entries/no_entries.php';
119 + include( FrmAppHelper::plugin_path() . '/classes/views/frm-entries/no_entries.php' );
126 120 }
127 121
128 - /**
129 - * @return void
130 - */
131 122 public function search_box( $text, $input_id ) {
132 123 // Searching is a pro feature
133 124 }
134 125
135 - /**
136 - * @return void
137 - */
138 126 protected function display_tablenav( $which ) {
139 127 $is_footer = ( $which !== 'top' );
140 128 if ( $is_footer && ! empty( $this->items ) ) {
141 129 ?>
@@ -149,11 +137,8 @@
149 137 }
150 138 parent::display_tablenav( $which );
151 139 }
152 140
153 - /**
154 - * @return void
155 - */
156 141 protected function extra_tablenav( $which ) {
157 142 $form_id = FrmAppHelper::simple_get( 'form', 'absint' );
158 143 if ( $which === 'top' && ! $form_id ) {
159 144 echo '<div class="alignleft actions">';
@@ -189,11 +174,8 @@
189 174
190 175 return $primary_column;
191 176 }
192 177
193 - /**
194 - * @return string
195 - */
196 178 public function single_row( $item, $style = '' ) {
197 179 // Set up the hover actions for this user
198 180 $actions = array();
199 181 $view_link = '?page=formidable-entries&frm_action=show&id=' . $item->id;
@@ -230,9 +212,9 @@
230 212
231 213 $form_id = $this->params['form'] ? $this->params['form'] : 0;
232 214 $this->column_name = preg_replace( '/^(' . $form_id . '_)/', '', $column_name );
233 215
234 - if ( $this->column_name === 'cb' ) {
216 + if ( $this->column_name == 'cb' ) {
235 217 $r .= "<th scope='row' class='check-column'>$checkbox</th>";
236 218 } else {
237 219 if ( in_array( $column_name, $hidden, true ) ) {
238 220 $val = '';
@@ -258,18 +240,13 @@
258 240 }
259 241
260 242 /**
261 243 * Get the column names that the logged in user can action on
262 - *
263 - * @return string[]
264 244 */
265 245 private function get_action_columns() {
266 246 return array( 'cb', 'form_id', 'id', 'post_id' );
267 247 }
268 248
269 - /**
270 - * @param object $item
271 - */
272 249 private function column_value( $item ) {
273 250 $col_name = $this->column_name;
274 251
275 252 switch ( $col_name ) {
@@ -278,8 +255,9 @@
278 255 case 'item_key':
279 256 $val = $item->{$col_name};
280 257 break;
281 258 case 'name':
259 + case 'description':
282 260 $val = FrmAppHelper::truncate( strip_tags( $item->{$col_name} ), 100 );
283 261 break;
284 262 case 'created_at':
285 263 case 'updated_at':
@@ -286,14 +264,9 @@
286 264 $date = FrmAppHelper::get_formatted_time( $item->{$col_name} );
287 265 $val = '<abbr title="' . esc_attr( FrmAppHelper::get_formatted_time( $item->{$col_name}, '', 'g:i:s A' ) ) . '">' . $date . '</abbr>';
288 266 break;
289 267 case 'is_draft':
290 - $entry_status = FrmEntriesHelper::get_entry_status_label( $item->is_draft );
291 - $val = sprintf(
292 - '<span class="frm-entry-status frm-entry-status-%s">%s</span>',
293 - sanitize_html_class( $item->is_draft ),
294 - esc_html( $entry_status )
295 - );
268 + $val = empty( $item->is_draft ) ? esc_html__( 'No', 'formidable' ) : esc_html__( 'Yes', 'formidable' );
296 269 break;
297 270 case 'form_id':
298 271 $form_id = $item->form_id;
299 272 $user_can_edit_forms = false === FrmAppHelper::permission_nonce_error( 'frm_edit_forms' );
@@ -334,12 +307,8 @@
334 307 }
335 308
336 309 /**
337 310 * @param string $view_link
338 - * @param array $actions
339 - * @param object $item
340 - *
341 - * @return void
342 311 */
343 312 private function get_actions( &$actions, $item, $view_link ) {
344 313 $actions['view'] = '<a href="' . esc_url( $view_link ) . '">' . __( 'View', 'formidable' ) . '</a>';
345 314
@@ -344,19 +313,14 @@
344 313 $actions['view'] = '<a href="' . esc_url( $view_link ) . '">' . __( 'View', 'formidable' ) . '</a>';
345 314
346 315 if ( current_user_can( 'frm_delete_entries' ) ) {
347 316 $delete_link = '?page=formidable-entries&frm_action=destroy&id=' . $item->id . '&form=' . $this->params['form'];
348 - $actions['delete'] = '<a href="' . esc_url( wp_nonce_url( $delete_link ) ) . '" class="submitdelete" data-frmverify="' . esc_attr__( 'Permanently delete this entry?', 'formidable' ) . '" data-frmverify-btn="frm-button-red">' . __( 'Delete', 'formidable' ) . '</a>';
317 + $actions['delete'] = '<a href="' . esc_url( wp_nonce_url( $delete_link ) ) . '" class="submitdelete" data-frmverify="' . esc_attr__( 'Permanently delete this entry?', 'formidable' ) . '">' . __( 'Delete', 'formidable' ) . '</a>';
349 318 }
350 319
351 320 $actions = apply_filters( 'frm_row_actions', $actions, $item );
352 321 }
353 322
354 - /**
355 - * @param false $val
356 - *
357 - * @return void
358 - */
359 323 private function get_column_value( $item, &$val ) {
360 324 $col_name = $this->column_name;
361 325
362 326 if ( strpos( $col_name, 'frmsep_' ) === 0 ) {