| | |
| | | exit; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Track REST API errors by wrapping request execution |
| | | */ |
| | |
| | | return IconsManager::for($source)->get($name, $options); |
| | | } |
| | | |
| | | function jvbFullIcon(string $name, array $options = []):string |
| | | { |
| | | $source = $options['source'] ?? 'icons'; |
| | | unset($options['source']); |
| | | return IconsManager::for($source)->getRawSvg($name, $options['style']??null); |
| | | } |
| | | |
| | | /** |
| | | * Get a CSS data URI for an icon |
| | | * |
| | |
| | | echo '<div class="screen-reader-text live-region" aria-live="polite" role="status"></div>'; |
| | | } |
| | | |
| | | add_action('wp_head', 'jvbFrontendBase',1); |
| | | function jvbFrontendBase():void |
| | | { |
| | | ?> |
| | | <script type="text/javascript">window.jvbBase = '<?= BASE ?>';</script> |
| | | <?php |
| | | } |
| | | |
| | | //add_action('wp_head', 'jvbDumpIt'); |
| | | function jvbDumpIt() |
| | |
| | | } |
| | | return $result; |
| | | }, 99); |
| | | |
| | | |
| | | add_action('wp_footer', 'jvb_back_to_top'); |
| | | function jvb_back_to_top():void |
| | | { |
| | | echo sprintf( |
| | | '<a id="back-to-top" class="btn sticky" href="#">%s<span>Back to Top</span></a>', |
| | | jvbIcon('caret-double-up') |
| | | ); |
| | | } |
| | | |
| | | add_action( 'doing_it_wrong_run', function ( $function_name ) { |
| | | if ( '_load_textdomain_just_in_time' === $function_name ) { |
| | | // This will print the full execution path to your screen or log |
| | | debug_print_backtrace(); |
| | | } |
| | | } ); |