Skip to content

Commit

Permalink
fix: some plugin issues
Browse files Browse the repository at this point in the history
* fix: action comment_form_after should be called #341

* fix: add custom_upload_perfilter on filter wp_handle_sideload_prefilter #345
  • Loading branch information
n0099 authored Mar 11, 2021
1 parent 3baa93b commit c3250ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@
</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 }?>
3 changes: 2 additions & 1 deletion inc/theme-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ function remove_default_images($sizes)
}

// 媒体文件使用 md5 值重命名,指定文件前缀
add_filter('wp_handle_sideload_prefilter', 'custom_upload_perfilter');
add_filter('wp_handle_upload_prefilter', 'custom_upload_filter');

function custom_upload_filter($file)
Expand Down Expand Up @@ -407,4 +408,4 @@ function txcurl($url, $params=false, $ispost=0)
curl_close($ch);
return $response;
}
}
}

0 comments on commit c3250ee

Please sign in to comment.