This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<span class="date"> | |
<time | |
datetime="<?php the_time('Y-m-d'); ?> <?php the_time('H:i'); ?>" | |
> | |
<?php the_date(); ?> | |
<?php the_time(); ?> | |
</time> | |
</span> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
h1 { | |
font-family: 'Pacifico', cursive; | |
} | |
[lang="ar"] h1 { | |
font-family: 'Lemonada', cursive; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.text-end { | |
text-align: right; /* Fallback */ | |
text-align: end; | |
} | |
[dir="rtl"] .text-end { | |
text-align: left; /* Fallback */ | |
text-align: end; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link | |
rel="stylesheet" | |
href="//cdnjs.cloudflare.com/ajax/libs/pure/1.0.0/pure-min.css" | |
> | |
<?php if (!function_exists('pll_current_language')) { | |
throw new Exception('Polylang plugin must be installed to determine ' . | |
'current language'); | |
} ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require __DIR__ . '/classes/HMT_Language_Switcher_Widget.php'; | |
// ... | |
/** | |
* Register our sidebars and widgetized areas. | |
*/ | |
function hmt_widgets_init() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use App\Locale; | |
use Illuminate\Support\ServiceProvider; | |
class LocaleServiceProvider extends ServiceProvider | |
{ | |
/** |