Skip to content

Instantly share code, notes, and snippets.

@benjaminpick
Created June 25, 2019 05:21
Show Gist options
  • Save benjaminpick/c8d53eadd0989e8cc8217f54d6ade9ac to your computer and use it in GitHub Desktop.
Save benjaminpick/c8d53eadd0989e8cc8217f54d6ade9ac to your computer and use it in GitHub Desktop.
Show Bootstap Breakpoint in Admin Bar
<?php
add_action('admin_bar_menu', function ($admin_bar) {
if (!is_admin() && WP_DEBUG) $admin_bar->add_menu([
'id' => 'my-item',
'title' => 'Breakpoint: ' .
'<strong class="d-sm-none">XS</strong>' .
'<strong class="d-none d-sm-inline d-md-none">SM</strong>' .
'<strong class="d-none d-md-inline d-lg-none">MD</strong>' .
'<strong class="d-none d-lg-inline d-xl-none">LG</strong>' .
'<strong class="d-none d-xl-inline">XL</strong>'
]);
}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment