| @@ -17,8 +17,9 @@ | ||
| 17 | 17 | // Make sure not to put .frm_wrap on the whole container because it will cause admin styles to apply to style cards. |
| 18 | 18 | 'class' => 'frm-right-panel frm-p-6 frm_wrap', |
| 19 | 19 | ); |
| 20 | 20 | $toggle_input_html = array(); |
| 21 | + | |
| 21 | 22 | if ( $globally_disabled ) { |
| 22 | 23 | $sidebar_params['class'] .= ' frm-styles-globally-disabled'; |
| 23 | 24 | $toggle_input_html['disabled'] = 'disabled'; |
| 24 | 25 | } |
| @@ -29,8 +30,9 @@ | ||
| 29 | 30 | $trigger_params = array( |
| 30 | 31 | 'id' => 'frm_new_style_trigger', |
| 31 | 32 | 'href' => '#', |
| 32 | 33 | ); |
| 34 | + | |
| 33 | 35 | if ( $can_create_styles ) { |
| 34 | 36 | $trigger_params['data-new-style-url'] = esc_url( admin_url( 'admin.php?page=formidable-styles&frm_action=new_style' ) ); |
| 35 | 37 | } else { |
| 36 | 38 | $trigger_params['class'] = 'frm_noallow'; |