wordpress/wp-content/themes/basic/themify/themify-builder/classes/class-themify-custom-fonts.php
/**
		 * Setup the custom fields
		 *
		 * @return array
		 */
Setup the custom fields
@return array
Setup the custom fields @return array
public static function meta_box_fields( $fields ) {
			$fields['tm-cf'] = array(
				'name' => __( 'Font Variations', 'themify' ),
				'id' => 'tm-cf',
				'options' => array(
					array(
						'name' => 'custom_fonts_notice',
						'title' => '',
						'description' => '',
						'type' => 'separator',
						'meta' => array(
						'html' => '<div class="themify-info-link">' . __('To add custom fonts: select the font weight/style and upload the font files accordingly. You don\'t need to upload all formats. The common support format is .ttf or .woff (just upload either .tff or .woff file is fine, depending on the font files you have). The custom fonts will appear on Builder and Customizer font select.', 'themify') . '</div>'
						),
					),
					array(
						'name' => 'variations',
						'type' => 'repeater',
						'show_first' => true,
						'add_new_label' => __( 'Add New Variation', 'themify' ),
						'fields' => array(
							array(
								'name' => 'weight',
								'title' => __( 'Weight', 'themify' ),
								'type' => 'dropdown',
								'meta' => array(
									array( 'value' => 'normal', 'name' => __( 'Normal', 'themify' ) ),
									array( 'value' => 'bold', 'name' => __( 'Bold', 'themify' ) ),
									array( 'value' => '100', 'name' => __( '100', 'themify' ) ),
									array( 'value' => '200', 'name' => __( '200', 'themify' ) ),
									array( 'value' => '300', 'name' => __( '300', 'themify' ) ),
									array( 'value' => '400', 'name' => __( '400', 'themify' ) ),
									array( 'value' => '500', 'name' => __( '500', 'themify' ) ),
									array( 'value' => '600', 'name' => __( '600', 'themify' ) ),
									array( 'value' => '700', 'name' => __( '700', 'themify' ) ),
									array( 'value' => '800', 'name' => __( '800', 'themify' ) ),
									array( 'value' => '900', 'name' => __( '900', 'themify' ) ),
								),
							),
							array(
								'name' => 'style',
								'title' => __( 'Style', 'themify' ),
								'type' => 'dropdown',
								'meta' => array(
									array( 'value' => 'normal', 'name' => __( 'Normal', 'themify' ) ),
									array( 'value' => 'italic', 'name' => __( 'Italic', 'themify' ) ),
									array( 'value' => 'oblique', 'name' => __( 'Oblique', 'themify' ) )
								)
							),
							array(
								'name' => 'woff',
								'ext' => 'woff',
								'title' => __( 'WOFF File', 'themify' ),
								'type' => 'font',
								'mime' => 'application/x-font-woff',
							),
							array(
								'name' => 'woff2',
								'ext' => 'woff2',
								'title' => __( 'WOFF2 File', 'themify' ),
								'type' => 'font',
								'mime' => 'application/x-font-woff2',
							),
							array(
								'name' => 'ttf',
								'ext' => 'ttf',
								'title' => __( 'TTF File', 'themify' ),
								'type' => 'font',
								'mime' => 'application/x-font-ttf',
							),
							array(
								'name' => 'svg',
								'ext' => 'svg',
								'title' => __( 'SVG File', 'themify' ),
								'type' => 'font',
								'mime' => 'image/svg+xml',
							),
							array(
								'name' => 'eot',
								'ext' => 'eot',
								'title' => __( 'EOT File', 'themify' ),
								'type' => 'font',
								'mime' => 'application/x-font-eot',
							),
							array(
								'name' => 'separator',
								'type' => 'separator',
							),
						),
					)
				),
			);
			return $fields;
		}
public static function meta_box_fields ( $ fields ) { $ fields [ 'tm-cf' ] = array ( 'name' => __ ( 'Font Variations' , 'themify' ) , 'id' => 'tm-cf' , 'options' => array ( array ( 'name' => 'custom_fonts_notice' , 'title' => '' , 'description' => '' , 'type' => 'separator' , 'meta' => array ( 'html' => '<div class="themify-info-link">' . __ ( 'To add custom fonts: select the font weight/style and upload the font files accordingly. You don\'t need to upload all formats. The common support format is .ttf or .woff (just upload either .tff or .woff file is fine, depending on the font files you have). The custom fonts will appear on Builder and Customizer font select.' , 'themify' ) . '</div>' ) , ) , array ( 'name' => 'variations' , 'type' => 'repeater' , 'show_first' => true , 'add_new_label' => __ ( 'Add New Variation' , 'themify' ) , 'fields' => array ( array ( 'name' => 'weight' , 'title' => __ ( 'Weight' , 'themify' ) , 'type' => 'dropdown' , 'meta' => array ( array ( 'value' => 'normal' , 'name' => __ ( 'Normal' , 'themify' ) ) , array ( 'value' => 'bold' , 'name' => __ ( 'Bold' , 'themify' ) ) , array ( 'value' => '100' , 'name' => __ ( '100' , 'themify' ) ) , array ( 'value' => '200' , 'name' => __ ( '200' , 'themify' ) ) , array ( 'value' => '300' , 'name' => __ ( '300' , 'themify' ) ) , array ( 'value' => '400' , 'name' => __ ( '400' , 'themify' ) ) , array ( 'value' => '500' , 'name' => __ ( '500' , 'themify' ) ) , array ( 'value' => '600' , 'name' => __ ( '600' , 'themify' ) ) , array ( 'value' => '700' , 'name' => __ ( '700' , 'themify' ) ) , array ( 'value' => '800' , 'name' => __ ( '800' , 'themify' ) ) , array ( 'value' => '900' , 'name' => __ ( '900' , 'themify' ) ) , ) , ) , array ( 'name' => 'style' , 'title' => __ ( 'Style' , 'themify' ) , 'type' => 'dropdown' , 'meta' => array ( array ( 'value' => 'normal' , 'name' => __ ( 'Normal' , 'themify' ) ) , array ( 'value' => 'italic' , 'name' => __ ( 'Italic' , 'themify' ) ) , array ( 'value' => 'oblique' , 'name' => __ ( 'Oblique' , 'themify' ) ) ) ) , array ( 'name' => 'woff' , 'ext' => 'woff' , 'title' => __ ( 'WOFF File' , 'themify' ) , 'type' => 'font' , 'mime' => 'application/x-font-woff' , ) , array ( 'name' => 'woff2' , 'ext' => 'woff2' , 'title' => __ ( 'WOFF2 File' , 'themify' ) , 'type' => 'font' , 'mime' => 'application/x-font-woff2' , ) , array ( 'name' => 'ttf' , 'ext' => 'ttf' , 'title' => __ ( 'TTF File' , 'themify' ) , 'type' => 'font' , 'mime' => 'application/x-font-ttf' , ) , array ( 'name' => 'svg' , 'ext' => 'svg' , 'title' => __ ( 'SVG File' , 'themify' ) , 'type' => 'font' , 'mime' => 'image/svg+xml' , ) , array ( 'name' => 'eot' , 'ext' => 'eot' , 'title' => __ ( 'EOT File' , 'themify' ) , 'type' => 'font' , 'mime' => 'application/x-font-eot' , ) , array ( 'name' => 'separator' , 'type' => 'separator' , ) , ) , ) ) , ) ; return $ fields ; }
Setup the custom fields
 @return array
Setup the custom fields @return array