| 1 |
<?php |
| 2 |
|
| 3 |
defined('WPINC') || exit; |
| 4 |
|
| 5 |
if (!function_exists('str_starts_with')) { |
| 6 |
function str_starts_with(?string $haystack, ?string $needle): bool { |
| 7 |
return 0 === strncmp((string) $haystack, (string) $needle, strlen((string) $needle)); |
| 8 |
} |
| 9 |
} |
| 10 |
|
| 11 |
/* |
| 12 |
* @return array |
| 13 |
* @see https://docs.gravityforms.com/gform_noconflict_scripts/ |
| 14 |
*/ |
| 15 |
add_filter('gform_noconflict_scripts', function (array $scripts) { |
| 16 |
$scripts[] = 'blackbar'; |
| 17 |
return $scripts; |
| 18 |
}); |
| 19 |
|
| 20 |
/* |
| 21 |
* @return array |
| 22 |
* @see https://docs.gravityforms.com/gform_noconflict_styles/ |
| 23 |
*/ |
| 24 |
add_filter('gform_noconflict_styles', function (array $styles) { |
| 25 |
$styles[] = 'blackbar'; |
| 26 |
$styles[] = 'blackbar-syntax'; |
| 27 |
return $styles; |
| 28 |
}); |
| 29 |
|