Conditions | 2 |
Paths | 2 |
Total Lines | 29 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | function insert_head_amazon() { |
||
20 | $data_tags = ( WordAds_Params::is_cloudflare() ) ? ' data-cfasync="false"' : ''; |
||
21 | echo <<<HTML |
||
22 | <script$data_tags type="text/javascript" src="//c.amazon-adsystem.com/aax2/amzn_ads.js"></script> |
||
23 | <script$data_tags type="text/javascript"> |
||
24 | try { |
||
25 | amznads.getAds("3033"); |
||
26 | } catch(e) { /* ignore */ } |
||
27 | </script> |
||
28 | <script$data_tags type="text/javascript"> |
||
29 | var a9_p = amznads.getKeys(); |
||
30 | if ("undefined" != typeof a9_p && "" != a9_p && null !== a9_p && "[object Array]" === Object.prototype.toString.call(a9_p)) { |
||
31 | var a = "", |
||
32 | b = 0, |
||
33 | c = a9_p.length, |
||
34 | d, e; |
||
35 | a9_p.sort(); |
||
36 | for (d = 0; d < c; d+=1) { |
||
37 | a9_p[d - b] = a9_p[d - b].replace(/a1x6p/, "a160x600p"); |
||
38 | e = a9_p[d - b].split("p"); |
||
39 | e[0] == a && (a9_p.splice(d - b, 1), b++); |
||
40 | a = e[0]; |
||
41 | } |
||
42 | _ipw_custom.amznPay = a9_p; |
||
43 | } |
||
44 | document.close(); |
||
45 | </script> |
||
46 | HTML; |
||
47 | } |
||
48 | } |
||
52 |