PATH:
home
/
letacommog
/
le-panoramique
/
wp-content
/
plugins
/
el-fb-you-vimeo-twit-insta-stream
/
inc
<?php add_action('init','svc_fb_you_vimeo_twit_insta_social_register_style_script'); function svc_fb_you_vimeo_twit_insta_social_register_style_script(){ add_shortcode('fb_you_vimeo_twit_insta','svc_fb_you_vimeo_twit_insta_social_layout_shortcode'); wp_enqueue_style( 'svc-fb-you-vimeo-twit-insta-social-css', plugins_url('../addons/social-stream/css/css.css', __FILE__)); wp_enqueue_style( 'svc-social-animate-css', plugins_url('../assets/css/animate.css', __FILE__)); wp_enqueue_style( 'vcfti-font-awesome-css', plugins_url('../assets/css/font-awesome.min.css', __FILE__)); wp_enqueue_style( 'vcfti-bootstrap-css', plugins_url('../assets/css/bootstrap.css', __FILE__)); wp_enqueue_style( 'svc-fb-insta-twit-megnific-css', plugins_url('../assets/css/magnific-popup.css', __FILE__)); wp_enqueue_script('moment-locale-js', plugins_url('../assets/js/moment-with-locales.min.js', __FILE__), array("jquery"), false, false); wp_enqueue_script('svc-megnific-js', plugins_url('../assets/js/megnific.js', __FILE__), array("jquery"), false, false); wp_enqueue_script('svc-isotop-js', plugins_url('../assets/js/isotope.pkgd.min.js', __FILE__), array("jquery"), false, false); wp_enqueue_script('svc-imagesloaded-js', plugins_url('../assets/js/imagesloaded.pkgd.min.js', __FILE__), array("jquery"), false, false); wp_enqueue_script('svc-carousel-js', plugins_url('../assets/js/owl.carousel.min.js', __FILE__), array("jquery"), false, false); wp_enqueue_script('viewportchecker-js', plugins_url('../assets/js/jquery.viewportchecker.js', __FILE__), array("jquery"), false, false); //wp_enqueue_script('script-js', plugins_url('../assets/js/script.js', __FILE__), array("jquery"), false, false); wp_enqueue_script('doT-js', plugins_url('../assets/js/doT.min.js', __FILE__), array("jquery"), false, false); wp_enqueue_script('vc-fb-you-vimeo-twit-insta-social-stream-js', plugins_url('../assets/js/social-stream.js', __FILE__), array("jquery"), false, false); wp_localize_script('vc-fb-you-vimeo-twit-insta-social-stream-js', 'svc_ajax_url', array('url' => admin_url( 'admin-ajax.php' ),'laungage' => get_locale())); } add_action('wp_head','svc_fb_you_vimeo_twit_insta_social_inline_css_for_imageloaded'); function svc_fb_you_vimeo_twit_insta_social_inline_css_for_imageloaded(){ ?> <style> .svc_social_stream_container{ display:none;} #loader {background-image: url("<?php echo plugins_url('../addons/social-stream/css/loader.GIF',__FILE__);?>");} </style> <?php } function el_fb_social_stream_generateRandomString($length = 12) { $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $charactersLength = strlen($characters); $randomString = ''; for ($i = 0; $i < $length; $i++) { $randomString .= $characters[rand(0, $charactersLength - 1)]; } return $randomString; } add_action('wp_ajax_el_fbs_social_stream_get_fb_post','el_fbs_social_stream_get_fb_post'); add_action('wp_ajax_nopriv_el_fbs_social_stream_get_fb_post','el_fbs_social_stream_get_fb_post'); function el_fbs_social_stream_get_fb_post(){ extract($_POST); $fb_token = get_option( 'fb_token' ); $fbs = get_transient("el_fbs_social_stream_".$username."_".$cache_id); if( !$fbs ) { //$api_url1 = 'https://graph.facebook.com/v2.12/'.$username.'/posts?limit='.$count.'&access_token='.$fb_token.'&fields=id,full_picture,created_time,from{id,name,picture},message,link,type,shares,object_id,story,attachments{subattachments}'; $api_url1 = 'https://graph.facebook.com/v3.1/'.$username.'/posts?limit='.$count.'&access_token='.$fb_token.'&fields=id,full_picture,created_time,from{id,name,picture},message,link,type,shares,object_id,attachments'; $fbs_get = wp_remote_get($api_url1); $fbs = $fbs_get['body']; $fbs_decode = json_decode($fbs); if (!empty($fbs_decode->error)) { $fbs = 'your token is wrong please regenerate.'; //$fbs = el_fbs_social_stream_get_fb_post_own_token($username,$count); //set_transient('el_fbs_social_stream_'.$username.'_'.$cache_id, $fbs, 60 * 360); }else{ set_transient('el_fbs_social_stream_'.$username.'_'.$cache_id, $fbs, 60 * 360); } //set_transient('el_fbs_social_stream_'.$username.'_'.$cache_id, $fbs, 60 * $cache_time); } echo $fbs; wp_die(); } function el_fbs_social_stream_get_fb_post_own_token($username,$count){ $fbTokens = array( '395202813876688|73e8ede72008b231a0322e40f0072fe6', '1599527947014940|5da5c64dded6c0f030a777bf80ba0eca', '1719442274956038|d514c64c417ca557e2fb1c30338bc895', '1306811039389586|3aRaqA90xuYXAMyTevq_cmnUhFc', // step 1 '1776901225963212|lbTRZhwbfaP8qSB5MLH5YRFHG5I', '1540440706197927|bG5UtY5wQi820n4NM9aC10CuME0', '1495204634110098|0sW9k2N-bKXXCFSY5Rw6LGJ0_Gs', '1662370060681113|mKe_bHuVGE4TjRTtclMtsK5mHAQ', '576812082472370|k3qFPynhEGRjNjHRu-sfsfk7cKw', '537833136371309|dPJa6KbzEIWo72zC6-R_8Tz9Isg', '404579483044100|j5DK_ckdcEaLeGVcWCg4N3pH6U4', '1670231719856162|csn93VA-DogZl8Y_7MV0QDO1hws', '161635820981707|djU1jpqzN1LLh9lKyYTHyRvL1vU', '1676868605960688|XYiK0rPy0MhYlZMCN7lC2lm-s98', '1977666209121109|3aKE3JxE2zE3fn-uFEdDsy7VGRk', '361503594288582|1MPKq1Tn0vsgA0Pf0ljeMT83v2k', '728775220636314|roz6Nh8MMgVbCDsgBE35G2242L8', '592195740817260|-RC49T8jlcIrFqrIuNPRgzp7kJI', '459051374435914|k53IeH_6CB3BnPuOH3HqFnqrcpo', '406771379368389|wtgmgnjv3LtFI6twqTc2Ge8n5r0', '1786442191676611|5QyMhnxzbUPOJNbeeUhHUYV8Qd8', '269382753427835|TvRt1iHjfqJG_h63Wpt_5tN9QlY', '1821498031469557|GoqUwJTux_jx13UgUpONqL0Ct3s', '1770048076648188|6oxb950o3ZrWRo9R5rbJP1Smvqc', '1838306676455068|o7N7OLpaXPP3Q7mhAk7lhk-zW00', '208417452510521|rqmwt_kmQe3Ey-CV8e0ySwvIAdE', '572491812960107|vMYF_XkEtSXqra5Q-MZ-7E1Ay4w', '1553226801359661|ax_9yk4nboXpTAfZsclHsmkSUVY', '1464473460510331|qr3aucfOOYfoAgG5CLjhOoR4z1c', '1528055577492141|mQZeLIyUXhP1GHB4XJVrgijYY9Y', '173415366083584|Zac78uDburEbFBSjaF5APLiGFxQ', '925098224193714|55fSx0_Qd8R7MU269fIgL5YP-Ys', '1763602263859026|Dys4zXi2qlcRkc8yLRZVH_kCwEs', '1657372791191081|Ol7n9wb5l7TXOkH-qrkWzASP8vg', '1560873374225471|x1Pg5eKJfDApwIXPvhRu0gXGynA', '116110950962|OyertfyPbC_2KAx3c_5qTisB8AI', '302027353262977|5_FeQVtCR2O_PUq157dxn89agZM', '1555921161394392|6qqRA_jwE-66gzoS_4eIBhheVMo', '189064264786567|kY_PiTz6suoArgk3HWgTq2QOFsI', '129217744081013|J8MaPPRrUIH9LOC-QG_IJnaYp88', '843269615747644|3iNSWOAvvbLPiHNi5hcJyJgCzFs', '794004190629471|akmgA9_AVOOOfOChweGD7qWPgfo', '1621837748076712|edwBDaSO0a1imxfzFnu_ElF5LWA', '1172932352721707|K5o5UfRUn14wOgns8Yb3jVUcYFQ', '310187322507687|x1st22P2E24EbB_DZCoCnDRov1A', '897264740322733|4zkujDQuCQCdQXElLvu1Fz937Uo', '1477946339188225|iGUUyCBW25VYA-H4X_zXlLfr7_I', '436832089833746|flmxyTdyvXZBjiL-YLqB_EL1xfE', '722160171249152|NLoY7jnHZsLehJzu9X2Tp3hBOkM', '1003267309717675|RIibM0Pzx6fmCJFNJVHxcLa0Rr0', '484948411683186|9R2YuQkTcqzCUCzxyEtovV1hcTQ', '1646442785604154|RhpCSRsGWA3PxXrqBfk6cquW-vc', '852916241454747|3RirOMy5k2WZxhaKAVIhg-Q_qFA', '550618921751879|450zNUbXpPghnVkGSgq-Kcw1oFw', '1602902723291572|BCx44MgDuksQeOSDaBYctJbVQk0', '859439884144033|JUMKkATNvxR7I_1OVEViMxbkrLM', '1133763566653442|t_v8bQB0c9lNalg1ywzawZqAzYI', '1606130562972726|0M7j3cmbRs89Fympo0OURm9T7Z4', '1031192160248330|FF9dALun6V0cyqqeiLVOTiSBeb0', '289661541157775|vBiiqEZiWJ3rPvcspHGgxh1eQOU', '424831211048692|m9DyfhzwMhXyyGCQQau1mP85uLg', '211619008796|2nxmj6XearZMLMBb28hw8wBFUIc', '335396480150975|ABKeUC30FlkbusFfjF44aej91x4', '1385785548416239|269JxuOF1zlrR9TdjUY5ncne5M4', '1599931313596772|83KIUBivMinTNPr6x2WrTh8KceE', '1965690660339564|Mo0gfFr2Lhiy75nUPztsAPlr4fo', '1951176081770439|phkhBAGGNHHvw7TA-CmcVC5Tojs', '518537078318322|mNqiRJRkfZ20NUKVHJehE67tD2w', '796896350447265|BcdukRbmnjF_OJ4-3YFstWR12MU', '270329503150918|mYRazIHqJE1KSRqtnz4kNHxfBcs', '421745368254704|D8eD0o9ZqnbKGQm2KY6Qw2E-8IA', '1185445661487531|ELIhuVqbj19odzJJBFT5dz_dMFI', '588813574500207|ULankCiL8IOvZ4q-H7qa1uVsGsU', '177899259380474|JgdlhmU-J0dq55bKng0xywDIgIo', //step2 '128947497630881|rlgLr8wtMUWRw7hbcLcsgoa01-k', '480672392334632|69Te1yxXP8s8UF4YFWdXhNLgu7w', '1298990730176646|rU4QhoOaYPWQng6-k_QdxRoVNaA', '1693018934313805|VYDjx69NpsgkDEAm79cYD0fxJBk', '257106408010811|MwCorr7qsyIeU_GjdPFIEw3-_P8', '386881278380301|NW_PiECD9TLVe0UNMsB5H9HkPEo', '277269689412168|o3k5mzmHsT-prqc2qizxk_DoXEQ', '1439406912938596|4JDCXisJ2d-1EWeObBt27DybH5c', '927474184059774|ekzzwIV9JnvG-ELYWut9wIvf4Y0', '322095208287051|pbCTS6jPuhjR18sl2UPhKQw7eyY', '1042396375891598|gn2HiZgDgjTbCMcXsSb6VK91PqM', '348613608818294|d4gRX7tNppCrI-DrOGof_O8gwvg', '1591407604237466|cHUFs9XDDJa7LDUW9zBxirwGAHE', '697312047120344|p8ST5dkrub6IoBZsClmyRBTScB0', '1788677371359317|UU7yeB5dsKOT8xLsLA9xSNu4OMQ', '1024245627652108|VmyBFUaBhjmvF31kPWdLcwtA0nU', '1665626540320930|kDmIPfF8Y0mvV5mPr3927c2nRlM', '219254908466738|9AAaE_5GnONhVWUTlEBS8LDiFi8', '383334425112756|cxkb0YngoQPVkr7AngA_LOE2TV8', '1711513059125773|IuTAeRQAzhUelndJ_n7jPx3yOxs', '1677248395890039|CSZsE5C-HJ8cYOraU6J6gwACZys', '162288250832230|HvQ8grGeT3QGVEFgRkooK-V55vs', '1028332560591295|InX-Kx2LF2tjcfjbz4ddP6wXJ6U', '1816228771930249|xW0dj0nD-gWTl9oUEFyz7kCn4Gk', '1425919427736604|6NKiBWf5_rR4DuV2z1E_Pk27F2I', '198080700214649|natEgdD5R82UoiLXL5UsUK82-O8', '452046251639377|sruLhZT7bktRpuPy0txclkvCMWE', '282581258595802|QRueniLvr6ppOBW9UcNpJVswGKw', '120755681588984|8IamCzI5D56psRs_726PwSgUgos', '236542103198412|YZBFLCWsx_ap_c2rmznf_tEbh6E', '444110102425340|1xyyWHpqzWy5jNrMnNAsMgIIKVI', '294686830545691|3DhoPPXbNBmzlmXXK9cbLnGJTMI', ); for($i = 0;$i<count($fbTokens);$i++){ $api_url1 = 'https://graph.facebook.com/v3.1/'.esc_html($username).'/posts?limit='.intval($count).'&access_token='.$fbTokens[$i].'&fields=id,full_picture,created_time,from{id,name,picture},message,link,type,shares,object_id,attachments'; $fbs_get = wp_remote_get($api_url1); $fbs = $fbs_get['body']; $fbs_decode = json_decode($fbs); if (empty($fbs_decode->error)) { return $fbs; } } } add_action('wp_ajax_svc_fb_you_vimeo_twit_insta_get_tweet','svc_fb_you_vimeo_twit_insta_get_tweet'); add_action('wp_ajax_nopriv_svc_fb_you_vimeo_twit_insta_get_tweet','svc_fb_you_vimeo_twit_insta_get_tweet'); function svc_fb_you_vimeo_twit_insta_get_tweet(){ require_once('twitter_proxy.php'); extract($_POST); $twit_api_key = get_option( 'twit_api_key' ); $twit_api_secret = get_option( 'twit_api_secret' ); $twit_access_token = get_option( 'twit_access_token' ); $twit_access_token_secret = get_option( 'twit_access_token_secret' ); //echo "<pre>";print_r($_POST); // Twitter OAuth Config options $oauth_access_token = $twit_access_token; $oauth_access_token_secret = $twit_access_token_secret; $consumer_key = $twit_api_key; $consumer_secret = $twit_api_secret; $user_id = '78884300'; $screen_name = $user_name; $count = $limit; $twitter_url = 'statuses/user_timeline.json'; //$twitter_url .= '?user_id=' . $user_id; $twitter_url .= '?tweet_mode=extended'; $twitter_url .= '&exclude_replies=true'; $twitter_url .= '&include_rts=true'; $twitter_url .= '&screen_name=' . $screen_name; $twitter_url .= '&count=' . $count; if($max_id != ''){ $twitter_url .= '&max_id=' . $max_id; } // Create a Twitter Proxy object from our twitter_proxy.php class $twitter_proxy = new TwitterProxy( $oauth_access_token, // 'Access token' on https://apps.twitter.com $oauth_access_token_secret, // 'Access token secret' on https://apps.twitter.com $consumer_key, // 'API key' on https://apps.twitter.com $consumer_secret, // 'API secret' on https://apps.twitter.com $user_id, // User id (http://gettwitterid.com/) $screen_name, // Twitter handle $count // The number of tweets to pull out ); if($ajx == 'y'){ $tweets = $twitter_proxy->get($twitter_url); }else{ if($on_cache == 'yes'){ $tweets = get_transient("el_twits_insta_twit_you_vimeo_".$screen_name."_".$cache_id); if( !$tweets ) { // Invoke the get method to retrieve results via a cURL request $tweets = $twitter_proxy->get($twitter_url); set_transient("el_twits_insta_twit_you_vimeo_".$screen_name."_".$cache_id, $tweets, 60 * $cache_time); } }else{ $tweets = $twitter_proxy->get($twitter_url); } } echo $tweets; wp_die(); } add_action('wp_ajax_svc_fb_you_vimeo_twit_insta_get_search_tweet','svc_fb_you_vimeo_twit_insta_get_search_tweet'); add_action('wp_ajax_nopriv_svc_fb_you_vimeo_twit_insta_get_search_tweet','svc_fb_you_vimeo_twit_insta_get_search_tweet'); function svc_fb_you_vimeo_twit_insta_get_search_tweet(){ require_once('twitter_proxy.php'); extract($_POST); $twit_api_key = get_option( 'twit_api_key' ); $twit_api_secret = get_option( 'twit_api_secret' ); $twit_access_token = get_option( 'twit_access_token' ); $twit_access_token_secret = get_option( 'twit_access_token_secret' ); //echo "<pre>";print_r($_POST); // Twitter OAuth Config options $oauth_access_token = $twit_access_token; $oauth_access_token_secret = $twit_access_token_secret; $consumer_key = $twit_api_key; $consumer_secret = $twit_api_secret; $user_id = '78884300'; $screen_name = $user_name; $count = $limit; $twitter_url = 'search/tweets.json'; if($other == 'yes'){ $twitter_url .= '?q=' . $q; $twitter_url .= '&count=' . $limit; $twitter_url .= '&' . $que; $twitter_url .= '&include_entities' . $include_entities; $twitter_url .= '&tweet_mode=extended'; $twitter_url .= '&exclude_replies=true'; $twitter_url .= '&include_rts=true'; }else{ $twitter_url .= '?q=' . $q; $twitter_url .= '&tweet_mode=extended'; $twitter_url .= '&exclude_replies=true'; $twitter_url .= '&include_rts=true'; $twitter_url .= '&count=' . $count; } // Create a Twitter Proxy object from our twitter_proxy.php class $twitter_proxy = new TwitterProxy( $oauth_access_token, // 'Access token' on https://apps.twitter.com $oauth_access_token_secret, // 'Access token secret' on https://apps.twitter.com $consumer_key, // 'API key' on https://apps.twitter.com $consumer_secret, // 'API secret' on https://apps.twitter.com $user_id, // User id (http://gettwitterid.com/) $screen_name, // Twitter handle $count // The number of tweets to pull out ); if($ajx == 'y'){ $tweets = $twitter_proxy->get($twitter_url); }else{ if($on_cache == 'yes'){ $tweets = get_transient("el_tweets_hash_insta_twit_you_vimeo_".$screen_name."_".$cache_id); if( !$tweets ) { // Invoke the get method to retrieve results via a cURL request $tweets = $twitter_proxy->get($twitter_url); set_transient('el_tweets_hash_insta_twit_you_vimeo_'.$screen_name.'_'.$cache_id, $tweets, 60 * $cache_time); } }else{ $tweets = $twitter_proxy->get($twitter_url); } } echo $tweets; die(); } add_action('wp_ajax_svc_fbs_you_vimeo_twit_insta_get_youtube_post','svc_fbs_you_vimeo_twit_insta_get_youtube_post'); add_action('wp_ajax_nopriv_svc_fbs_you_vimeo_twit_insta_get_youtube_post','svc_fbs_you_vimeo_twit_insta_get_youtube_post'); function svc_fbs_you_vimeo_twit_insta_get_youtube_post(){ extract($_POST); $youtube_token = get_option( 'youtube_token' ); if($type == 'user'){ $you_array = get_transient("fyvti_yous_user_".$username); if( !$you_array ) { $video_ids = array(); $api_url1 = 'https://www.googleapis.com/youtube/v3/channels?part=id&forUsername='.$username.'&key='.$youtube_token; $fbs_get = wp_remote_get($api_url1); $fbs = $fbs_get['body']; $get_paylist_id = json_decode($fbs); //$get_paylist_id = json_decode(file_get_contents($api_url1)); //echo "<pre>";print_r($get_paylist_id); if (!empty($get_paylist_id->error)) { echo "Token Limit finish."; }else{ $playlistid = $get_paylist_id->items[0]->id; $api_url2 = 'https://www.googleapis.com/youtube/v3/channels?part=brandingSettings,snippet,statistics,contentDetails&id='.$playlistid.'&key='.$youtube_token; //echo $api_url2; $auth_playid = json_decode(file_get_contents($api_url2)); //echo "<pre>";print_r($auth_playid); $author_logo = $auth_playid->items[0]->snippet->thumbnails->default->url; $playlistid = $auth_playid->items[0]->contentDetails->relatedPlaylists->uploads; $api_url3 = 'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId='.$playlistid.'&maxResults='.$count.'&key='.$youtube_token; //echo $api_url3; $videos = json_decode(file_get_contents($api_url3)); //echo "<pre>";print_r($yous); $next_page_token = ($videos->nextPageToken) ? $videos->nextPageToken : ''; foreach($videos->items as $video) { array_push($video_ids,$video->snippet->resourceId->videoId); } $video_ids_imp = implode(',',$video_ids); //echo $video_ids_imp; $api_url4 = 'https://www.googleapis.com/youtube/v3/videos?id='.$video_ids_imp.'&part=snippet,contentDetails,statistics&key='.$youtube_token; //echo $api_url4; $yous = json_decode(file_get_contents($api_url4)); $you_array = array('data' => $yous,'author_logo' => $author_logo,'playlistid' => $playlistid,'next_page_token' => $next_page_token); set_transient('fyvti_yous_user_'.$username, $you_array, 60 * $cache_time); echo json_encode($you_array); } }else{ echo json_encode($you_array); } } if($type == 'channel'){ $you_array = get_transient("fyvti_yous_channel_".$username); if( !$you_array ) { $video_ids = array(); $api_url2 = 'https://www.googleapis.com/youtube/v3/channels?part=brandingSettings,snippet,statistics,contentDetails&id='.$username.'&key='.$youtube_token; $fbs_get = wp_remote_get($api_url2); $fbs = $fbs_get['body']; $auth_playid = json_decode($fbs); //$auth_playid = json_decode(file_get_contents($api_url2)); //echo "<pre>";print_r($auth_playid); if (!empty($auth_playid->error)) { echo "Token Limit finish."; }else{ $author_logo = $auth_playid->items[0]->snippet->thumbnails->default->url; $playlistid = $auth_playid->items[0]->contentDetails->relatedPlaylists->uploads; $api_url3 = 'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId='.$playlistid.'&maxResults='.$count.'&key='.$youtube_token; //echo $api_url3; $videos = json_decode(file_get_contents($api_url3)); //echo "<pre>";print_r($yous); $next_page_token = ($videos->nextPageToken) ? $videos->nextPageToken : ''; foreach($videos->items as $video) { array_push($video_ids,$video->snippet->resourceId->videoId); } $video_ids_imp = implode(',',$video_ids); //echo $video_ids_imp; $api_url4 = 'https://www.googleapis.com/youtube/v3/videos?id='.$video_ids_imp.'&part=snippet,contentDetails,statistics&key='.$youtube_token; //echo $api_url4; $yous = json_decode(file_get_contents($api_url4)); $you_array = array('data' => $yous,'author_logo' => $author_logo,'playlistid' => $playlistid,'next_page_token' => $next_page_token); set_transient('fyvti_yous_channel_'.$username, $you_array, 60 * $cache_time); echo json_encode($you_array); } }else{ echo json_encode($you_array); } } if($type == 'playlist'){ $you_array = get_transient("fyvti_yous_playlist_".$username); if( !$you_array ) { $video_ids = array(); $api_url3 = 'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId='.$username.'&maxResults='.$count.'&key='.$youtube_token; $fbs_get = wp_remote_get($api_url3); $fbs = $fbs_get['body']; $videos = json_decode($fbs); //$videos = json_decode(file_get_contents($api_url3)); //echo "<pre>";print_r($yous); if (!empty($videos->error)) { echo "Token Limit finish."; }else{ $cid = $videos->items[0]->snippet->channelId; $api_url2 = 'https://www.googleapis.com/youtube/v3/channels?part=brandingSettings,snippet,statistics,contentDetails&id='.$cid.'&key='.$youtube_token; //echo $api_url2; $auth_playid = json_decode(file_get_contents($api_url2)); //echo "<pre>";print_r($auth_playid); $author_logo = $auth_playid->items[0]->snippet->thumbnails->default->url; $next_page_token = ($videos->nextPageToken) ? $videos->nextPageToken : ''; foreach($videos->items as $video) { array_push($video_ids,$video->snippet->resourceId->videoId); } $video_ids_imp = implode(',',$video_ids); //echo $video_ids_imp; $api_url4 = 'https://www.googleapis.com/youtube/v3/videos?id='.$video_ids_imp.'&part=snippet,contentDetails,statistics&key='.$youtube_token; //echo $api_url4; $yous = json_decode(file_get_contents($api_url4)); $you_array = array('data' => $yous,'author_logo' => $author_logo,'playlistid' => $username,'next_page_token' => $next_page_token); set_transient('fyvti_yous_playlist_'.$username, $you_array, 60 * $cache_time); echo json_encode($you_array); } }else{ echo json_encode($you_array); } } wp_die(); } add_action('wp_ajax_nopriv_el_fb_you_vimeo_twit_insta_get_insta_post','el_fb_you_vimeo_twit_insta_get_insta_post'); add_action('wp_ajax_el_fb_you_vimeo_twit_insta_get_insta_post','el_fb_you_vimeo_twit_insta_get_insta_post'); function el_fb_you_vimeo_twit_insta_get_insta_post(){ extract($_POST); $instagram_token = get_option( 'instagram_token' ); $userid = esc_html($userid); $insta_posts = get_transient("el_instas_insta_twit_you_vimeo_".$userid."_".$cache_id); if( !$insta_posts ) { $api_url1 = 'https://api.instagram.com/v1/users/'.$userid.'/media/recent/?access_token='.$instagram_token.'&count='.intval($count); $insta_posts_get = wp_remote_get(esc_url_raw($api_url1)); $insta_posts = $insta_posts_get['body']; set_transient('el_instas_insta_twit_you_vimeo_'.$userid.'_'.$cache_id, $insta_posts, 60 * $cache_time); } echo $insta_posts; die(); } add_action('wp_ajax_nopriv_svc_fb_twit_insta_you_vimeo_inline_twit_video_popup','svc_fb_twit_insta_you_vimeo_inline_twit_video_popup'); add_action('wp_ajax_svc_fb_twit_insta_you_vimeo_inline_twit_video_popup','svc_fb_twit_insta_you_vimeo_inline_twit_video_popup'); function svc_fb_twit_insta_you_vimeo_inline_twit_video_popup(){ ?> <div class="svc_tweet_conatiner"> <style type="text/css"> .svc_tweet_conatiner{ /*max-width:500px; background:#f5f8fa;*/margin:0 auto 15px;border-radius: 6px;} .svc_tweet_conatiner video{ max-width:100%;} @media screen and (min-width:768px){ .svc_tweet_conatiner video{ min-width:550px;} } .tweet_img_video{ text-align: center; line-height: 0;} .tweet_img_video img{ max-width: 100%; width:100%;border-radius: 6px 6px 0 0;} .tweet_content{padding: 15px;} .tweet_title{ font-size: 17px; color: #333; display:inline-block;line-height: 1.4em;} .tweet_title a {color: #8899a6;font-size: 13px;} .tweet_message{ margin-top: 3px;margin-bottom:7px; } .tweet_tags a{ font-size: 14px; color: #aaa; float: left; margin-right: 5px; } .tweet_notes{width:100%; display:inline-block; margin-top:10px;} .tweet_notes div{ font-weight: bold; color: #949494; float:left; font-size:15px; margin-right:15px; } .twit_profile_img{ float:left;margin-right: 12px;border-radius: 4px;} </style> <div class="tweet_img_video"> <?php if($_GET['video_url']){?> <div id="video-01" class="video-popup"> <video preload="auto" controls autoplay> <source src="<?php echo $_GET['video_url'];?>" type="video/mp4"> </video> </div> <?php }?> </div> </div> <?php wp_die(); } add_action('wp_ajax_nopriv_svc_fb_you_vimeo_twit_insta_inline_social_popup','svc_fb_you_vimeo_twit_insta_inline_social_popup'); add_action('wp_ajax_svc_fb_you_vimeo_twit_insta_inline_social_popup','svc_fb_you_vimeo_twit_insta_inline_social_popup'); function svc_fb_you_vimeo_twit_insta_inline_social_popup(){ $fb_token = get_option( 'fb_token' ); $youtube_token = get_option( 'youtube_token' ); $vimeo_token = get_option( 'vimeo_token' ); if($_GET['network'] == 'twitter'){?> <div class="svc_tweet_conatiner"> <style type="text/css"> .svc_tweet_conatiner{ max-width:500px; background:#f5f8fa;margin:0 auto 15px;border-radius: 6px;} .svc_tweet_conatiner video{ max-width:100%; width:100%;} .tweet_img_video{ text-align: center; line-height: 0;} .tweet_img_video img{ max-width: 100%; width:100%;border-radius: 6px 6px 0 0;} .tweet_content{padding: 15px;} .tweet_title{ font-size: 17px; color: #333; display:inline-block;line-height: 1.4em;} .tweet_title a {color: #8899a6;font-size: 13px;} .tweet_message{ margin-top: 3px;margin-bottom:7px; } .tweet_tags a{ font-size: 14px; color: #aaa; float: left; margin-right: 5px; } .tweet_notes{width:100%; display:inline-block; margin-top:10px;} .tweet_notes div{ font-weight: bold; color: #949494; float:left; font-size:15px; margin-right:15px; } .twit_profile_img{ float:left;margin-right: 12px;border-radius: 4px;} </style> <div class="tweet_img_video"> <?php if($_GET['image_url']){ if($_GET['type'] == 'video'){?> <div id="video-01" class="video-popup"> <video preload="auto" controls autoplay> <source src="<?php echo $_GET['image_url'];?>" type="video/mp4"> </video> </div> <?php }else{?> <img src="<?php echo $_GET['image_url'];//$tweet->entities->media[0]->media_url;?>"> <?php } }?> </div> <div class="tweet_content"> <img src="<?php echo $_GET['authore_img'];?>" class="twit_profile_img"><div class="tweet_title"><?php echo $_GET['authore_name'];?> <a href="https://twitter.com/<?php echo $_GET['username'];?>" target="_blank">@<?php echo $_GET['username'];?></a></div> <div class="tweet_message"><?php echo $_GET['msg'];?></div> <div class="tweet_notes"> <div><i class="fa fa-retweet" aria-hidden="true"></i> <?php echo $_GET['retweet'];?></div> <div><i class="fa fa-heart" aria-hidden="true"></i> <?php echo $_GET['like'];?></div> </div> </div> </div> <?php } if($_GET['network'] == 'facebook'){ if($_GET['fb_type'] == 'photo'){ $api_url1 = 'https://graph.facebook.com/'.$_GET["facebook_id"].'?access_token='.$fb_token.'&fields=images,from{id,name,picture},link,created_time,icon,id'; }elseif($_GET['fb_type'] == 'link'){ $api_url1 = 'https://graph.facebook.com/'.$_GET["facebook_id"].'?access_token='.$fb_token.'&fields=from{id,name,picture},link,created_time,icon,id,message'; }else{ $api_url1 = 'https://graph.facebook.com/'.$_GET["facebook_id"].'?access_token='.$fb_token.'&fields=created_time,icon,from{id,name,picture},embed_html'; } $api_url2 = 'https://graph.facebook.com/'.$_GET["facebook_id"].'/likes?limit=1&access_token='.$fb_token.'&summary=1'; $api_url3 = 'https://graph.facebook.com/'.$_GET["facebook_id"].'/comments?access_token='.$fb_token.'&summary=1'; $response1=json_decode(file_get_contents($api_url1)); $response2=json_decode(file_get_contents($api_url2)); $response3=json_decode(file_get_contents($api_url3)); if($_GET['fb_type'] == 'photo' || $_GET['fb_type'] == 'link'){ $feed_url = $response1->link; }else{ $feed_url = 'https://www.facebook.com'.$response1->permalink_url.'/'; } //echo "<pre>";print_r($api_url1);echo "</pre>"; //$response = wp_remote_get( $url );?> <div class="svc_facebok_popup"> <style type="text/css"> @media screen and (min-width:769px){.svc_facebok_popup .pos_relative{ min-height:550px;}} @media screen and (max-width:768px) and (min-width:760px){.svc_facebok_popup .pos_relative{ min-height:400px;}} @media screen and (max-width:759px) and (min-width:550px){.svc_facebok_popup .vcfti-col-md-8{ min-height:270px;}} @media screen and (max-width:549px) and (min-width:10px){.svc_facebok_popup .vcfti-col-md-8{ min-height:150px;}} .fb_comments_inner{ min-height:358px !important;} .fb_comments_inner p {border-bottom: 1px solid #e8e8e8;padding-bottom: 15px;} </style> <div> <div class="vcfti-col-md-8 vcfti-col-sm-6" style="line-height:0;text-align: center;"> <?php if($_GET['fb_type'] == 'photo'){?> <a href="<?php echo $feed_url;?>" target="_blank"><img src="<?php echo $response1->images[1]->source;?>" class="fb_popup_img"/></a> <?php }elseif($_GET['fb_type'] == 'link'){ if(strpos($_GET['img'], 'safe_image.php')){ $fb_img_link = $_GET['url']; }else{ if($_GET['oe']){ $fb_img_link = $_GET['img'].'&oe='.$_GET['oe']; }else{ $fb_img_link = $_GET['img']; } }?> <a href="<?php echo $feed_url;?>" target="_blank"><img src="<?php echo $fb_img_link;?>" class="fb_popup_img"/></a> <?php }else{ echo $response1->embed_html; }?> </div> <div class="vcfti-col-md-4 vcfti-col-sm-6 pos_relative"> <div class="svc_link"> <a href="<?php echo $feed_url;?>" target="_blank"><i class="fa fa-link"></i></a> </div> <div class="svc_share"> <i class="fa fa-share-alt"></i> <div class="svc_share-box full-color"> <ul class="s8-social" style="padding-left: 1em; text-indent: -1em;"> <li class="facebook"> <a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $feed_url;?>" target="_blank" title=""> <i class="fa fa-facebook"></i> </a> </li> <li class="google"> <a href="https://plusone.google.com/share?url=<?php echo $feed_url;?>" target="_blank" title=""> <i class="fa fa-google-plus"></i> </a> </li> <li class="twitter"> <a href="https://twitter.com/intent/tweet?text=&url=<?php echo $feed_url;?>" target="_blank" title=""> <i class="fa fa-twitter"></i> </a> </li> </ul> </div> </div> <div class="fb_popup_content"> <div class="fb_popup_header"> <a href="javascript:;" class="fb_profile_img" target="_blank"><img src="<?php echo $response1->from->picture->data->url;?>" /></a> <a href="javascript:;" class="fb_profile_name" target="_blank"><?php echo $response1->from->name;?></a> </div> <hr class="fb_hr"/> <div class="fb_like_date"> <div class="fb_likes"><i class="fa fa-thumbs-o-up"></i> <?php echo insta_like_counter($response2->summary->total_count);?> <i class="fa fa-comments-o"></i> <?php echo insta_like_counter($response3->summary->total_count);?></div> <div class="fb_date"><?php echo time_elapsed_string(strtotime($response1->created_time));?></div> </div> <div class="fb_caption"> <?php if($_GET['fb_type'] == 'link'){ if($response1->message != 'undefined'){ echo social_convertHashtags($response1->message,'facebook');//$_GET['story']; } }else{ echo $_GET['story']; }?> </div> </div> <?php $comm_count = count($response3->data); if($comm_count > 0){?> <div class="fb_comments"> <?php $comments = $response3->data; //echo "<pre>";print_r($comments);echo "</pre>";?> <span><?php echo $_GET['share'].' shares';?><div class="pull_right"><?php echo insta_like_counter($response3->summary->total_count);?> Comments</div></span> <div class="fb_comments_inner"> <?php for($i=0;$i<$comm_count;$i++){ if($comments[$i]->message){?> <p><?php /*<img src="https://graph.facebook.com/<?php echo $comments[$i]->from->id;?>/picture" /><a href="javascript:;" target="_blank"><?php echo $comments[$i]->from->name;?></a> */?><?php echo $comments[$i]->message;?></p> <?php } }?> </div> </div> <?php }?> </div> </div> <?php //print_r($response->html);?> </div> <?php } if($_GET['network'] == 'youtube'){?> <style> .svc_youtube_popup { margin: 20px auto; max-width: 900px; position: relative; width: 100%; background: #333; display: -webkit-flex; display: flex; background:#fff; } .svc_youtube_popup > div{ width:100%;} .youtube-main-container,.you-panel-details{ padding:15px;margin: 0 0 10px;border: 0;background: #fff;box-shadow: 0 1px 2px rgba(0,0,0,.1);-moz-box-sizing: border-box;box-sizing: border-box;} .you-watch-title{ font-size:20px; display:block; margin-bottom:10px;} .you-profile-container{ display:inline-block;border-bottom: 1px solid #ccc;padding-bottom: 15px; width:100%;position: relative;} .you-profile-container > span{ display:table-row;font-size: 14px;} .you_profile_img{ width:48px; float:left; margin-right:10px;} .you-suscriber_div { margin-top: 4px; } .you-suscriber_div div { background: #e62117; color: #fff; font-size: 13px; padding: 3px 6px; float: left; margin-right: 7px; } .you-suscriber_div small{ background: #e62117; color: #fff; font-size: 13px; padding: 2px 6px; } .you-suscriber_div span{ border: 1px solid #ccc; padding: 1px 5px; font-size: 13px; background: #f2f2f2; } .you_view_count { position: absolute; right: 0; font-size: 25px; bottom: -1px; border-bottom: 2px solid #167ac6; } .you_view_count span{ font-size:18px;} .you_like_dislike > div { display: inline-block; margin-right: 14px; } .you_like_dislike_container{ display: inline-block; width: 100%; padding: 10px 10px 0 10px; box-sizing: border-box; } .you_like_dislike { color: #807e7e; font-size: 14px; float: right; } .you_like_dislike i{ font-size:20px; margin-right:3px;} .you_publish_date { color: #222; font-weight: bold; font-size: 14px; margin-bottom: 5px; } .you_comments{ padding:0 0 0 15px; } .you_comments span{ width:100%; display:inline-block; padding: 8px 8px 8px 0; box-sizing: border-box; } .you_comments_inner{ overflow-y: auto; height: 380px; max-height: 100%; margin:10px 0 0; } .you_comments_inner span img{ float: left; margin-right: 10px; max-width: 45px; border-radius: 2px; } .you_comments_inner span a { font-weight:bold; } .you_comments_inner span { margin: 0 0 6px; font-size: 12px; line-height: 16px; color: #333; margin-bottom: 15px; display: inline-block; width:100%; } .you_comment_a{ font-size:13px; margin-right:4px;} .you_comment_text{ font-size:16px;} .you_comment_content{ margin-top:5px; font-size:13px; color:#222;} .you-desc-panel-height-css{margin:-14px 0 1px 0;border-top: 1px solid #e6e3e3; position:relative;} .you-desc-panel-height{max-height: 110px;overflow: hidden;} .you-desc-hide-show { text-align: center; box-shadow: 1px -1px 2px rgba(0,0,0,.1); -moz-box-sizing: border-box; padding-top: 5px; font-size: 11px; cursor: pointer; margin-bottom: 15px; border-bottom: 1px solid #f2f2f2; padding-bottom: 5px; } </style> <?php $api_url1 = 'https://www.googleapis.com/youtube/v3/videos?part=contentDetails%2Cstatistics%2Csnippet&id='.$_GET['videoId'].'&key='.$youtube_token; $api_url2 = 'https://www.googleapis.com/youtube/v3/commentThreads?part=id%2Csnippet&videoId='.$_GET['videoId'].'&key='.$youtube_token; $response1=json_decode(file_get_contents($api_url1)); $snippet = $response1->items[0]->snippet; $statistics = $response1->items[0]->statistics; $api_url3 = 'https://www.googleapis.com/youtube/v3/channels?part=brandingSettings,snippet,statistics,contentDetails&id='.$snippet->channelId.'&key='.$youtube_token; $response2=json_decode(file_get_contents($api_url2)); $snippet_comment = $response2->items; //$statistics_comment = $response2->items[0]->statistics; //echo "<pre>";print_r($snippet_comment);echo "</pre>";die; $response3=json_decode(file_get_contents($api_url3)); $snippet_channel = $response3->items[0]->snippet; $statistics_channel = $response3->items[0]->statistics; ?> <div class="svc_youtube_popup"> <div> <iframe class="mfp-iframe" src="//www.youtube.com/embed/<?php echo $_GET['videoId'];?>?rel=0&autoplay=0" frameborder="0" allowfullscreen=""></iframe> <div class="youtube-watch-header youtube-main-container"> <div class="clearfix"> <div class="you-watch-title"><?php echo $snippet->title;?></div> <div class="you-profile-container"> <img src="<?php echo $snippet_channel->thumbnails->default->url;?>" class="you_profile_img"/> <span><?php echo $snippet_channel->title;?></span> <span><div class="you-suscriber_div"><small><i class="fa fa-youtube-play"></i> subscriber</small><span><?php echo number_format($statistics_channel->subscriberCount);?></span></div></span> <div class="you_view_count"><?php echo number_format($statistics->viewCount);?> <span>views</span></div> </div> <div class="you_like_dislike_container"> <div class="you_like_dislike"> <div class="you_up"><i class="fa fa-thumbs-up"></i><?php echo number_format($statistics->likeCount);?></div> <div class="you_down"><i class="fa fa-thumbs-down"></i><?php echo number_format($statistics->dislikeCount);?></div> </div> </div> </div> </div> <div class="you-panel-details you-desc-panel-height you-desc-panel-height-css"> <div class="you_publish_date"><?php _e('Published on','svc_social_feed');?> <?php echo date('M d,Y',strtotime($snippet->publishedAt));?></div> <div class="you_description"><?php echo nl2br(social_convertHashtags($snippet->description,'youtube'));?></div> </div> <div class="you-desc-hide-show" show-more="<?php _e('SHOW MORE','svc_social_feed');?>" show-less="<?php _e('SHOW LESS','svc_social_feed');?>"><?php _e('SHOW MORE','svc_social_feed');?></div> <div class="you-comment-details"> <?php $comm_count = count($snippet_comment); if($comm_count > 0){?> <div class="you_comments"> <?php $comments = $snippet_comment;?> <div class="you_comment_text">COMMENTS</div> <div class="you_comments_inner"> <?php for($i=0;$i<$comm_count;$i++){?> <div> <span><img src="<?php echo $comments[$i]->snippet->topLevelComment->snippet->authorProfileImageUrl;?>" /><a href="<?php echo $comments[$i]->snippet->topLevelComment->snippet->authorChannelUrl;?>" target="_blank" class="you_comment_a"><?php echo $comments[$i]->snippet->topLevelComment->snippet->authorDisplayName;?></a> <?php echo time_elapsed_string(strtotime($comments[$i]->snippet->topLevelComment->snippet->publishedAt));?><div class="you_comment_content"><?php echo $comments[$i]->snippet->topLevelComment->snippet->textDisplay;?></div></span> </div> <?php }?> </div> </div> <?php }?> </div> </div> </div> <?php } if($_GET['network'] == 'vimeo'){?> <style> .svc_vimeo_popup { margin: 20px auto; max-width: 850px; position: relative; width: 100%; background: #333; display: -webkit-flex; display: flex; background:#fff; } .svc_vimeo_popup > div{ width:100%;} .vimeo-main-container,.vimeo-panel-details{ padding:15px;border: 0;background: #fff;-moz-box-sizing: border-box;box-sizing: border-box;} .vimeo-watch-title{ font-size:23px; display:block; margin-bottom:10px;} .vimeo-profile-container{ display:inline-block;padding-bottom: 15px; width:100%;position: relative;} .vimeo-profile-container > span{ display:table-row;font-size: 14px;} .vimeo_profile_img{ width:48px; float:left; margin-right:10px;border-radius: 100%;} .vimeo-suscriber_div { margin-top: 4px; } .vimeo-suscriber_div div { background: #e62117; color: #fff; font-size: 13px; padding: 3px 6px; float: left; margin-right: 7px; } .vimeo-suscriber_div small{ background: #e62117; color: #fff; font-size: 13px; padding: 2px 6px; } .vimeo-suscriber_div span{ border: 1px solid #ccc; padding: 1px 5px; font-size: 13px; background: #f2f2f2; } .vimeo_view_count { position: absolute; right: 0; font-size: 25px; bottom: -1px; border-bottom: 2px solid #167ac6; } .vimeo_publish_date { color: #222; font-weight: bold; font-size: 14px; margin-bottom: 5px; } .vimeo_comments{ padding:0 0 0 15px; } .vimeo_comments span{ width:100%; display:inline-block; padding: 8px 8px 8px 0; box-sizing: border-box; } .vimeo_comments_inner{ overflow-y: auto; max-height: 380px; margin:10px 0 0; } .vimeo_comments_inner span img{ float: left; margin-right: 10px; max-width: 45px; border-radius: 2px; } .vimeo_comments_inner span a { font-weight:bold; } .vimeo_comments_inner span { margin: 0 0 6px; font-size: 12px; line-height: 16px; color: #333; margin-bottom: 15px; display: inline-block; width:100%; } .vimeo_comment_a{ font-size:13px; margin-right:4px;} .vimeo_comment_text{ font-size:16px;margin-top: 25px;margin-bottom: 20px;} .vimeo_comment_content{ margin-top:5px; font-size:13px; color:#222;} .vimeo_profile_data{ font-size:15px;} .vimeo-panel-details { background:#F4F6F6 !important;background: #F4F6F6;border-bottom: 1px solid #D0D8DB;border-top: 1px solid #D0D8DB;position: relative;} .vimeo_like_dislike {padding: 10px 0;font-size: 16px;display: inline-block; width:100%;} .vimeo_up {float: left;margin-right: 10px;} .you-desc-panel-height-css{} .you-desc-panel-height{max-height: 110px;overflow: hidden;} .you-desc-hide-show { padding-top: 8px; font-size: 13px; cursor: pointer; margin-bottom: 15px; padding-bottom: 5px; padding-left: 15px; font-weight: bold; border-bottom: 1px solid #D0D8DB; background: #F4F6F6; } </style> <?php $api_url1 = 'https://api.vimeo.com/users/'.$_GET['userid'].'/videos/'.$_GET['videoId'].'?access_token='.$vimeo_token; $api_url2 = 'https://api.vimeo.com/videos/'.$_GET['videoId'].'/comments?per_page=25&access_token='.$vimeo_token; $response1=json_decode(file_get_contents($api_url1)); $snippet = $response1; //$statistics = $response1->items[0]->statistics; $response2=json_decode(file_get_contents($api_url2)); $snippet_comment = $response2->data; $feed_url = 'https://vimeo.com/'.$_GET['videoId']; ?> <div class="svc_vimeo_popup"> <div> <iframe class="mfp-iframe" src="//player.vimeo.com/video/<?php echo $_GET['videoId'];?>?autoplay=0" frameborder="0" allowfullscreen=""></iframe> <div class="vimeo-watch-header vimeo-main-container"> <div class="clearfix"> <div class="vimeo-watch-title"><?php echo $snippet->name;?></div> <div class="vimeo-profile-container"> <img src="<?php echo $_GET['profileImg'];?>" class="vimeo_profile_img"/> <div class="vimeo_profile_data"><strong><?php echo $_GET['from'];?></strong> <div class="vimeo_publish_date"><?php echo time_elapsed_string(strtotime($snippet->created_time));?></div></div> </div> </div> </div> <div class="vimeo-panel-details you-panel-details you-desc-panel-height you-desc-panel-height-css"> <div class="svc_share"> <i class="fa fa-share-alt"></i> <div class="svc_share-box full-color"> <ul class="s8-social" style="padding-left: 1em; text-indent: -1em;"> <li class="facebook"> <a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $feed_url;?>" target="_blank" title=""> <i class="fa fa-facebook"></i> </a> </li> <li class="google"> <a href="https://plusone.google.com/share?url=<?php echo $feed_url;?>" target="_blank" title=""> <i class="fa fa-google-plus"></i> </a> </li> <li class="twitter"> <a href="https://twitter.com/intent/tweet?text=&url=<?php echo $feed_url;?>" target="_blank" title=""> <i class="fa fa-twitter"></i> </a> </li> </ul> </div> </div> <div class="vimeo_like_dislike_container"> <div class="vimeo_like_dislike"> <div class="vimeo_up"><i class="fa fa-play"></i> <?php echo number_format($snippet->stats->plays);?></div> <div class="vimeo_up"><i class="fa fa-heart"></i> <?php echo number_format($snippet->metadata->connections->likes->total);?></div> </div> </div> <?php if($snippet->description){?> <div class="vimeo_description"><?php echo nl2br(social_convertHashtags($snippet->description,'vimeo'));?></div> <?php }?> </div> <?php if($snippet->description){?> <div class="you-desc-hide-show vimeo-show-more"><?php _e('Read More...','js_composer');?></div> <?php }?> <div class="vimeo-comment-details"> <?php $comm_count = count($snippet_comment); if($comm_count > 0){?> <div class="vimeo_comments"> <?php $comments = $snippet_comment;?> <div class="vimeo_comment_text"><?php _e('COMMENTS','js_composer');?></div> <div class="vimeo_comments_inner"> <?php for($i=0;$i<$comm_count;$i++){?> <div> <span><img src="<?php echo $comments[$i]->user->pictures->sizes[1]->link;?>" /><a href="https://vimeo.com<?php echo $comments[$i]->user->uri;?>" target="_blank" class="vimeo_comment_a"><?php echo $comments[$i]->user->name;?></a> <?php echo time_elapsed_string(strtotime($comments[$i]->created_on));?><div class="vimeo_comment_content"><?php echo $comments[$i]->text;?></div></span> </div> <?php }?> </div> </div> <?php }?> </div> </div> </div> <?php } if($_GET['network'] == 'instagram'){ $url = $_GET['url'].'?taken-by=alexstrohl&__a=1'; $response=json_decode(file_get_contents($url)); $media = $response->graphql->shortcode_media; $feed_url = 'https://www.instagram.com/p/'.$media->shortcode.'/'; //$response = wp_remote_get( $url );?> <div class="svc_instagram_popup"> <div> <div class="vcfti-col-md-7 vcfti-col-sm-6" style="line-height:0"> <?php if($media->is_video){?> <iframe frameborder="0" allowfullscreen="" class="mfp-iframe" src="<?php echo $media->video_url;?>"></iframe> <?php }else{?> <a href="<?php echo $feed_url;?>" target="_blank"><img src="<?php echo $media->display_url?>" class="insta_popup_img"/></a> <?php }?> </div> <div class="vcfti-col-md-5 vcfti-col-sm-6 pos_relative"> <div class="svc_link"> <a href="<?php echo $feed_url;?>" target="_blank"><i class="fa fa-link"></i></a> </div> <div class="svc_share"> <i class="fa fa-share-alt"></i> <div class="svc_share-box full-color"> <ul class="s8-social" style="padding-left: 1em; text-indent: -1em;"> <li class="facebook"> <a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $feed_url;?>" target="_blank" title=""> <i class="fa fa-facebook"></i> </a> </li> <li class="google"> <a href="https://plusone.google.com/share?url=<?php echo $feed_url;?>" target="_blank" title=""> <i class="fa fa-google-plus"></i> </a> </li> <li class="twitter"> <a href="https://twitter.com/intent/tweet?text=&url=<?php echo $feed_url;?>" target="_blank" title=""> <i class="fa fa-twitter"></i> </a> </li> </ul> </div> </div> <div class="insta_popup_content"> <div class="insta_popup_header"> <a href="https://www.instagram.com/<?php echo $media->owner->username;?>/" class="insta_profile_img" target="_blank"><img src="<?php echo $media->owner->profile_pic_url?>" /></a> <a href="https://www.instagram.com/<?php echo $media->owner->username;?>/" class="insta_profile_name" target="_blank"><?php echo $media->owner->full_name;?></a> </div> <hr class="insta_hr"/> <div class="insta_like_date"> <div class="insta_likes"><i class="fa fa-heart-o"></i> <?php echo insta_like_counter($media->edge_media_preview_like->count);?> <i class="fa fa-comments-o"></i> <?php echo insta_like_counter($media->edge_media_to_comment->count);?></div> <div class="insta_date"><?php echo time_elapsed_string($media->taken_at_timestamp);?></div> </div> <div class="insta_caption"> <?php $len_caption = strlen($media->edge_media_to_caption->edges[0]->node->text); if($len_caption > 350){ echo substr($media->edge_media_to_caption->edges[0]->node->text,0,350).'...'; }else{ echo $media->edge_media_to_caption->edges[0]->node->text; }?> </div> </div> <?php $comm_count = count($media->edge_media_to_comment->edges); if($comm_count > 0){?> <div class="insta_comments"> <?php $comments = $media->edge_media_to_comment->edges;?> <span>Comments</span> <div class="insta_comments_inner"> <?php for($i=0;$i<$comm_count;$i++){?> <p><a href="https://www.instagram.com/<?php echo $comments[$i]->node->owner->username;?>" target="_blank"><?php echo $comments[$i]->node->owner->username;?></a> <?php echo $comments[$i]->node->text;?></p> <?php }?> </div> </div> <?php }?> </div> </div> <?php //print_r($response->html);?> </div> <?php } die(); } if(!function_exists('insta_like_counter')){ function insta_like_counter($value){ if ($value > 999 && $value <= 999999) { $result = floor($value / 1000) . 'k'; } elseif ($value > 999999) { $result = floor($value / 1000000) . 'M'; } else { $result = $value; } return $result; } } if(!function_exists('time_elapsed_string')){ function time_elapsed_string($ptime){ $etime = time() - $ptime; if ($etime < 1) { return '0 seconds'; } $a = array( 365 * 24 * 60 * 60 => 'year', 30 * 24 * 60 * 60 => 'month', 24 * 60 * 60 => 'day', 60 * 60 => 'hour', 60 => 'minute', 1 => 'second' ); $a_plural = array( 'year' => 'years', 'month' => 'months', 'day' => 'days', 'hour' => 'hours', 'minute' => 'minutes', 'second' => 'seconds' ); foreach ($a as $secs => $str) { $d = $etime / $secs; if ($d >= 1) { $r = round($d); return $r . ' ' . ($r > 1 ? $a_plural[$str] : $str) . ' ago'; } } } } if(!function_exists('social_convertHashtags')){ function social_convertHashtags($str,$social){ $regex = "/#+([a-zA-Z0-9_]+)/"; if($social == 'instagram'){ $str = preg_replace($regex, '<a href="https://www.instagram.com/explore/tags/$1/" target="_blank" class="svc_hashtags">$0</a>', $str); } if($social == 'facebook'){ $str = preg_replace($regex, '<a href="https://www.facebook.com/hashtag/$1/" target="_blank" class="svc_hashtags">$0</a>', $str); } if($social == 'twitter'){ $str = social_autolink($str); $str = preg_replace($regex, '<a href="https://twitter.com/hashtag/$1/" target="_blank" class="svc_hashtags">$0</a>', $str); } if($social == 'youtube'){ $str = social_autolink($str); } if($social == 'dribbble'){ $str = social_autolink($str); } if($social == 'vimeo'){ $str = social_autolink($str); } if($social == 'vk'){ $str = social_autolink($str); } return($str); } } if(!function_exists('social_autolink')){ function social_autolink($string){ $string = preg_replace("/([\w]+\:\/\/[\w-?&;#~=\.\/\@]+[\w\/])/", "<a target=\"_blank\" href=\"$1\" class=\"svc_hashtags\">$1</a>", $string); return $string; } } ?>
[+]
..
[-] get_tweets.php
[edit]
[-] .htaccess
[edit]
[-] social-setting.php
[edit]
[-] el-setup.php
[edit]
[-] all_function.php
[edit]
[-] social-grid-setting.php
[edit]
[-] el-addon.php
[edit]
[-] twitter_proxy.php
[edit]
[-] add-param.php
[edit]