📄 googleadsense.php
字号:
<?php
/*
Plugin Name: GoogleAdSense
Plugin URI: http://forum.f2blog.com/forum-21-1.html
Description: Add Google AdSense to your blog.
Version: 0.1
Author: zach14c
Author URI: http://forum.f2blog.com/profile-uid-22.html
*/
include_once(substr(dirname(__FILE__), 0) . "/common.php");
// Install Plugin
function GoogleAdSense_install() {
global $GoogleAdSense_plugin_config;
$arrPlugin['Name'] = $GoogleAdSense_plugin_config["Name"];
$arrPlugin['Desc'] = "Google Ad";
$arrPlugin['Type'] = "Side";
$arrPlugin['Code'] = "";
$arrPlugin['Path'] = "";
$arrPlugin['DefaultField'] = array("dummy");
$arrPlugin['DefaultValue'] = array("1");
$ActionMessage = install_plugins($arrPlugin);
return $ActionMessage;
}
//Unstall Plugin
function GoogleAdSense_unstall() {
global $GoogleAdSense_plugin_config;
$ActionMessage = unstall_plugins($GoogleAdSense_plugin_config["Name"]);
return $ActionMessage;
}
function GoogleAdSense($sidename, $sidetitle, $htmlcode, $isInstall) {
global $GoogleAdSense_plugin_config;
$ad_js = readfromfile($GoogleAdSense_plugin_config["JSFile"]);
?>
<!-- Google Ad-Sense -->
<div class="sidepanel" id="Side_GoogleAd">
<h4 class="Ptitle" style="cursor: pointer;"><?=$sidetitle?></h4>
<div class="Pcontent" id="content_statistics" style="display:">
<?=$ad_js?>
</div>
</div>
<?
}
add_action('GoogleAdSense','GoogleAdSense',4);
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -