<?php
$str='<div class="class-name">Как-то так</div>';
if(!stristr($str, 'class-name')){
add_action( 'woocommerce_before_shop_loop_item_title', "my_acf_load_value", 10 );
function my_acf_load_value( $value) {
if ( get_field('tab_number') )
echo '<h2>'.get_field('tab_number').'</h2>';
}
}
?>
public function getGroupUser($id_user,$token){
$method='https://api.vk.com/method/groups.get?';
$data=[
'count'=>200,
'user_id'=>$id_user,
'extended'=>1,
'filter'=>'admin',
'access_token'=>$token,
];
return json_decode(file_get_contents($method.urldecode(http_build_query($data))),true);
}
DROP TABLE IF EXISTS `t_content`;
CREATE TABLE `t_content` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`type` enum('blog','news','page') DEFAULT NULL,
`alias` varchar(255) DEFAULT NULL,
`title` varchar(555) DEFAULT NULL,
`content` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
LOCK TABLES `t_content` WRITE;
/*!40000 ALTER TABLE `t_content` DISABLE KEYS */;
INSERT INTO `t_content` (`id`, `type`, `alias`, `title`, `content`)
VALUES
(1,'blog','eto_statia_bloga','Это статья блога','Контент'),
(2,'news','eto_novost','Это новость','Текст новости'),
(3,'page','kontacty','Контакты','Обычная страница, например с контактами');
/*!40000 ALTER TABLE `t_content` ENABLE KEYS */;
UNLOCK TABLES;
$json='{"ok":true,"result":[{"update_id":125804848, "message":{"message_id":28,"from":{"id":178282468,"first_name":"Ismar","last_name":"Suleymanov"},
"chat":{"id":178282468,"first_name":"Ismar","last_name":"Suleymanov","type":"private"},"date":1447495291,"text":"asdasd"}},{"update_id":125804849, "message":{"message_id":29,"from":{"id":178282468,"first_name":"Ismar","last_name":"Suleymanov"},
}}]}';
var_dump(json_decode($json));