wordpress/wp-content/themes/basic/themify/themify-builder/classes/class-themify-custom-fonts.php
/**
		 * Render preview column in font manager admin listing
		 *
		 * @param $column
		 * @param $post_id
		 */
Render preview column in font manager admin listing
@param $column
@param $post_id
Render preview column in font manager admin listing @param $column @param $post_id
public static function render_columns( $column, $post_id ) {
			if ( 'font_preview' === $column ) {
				$variations = get_post_meta( $post_id, 'variations', true );
				if ( empty( $variations ) ) {
					return;
				}
				$fonts = array(
					'woff' => 'woff',
					'woff2' => 'woff2',
					'ttf' => 'truetype',
					'svg' => 'svg',
					'eot' => 'embedded-opentype',
				);
				$font_family = get_the_title( $post_id );
				ob_start();
				foreach ( $variations as $var ):
					$src = '';
					foreach ( $fonts as $type => $format ) {
						$src .= !empty( $var[ $type ] ) ? 'url(\'' . $var[ $type ] . '\') format(\'' . $format . '\'),' : '';
					}
					?>
                    @font-face{font-family:'<?php echo $font_family; ?>';font-weight:<?php echo $var['weight']; ?>;font-style:<?php echo $var['style']; ?>;src:<?php echo rtrim( $src, ',' ); ?>;    }
				<?php
				endforeach;
				$font_face = ob_get_clean();
				printf( '<style>%s</style><span style="font-family: \'%s\';">%s</span>', trim( $font_face ), $font_family, __( 'Themify makes your dreams true.', 'themify' ) );
			}
		}
public static function render_columns ( $ column , $ post_id ) { if ( 'font_preview' === $ column ) { $ variations = get_post_meta ( $ post_id , 'variations' , true ) ; if ( empty ( $ variations ) ) { return ; } $ fonts = array ( 'woff' => 'woff' , 'woff2' => 'woff2' , 'ttf' => 'truetype' , 'svg' => 'svg' , 'eot' => 'embedded-opentype' , ) ; $ font_family = get_the_title ( $ post_id ) ; ob_start ( ) ; foreach ( $ variations as $ var ) : $ src = '' ; foreach ( $ fonts as $ type => $ format ) { $ src .= ! empty ( $ var [ $ type ] ) ? 'url(\'' . $ var [ $ type ] . '\') format(\'' . $ format . '\'),' : '' ; } ?> @font-face{font-family:' <?php echo $ font_family ; ?> ';font-weight: <?php echo $ var [ 'weight' ] ; ?> ;font-style: <?php echo $ var [ 'style' ] ; ?> ;src: <?php echo rtrim ( $ src , ',' ) ; ?> ;    }
				 <?php endforeach ; $ font_face = ob_get_clean ( ) ; printf ( '<style>%s</style><span style="font-family: \'%s\';">%s</span>' , trim ( $ font_face ) , $ font_family , __ ( 'Themify makes your dreams true.' , 'themify' ) ) ; } }
Render preview column in font manager admin listing
 @param $column
 @param $post_id
Render preview column in font manager admin listing @param $column @param $post_id