This is a widget plugin that allow’s you to mix PHP and html code with mobile
这是一个小部件插件,可让您将PHP和html代码与移动设备混合使用
support.
支持。
Two text area’s are provided.
提供了两个文本区域。
The first is the standard “Title”.
第一个是标准的“标题”。
The one named “Code:” can mix PHP and html.
名为“代码:”的代码可以将PHP和html混合使用。
Two checkboxes allow you to choose
两个复选框可让您选择
before and/or after posts.
发布之前和/或之后。
No limit on the number of widgets.
小部件数量没有限制。 p>
WordPress version 3.4 and higher has defined a function called wp_is_mobile().
WordPress 3.4及更高版本定义了一个名为wp_is_mobile()的函数。
This can be used inside your code mix to perform certain actions if the
如果
browser is mobile.
浏览器是移动的。
Mobile support is via wp_is_mobile() function which returns
通过wp_is_mobile()函数提供移动支持,该函数返回
true if on a mobile browser.
如果在移动浏览器上,则为true。
See the WordPress API for more information.
有关更多信息,请参见WordPress API。 p>
Dynamic title support means that you can name your widget using the title
动态标题支持意味着您可以使用标题命名小部件
field and not have it displayed in the output.
字段,而不在输出中显示它。
This is useful to give
这对于给
很有用
your widgets meaningful names so you don’t lose track of what is going
您的小部件的有意义的名称,这样您就不会迷路了
on with your widgets.
在您的小部件上。 p>
Two variables have been defined for use with Google Mobile Adsense:
已定义了两个变量供Google Mobile Adsense使用: p>
$myMobileAdsenseCode;
$ myMobileAdsenseCode;
$myMobileAdsenseSlot;
$ myMobileAdsenseSlot; p>
This widget requires some knowledge of PHP and HTML coding.
此小部件需要有关PHP和HTML编码的一些知识。
Misuse could crash
滥用可能导致崩溃
your site or cause errors with Adsense.
您的网站或导致Adsense错误。 p>
Examples:
示例: p>
Output:
输出:
5
5 p>
To use Google mobile adsense include the following in the “Code:” area:
要使用Google移动Adsense,请在“代码:”区域中添加以下内容: p>
The plugin will take care of the rest.
该插件将处理其余的工作。
Another check is made to ensure
再次检查以确保
that wp_is_mobile is true inside the plugin and that the Google Adsense variable
wp_is_mobile在插件中为true,并且Google Adsense变量为
has a value.
有一个值。 p>
You can combine both regular and mobile adsense.
您可以将常规和移动adsense结合使用。
Be careful.
小心点。 p>
The following snippet will either show mobile or regular ads depending on the
以下代码段将显示移动广告或常规广告,具体取决于
browswer used by the end-user.
最终用户使用的浏览器。 p>
< ?php
<?php
if ( !wp_is_mobile() ) {
if(!wp_is_mobile()){
echo '
回声'
<!-后内容-> p>
(adsbygoogle = window.adsbygoogle || []).push({});
(adsbygoogle = window.adsbygoogle || [])。push({});
‘;}
‘;}
else {
其他{
$myMobileAdsenseClient=’ca-mb-pub-xxxxxxxxxxxx’;
$ myMobileAdsenseClient ='ca-mb-pub-xxxxxxxxxxxx';
$myMobileAdsenseSlot=’xxxxxxxxxx’;
$ myMobileAdsenseSlot ='xxxxxxxxxx';
}?>
}?> p>
Ordered list:
订购清单: p>
- Support for the mixing of PHP and HTML
- 支持混合使用PHP和HTML li>
- Support for mobile browsers
- 对移动浏览器的支持 li>
- Support for Google Adsense including mobilie
- 对Google Adsense的支持,包括移动电话 li>
- Includes “before post” support
- 包括“发布前”支持 li>
- Includes “after post” support
- 包括“发布后”支持 li>
- No limit on the number of widgets
- 小部件数量无限制 li>
- Includes dynamic title support in sidebars
- 在侧边栏中包含动态标题支持 li>
ol>
Unordered list:
无序列表: p>
- Support for the mixing of PHP and HTML
- 支持混合使用PHP和HTML li>
- Support for mobile browsers
- 对移动浏览器的支持 li>
- Support for Google adsense including mobile
- 支持Google adsense,包括移动设备 li>
- Includes support for “before post”
- 包括对“发布前”的支持 li>
- Includes support for “after post”
- 包括对“发布后”的支持 li>
- No limit on the number of widgets
- 小部件数量无限制 li>
- Include dynamic title support in sidebars
- 在侧边栏中包含动态标题支持 li>
ul>
Link to [WordPress](https://wordpress.org/ \”Your favorite software\”) and one to [Markdown\’s Syntax Documentation][markdown syntax].
链接到[WordPress](https://wordpress.org/“您喜欢的软件”),并链接到[Markdown的语法文档] [markdown语法]。 p>