| @@ -6,9 +6,9 @@ | ||
| 6 | 6 | if ( ! isset( $saving ) ) { |
| 7 | 7 | header( 'Content-type: text/css' ); |
| 8 | 8 | |
| 9 | 9 | if ( ! empty( $css ) ) { |
| 10 | - echo strip_tags( $css, 'all' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 10 | + echo strip_tags( FrmStylesHelper::maybe_scope_custom_css_in_cached_output( $css ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 11 | 11 | FrmStylesController::maybe_hide_sample_form_error_message(); |
| 12 | 12 | die(); |
| 13 | 13 | } |
| 14 | 14 | } |
| @@ -18,13 +18,19 @@ | ||
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | $styles = $frm_style->get_all(); |
| 21 | 21 | $default_style = $frm_style->get_default_style( $styles ); |
| 22 | -$defaults = FrmStylesHelper::get_settings_for_output( $default_style ); | |
| 23 | -$important = empty( $defaults['important_style'] ) ? '' : ' !important'; | |
| 24 | 22 | $pro_is_installed = FrmAppHelper::pro_is_installed(); |
| 25 | -$use_chosen_js = FrmStylesHelper::use_chosen_js(); | |
| 26 | 23 | |
| 24 | +if ( ! $pro_is_installed && $default_style ) { | |
| 25 | + // Per-form styles are a Pro feature, so only the default style is ever used without Pro. | |
| 26 | + $styles = array( $default_style->ID => $default_style ); | |
| 27 | +} | |
| 28 | + | |
| 29 | +$defaults = FrmStylesHelper::get_settings_for_output( $default_style ); | |
| 30 | +$important = ! empty( $defaults['important_style'] ) ? ' !important' : ''; | |
| 31 | +$use_chosen_js = FrmStylesHelper::use_chosen_js(); | |
| 32 | + | |
| 27 | 33 | ?> |
| 28 | 34 | .with_frm_style{ |
| 29 | 35 | <?php FrmStylesHelper::output_vars( $defaults ); ?> |
| 30 | 36 | } |
| @@ -142,13 +148,14 @@ | ||
| 142 | 148 | color: var(--form-desc-color)<?php echo esc_html( $important ); ?>; |
| 143 | 149 | <?php } ?> |
| 144 | 150 | } |
| 145 | 151 | |
| 152 | +.with_frm_style .frm_form_field.frm_html_container{ | |
| 146 | 153 | <?php if ( ! empty( $defaults['form_desc_size'] ) ) { ?> |
| 147 | -.with_frm_style .frm_form_field.frm_html_container{ | |
| 148 | 154 | font-size: var(--form-desc-size)<?php echo esc_html( $important ); ?>; |
| 155 | +<?php } ?> | |
| 156 | + overflow-wrap: break-word<?php echo esc_html( $important ); ?>; | |
| 149 | 157 | } |
| 150 | -<?php } ?> | |
| 151 | 158 | |
| 152 | 159 | .with_frm_style .frm_form_field .frm_show_it{ |
| 153 | 160 | <?php if ( ! empty( $defaults['field_font_size'] ) ) { ?> |
| 154 | 161 | font-size: var(--field-font-size)<?php echo esc_html( $important ); ?>; |
| @@ -191,8 +198,14 @@ | ||
| 191 | 198 | vertical-align:top; |
| 192 | 199 | height:auto; |
| 193 | 200 | } |
| 194 | 201 | |
| 202 | +<?php if ( $use_chosen_js ) { ?> | |
| 203 | +.with_frm_style .chosen-container-multi .chosen-choices, | |
| 204 | +.with_frm_style .chosen-container-single .chosen-single, | |
| 205 | +<?php } elseif ( $pro_is_installed ) { ?> | |
| 206 | +.with_frm_style .frm_slimselect.ss-main, | |
| 207 | +<?php } ?> | |
| 195 | 208 | .with_frm_style input[type=text], |
| 196 | 209 | .with_frm_style input[type=password], |
| 197 | 210 | .with_frm_style input[type=email], |
| 198 | 211 | .with_frm_style input[type=number], |
| @@ -205,14 +218,9 @@ | ||
| 205 | 218 | .frm_form_fields_style, |
| 206 | 219 | .with_frm_style .frm_scroll_box .frm_opt_container, |
| 207 | 220 | .frm_form_fields_active_style, |
| 208 | 221 | .frm_form_fields_error_style, |
| 209 | -.with_frm_style .frm-card-element.StripeElement, | |
| 210 | -<?php if ( $use_chosen_js ) { ?> | |
| 211 | -.with_frm_style .chosen-container-multi .chosen-choices, | |
| 212 | -.with_frm_style .chosen-container-single .chosen-single, | |
| 213 | -<?php } ?> | |
| 214 | -.with_frm_style .frm_slimselect.ss-main { | |
| 222 | +.with_frm_style .frm-card-element.StripeElement { | |
| 215 | 223 | color: var(--text-color)<?php echo esc_html( $important ); ?>; |
| 216 | 224 | background-color: var(--bg-color)<?php echo esc_html( $important ); ?>; |
| 217 | 225 | border-color: var(--border-color)<?php echo esc_html( $important ); ?>; |
| 218 | 226 | border-width: var(--field-border-width)<?php echo esc_html( $important ); ?>; |
| @@ -226,9 +234,14 @@ | ||
| 226 | 234 | outline: none<?php echo esc_html( $important ); ?>; |
| 227 | 235 | font-weight: var(--field-weight); |
| 228 | 236 | } |
| 229 | 237 | |
| 230 | -<?php if ( ! empty( $important ) ) : ?> | |
| 238 | +.with_frm_style input:-webkit-autofill:focus { | |
| 239 | + /* Prevent the user agent autofill background color from taking effect on focus. */ | |
| 240 | + transition: background-color 5000s ease-in-out 0s<?php echo esc_html( $important ); ?>; | |
| 241 | +} | |
| 242 | + | |
| 243 | +<?php if ( $important ) : ?> | |
| 231 | 244 | <?php if ( $use_chosen_js ) { ?> |
| 232 | 245 | .with_frm_style .chosen-container-multi .chosen-choices, |
| 233 | 246 | .with_frm_style .chosen-container-single .chosen-single, |
| 234 | 247 | <?php } ?> |
| @@ -319,8 +332,9 @@ | ||
| 319 | 332 | .with_frm_style input[type=file].frm_transparent{ |
| 320 | 333 | color:transparent<?php echo esc_html( $important ); ?>; |
| 321 | 334 | } |
| 322 | 335 | |
| 336 | +<?php if ( $pro_is_installed ) { ?> | |
| 323 | 337 | .with_frm_style .wp-editor-wrap{ |
| 324 | 338 | width: var(--field-width)<?php echo esc_html( $important ); ?>; |
| 325 | 339 | max-width:100%; |
| 326 | 340 | } |
| @@ -332,8 +346,9 @@ | ||
| 332 | 346 | |
| 333 | 347 | .with_frm_style .mceIframeContainer{ |
| 334 | 348 | background-color: var(--bg-color)<?php echo esc_html( $important ); ?>; |
| 335 | 349 | } |
| 350 | +<?php } ?> | |
| 336 | 351 | |
| 337 | 352 | .with_frm_style select{ |
| 338 | 353 | width: var(--auto-width)<?php echo esc_html( $important ); ?>; |
| 339 | 354 | max-width:100%; |
| @@ -413,11 +428,13 @@ | ||
| 413 | 428 | .frm_none_container .frm_primary_label{ |
| 414 | 429 | display:none; |
| 415 | 430 | } |
| 416 | 431 | |
| 432 | +<?php if ( $pro_is_installed ) { ?> | |
| 417 | 433 | .with_frm_style .frm_section_heading.frm_hide_section{ |
| 418 | 434 | margin-top:0 !important; |
| 419 | 435 | } |
| 436 | +<?php } ?> | |
| 420 | 437 | |
| 421 | 438 | .with_frm_style .frm_hidden_container .frm_primary_label, |
| 422 | 439 | .with_frm_style .frm_pos_hidden, |
| 423 | 440 | .frm_hidden_container .frm_primary_label{ |
| @@ -441,26 +458,13 @@ | ||
| 441 | 458 | .with_frm_style .frm_inside_container > textarea { |
| 442 | 459 | display: block; |
| 443 | 460 | } |
| 444 | 461 | |
| 445 | -/* These do not work if they are combined */ | |
| 446 | 462 | .with_frm_style input::placeholder, |
| 447 | 463 | .with_frm_style textarea::placeholder { |
| 448 | 464 | font-size: var(--field-font-size)<?php echo esc_html( $important ); ?>; |
| 449 | 465 | } |
| 450 | 466 | |
| 451 | -.with_frm_style .frm_inside_container > input::-moz-placeholder, | |
| 452 | -.with_frm_style .frm_inside_container > textarea::-moz-placeholder { | |
| 453 | - opacity: 0 !important; | |
| 454 | - transition: opacity 0.3s ease-in; | |
| 455 | -} | |
| 456 | - | |
| 457 | -.with_frm_style .frm_inside_container > input:-ms-input-placeholder, | |
| 458 | -.with_frm_style .frm_inside_container > textarea:-ms-input-placeholder { | |
| 459 | - opacity: 0; | |
| 460 | - transition: opacity 0.3s ease-in; | |
| 461 | -} | |
| 462 | - | |
| 463 | 467 | .with_frm_style .frm_inside_container > input::placeholder, |
| 464 | 468 | .with_frm_style .frm_inside_container > textarea::placeholder { |
| 465 | 469 | opacity: 0; |
| 466 | 470 | transition: opacity 0.3s ease-in; |
| @@ -502,21 +506,8 @@ | ||
| 502 | 506 | font-size: 12px; |
| 503 | 507 | font-size: calc(0.85 * var(--field-font-size)); |
| 504 | 508 | } |
| 505 | 509 | |
| 506 | -/* These do not work if they are combined */ | |
| 507 | -.with_frm_style .frm_inside_container.frm_label_float_top > input::-moz-placeholder, | |
| 508 | -.with_frm_style .frm_inside_container.frm_label_float_top > textarea::-moz-placeholder { | |
| 509 | - opacity: 1 !important; | |
| 510 | - transition: opacity 0.3s ease-in; | |
| 511 | -} | |
| 512 | - | |
| 513 | -.with_frm_style .frm_inside_container.frm_label_float_top > input:-ms-input-placeholder, | |
| 514 | -.with_frm_style .frm_inside_container.frm_label_float_top > textarea:-ms-input-placeholder { | |
| 515 | - opacity: 1; | |
| 516 | - transition: opacity 0.3s ease-in; | |
| 517 | -} | |
| 518 | - | |
| 519 | 510 | .with_frm_style .frm_inside_container.frm_label_float_top > input::placeholder, |
| 520 | 511 | .with_frm_style .frm_inside_container.frm_label_float_top > textarea::placeholder { |
| 521 | 512 | opacity: 1; |
| 522 | 513 | transition: opacity 0.3s ease-in; |
| @@ -527,9 +518,9 @@ | ||
| 527 | 518 | .with_frm_style .frm_pro_max_limit_desc{ |
| 528 | 519 | clear:both; |
| 529 | 520 | } |
| 530 | 521 | |
| 531 | -.with_frm_style input[type=number][readonly]{ | |
| 522 | +.with_frm_style input[type=number][readonly] { | |
| 532 | 523 | -moz-appearance: textfield; |
| 533 | 524 | } |
| 534 | 525 | |
| 535 | 526 | .with_frm_style select[multiple="multiple"]{ |
| @@ -536,8 +527,9 @@ | ||
| 536 | 527 | height:auto; |
| 537 | 528 | line-height:normal; |
| 538 | 529 | } |
| 539 | 530 | |
| 531 | +<?php if ( $pro_is_installed ) { ?> | |
| 540 | 532 | .with_frm_style .frm_catlevel_2, |
| 541 | 533 | .with_frm_style .frm_catlevel_3, |
| 542 | 534 | .with_frm_style .frm_catlevel_4, |
| 543 | 535 | .with_frm_style .frm_catlevel_5{ |
| @@ -542,9 +534,11 @@ | ||
| 542 | 534 | .with_frm_style .frm_catlevel_4, |
| 543 | 535 | .with_frm_style .frm_catlevel_5{ |
| 544 | 536 | margin-left:18px; |
| 545 | 537 | } |
| 538 | +<?php } ?> | |
| 546 | 539 | |
| 540 | +<?php if ( $pro_is_installed ) { ?> | |
| 547 | 541 | .with_frm_style .wp-editor-container{ |
| 548 | 542 | border:1px solid #e5e5e5; |
| 549 | 543 | } |
| 550 | 544 | |
| @@ -554,8 +548,9 @@ | ||
| 554 | 548 | |
| 555 | 549 | .with_frm_style .wp-editor-container textarea{ |
| 556 | 550 | border:none; |
| 557 | 551 | } |
| 552 | +<?php } ?> | |
| 558 | 553 | |
| 559 | 554 | .with_frm_style .auto_width #loginform input, |
| 560 | 555 | .with_frm_style .auto_width input, |
| 561 | 556 | .with_frm_style input.auto_width, |
| @@ -563,14 +558,16 @@ | ||
| 563 | 558 | .with_frm_style textarea.auto_width{ |
| 564 | 559 | width:auto<?php echo esc_html( $important ); ?>; |
| 565 | 560 | } |
| 566 | 561 | |
| 562 | +<?php if ( $pro_is_installed ) { ?> | |
| 567 | 563 | .with_frm_style .frm_repeat_buttons{ |
| 568 | 564 | white-space:nowrap; |
| 569 | 565 | } |
| 566 | +<?php } ?> | |
| 570 | 567 | |
| 571 | 568 | .with_frm_style .frm_button{ |
| 572 | - text-decoration:none !important;; | |
| 569 | + text-decoration:none !important; | |
| 573 | 570 | border:1px solid #eee; |
| 574 | 571 | display:inline-block; |
| 575 | 572 | <?php if ( ! empty( $defaults['submit_padding'] ) ) { ?> |
| 576 | 573 | padding: var(--submit-padding)<?php echo esc_html( $important ); ?>; |
| @@ -577,9 +574,8 @@ | ||
| 577 | 574 | <?php } else { ?> |
| 578 | 575 | padding:5px; |
| 579 | 576 | <?php } ?> |
| 580 | 577 | <?php if ( ! empty( $defaults['border_radius'] ) ) { ?> |
| 581 | - border-radius:<?php echo esc_html( $defaults['border_radius'] . $important ); ?>; | |
| 582 | 578 | border-radius:var(--border-radius)<?php echo esc_html( $important ); ?>; |
| 583 | 579 | <?php } ?> |
| 584 | 580 | <?php if ( ! empty( $defaults['submit_font_size'] ) ) { ?> |
| 585 | 581 | font-size: var(--submit-font-size)<?php echo esc_html( $important ); ?>; |
| @@ -664,9 +660,11 @@ | ||
| 664 | 660 | .with_frm_style.frm_center_submit .frm_submit button{ |
| 665 | 661 | margin-bottom:8px !important; |
| 666 | 662 | } |
| 667 | 663 | |
| 664 | +<?php if ( $pro_is_installed ) { ?> | |
| 668 | 665 | .with_frm_style .frm-edit-page-btn, |
| 666 | +<?php } ?> | |
| 669 | 667 | .with_frm_style .frm_submit input[type=submit], |
| 670 | 668 | .with_frm_style .frm_submit input[type=button], |
| 671 | 669 | .with_frm_style .frm_submit button{ |
| 672 | 670 | -webkit-appearance: none; |
| @@ -683,9 +681,11 @@ | ||
| 683 | 681 | /* keep this for reverse compatibility for old HTML */ |
| 684 | 682 | visibility:visible !important; |
| 685 | 683 | } |
| 686 | 684 | |
| 685 | +<?php if ( $pro_is_installed ) { ?> | |
| 687 | 686 | .with_frm_style .frm_loading_prev .frm_prev_page, |
| 687 | +<?php } ?> | |
| 688 | 688 | .with_frm_style .frm_loading_form .frm_button_submit { |
| 689 | 689 | position: relative; |
| 690 | 690 | color: transparent !important; |
| 691 | 691 | text-shadow: none !important; |
| @@ -690,11 +690,13 @@ | ||
| 690 | 690 | color: transparent !important; |
| 691 | 691 | text-shadow: none !important; |
| 692 | 692 | } |
| 693 | 693 | |
| 694 | +<?php if ( $pro_is_installed ) { ?> | |
| 694 | 695 | .with_frm_style .frm_loading_prev .frm_prev_page:hover, |
| 695 | 696 | .with_frm_style .frm_loading_prev .frm_prev_page:active, |
| 696 | 697 | .with_frm_style .frm_loading_prev .frm_prev_page:focus, |
| 698 | +<?php } ?> | |
| 697 | 699 | .with_frm_style .frm_loading_form .frm_button_submit:hover, |
| 698 | 700 | .with_frm_style .frm_loading_form .frm_button_submit:active, |
| 699 | 701 | .with_frm_style .frm_loading_form .frm_button_submit:focus { |
| 700 | 702 | cursor: not-allowed; |
| @@ -702,9 +704,11 @@ | ||
| 702 | 704 | outline: none !important; |
| 703 | 705 | box-shadow: none; |
| 704 | 706 | } |
| 705 | 707 | |
| 708 | +<?php if ( $pro_is_installed ) { ?> | |
| 706 | 709 | .with_frm_style .frm_loading_prev .frm_prev_page::before, |
| 710 | +<?php } ?> | |
| 707 | 711 | .with_frm_style .frm_loading_form .frm_button_submit:before { |
| 708 | 712 | content: ''; |
| 709 | 713 | display: inline-block; |
| 710 | 714 | position: absolute; |
| @@ -728,11 +732,13 @@ | ||
| 728 | 732 | align-items: center; |
| 729 | 733 | gap: 2%; |
| 730 | 734 | } |
| 731 | 735 | |
| 736 | +<?php if ( $pro_is_installed ) { ?> | |
| 732 | 737 | .with_frm_style .frm_submit.frm_flex button.frm_button_submit ~ .frm_prev_page { |
| 733 | 738 | order: -1; |
| 734 | 739 | } |
| 740 | +<?php } ?> | |
| 735 | 741 | |
| 736 | 742 | <?php |
| 737 | 743 | foreach ( $styles as $style ) { |
| 738 | 744 | include __DIR__ . '/_single_theme.css.php'; |
| @@ -739,9 +745,9 @@ | ||
| 739 | 745 | unset( $style ); |
| 740 | 746 | } |
| 741 | 747 | |
| 742 | 748 | // Set it again since it may have been overridden. |
| 743 | -$important = empty( $defaults['important_style'] ) ? '' : ' !important'; | |
| 749 | +$important = ! empty( $defaults['important_style'] ) ? ' !important' : ''; | |
| 744 | 750 | ?> |
| 745 | 751 | |
| 746 | 752 | .frm_ajax_loading{ |
| 747 | 753 | visibility:hidden; |
| @@ -755,16 +761,18 @@ | ||
| 755 | 761 | a.frm_save_draft{ |
| 756 | 762 | cursor:pointer; |
| 757 | 763 | } |
| 758 | 764 | |
| 765 | +<?php if ( $pro_is_installed ) { ?> | |
| 759 | 766 | .with_frm_style a.frm_save_draft, |
| 760 | 767 | .with_frm_style a.frm_start_over{ |
| 761 | -<?php if ( ! empty( $defaults['font'] ) ) { ?> | |
| 768 | + <?php if ( ! empty( $defaults['font'] ) ) { ?> | |
| 762 | 769 | font-family: var(--font); |
| 763 | 770 | <?php } ?> |
| 764 | 771 | font-size: var(--submit-font-size); |
| 765 | 772 | font-weight: var(--submit-weight); |
| 766 | 773 | } |
| 774 | +<?php } ?> | |
| 767 | 775 | |
| 768 | 776 | .horizontal_radio .frm_radio{ |
| 769 | 777 | margin:0 5px 0 0; |
| 770 | 778 | } |
| @@ -1068,8 +1076,9 @@ | ||
| 1068 | 1076 | .frm-alt-table tr:nth-child(even) { |
| 1069 | 1077 | background-color:<?php echo esc_html( FrmStylesHelper::adjust_brightness( $defaults['border_color'], 45 ) ); ?>; |
| 1070 | 1078 | } |
| 1071 | 1079 | |
| 1080 | +<?php if ( $pro_is_installed ) { ?> | |
| 1072 | 1081 | table.form_results.with_frm_style{ |
| 1073 | 1082 | border-style: solid; |
| 1074 | 1083 | border-width: var(--field-border-width)<?php echo esc_html( $important ); ?>; |
| 1075 | 1084 | border-color: var(--border-color)<?php echo esc_html( $important ); ?>; |
| @@ -1077,17 +1086,18 @@ | ||
| 1077 | 1086 | |
| 1078 | 1087 | table.form_results.with_frm_style tr td{ |
| 1079 | 1088 | text-align:left; |
| 1080 | 1089 | padding:7px 9px; |
| 1081 | -<?php if ( ! empty( $defaults['text_color'] ) ) { ?> | |
| 1090 | + <?php if ( ! empty( $defaults['text_color'] ) ) { ?> | |
| 1082 | 1091 | color: var(--text-color)<?php echo esc_html( $important ); ?>; |
| 1083 | 1092 | <?php } ?> |
| 1084 | -<?php if ( ! empty( $defaults['border_color'] ) ) { ?> | |
| 1093 | + <?php if ( ! empty( $defaults['border_color'] ) ) { ?> | |
| 1085 | 1094 | border-top-style: solid; |
| 1086 | 1095 | border-top-width: var(--field-border-width)<?php echo esc_html( $important ); ?>; |
| 1087 | 1096 | border-top-color: var(--border-color)<?php echo esc_html( $important ); ?>; |
| 1088 | 1097 | <?php } ?> |
| 1089 | 1098 | } |
| 1099 | +<?php } ?> | |
| 1090 | 1100 | |
| 1091 | 1101 | table.form_results.with_frm_style tr.frm_even, |
| 1092 | 1102 | .frm-grid .frm_even{ |
| 1093 | 1103 | background-color:#fff; |
| @@ -1106,18 +1116,23 @@ | ||
| 1106 | 1116 | background-color:<?php echo esc_html( FrmStylesHelper::adjust_brightness( $defaults['border_color'], 45 ) ); ?>; |
| 1107 | 1117 | padding: 40px; |
| 1108 | 1118 | } |
| 1109 | 1119 | |
| 1120 | + <?php if ( $pro_is_installed ) { ?> | |
| 1110 | 1121 | .with_frm_style .frm-show-form .frm_color_block.frm_section_heading h3, |
| 1111 | 1122 | .frm_color_block.frm_section_heading h3 { |
| 1112 | 1123 | border-width: 0 !important; |
| 1113 | 1124 | } |
| 1125 | + <?php } ?> | |
| 1114 | 1126 | <?php } ?> |
| 1115 | 1127 | |
| 1128 | +<?php if ( $pro_is_installed ) { ?> | |
| 1116 | 1129 | .frm_collapse .ui-icon{ |
| 1117 | 1130 | display:inline-block; |
| 1118 | 1131 | } |
| 1132 | +<?php } ?> | |
| 1119 | 1133 | |
| 1134 | +<?php if ( $pro_is_installed ) { ?> | |
| 1120 | 1135 | .frm_toggle_container{ |
| 1121 | 1136 | /* Prevent the slide and bounce */ |
| 1122 | 1137 | border:1px solid transparent; |
| 1123 | 1138 | } |
| @@ -1134,9 +1149,11 @@ | ||
| 1134 | 1149 | |
| 1135 | 1150 | .frm_toggle_container .frm_month_listing{ |
| 1136 | 1151 | margin-left:40px; |
| 1137 | 1152 | } |
| 1153 | +<?php } ?> | |
| 1138 | 1154 | |
| 1155 | +<?php if ( $pro_is_installed ) { ?> | |
| 1139 | 1156 | #frm_loading{ |
| 1140 | 1157 | display:none; |
| 1141 | 1158 | position:fixed; |
| 1142 | 1159 | top:0; |
| @@ -1179,11 +1196,11 @@ | ||
| 1179 | 1196 | #frm_loading .progress.active .progress-bar{ |
| 1180 | 1197 | animation:2s linear 0s normal none infinite progress-bar-stripes; |
| 1181 | 1198 | } |
| 1182 | 1199 | |
| 1183 | -<?php if ( ! empty( $defaults['bg_color'] ) ) { ?> | |
| 1200 | + <?php if ( ! empty( $defaults['bg_color'] ) ) { ?> | |
| 1184 | 1201 | #frm_loading .progress-striped .progress-bar { |
| 1185 | - <?php if ( ! empty( $defaults['border_color'] ) ) { ?> | |
| 1202 | + <?php if ( ! empty( $defaults['border_color'] ) ) { ?> | |
| 1186 | 1203 | background-image: linear-gradient(45deg, var(--border-color) 25%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 50%, var(--border-color) 50%, var(--border-color) 75%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0)); |
| 1187 | 1204 | <?php } ?> |
| 1188 | 1205 | background-size:40px 40px; |
| 1189 | 1206 | } |
| @@ -1198,8 +1215,11 @@ | ||
| 1198 | 1215 | text-align: center; |
| 1199 | 1216 | transition: width 0.6s ease 0s; |
| 1200 | 1217 | width: 100%; |
| 1201 | 1218 | } |
| 1219 | + <?php | |
| 1220 | +}//end if | |
| 1221 | +?> | |
| 1202 | 1222 | |
| 1203 | 1223 | .frm_image_from_url{ |
| 1204 | 1224 | height:50px; |
| 1205 | 1225 | } |
| @@ -1208,8 +1228,9 @@ | ||
| 1208 | 1228 | background:url(../images/ajax_loader.gif) no-repeat center center; |
| 1209 | 1229 | padding:6px 12px; |
| 1210 | 1230 | } |
| 1211 | 1231 | |
| 1232 | +<?php if ( $pro_is_installed ) { ?> | |
| 1212 | 1233 | select.frm_loading_lookup{ |
| 1213 | 1234 | background-image: url(../images/ajax_loader.gif) !important; |
| 1214 | 1235 | background-position: 10px; |
| 1215 | 1236 | background-repeat: no-repeat; |
| @@ -1214,20 +1235,25 @@ | ||
| 1214 | 1235 | background-position: 10px; |
| 1215 | 1236 | background-repeat: no-repeat; |
| 1216 | 1237 | color: transparent !important; |
| 1217 | 1238 | } |
| 1239 | +<?php } ?> | |
| 1218 | 1240 | |
| 1219 | 1241 | <?php readfile( __DIR__ . '/frm_grids.css' ); ?> |
| 1220 | 1242 | |
| 1243 | +<?php if ( $pro_is_installed ) { ?> | |
| 1221 | 1244 | .frm_conf_field.frm_left_container .frm_primary_label{ |
| 1222 | 1245 | display:none; |
| 1223 | 1246 | } |
| 1247 | +<?php } ?> | |
| 1224 | 1248 | |
| 1249 | +<?php if ( $pro_is_installed ) { ?> | |
| 1225 | 1250 | .wp-editor-wrap *, |
| 1226 | 1251 | .wp-editor-wrap *:after, |
| 1227 | 1252 | .wp-editor-wrap *:before{ |
| 1228 | 1253 | box-sizing:content-box; |
| 1229 | 1254 | } |
| 1255 | +<?php } ?> | |
| 1230 | 1256 | |
| 1231 | 1257 | .with_frm_style .frm_grid, |
| 1232 | 1258 | .with_frm_style .frm_grid_first, |
| 1233 | 1259 | .with_frm_style .frm_grid_odd{ |
| @@ -1338,105 +1364,8 @@ | ||
| 1338 | 1364 | .frm_grid_odd .frm_checkbox{ |
| 1339 | 1365 | display:inline; |
| 1340 | 1366 | } |
| 1341 | 1367 | |
| 1342 | -.frm_grid_2 .frm_radio, | |
| 1343 | -.frm_grid_2 .frm_checkbox, | |
| 1344 | -.frm_grid_2 .frm_primary_label{ | |
| 1345 | - width:48% !important; | |
| 1346 | -} | |
| 1347 | - | |
| 1348 | -.frm_grid_2 .frm_radio, | |
| 1349 | -.frm_grid_2 .frm_checkbox{ | |
| 1350 | - margin-right:4%; | |
| 1351 | -} | |
| 1352 | - | |
| 1353 | -.frm_grid_3 .frm_radio, | |
| 1354 | -.frm_grid_3 .frm_checkbox, | |
| 1355 | -.frm_grid_3 .frm_primary_label{ | |
| 1356 | - width:30% !important; | |
| 1357 | -} | |
| 1358 | - | |
| 1359 | -.frm_grid_3 .frm_radio, | |
| 1360 | -.frm_grid_3 .frm_checkbox{ | |
| 1361 | - margin-right:3%; | |
| 1362 | -} | |
| 1363 | - | |
| 1364 | -.frm_grid_4 .frm_radio, | |
| 1365 | -.frm_grid_4 .frm_checkbox{ | |
| 1366 | - width:20% !important; | |
| 1367 | -} | |
| 1368 | - | |
| 1369 | -.frm_grid_4 .frm_primary_label{ | |
| 1370 | - width:28% !important; | |
| 1371 | -} | |
| 1372 | - | |
| 1373 | -.frm_grid_4 .frm_radio, | |
| 1374 | -.frm_grid_4 .frm_checkbox{ | |
| 1375 | - margin-right:4%; | |
| 1376 | -} | |
| 1377 | - | |
| 1378 | -.frm_grid_5 .frm_primary_label, | |
| 1379 | -.frm_grid_7 .frm_primary_label{ | |
| 1380 | - width:24% !important; | |
| 1381 | -} | |
| 1382 | - | |
| 1383 | -.frm_grid_5 .frm_radio, | |
| 1384 | -.frm_grid_5 .frm_checkbox{ | |
| 1385 | - width:17% !important; | |
| 1386 | - margin-right:2%; | |
| 1387 | -} | |
| 1388 | - | |
| 1389 | -.frm_grid_6 .frm_primary_label{ | |
| 1390 | - width:25% !important; | |
| 1391 | -} | |
| 1392 | - | |
| 1393 | -.frm_grid_6 .frm_radio, | |
| 1394 | -.frm_grid_6 .frm_checkbox{ | |
| 1395 | - width:14% !important; | |
| 1396 | - margin-right:1%; | |
| 1397 | -} | |
| 1398 | - | |
| 1399 | -.frm_grid_7 .frm_primary_label{ | |
| 1400 | - width:22% !important; | |
| 1401 | -} | |
| 1402 | - | |
| 1403 | -.frm_grid_7 .frm_radio, | |
| 1404 | -.frm_grid_7 .frm_checkbox{ | |
| 1405 | - width:12% !important; | |
| 1406 | - margin-right:1%; | |
| 1407 | -} | |
| 1408 | - | |
| 1409 | -.frm_grid_8 .frm_primary_label{ | |
| 1410 | - width:23% !important; | |
| 1411 | -} | |
| 1412 | - | |
| 1413 | -.frm_grid_8 .frm_radio, | |
| 1414 | -.frm_grid_8 .frm_checkbox{ | |
| 1415 | - width:10% !important; | |
| 1416 | - margin-right:1%; | |
| 1417 | -} | |
| 1418 | - | |
| 1419 | -.frm_grid_9 .frm_primary_label{ | |
| 1420 | - width:20% !important; | |
| 1421 | -} | |
| 1422 | - | |
| 1423 | -.frm_grid_9 .frm_radio, | |
| 1424 | -.frm_grid_9 .frm_checkbox{ | |
| 1425 | - width:9% !important; | |
| 1426 | - margin-right:1%; | |
| 1427 | -} | |
| 1428 | - | |
| 1429 | -.frm_grid_10 .frm_primary_label{ | |
| 1430 | - width:19% !important; | |
| 1431 | -} | |
| 1432 | - | |
| 1433 | -.frm_grid_10 .frm_radio, | |
| 1434 | -.frm_grid_10 .frm_checkbox{ | |
| 1435 | - width:8% !important; | |
| 1436 | - margin-right:1%; | |
| 1437 | -} | |
| 1438 | - | |
| 1439 | 1368 | .frm_form_field.frm_inline_container .frm_opt_container, |
| 1440 | 1369 | .frm_form_field.frm_right_container .frm_opt_container, |
| 1441 | 1370 | .frm_form_field.frm_left_container .frm_opt_container{ |
| 1442 | 1371 | padding-top:4px; |
| @@ -1583,8 +1512,9 @@ | ||
| 1583 | 1512 | /** |
| 1584 | 1513 | * Call action so other plugins can add additional CSS. |
| 1585 | 1514 | * |
| 1586 | 1515 | * @param array $args { |
| 1516 | + * | |
| 1587 | 1517 | * @type array $defaults |
| 1588 | 1518 | * } |
| 1589 | 1519 | */ |
| 1590 | 1520 | do_action( 'frm_include_front_css', compact( 'defaults' ) ); |
| @@ -1591,8 +1521,9 @@ | ||
| 1591 | 1521 | ?> |
| 1592 | 1522 | |
| 1593 | 1523 | /* Responsive */ |
| 1594 | 1524 | |
| 1525 | +<?php if ( $pro_is_installed ) { ?> | |
| 1595 | 1526 | @media only screen and (max-width: 900px) { |
| 1596 | 1527 | .frm_form_field .frm_repeat_grid .frm_form_field.frm_sixth .frm_primary_label, |
| 1597 | 1528 | .frm_form_field .frm_repeat_grid .frm_form_field.frm_seventh .frm_primary_label, |
| 1598 | 1529 | .frm_form_field .frm_repeat_grid .frm_form_field.frm_eighth .frm_primary_label{ |
| @@ -1598,8 +1529,9 @@ | ||
| 1598 | 1529 | .frm_form_field .frm_repeat_grid .frm_form_field.frm_eighth .frm_primary_label{ |
| 1599 | 1530 | display: block !important; |
| 1600 | 1531 | } |
| 1601 | 1532 | } |
| 1533 | +<?php } ?> | |
| 1602 | 1534 | |
| 1603 | 1535 | @media only screen and (max-width: 600px) { |
| 1604 | 1536 | .frm_form_field.frm_four_col .frm_opt_container{ |
| 1605 | 1537 | grid-template-columns: repeat(2, 1fr); |
| @@ -1604,12 +1536,14 @@ | ||
| 1604 | 1536 | .frm_form_field.frm_four_col .frm_opt_container{ |
| 1605 | 1537 | grid-template-columns: repeat(2, 1fr); |
| 1606 | 1538 | } |
| 1607 | 1539 | |
| 1540 | + <?php if ( $pro_is_installed ) { ?> | |
| 1608 | 1541 | .with_frm_style .frm_repeat_inline, |
| 1609 | 1542 | .with_frm_style .frm_repeat_grid{ |
| 1610 | 1543 | margin: 20px 0; |
| 1611 | 1544 | } |
| 1545 | + <?php } ?> | |
| 1612 | 1546 | } |
| 1613 | 1547 | |
| 1614 | 1548 | @media only screen and (max-width: 500px) { |
| 1615 | 1549 | .frm_form_field.frm_two_col .frm_radio, |
| @@ -1650,5 +1584,9 @@ | ||
| 1650 | 1584 | margin: 0; |
| 1651 | 1585 | } |
| 1652 | 1586 | <?php |
| 1653 | 1587 | |
| 1654 | -echo strip_tags( FrmStylesController::get_custom_css() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 1588 | +$frm_custom_css = strip_tags( FrmStylesController::get_custom_css() ); | |
| 1589 | + | |
| 1590 | +if ( $frm_custom_css ) { | |
| 1591 | + echo FrmStylesHelper::maybe_scope_css_for_admin( $frm_custom_css ) . PHP_EOL; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 1592 | +} | |