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
/* 批次刪除不存在的迴響之meta值 */ | |
DELETE FROM wp_commentmeta WHERE comment_id NOT IN (SELECT comment_id FROM wp_comments); |
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
/*批次關閉所有文章留言*/ | |
UPDATE wp_posts SET comment_status = 'close' WHERE post_type = 'post' ; |
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 | |
add_filter('wp_get_attachment_image_attributes', function($attr) { | |
if (isset($attr['sizes'])) unset($attr['sizes']); | |
if (isset($attr['srcset'])) unset($attr['srcset']); | |
return $attr; | |
}, PHP_INT_MAX); | |
add_filter('wp_calculate_image_sizes', '__return_false', PHP_INT_MAX); | |
add_filter('wp_calculate_image_srcset', '__return_false', PHP_INT_MAX); | |
remove_filter('the_content', 'wp_make_content_images_responsive'); |
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 achang_chang_filename_to_date($filename) { | |
$info = pathinfo($filename); | |
$ext = empty($info['extension']) ? '' : '.' . $info['extension']; | |
$name = basename($filename, $ext); | |
if(!is_numeric($name)){ |
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
#Googlebot | |
User-agent: Googlebot | |
Allow: *.css | |
Allow: *.js | |
# Other bot spider | |
User-agent: * | |
Disallow: /wp-admin/ | |
Disallow: /wp-includes/ |
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 | |
$to =" [email protected] "; //收件者 | |
$subject = "test"; //信件標題 | |
$msg = "smtp發信測試";//信件內容 | |
$headers = "From: [email protected]"; //寄件者 | |
if(mail("$to", "$subject", "$msg", "$headers")): | |
echo "信件已經發送成功。";//寄信成功就會顯示的提示訊息 | |
else: | |
echo "信件發送失敗!";//寄信失敗顯示的錯誤訊息 |
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
<script> | |
//<![CDATA[ | |
if (top.location != location ) { | |
top.location.href = location.href; | |
} | |
//]]> | |
</script> |
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
<script src="https://apis.google.com/js/plusone.js"></script> | |
<div class="g-savetodrive" data-filename="檔案名稱" data-sitename="網站名稱" data-src="檔案路徑"> | |
</div> |
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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> |
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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> |
NewerOlder