$ext, 'type' => 'application/x-font-ttf', 'proper_filename' => false ); } if ( $ext === 'eot' ) { return array( 'ext' => $ext, 'type' => 'application/vnd.ms-fontobject', 'proper_filename' => false ); } if ( $ext === 'woff' ) { return array( 'ext' => $ext, 'type' => 'application/x-font-woff', 'proper_filename' => false ); } if ( $ext === 'woff2' ) { return array( 'ext' => $ext, 'type' => 'application/x-font-woff2', 'proper_filename' => false ); } } return $data; } public static function registerCustomPosts() { $labels = array( 'name' => _x( 'Fonts', 'post type general name' ), ); register_post_type( self::CP_FONT, array( 'labels' => $labels, 'public' => false, 'has_archive' => false, 'description' => __bt( 'brizy', 'Brizy' ) . ' ' . __( 'font', 'brizy' ) . '.', 'publicly_queryable' => false, 'show_ui' => false, 'show_in_menu' => false, 'query_var' => false, 'capability_type' => 'page', 'hierarchical' => false, 'show_in_rest' => false, 'exclude_from_search' => true, 'supports' => array( 'title', 'page-attributes' ) ) ); } }