恢复意外删除的代码

pull/121/head
spirit 2019-10-28 21:04:01 +08:00
parent 2b4612493c
commit d10a957567
1 changed files with 8 additions and 6 deletions

View File

@ -1513,12 +1513,14 @@ function codecheese_register_post( $sanitized_user_login, $user_email, $errors )
// html 标签处理器 // html 标签处理器
function html_tag_parser($content) { function html_tag_parser($content) {
if(!is_feed()) { if(!is_feed()) {
$content=preg_replace( if(akina_option('lazyload') && akina_option('lazyload_spinner')){
'/<img(.+)src=[\'"]([^\'"]+)[\'"](.*)>/i', $content=preg_replace(
"<img $1 class=\"lazyload\" data-src=\"$2\" src=\"https://cdn.jsdelivr.net/gh/moezx/cdn@3.0.2/img/svg/loader/trans.ajax-spinner-preloader.svg\" onerror=\"imgError(this)\" $3 >\n<noscript>$0</noscript>", '/<img(.+)src=[\'"]([^\'"]+)[\'"](.*)>/i',
$content "<img $1 class=\"lazyload\" data-src=\"$2\" src=\"".akina_option('lazyload_spinner')."\" onerror=\"imgError(this)\" $3 >\n<noscript>$0</noscript>",
); $content
);
}
//Fancybox //Fancybox
/* Markdown Regex Pattern for Matching URLs: /* Markdown Regex Pattern for Matching URLs: