WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 9 days ago

#40687 new defect (bug)

pre_option_upload_url_path filter no longer working

Reported by: QROkes Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.7.4
Component: General Keywords:
Focuses: Cc:

Description

“pre_option_upload_url_path” filter is not working since WP 4.7.

This is my use case that used to work like a charm before, it's pretty simple and seems like an issue in the wp_upload_dir() function in /wp-includes/functions.php file.

function cdn_url() {
  return 'http://cdn.domain/wp-content/uploads';
}
add_filter( 'pre_option_upload_url_path', 'cdn_url' );

Change History (2)

#1 @Nomafin
2 years ago

Same problem here. I've tried to find out what causes the bug in the core but so far haven't found anything.

#2 @donmhico
9 days ago

This bug is kind of weird. I can't find pre_option_upload_url_path. I tried searching on

This might help though - https://gist.github.com/Fliktrax/dfcf7e2a0d2d263aeed9fe4fbd7d45a1

Note: See TracTickets for help on using tickets.