| @@ -2,8 +2,9 @@ | ||
| 2 | 2 | |
| 3 | 3 | // This file is included via Render::view() using extract(); all variables below are in the calling method's local scope, not global namespace. |
| 4 | 4 | |
| 5 | 5 | use BitCode\BitForm\Core\Util\EscapingHelper; |
| 6 | +use BitCode\BitForm\Core\Util\FrontendHelpers; | |
| 6 | 7 | |
| 7 | 8 | if (!defined('ABSPATH')) { |
| 8 | 9 | exit; |
| 9 | 10 | } |
| @@ -18,18 +19,18 @@ | ||
| 18 | 19 | $customCSSPath = "/form-styles/bitform-custom-{$formID}.css"; |
| 19 | 20 | $standaloneCSSPath = "/form-styles/bitform-standalone-{$formID}.css"; |
| 20 | 21 | |
| 21 | 22 | // Use the same handles as FrontendFormHandler::loadAssets() so WP dedups instead of printing the file twice. |
| 22 | -wp_register_style('bitform-style-' . $formIdSafe, BITFORMS_UPLOAD_BASE_URL . $baseCSSPath, [], $formUpdateVersion); | |
| 23 | +wp_register_style('bitform-style-' . $formIdSafe, FrontendHelpers::styleSrc($baseCSSPath), [], $formUpdateVersion); | |
| 23 | 24 | wp_enqueue_style('bitform-style-' . $formIdSafe); |
| 24 | 25 | |
| 25 | 26 | if (file_exists(BITFORMS_CONTENT_DIR . $customCSSPath)) { |
| 26 | - wp_register_style('bitform-style-custom-' . $formIdSafe, BITFORMS_UPLOAD_BASE_URL . $customCSSPath, [], $formUpdateVersion); | |
| 27 | + wp_register_style('bitform-style-custom-' . $formIdSafe, FrontendHelpers::styleSrc($customCSSPath), [], $formUpdateVersion); | |
| 27 | 28 | wp_enqueue_style('bitform-style-custom-' . $formIdSafe); |
| 28 | 29 | } |
| 29 | 30 | |
| 30 | 31 | if (file_exists(BITFORMS_CONTENT_DIR . $standaloneCSSPath)) { |
| 31 | - wp_register_style('bitform-standalone-extra-' . $formIdSafe, BITFORMS_UPLOAD_BASE_URL . $standaloneCSSPath, [], $formUpdateVersion); | |
| 32 | + wp_register_style('bitform-standalone-extra-' . $formIdSafe, FrontendHelpers::styleSrc($standaloneCSSPath), [], $formUpdateVersion); | |
| 32 | 33 | wp_enqueue_style('bitform-standalone-extra-' . $formIdSafe); |
| 33 | 34 | } |
| 34 | 35 | |
| 35 | 36 | if (isset($font) && '' !== $font) { |