我知道如何在脑海中回声但是当我在我的选项页面的文本框中粘贴脚本时,它会像这样出现:
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-48019065-1', 'elegantdevelopment.eu');
ga('send', 'pageview');
</script>
而不是:
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-48019065-1', 'elegantdevelopment.eu');
ga('send', 'pageview');
</script>
我检查了我的数据库,当我签入phpmyadmin
时,该选项被存储为第二个示例显示以下是插入代码段的代码:
function PrintAnalytics( $post ){
global $post;
$analytics = esc_attr(get_option('basic_seo_analytics'));
echo "\r\n" . $analytics . "\r\n\n";
}