| @@ -13,10 +13,11 @@ | ||
| 13 | 13 | * |
| 14 | 14 | * @return void |
| 15 | 15 | */ |
| 16 | 16 | public static function menu() { |
| 17 | - $label = __( 'Applications', 'formidable' ); | |
| 18 | - $cap = self::get_required_capability(); | |
| 17 | + $label = __( 'Applications', 'formidable' ); | |
| 18 | + $new_pill = '<span class="frm-new-pill">NEW</span>'; | |
| 19 | + $cap = self::get_required_capability(); | |
| 19 | 20 | |
| 20 | 21 | if ( ! current_user_can( $cap ) && is_callable( 'FrmProApplicationsHelper::get_custom_applications_capability' ) ) { |
| 21 | 22 | $custom_applications_cap = FrmProApplicationsHelper::get_custom_applications_capability(); |
| 22 | 23 | if ( current_user_can( $custom_applications_cap ) ) { |
| @@ -30,9 +31,9 @@ | ||
| 30 | 31 | $slug = 'formidable-applications'; |
| 31 | 32 | $callback = array( __CLASS__, 'landing_page' ); |
| 32 | 33 | } |
| 33 | 34 | |
| 34 | - add_submenu_page( 'formidable', 'Formidable | ' . $label, $label, $cap, $slug, $callback ); | |
| 35 | + add_submenu_page( 'formidable', 'Formidable | ' . $label, $label . $new_pill, $cap, $slug, $callback ); | |
| 35 | 36 | } |
| 36 | 37 | |
| 37 | 38 | /** |
| 38 | 39 | * Get the required capability for accessing the Applications dashboard. |
| @@ -71,11 +72,8 @@ | ||
| 71 | 72 | * |
| 72 | 73 | * @return void |
| 73 | 74 | */ |
| 74 | 75 | public static function get_applications_data() { |
| 75 | - FrmAppHelper::permission_check( 'frm_view_forms' ); | |
| 76 | - check_ajax_referer( 'frm_ajax', 'nonce' ); | |
| 77 | - | |
| 78 | 76 | $view = FrmAppHelper::get_param( 'view', '', 'get', 'sanitize_text_field' ); |
| 79 | 77 | $data = array(); |
| 80 | 78 | |
| 81 | 79 | if ( 'applications' !== $view ) { |
| @@ -172,9 +170,8 @@ | ||
| 172 | 170 | wp_enqueue_style( 'formidable-grids' ); |
| 173 | 171 | |
| 174 | 172 | $js_dependencies = array( |
| 175 | 173 | 'wp-i18n', |
| 176 | - 'wp-hooks', // This prevents a console error "wp.hooks is undefined" in WP versions older than 5.7. | |
| 177 | 174 | 'formidable_dom', |
| 178 | 175 | ); |
| 179 | 176 | wp_register_script( 'formidable_applications', $plugin_url . '/js/admin/applications.js', $js_dependencies, $version, true ); |
| 180 | 177 | wp_register_style( 'formidable_applications', $plugin_url . '/css/admin/applications.css', array(), $version ); |