fix: some plugin issues

* fix: action comment_form_after should be called #341

* fix: add custom_upload_perfilter on filter wp_handle_sideload_prefilter #345
pull/369/head
n0099 2021-03-11 08:05:05 +08:00 committed by GitHub
parent 3baa93b162
commit c3250ee916
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -74,9 +74,10 @@ if (comments_open()) {?>
</div>
</div>
<?php comment_id_fields();?>
<?php do_action('comment_form_after');?>
<?php do_action('comment_form', $post->ID);?>
</form>
<?php endif;?>
</div>
</div>
<?php }?>
<?php }?>

View File

@ -210,6 +210,7 @@ if (kratos_option('g_removeimgsize', false)) {
}
// 媒体文件使用 md5 值重命名,指定文件前缀
add_filter('wp_handle_sideload_prefilter', 'custom_upload_perfilter');
add_filter('wp_handle_upload_prefilter', 'custom_upload_filter');
function custom_upload_filter($file)
@ -407,4 +408,4 @@ if (kratos_option('g_007', false)) {
curl_close($ch);
return $response;
}
}
}