AlipayDonate,支付宝为您提供快捷的捐赠服务. Version:1.8.8 Author:歪SIR Author URI:http://www.waisir.com License: GPLv2 or later */ /* Copyright (c) 2011-2012 waisir (Email : waisir@qq.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. License: http://www.gnu.org/licenses/gpl.txt You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ include_once 'includes/cfg.config.php'; include_once 'includes/fnc.core.php'; include_once 'includes/cls.settings.php'; include_once 'includes/cls.widget.php'; ///////////////////////////////////////////////////////////////////////////////////// add_action( 'save_post', 'ws_alido_updatePostIdsCol_callback' ); add_action( 'edit_post', 'ws_alido_updatePostIdsCol_callback' ); add_action( 'delete_post', 'ws_alido_updatePostIdsCol_callback' ); function ws_alido_updatePostIdsCol_callback(){ require_once( WS_ALIDO_INC_DIR . '/cls.option.php' ); $options = new WS_AliDo_Option( WS_ALIDO_ID ); $options->set('showPostIds', ws_alido_updatePostIdsCol( $options )); $options->update(); } ///////////////////////////////////////////////////////////////////////////////////// add_action('widgets_init', create_function('', 'return register_widget("WS_AliDo_Widget");')); ///////////////////////////////////////////////////////////////////////////////////// add_action('init', 'ws_alido_redirect', 1 ); function ws_alido_redirect(){ if( isset($_GET['alidobill']) ){ die(wp_redirect( WS_ALIDO_URL . '/redirect.php?bill=' . $_GET['alidobill'], 301)); } } add_filter('the_content','ws_alido_content_pack',10,1); function ws_alido_content_pack( $content ){ require_once( 'includes/cls.option.php' ); $options = new WS_AliDo_Option( WS_ALIDO_ID ); $gateway = $options->get('gateway'); $donateurl = $options->get('donateurl'); $email = $options->get('email'); if( $gateway == 'alipay' && !empty($donateurl) ) $donateLink = $donateurl; elseif( $gateway == 'api' && !empty($email) ) $donateLink = WS_ALIDO_URL . '/redirect.php?bill'; else $donateLink = "javascript:alert('还没设置收款账号呢');"; $showwords = $options->get('showwords'); $tipwords = $options->get('tipwords'); $imgurl = WS_ALIDO_IMG_URL; $imgButton = $imgurl .'/' . $options->get('button'); $donate = << $(function(){ $('.ws_alido_postMainWrap').bind({ mousedown:function(){return false;}, click:function(){return true;} }); });