| @@ -2,9 +2,10 @@ | ||
| 2 | 2 | if ( ! defined( 'ABSPATH' ) ) { |
| 3 | 3 | die( 'You are not allowed to call this page directly.' ); |
| 4 | 4 | } |
| 5 | 5 | |
| 6 | -$pro_is_installed = FrmAppHelper::pro_is_installed(); | |
| 6 | +$pro_is_installed = FrmAppHelper::pro_is_installed(); | |
| 7 | +$should_show_add_new_button = $form && $pro_is_installed && current_user_can( 'frm_create_entries' ); | |
| 7 | 8 | ?> |
| 8 | 9 | <div id="form_entries_page" class="frm_wrap frm_list_entry_page"> |
| 9 | 10 | <?php |
| 10 | 11 | // Adding new entries from an admin page is a Pro feature. |
| @@ -13,14 +14,14 @@ | ||
| 13 | 14 | 'label' => __( 'Form Entries', 'formidable' ), |
| 14 | 15 | 'form' => $form, |
| 15 | 16 | 'close' => $form ? admin_url( 'admin.php?page=formidable-entries&form=' . $form->id ) : '', |
| 16 | 17 | 'import_link' => $pro_is_installed, |
| 17 | - 'publish' => ! $form || ! $pro_is_installed ? true : array( | |
| 18 | + 'publish' => $should_show_add_new_button ? array( | |
| 18 | 19 | 'FrmAppHelper::add_new_item_link', |
| 19 | 20 | array( |
| 20 | 21 | 'new_link' => admin_url( 'admin.php?page=formidable-entries&frm_action=new&form=' . $form->id ), |
| 21 | 22 | ), |
| 22 | - ), | |
| 23 | + ) : true, | |
| 23 | 24 | ) |
| 24 | 25 | ); |
| 25 | 26 | ?> |
| 26 | 27 | |