Hi
I'm trying to replace embedded Youtube videos with youtube-nocookie.com and do this:
I replace the code in wpforoembeds.php from line 88 onwards
array ( '# [^ \ s \ r \ n \ t \' \ "<>] * https: // (: www \) youtube \ .com + v = ([^ \ \.?.? s \ r \ n \ t \ 0 <>] +) [^ \ s \ r \ n \ t \ '\ "<>] * # isu', '<div class =" wpf-video "style =" width : '. $ w.'; height: '. $ h.' "> <iframe style =" width: '. $ w.'; height: '. $ h.' "src =" // www.youtube- nocookie.com/embed/$1 "frameborder =" 0 "allowfullscreen> </ iframe> </ div> ',' youtube.com '),
array ( '# [^ \ s \ r \ n \ t \' \ "<>] * https: // (: www \) youtu \ .be \ / ([^ \ s \ r \ n.? \ t \ 0 <>] +) [^ \ s \ r \ n \ t \ '\ "<>] * # isu', '<div class =" wpf-video "style =" width:'. $ w . '; height:'. $ h. '"> <iframe style =" width:'. $ w. '; height:'. $ h. '"src =" // www.youtube-nocookie.com/embed / $ 1 "frameborder =" 0 "allowfullscreen> </ iframe> </ div> ',' youtube.com '),
Is there a better way to do that? Thanks for your help! I'm a beginner:)