Skip to content

Instantly share code, notes, and snippets.

<span class="date">
<time
datetime="<?php the_time('Y-m-d'); ?> <?php the_time('H:i'); ?>"
>
<?php the_date(); ?>
<?php the_time(); ?>
</time>
</span>
<?php
// Place A in our UI
echo _x('Menu', 'Hamburger icon for mobile devices', 'handmadestale');
?>
<?php
// Place B in our UI
_ex('Menu', 'Footer menu header', 'handmadestale');
?>
h1 {
font-family: 'Pacifico', cursive;
}
[lang="ar"] h1 {
font-family: 'Lemonada', cursive;
}
.text-end {
text-align: right; /* Fallback */
text-align: end;
}
[dir="rtl"] .text-end {
text-align: left; /* Fallback */
text-align: end;
}
<?php
class HMT_Language_Switcher_Widget extends WP_Widget
{
public function __construct()
{
parent::__construct(
'HMT_Language_Switcher_Widget',
__("Handmade's Tale Language Switcher", 'handmadestale'),
array(
<?php if (!isset($languages)) {
throw new Exception(__('Expected $languages array for printing'));
} ?>
<ul class="pure-menu-list pure-menu-horizontal text-end">
<?php foreach ($languages as $language) : ?>
<li class="pure-menu-item">
<a class="pure-menu-link" href="<?php echo $language['url']; ?>">
<?php echo $language['name']; ?>
</a>
<?php
require __DIR__ . '/classes/HMT_Language_Switcher_Widget.php';
// ...
/**
* Register our sidebars and widgetized areas.
*/
function hmt_widgets_init()
{
<div class="pure-u-1-3">
<!-- #language-switcher -->
<?php if (is_active_sidebar('trailing_main_nav')) : ?>
<div id="trailing_main_nav" class="widget-area">
<?php dynamic_sidebar('trailing_main_nav'); ?>
</div>
<?php endif; ?>
<!-- /#language-switcher -->
</div>
<?php
namespace App\Providers;
use App\Locale;
use Illuminate\Support\ServiceProvider;
class LocaleServiceProvider extends ServiceProvider
{
/**