| @@ -9,14 +9,14 @@ | ||
| 9 | 9 | class FrmInboxController { |
| 10 | 10 | |
| 11 | 11 | /** |
| 12 | 12 | * @since 4.05 |
| 13 | - * | |
| 14 | - * @return void | |
| 15 | 13 | */ |
| 16 | 14 | public static function menu() { |
| 17 | 15 | $unread = self::get_notice_count(); |
| 18 | 16 | add_submenu_page( 'formidable', 'Formidable | ' . __( 'Inbox', 'formidable' ), __( 'Inbox', 'formidable' ) . $unread, 'frm_change_settings', 'formidable-inbox', 'FrmInboxController::inbox' ); |
| 17 | + | |
| 18 | + self::maybe_add_old_css_message(); | |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | 22 | * @since 4.05 |
| @@ -27,12 +27,27 @@ | ||
| 27 | 27 | $inbox = new FrmInbox(); |
| 28 | 28 | return $inbox->unread_html(); |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | + private static function maybe_add_old_css_message() { | |
| 32 | + $frm_settings = FrmAppHelper::get_settings(); | |
| 33 | + if ( $frm_settings->old_css ) { | |
| 34 | + $inbox = new FrmInbox(); | |
| 35 | + $inbox->add_message( | |
| 36 | + array( | |
| 37 | + 'key' => 'old_css', | |
| 38 | + 'subject' => 'The option to disable CSS Grids for form layouts is being removed.', | |
| 39 | + 'message' => 'We\'ve got some awesome form layout features coming soon. These new layouts will require CSS grids, and will not be supported in Internet Explorer. If a visitor views your forms in IE, a single field will show in each row.<br><br>We recommend enabling CSS Grids in Global Settings and then checking your form layouts.', | |
| 40 | + 'cta' => '<a href="' . esc_url( admin_url( 'admin.php?page=formidable-settings' ) ) . '" class="button-primary frm-button-primary">' . esc_html__( 'Go to Global Settings', 'formidable' ) . '</a>', | |
| 41 | + 'icon' => 'frm_report_problem_icon', | |
| 42 | + 'type' => 'news', | |
| 43 | + ) | |
| 44 | + ); | |
| 45 | + } | |
| 46 | + } | |
| 47 | + | |
| 31 | 48 | /** |
| 32 | 49 | * @since 4.06 |
| 33 | - * | |
| 34 | - * @return void | |
| 35 | 50 | */ |
| 36 | 51 | public static function dismiss_all_button( $atts ) { |
| 37 | 52 | if ( empty( $atts['messages'] ) ) { |
| 38 | 53 | return; |
| @@ -37,9 +52,9 @@ | ||
| 37 | 52 | if ( empty( $atts['messages'] ) ) { |
| 38 | 53 | return; |
| 39 | 54 | } |
| 40 | 55 | |
| 41 | - echo '<button class="frm-button-secondary" id="frm-dismiss-inbox" type="button">' . | |
| 56 | + echo '<button class="button-secondary frm-button-secondary" id="frm-dismiss-inbox" type="button">' . | |
| 42 | 57 | esc_html__( 'Dismiss All', 'formidable' ) . |
| 43 | 58 | '</button>'; |
| 44 | 59 | } |
| 45 | 60 | |
| @@ -44,10 +59,8 @@ | ||
| 44 | 59 | } |
| 45 | 60 | |
| 46 | 61 | /** |
| 47 | 62 | * @since 4.05 |
| 48 | - * | |
| 49 | - * @return void | |
| 50 | 63 | */ |
| 51 | 64 | public static function inbox() { |
| 52 | 65 | FrmAppHelper::include_svg(); |
| 53 | 66 | self::add_tracking_request(); |
| @@ -64,10 +77,8 @@ | ||
| 64 | 77 | } |
| 65 | 78 | |
| 66 | 79 | /** |
| 67 | 80 | * @since 4.05 |
| 68 | - * | |
| 69 | - * @return void | |
| 70 | 81 | */ |
| 71 | 82 | public static function dismiss_message() { |
| 72 | 83 | check_ajax_referer( 'frm_ajax', 'nonce' ); |
| 73 | 84 | FrmAppHelper::permission_check( 'frm_change_settings' ); |
| @@ -86,10 +97,8 @@ | ||
| 86 | 97 | } |
| 87 | 98 | |
| 88 | 99 | /** |
| 89 | 100 | * @since 4.05 |
| 90 | - * | |
| 91 | - * @return void | |
| 92 | 101 | */ |
| 93 | 102 | private static function add_tracking_request() { |
| 94 | 103 | $settings = FrmAppHelper::get_settings(); |
| 95 | 104 | if ( $settings->tracking ) { |
| @@ -103,9 +112,9 @@ | ||
| 103 | 112 | array( |
| 104 | 113 | 'key' => 'usage', |
| 105 | 114 | 'message' => 'Gathering usage data allows us to improve Formidable. Your forms will be considered as we evaluate new features, judge the quality of an update, or determine if an improvement makes sense. You can always visit the <a href="' . esc_url( $link ) . '">Global Settings</a> and choose to stop sharing data. <a href="https://formidableforms.com/knowledgebase/global-settings-overview/#kb-usage-tracking" target="_blank" rel="noopener noreferrer">Read more about what data we collect</a>.', |
| 106 | 115 | 'subject' => __( 'Help Formidable improve with usage tracking', 'formidable' ), |
| 107 | - 'cta' => '<a href="#" class="frm-button-secondary frm_inbox_dismiss">Dismiss</a> <a href="' . esc_url( $link ) . '" class="button-primary frm-button-primary frm_inbox_dismiss">Activate usage tracking</a>', | |
| 116 | + 'cta' => '<a href="#" class="button-secondary frm-button-secondary frm_inbox_dismiss">Dismiss</a> <a href="' . esc_url( $link ) . '" class="button-primary frm-button-primary frm_inbox_dismiss">Activate usage tracking</a>', | |
| 108 | 117 | 'type' => 'feedback', |
| 109 | 118 | ) |
| 110 | 119 | ); |
| 111 | 120 | } |
| @@ -113,10 +122,8 @@ | ||
| 113 | 122 | /** |
| 114 | 123 | * Adds free template design. |
| 115 | 124 | * |
| 116 | 125 | * @since 4.10.03 |
| 117 | - * | |
| 118 | - * @return void | |
| 119 | 126 | */ |
| 120 | 127 | private static function add_free_template_message() { |
| 121 | 128 | if ( FrmAppHelper::pro_is_installed() ) { |
| 122 | 129 | return; |
| @@ -134,9 +141,9 @@ | ||
| 134 | 141 | array( |
| 135 | 142 | 'key' => 'free_templates', |
| 136 | 143 | 'message' => 'Add your email address to get a code for 10+ free form templates.', |
| 137 | 144 | 'subject' => 'Get 10+ Free Form Templates', |
| 138 | - 'cta' => '<a href="#" class="frm-button-secondary frm_inbox_dismiss">Dismiss</a> <a href="' . esc_url( $link ) . '" class="button-primary frm-button-primary">Get Now</a>', | |
| 145 | + 'cta' => '<a href="#" class="button-secondary frm-button-secondary frm_inbox_dismiss">Dismiss</a> <a href="' . esc_url( $link ) . '" class="button-primary frm-button-primary">Get Now</a>', | |
| 139 | 146 | 'type' => 'feedback', |
| 140 | 147 | ) |
| 141 | 148 | ); |
| 142 | 149 | } |