mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Editor: Relocate font files uploads to the uploads directory.
Relocate the upload of font files uploaded via the Font Library feature to the `wp-content/uploads/fonts` (or multisite equivalent) directory. This accounts for immutable file systems in which directories are unable to be created within `wp-content` and deploy processes which require special consideration of the `uploads` directory to ensure it remains persistent between deploys. Props azaozz, burnuser, cbirdsong, christopherplus, costdev, davidbaumwald, desrosj, elrae, euthelup, get_dave, grantmkin, hellofromtonya, janthiel, jazzs3quence, johnbillion, jorbin, justlevine, kraftner, matveb, mcsf, mmaattiiaass, nico23, peterwilsoncc, priethor, rmccue, samuelsidler, swissspidy, youknowriad. Fixes #60845. Built from https://develop.svn.wordpress.org/trunk@57878 git-svn-id: http://core.svn.wordpress.org/trunk@57379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
326bd23fd9
commit
8e5e7a3a11
@ -167,17 +167,12 @@ function _wp_filter_font_directory( $font_dir ) {
|
||||
return $font_dir;
|
||||
}
|
||||
|
||||
$site_path = '';
|
||||
if ( is_multisite() && ! ( is_main_network() && is_main_site() ) ) {
|
||||
$site_path = '/sites/' . get_current_blog_id();
|
||||
}
|
||||
|
||||
$font_dir = array(
|
||||
'path' => path_join( WP_CONTENT_DIR, 'fonts' ) . $site_path,
|
||||
'url' => untrailingslashit( content_url( 'fonts' ) ) . $site_path,
|
||||
'path' => untrailingslashit( $font_dir['basedir'] ) . '/fonts',
|
||||
'url' => untrailingslashit( $font_dir['baseurl'] ) . '/fonts',
|
||||
'subdir' => '',
|
||||
'basedir' => path_join( WP_CONTENT_DIR, 'fonts' ) . $site_path,
|
||||
'baseurl' => untrailingslashit( content_url( 'fonts' ) ) . $site_path,
|
||||
'basedir' => untrailingslashit( $font_dir['basedir'] ) . '/fonts',
|
||||
'baseurl' => untrailingslashit( $font_dir['baseurl'] ) . '/fonts',
|
||||
'error' => false,
|
||||
);
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.6-alpha-57877';
|
||||
$wp_version = '6.6-alpha-57878';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user