'; if(!isset($atts['after_wrapper'])) $atts['after_wrapper'] = ''; if(!isset($atts['before_image_listing'])) $atts['before_image_listing'] = '
'; if(!isset($atts['after_caption'])) $atts['after_caption'] = '
'; if(!isset($atts['theme'])) $atts['theme'] = 'theme1'; if(!isset($atts['show_user_details'])) $atts['show_user_details'] = '1'; if(isset($atts['access_token'])){ $access_token=$atts['access_token']; /*Profile Details*/ $profile_details = ''; if($atts['show_user_details']==1){ $json_link="https://api.instagram.com/v1/users/self/?"; $json_link.="access_token={$access_token}"; $json = file_get_contents($json_link); $obj = json_decode(preg_replace('/("\w+"):(\d+)/', '\\1:"\\2"', $json), true); $username= $obj['data']['username']; $profile_picture=$obj['data']['profile_picture']; $full_name=$obj['data']['full_name']; $followed_by=$obj['data']['counts']['followed_by']; $follows=$obj['data']['counts']['follows']; $post_count = $obj['data']['counts']['media']; $profile_details .=''; print_r($post); echo '';*/ $image_size = $atts['image_size']; $pic_text=$post['caption']['text']; $pic_link=$post['link']; $pic_like_count=$post['likes']['count']; $pic_comment_count=$post['comments']['count']; $pic_src=str_replace("http://", "https://", $post['images'][$image_size]['url']); $pic_created_time=date("F j, Y", $post['caption']['created_time']); $pic_created_time=date("F j, Y", strtotime($pic_created_time . " +1 days")); //Image Listing Start echo $atts['before_image_listing']; echo ""; echo ''; echo ""; echo $atts['after_image_listing']; //Image Listing End } echo $atts['after_wrapper']; echo '