PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.32
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.32
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/controllers/FrmFormsController.php +59 -10 6.306.32 View file →
@@ -47,8 +47,15 @@
47 47 add_filter( 'manage_toplevel_page_formidable_columns', 'FrmFormsController::get_columns', 0 );
48 48 add_filter( 'manage_toplevel_page_formidable_sortable_columns', 'FrmFormsController::get_sortable_columns' );
49 49 }
50 50
51 + /**
52 + * Runs on admin head of the formidable forms page.
53 + *
54 + * @since 6.32 This adds screen options.
55 + *
56 + * @return void
57 + */
51 58 public static function head() {
52 59 if ( wp_is_mobile() ) {
53 60 wp_enqueue_script( 'jquery-touch-punch' );
54 61 }
@@ -1232,17 +1239,27 @@
1232 1239 public static function get_columns( $columns ) {
1233 1240 $columns['cb'] = '<input type="checkbox" />';
1234 1241 $columns['name'] = esc_html__( 'Form Title', 'formidable' );
1235 1242 $columns['entries'] = esc_html__( 'Entries', 'formidable' );
1243 + $columns['views'] = esc_html__( 'Views', 'formidable' );
1236 1244 $columns['id'] = 'ID';
1237 1245 $columns['form_key'] = esc_html__( 'Key', 'formidable' );
1238 1246
1239 - if ( 'trash' !== FrmAppHelper::simple_get( 'form_type' ) ) {
1247 + if ( 'trash' !== FrmAppHelper::simple_get( 'form_type' ) && has_filter( 'frm_form_list_actions' ) ) {
1248 + // If there is any filters added, keep this column.
1240 1249 $columns['shortcode'] = esc_html__( 'Actions', 'formidable' );
1241 1250 }
1242 1251
1243 1252 $columns['created_at'] = esc_html__( 'Date', 'formidable' );
1244 1253
1254 + if ( 'trash' !== FrmAppHelper::simple_get( 'form_type' ) ) {
1255 + $columns['embeds'] = esc_html__( 'Embeds', 'formidable' );
1256 + $columns['settings'] = '<div class="frm-forms-list-settings-btn-wrapper"><a href="#" class="frm-forms-list-settings-btn">';
1257 + $columns['settings'] .= FrmAppHelper::icon_by_class( 'frmfont frm_settings_icon', array( 'echo' => false ) );
1258 + $columns['settings'] .= '<span class="screen-reader-text">' . esc_html__( 'List settings', 'formidable' ) . '</span>';
1259 + $columns['settings'] .= '</a></div>';
1260 + }
1261 +
1245 1262 add_screen_option(
1246 1263 'per_page',
1247 1264 array(
1248 1265 'label' => __( 'Forms', 'formidable' ),
@@ -1520,19 +1537,19 @@
1520 1537 'advanced' => array(
1521 1538 'name' => __( 'General', 'formidable' ),
1522 1539 'title' => __( 'General Form Settings', 'formidable' ),
1523 1540 'function' => array( self::class, 'advanced_settings' ),
1524 - 'icon' => 'frmfont frm_settings_icon',
1541 + 'icon' => 'frmfont frm_small_settings_icon',
1525 1542 ),
1526 1543 'email' => array(
1527 1544 'name' => __( 'Actions & Notifications', 'formidable' ),
1528 1545 'function' => array( 'FrmFormActionsController', 'email_settings' ),
1529 1546 'id' => 'frm_notification_settings',
1530 - 'icon' => 'frmfont frm_mail_bulk_icon',
1547 + 'icon' => 'frmfont frm_notification_check_icon',
1531 1548 ),
1532 1549 'permissions' => array(
1533 1550 'name' => __( 'Form Permissions', 'formidable' ),
1534 - 'icon' => 'frmfont frm_lock_closed_icon',
1551 + 'icon' => 'frmfont frm_lock_closed2_icon',
1535 1552 'html_class' => 'frm_show_upgrade_tab frm_noallow',
1536 1553 'data' => array(
1537 1554 'medium' => 'permissions',
1538 1555 'upgrade' => __( 'Form Permissions', 'formidable' ),
@@ -1542,9 +1559,9 @@
1542 1559 ),
1543 1560 ),
1544 1561 'scheduling' => array(
1545 1562 'name' => __( 'Form Scheduling', 'formidable' ),
1546 - 'icon' => 'frmfont frm_calendar_icon',
1563 + 'icon' => 'frmfont frm_schedule_icon',
1547 1564 'html_class' => 'frm_show_upgrade_tab frm_noallow',
1548 1565 'data' => array(
1549 1566 'medium' => 'scheduling',
1550 1567 'upgrade' => __( 'Form scheduling settings', 'formidable' ),
@@ -1555,19 +1572,19 @@
1555 1572 'buttons' => array(
1556 1573 'name' => __( 'Buttons', 'formidable' ),
1557 1574 'class' => self::class,
1558 1575 'function' => 'buttons_settings',
1559 - 'icon' => 'frmfont frm_button_icon',
1576 + 'icon' => 'frmfont frm-buttons-style',
1560 1577 ),
1561 1578 'landing' => array(
1562 1579 'name' => __( 'Form Landing Page', 'formidable' ),
1563 - 'icon' => 'frmfont frm_file_text_icon',
1580 + 'icon' => 'frmfont frm_cross_device_icon',
1564 1581 'html_class' => 'frm_show_upgrade_tab frm_noallow',
1565 1582 'data' => FrmAppHelper::get_landing_page_upgrade_data_params(),
1566 1583 ),
1567 1584 'chat' => array(
1568 1585 'name' => __( 'Conversational Forms', 'formidable' ),
1569 - 'icon' => 'frmfont frm_chat_forms_icon',
1586 + 'icon' => 'frmfont frm_chat_bubbles_icon',
1570 1587 'html_class' => 'frm_show_upgrade_tab frm_noallow',
1571 1588 'data' => FrmAppHelper::get_upgrade_data_params(
1572 1589 'chat',
1573 1590 array(
@@ -1595,9 +1612,9 @@
1595 1612 'html' => array(
1596 1613 'name' => __( 'Customize HTML', 'formidable' ),
1597 1614 'class' => self::class,
1598 1615 'function' => 'html_settings',
1599 - 'icon' => 'frmfont frm_code_icon',
1616 + 'icon' => 'frmfont frm_code2_icon',
1600 1617 ),
1601 1618 );
1602 1619
1603 1620 if ( ! has_action( 'frm_add_form_style_tab_options' ) && ! has_action( 'frm_add_form_button_options' ) ) {
@@ -2215,9 +2232,10 @@
2215 2232 }
2216 2233
2217 2234 if ( $name === $form->name ) {
2218 2235 // Nothing to change so exit early.
2219 - wp_send_json_success();
2236 + $form_key = $form->form_key;
2237 + wp_send_json_success( compact( 'form_key' ) );
2220 2238 }
2221 2239
2222 2240 $to_update = array(
2223 2241 'name' => $name,
@@ -3692,8 +3710,39 @@
3692 3710 'html' => $html,
3693 3711 'edit_page_url' => admin_url( sprintf( get_post_type_object( 'page' )->_edit_link . '&action=edit', 0 ) ),
3694 3712 )
3695 3713 );
3714 + }
3715 +
3716 + /**
3717 + * Prints necessary templates for the forms list page.
3718 + *
3719 + * @since 6.32
3720 + *
3721 + * @return void
3722 + */
3723 + public static function print_forms_list_templates() {
3724 + if ( ! FrmAppHelper::on_form_listing_page() ) {
3725 + return;
3726 + }
3727 +
3728 + $screen = get_current_screen();
3729 +
3730 + if ( ! $screen ) {
3731 + return;
3732 + }
3733 +
3734 + $columns = get_column_headers( $screen );
3735 + $hidden = get_hidden_columns( $screen );
3736 + $skip_cols = array( 'cb', 'name', 'settings' );
3737 + $per_page = get_user_option( 'formidable_page_formidable_per_page' );
3738 + $show_screen_options = $screen->show_screen_options();
3739 +
3740 + if ( $per_page < 1 ) {
3741 + $per_page = 20;
3742 + }
3743 +
3744 + include FrmAppHelper::plugin_path() . '/classes/views/frm-forms/forms-list-settings.php';
3696 3745 }
3697 3746
3698 3747 /**
3699 3748 * @deprecated 4.0