<?php $authors = get_users( 'role=author' );
foreach ( $authors as $author ) {
$user_id = $author->ID;
echo '<div class="user-avatar">' . get_avatar($user_id) . '</div>';
}
?>
<?php $my_user = get_user_by('email', '1choosew1@instagram.com'); ?>
<?php echo $my_user->user_lastname; ?>
jQuery(document).ready(function($) {
$(document).on("input",function(){
var url = input.value;
if(url.indexOf('www.instagram.com') != -1) {
jQuery.ajax({
url: $('#inputLink').val() + '?__a=1',
dataType: "json",
type: "GET",
success: function(data) {
var commentsCount = data.graphql.shortcode_media.edge_media_to_comment.count;
$('#countComments').html('Количество комментов' + ':' + ' ' + commentsCount)
}
})
jQuery.ajax({
url: $('#inputLink').val() + '?__a=1',
dataType: "json",
type: "GET",
success: function(data) {
var likesCount = data.graphql.shortcode_media.edge_media_preview_like.count;
$('#countLikes').html('Количество лайков' + ':' + ' ' + likesCount)
}
})
} else {
$('#countError').html('Неверная ссылка')
}
})
});