Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1307902

    Dear Support-Team,
    I am wondering if there is a file that I could tweak to define a certain place on the server where I would host the font.zip that I downloaded from Google Fonts. Normally I would place the archive in the media library and link it in the settings. I would prefer to place the archive with FTP in a certain folder and link to that folder (on the same server). Therefore no one could delete the font by accident.
    Is there any chance to do that? Any response appreciated!
    Best regards, Daniel

    #1308041

    Hey spooniverse,

    Thank you for the inquiry.

    The custom font manager is using the wp_upload_dir function by default to get the location of the uploads directory where the theme uploads and retrieves the font. The function returns an array containing information about the uplaods directory.

    // https://developer.wordpress.org/reference/functions/wp_upload_dir/

    You might be able to change the default directory by editing the upload location in the enfold/framework/php/font-management/class-avia-icon-fonts.php file around line 36.

    $upload = wp_upload_dir();
    

    Unfortunately, we haven’t tried or tested this before.

    Best regards,
    Ismael

    #1308054

    Dear Ismael,
    thanks for pointing me in the right direction. In the mentioned file I realized that the fonts get extracted in a folder called ‘avia_fonts’. The zip-archive doesn’t need to remain in the library and the self hosted fonts are working nevertheless. And that is everything I wanted to have. I can delete the zip-archive and everything will still look fine. Thanks!
    All the best, Daniel

    #1308282

    Hi,

    Alright. Glad to know. Please feel free to open a new thread should you need anything else. We will close this one for now.

    Have a nice day.

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Hosting fonts with FTP’ is closed to new replies.