$translations = pll_the_languages(array(
"raw" => 1,
));
<div class="dropdown">
<button class="header-lang__btn"
type="button" id="dropdownLangButton"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="header-lang__text"><?= $translations[pll_current_language()]['name'] ?></span>
</button>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownLangButton">
<?php foreach ($translations as $item) : ?>
<a class="dropdown-item <?= ($item['current_lang']) ? 'disabled' : '' ?>" href="<?= $item['url'] ?>">
<?= $item['name'] ?>
</a>
<?php endforeach; ?>
</div>
</div>
add_filter( 'the_content', 'filter_function_name_11' );
function filter_function_name_11( $content ) {
$extra_text = 'blabla';
$paragraphs = explode('</p>',$content);
$new_content = '';
foreach ($paragraphs as $index => $paragraph) {
$new_content .= $paragraph;
if( round( count($paragraphs) / 2 ) == $index ) {
$new_content .= $extra_text;
}
}
return $new_content;
}
...
{
test: /\.less$/,
use: ['style-loader', 'css-loader', 'postcss-loader', 'less-loader']
}
...
А реально ли создать приватный репозиторий, в него залить сайт wordpress. а базу данных разместить удаленно на каком-то хостинге?