我想钓wp_get_attachment_url()
使用我的自定义实现。我正在尝试从Amazon S3获取我的帖子图像和任何其他静态数据,我想知道是否可以使用我的Amazon bucket URL配置URL。
这就是我想做的
add_filter(\'wp_get_attachment_url\', \'custom_get_attachment_url\', 1, 1);
function clrs_get_attachment_url($post_id = 0) {
// change URL for Amazon bucket
}
但这并不像我想象的那样有效$post_id
像0
. 如何以适当的方式进行?