mirror of
https://github.com/WordPress/create-block-theme.git
synced 2025-10-03 16:11:13 +08:00
added filters for changing paths (#771)
This commit is contained in:
parent
b51c8545df
commit
654714b143
1 changed files with 3 additions and 3 deletions
|
@ -10,11 +10,11 @@ class CBT_Theme_Media {
|
|||
$image_extensions = array( 'jpg', 'jpeg', 'png', 'gif', 'svg', 'webp' );
|
||||
$video_extensions = array( 'mp4', 'm4v', 'webm', 'ogv', 'wmv', 'avi', 'mov', 'mpg', 'ogv', '3gp', '3g2' );
|
||||
if ( in_array( $extension, $image_extensions, true ) ) {
|
||||
$folder_path = '/assets/images/';
|
||||
$folder_path = apply_filters( 'cbt_media_folder_path_images', '/assets/images/' );
|
||||
} elseif ( in_array( $extension, $video_extensions, true ) ) {
|
||||
$folder_path = '/assets/videos/';
|
||||
$folder_path = apply_filters( 'cbt_media_folder_path_videos', '/assets/videos/' );
|
||||
} else {
|
||||
$folder_path = '/assets/';
|
||||
$folder_path = apply_filters( 'cbt_media_folder_path_others', '/assets/' );
|
||||
}
|
||||
return $folder_path;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue