$term_list = wp_get_post_terms( $post->ID, 'program', array( 'fields' => 'ids' ) );
echo 'Я буду учить документацию php ' . reset( $term_list ) . ' раз';
$('#add-image').click(function(e) {
e.preventDefault();
var image = wp.media({
title: 'Upload Image',
multiple: false
}).open()
.on('select', function(e){
var uploaded_image = image.state().get('selection').first();
console.log(uploaded_image);
var image_url = uploaded_image.toJSON().url;
});
});
foreach ($array as $item) {
if( !in_array( $item['id'], $array2 ) ) {
$res[]=$item;
}
}