This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: 三竹簡訊 Webhook | |
Plugin URI: https://gist.github.com/nczz/750c3d8d18b9e0ca07ca06a248c11570 | |
Description: 接收 Webhook 請求發送簡訊 | |
Author: Chun | |
Version: 1.0 | |
Author URI: https://www.mxp.tw/ | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//設定系統環境,確保輸出執行環境無礙 | |
set_time_limit(0); | |
ini_set('memory_limit', '256M'); | |
//判斷執行權限 | |
//建立資料庫連線,開始取得資料 | |
//撰寫資料庫欄位與可讀性資料的轉換方法 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This little class records how long it takes each WordPress action or filter | |
* to execute which gives a good indicator of what hooks are being slow. | |
* You can then debug those hooks to see what hooked functions are causing problems. | |
* | |
* This class does NOT time the core WordPress code that is being run between hooks. | |
* You could use similar code to this that doesn't have an end processor to do that. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//修正管理後台頁尾顯示 | |
function dashboard_footer_design() { | |
echo 'Design by <a href="https://www.mxp.tw">Mxp</a>'; | |
} | |
add_filter('admin_footer_text', 'dashboard_footer_design'); | |
//修正管理後台頁尾顯示 | |
function dashboard_footer_developer() { | |
echo '<br/><span id="footer-thankyou">Developed by <a href="http://www.mxp.tw">Mxp</a></span>'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ~ /wp-content/uploads/.* { | |
if (!-f $request_filename) { | |
rewrite ^/wp-content/uploads/(.*)$ https://www.mxp.tw/wp-content/uploads/$1 redirect; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$twzipcode_arr = array( | |
0 => array( | |
'zipcode' => 100, | |
'county' => '臺北市', | |
'city' => '中正區', | |
'outlying' => 0, | |
), | |
1 => array( | |
'zipcode' => 103, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Math { | |
/** | |
* The base. | |
* | |
* @var string | |
*/ | |
private static $base = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103.1.220.10 => WordPress/6.1.1; http://www.gujibaili.com.tw | |
103.1.220.10 => WordPress/6.1; http://www.gujibaili.com.tw | |
103.1.220.18 => WordPress/5.6.10; http://yks.bailhai.com.tw | |
103.1.220.18 => WordPress/5.8.6; http://www.amahua.com.tw | |
103.1.220.18 => WordPress/5.8.6; http://www.speedkz.com.tw | |
103.1.220.18 => WordPress/5.8.6; http://yks.futhome.com.tw | |
103.1.220.18 => WordPress/5.8.6; http://yks.speedkz.com.tw | |
103.1.220.18 => WordPress/5.9.5; http://www.hds555.com.tw | |
103.1.220.18 => WordPress/5.9.5; https://www.hds555.com.tw | |
103.1.220.18 => WordPress/6.1.1; http://blog.amahua.com.tw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* HOW-TO | |
*/ | |
// same param as $.ajax(option); see http://api.jquery.com/jQuery.ajax/ | |
$.ajaxQueue.addRequest(option); | |
// start processing one by one requests | |
$.ajaxQueue.run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mxp_woocommerce_after_add_to_cart_button(){ | |
global $woocommerce; | |
$checkout_url = $woocommerce->cart->get_checkout_url(); | |
echo '<div id="ks_quick_checkout"><a href="'.$checkout_url.'?add-to-cart='.get_queried_object_id().'" class="button alt">直接結帳</a></div>'; | |
?> | |
<script> | |
jQuery(document).ready(function() { | |
var v_product = jQuery('form.variations_form.cart').data(); | |
if (v_product === undefined) { | |
return; |
NewerOlder