'; $profile_details .= '
'.$full_name.'

@'.$username.'

'; $profile_details .= '

'.$post_count.'

Posts

'; $profile_details .= '

'.$followed_by.'

Followers

'; $profile_details .= '

'.$follows.'

Following

'; $profile_details .='
'; $profile_details .=''; //twic-profile-details } /*Instagram Feeds*/ $json_link="https://api.instagram.com/v1/users/self/media/recent/?"; $json_link.="access_token={$access_token}&count={$photo_count}"; $json = file_get_contents($json_link); $obj = json_decode(preg_replace('/("\w+"):(\d+)/', '\\1:"\\2"', $json), true); $output = ''; //Wrapper Start echo '
'; echo $profile_details; if($atts['theme']=="theme1"){ include('twaic-theme1.php'); } else if($atts['theme']=="theme2"){ include('twaic-theme2.php'); } echo '
'; //Wrapper End if($atts['enable_fontawesome']==1){ wp_enqueue_style( 'twaic-fontawesome', 'https://use.fontawesome.com/releases/v4.6.3/css/font-awesome-css.min.css', array(), '4.6.3' ); } if($atts['theme']=="theme1"){ wp_enqueue_style( 'twaic-theme1', plugins_url('asset/css/theme1.css',__FILE__ ), array(), TWAIC_VERSION ); wp_enqueue_script( 'masonry-js', plugins_url('asset/js/masonry.pkgd.min.js',__FILE__ ), array(), TWAIC_VERSION ); } else if($atts['theme']=="theme2"){ wp_enqueue_style( 'twaic-theme2', plugins_url('asset/css/theme2.css',__FILE__ ), array(), TWAIC_VERSION ); } } else{ echo '
Please, configure your Instagram settings first.
'; } // Collect the output $output = ob_get_contents(); ob_end_clean(); return $output; }