redux-framework icon indicating copy to clipboard operation
redux-framework copied to clipboard

Issue with Uploading Custom fonts on Redux

Open nelsonkana opened this issue 12 years ago • 3 comments

Hi Redux Community, I'm not sure if this issue had been reported yet. I'm using redux framework for my theme admin page. I'm faced with the issue of uploading fonts files using the native wordpress media uploader. In attempt to resolve this, I sorted out that this issue can be divided into two sections 1 - Breaking the mime type barrier which restricts upload to certain file types. The good news is that this can be resolved easily with this filter in the theme functions.php (which i suggest should be rather added to the redux core functions)

function mytheme_mime_types( $mimes ){ $mimes['svg'] = 'image/svg+xml'; $mimes['ttf'] = 'font/ttf'; $mimes['woff'] = 'font/woff'; $mimes['eot'] = 'font/eot'; return $mimes; } add_filter( 'upload_mimes', 'mytheme_mime_types' );

2 - Once you break the mime types barrier, that next thing you're faced with is to be able to select that file from the wp media library to save its url as you would normally do when you use a "media" field in redux. As of the current implementation, nothing happens when you select a font file from the wp media library. Not sure if this can be resolved with php. Can anyone help? I would be much grateful.

nelsonkana avatar Jan 07 '14 09:01 nelsonkana

@nelsonkana We'll actually be working on a custom font uploader shortly that allows you to just upload a zip and auto-adds the font to the typography module. This, however, will be a premium feature.

Unfortunately we have some goodies in the work that have to be premium to justify doing. But do know, I am working on this.

dovy avatar Jan 07 '14 10:01 dovy

@dovy: Can you please give me an update to Custom Fonts. There have been some changes at http://reduxframework.com and I do not see any remark on premium any more. Are the plans for premium deferred? Any plans for the custom font upload to be ready? Thanks.

FrankyG avatar Jan 15 '14 12:01 FrankyG

@FrankyG https://gist.github.com/dovy/7f9aadab732e69f5130d Forthcoming. Finishing up metaboxes now. ;)

dovy avatar Jan 15 '14 22:01 dovy