mirror of https://github.com/vtrois/kratos
fix: some plugin issues
* fix: action comment_form_after should be called #341 * fix: add custom_upload_perfilter on filter wp_handle_sideload_prefilter #345pull/369/head
parent
3baa93b162
commit
c3250ee916
|
@ -74,9 +74,10 @@ if (comments_open()) {?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php comment_id_fields();?>
|
<?php comment_id_fields();?>
|
||||||
|
<?php do_action('comment_form_after');?>
|
||||||
<?php do_action('comment_form', $post->ID);?>
|
<?php do_action('comment_form', $post->ID);?>
|
||||||
</form>
|
</form>
|
||||||
<?php endif;?>
|
<?php endif;?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
|
|
|
@ -210,6 +210,7 @@ if (kratos_option('g_removeimgsize', false)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 媒体文件使用 md5 值重命名,指定文件前缀
|
// 媒体文件使用 md5 值重命名,指定文件前缀
|
||||||
|
add_filter('wp_handle_sideload_prefilter', 'custom_upload_perfilter');
|
||||||
add_filter('wp_handle_upload_prefilter', 'custom_upload_filter');
|
add_filter('wp_handle_upload_prefilter', 'custom_upload_filter');
|
||||||
|
|
||||||
function custom_upload_filter($file)
|
function custom_upload_filter($file)
|
||||||
|
@ -407,4 +408,4 @@ if (kratos_option('g_007', false)) {
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue