<?php
$route = Route::current();
$name = Route::currentRouteName();
$action = Route::currentRouteAction();
<li>
<?php if (!empty($featured_categories)): ?>
<div class="featured-categories">
<div class="categories__inner">
<div class="section-heading">Выберите категорию</div>
<ul class="categories__list">
<?php foreach ($featured_categories as $category): ?>
<li id="#" class="categories__item">
<span class="category-item__image" style="<?php echo get_category_image_url($category); ?>">
<a href="<?php echo generate_category_url($category); ?>" class="category-item">
<span class="category-item__separator"></span>
<span class="category-item__title"><?php echo category_name($category); ?></span>
</a>
</span>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
<?php endif; ?>
<?php
$context = stream_context_create([
"http" => [
"method" => "GET",
"header" => [
"Referer: XXXXXXXXX"
],
]
]);
$result = file_get_contents('http://www.ru/', false, $context);
SELECT title_ru AS title, content_ru AS content FROM article
$a = 5;
function inc() {
return $GLOBALS["a"];
}
var_dump($a); //int(5)
var_dump(inc()); //int(5)
<?php
$upload_url = "тут ваш upload_url";
$ch = curl_init($upload_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, array('file1' => '@name.img'));
$result = curl_exec($ch);
$ur = json_decode($result);
//print_r($ur);
<?php if(условие_есть_ли_видео): ?>
<a class="videofront" href="<?php the_permalink(); ?>"><video src="<?php the_field('video'); ?>" loop="on" autoplay="on" height="110" width="200"/></a>
<?php else: ?>
<a class="iconb-game" href="<?php the_permalink(); ?>" title="<?php _e('Play', 'arcadexls'); ?>"><span><?php _e('Play', 'arcadexls'); ?></span></a>
<?php endif; ?>