...。您的广告代码在此处... div> code
>
> li>
ol>
Personally I create various WordPress shortcodes for various ad units that I use on my personal website.
我个人为个人网站上使用的各种广告单元创建了各种WordPress短代码。
It is extremely easity to create shortcodes for your ad units while taking the advantage of AdSense Invalid Click Protector Plugin.
在利用AdSense Invalid Click Protector插件的同时,为广告单元创建简码非常容易。
Let me show you how to create a WordPress shortcode very easily.
让我向您展示如何轻松创建WordPress简码。 p>
To create a shortcode the first thing you need to do is, go to the functions.php
file of your theme or your child theme and at the end of yoru file put any of the following code
要创建简码,您需要做的第一件事是,转到主题或子主题的 functions.php code>文件,然后在yoru文件的末尾放置以下任何代码.
p>
If you are using a PHP version < 5.3, you can create a shortcode in the following way:
如果您使用的PHP版本<5.3,则可以通过以下方式创建简码: p>
add_shortcode( 'your_shortcode_name', 'your_shortcode_function_name' ); add_shortcode('your_shortcode_name','your_shortcode_function_name');function your_shortcode_function_name() {
函数your_shortcode_function_name(){
if( aicp_can_see_ads() ) { // This part will show ads to your non-banned visitors
if(aicp_can_see_ads()){//此部分将向非禁止访问者展示广告
$adCode = '
$ adCode ='
<!-不要忘记添加带有icp class的div->
script>
';
div> <!-aicp div的末尾->';
return $adCode;
返回$ adCode;
} else { // Anything within this part will be shown to your banned visitors or to the blocked country visitors
} else {//这部分的任何内容都会显示给您被禁止的访问者或被阻止的国家/地区访问者
return '
You have been blocked from seeing ads.
';
返回'
您已被阻止查看广告。 div>';
}
}
}
}
code> pre>
If you are using PHP version >= 5.3, you don’t need to give a function name, instead you can take advantage of of anonymous function like this way:
如果您使用的是PHP版本> = 5.3,则无需提供函数名,而是可以像下面这样利用匿名函数: p>
add_shortcode( 'your_shortcode_name', function() { add_shortcode('your_shortcode_name',function(){ if( aicp_can_see_ads() ) { // This part will show ads to your non-banned visitors
if(aicp_can_see_ads()){//此部分将向非禁止访问者展示广告
$adCode = '
$ adCode ='
<!-不要忘记添加带有icp class的div->
script>
';
div> <!-aicp div的末尾->';
return $adCode;
返回$ adCode;
} else { // Anything within this part will be shown to your banned visitors or to the blocked country visitors
} else {//这部分的任何内容都会显示给您被禁止的访问者或被阻止的国家/地区访问者
return '
You have been blocked from seeing ads.
';
返回'
您已被阻止查看广告。 div>';
}
}
} );
});
code> pre>
Please Note: if you want, you can completely ignore the else {}
block above in case you don't wanna show anything special to the blocked visitors.<
请注意: strong>:如果愿意,您可以完全忽略上面的 else {} code>块,以防您不想向被阻止的访问者展示特殊内容。< /p>
/ p>
How can I know what PHP version I am using?
如何知道我使用的PHP版本? strong> p>You can install the WP Server Stats plugin in your website which will show you many important information about your
您可以在网站上安装 WP Server Stats 插件,该插件将向您显示有关您的许多重要信息
hosting environment including what PHP version you are currently using.
托管环境,包括当前使用的PHP版本。 p>
Can this plugin be used with other ad medias?
此插件可以与其他广告媒体一起使用吗? strong> p>No It is not.
否,不是。
This plugin will only work with AdSense ads or any ad media that shows iframe based ads.
该插件仅适用于AdSense广告或展示基于iframe的广告的任何广告媒体。
Recently Google has tweaked there ad code which makes merely impossible to support both iframe based ads like AdSense and non-iframe based ads, like affiliate ads.
最近,Google调整了广告代码,这使得它几乎无法同时支持AdSense等基于iframe的广告和会员广告等非基于iframe的广告。
In case of affiliate ads, there is generally no click bombing issue, that is why from v1.1.0, AICP will only support iframe based ads and not general affiliate ads.
对于联盟广告,通常不会出现点击轰炸的问题,因此从v1.1.0开始,AICP仅支持基于iframe的广告,而不支持常规联盟广告。
Sorry guys!
对不起大家!
In case you want to use AICP just for affiliate ads, I will recommend you to download v1.0.6 of the plugin from the old archive.
/“>旧存档。 p>
Will it help me from stop clicking on my own ads?
它会帮助我停止点击自己的广告吗? strong> p>No, you are not supposed to click on your own ads.
否,您不应点击自己的广告。
If you want you can use adblock in your borswer to save yourself from accidental clicking on your own ads.
如果需要的话,您可以在借口中使用adblock来避免意外点击自己的广告。 p>
Languages
语言 strong> p>AdSense Invalid Click Protector plugin is 100% translation ready.
AdSense无效的Click Protector插件已100%准备翻译。
Right now it only has the English translation in it but over time with the community help I hope this plugin will have many language in it’s language directory.
现在它只包含英语翻译,但是随着社区的帮助,我希望这个插件在其语言目录中能有多种语言。 p>
Support the Plugin
支持插件 strong> p>If you like this plugin please don't forget to write a review and if possible please Donate some amount
如果您喜欢此插件,请不要忘了写评论,并且如果可能的话,请捐赠一些金额
to keep the plugin and it's development alive.
保持插件及其开发的生命力。 p>
-EOF-
AI助手支持GPT4.0