PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.6
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.6
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/FrmEntryMeta.php +22 -2 6.56.6 View file →
@@ -392,10 +392,30 @@
392 392 $query[] = 'INNER JOIN ' . $wpdb->prefix . 'frm_items e ON (e.id=it.item_id)';
393 393 if ( is_array( $where ) ) {
394 394 if ( ! $args['is_draft'] ) {
395 395 $where['e.is_draft'] = 0;
396 - } elseif ( $args['is_draft'] == 1 ) {
397 - $where['e.is_draft'] = 1;
396 + } elseif ( is_numeric( $args['is_draft'] ) ) {
397 + if ( class_exists( 'FrmAbandonmentHooksController', false ) ) {
398 + $where['e.is_draft'] = absint( $args['is_draft'] );
399 + } else {
400 + $where['e.is_draft'] = 1;
401 + }
402 + } elseif ( 'both' === $args['is_draft'] && class_exists( 'FrmAbandonmentHooksController', false ) ) {
403 + $where['e.is_draft'] = array( 0, 1 );
404 + } elseif ( false !== strpos( $args['is_draft'], ',' ) ) {
405 + $is_draft = array_reduce(
406 + explode( ',', $args['is_draft'] ),
407 + function( $total, $current ) {
408 + if ( is_numeric( $current ) ) {
409 + $total[] = absint( $current );
410 + }
411 + return $total;
412 + },
413 + array()
414 + );
415 + if ( $is_draft ) {
416 + $where['e.is_draft'] = $is_draft;
417 + }
398 418 }
399 419
400 420 if ( ! empty( $args['user_id'] ) ) {
401 421 $where['e.user_id'] = $args['user_id'];