Move assignment of $dir outside of loop
Change-Id: I24009db72d0afbb47532eb2c00329e488461066f
This commit is contained in:
@@ -16,6 +16,8 @@ foreach ( glob( '../fonts/*/font.ini' ) as $inifile ) {
|
||||
$languages = array();
|
||||
$version = null;
|
||||
|
||||
$dir = dirname( $inifile );
|
||||
|
||||
foreach ( $conf as $fontname => $font ) {
|
||||
if ( isset( $font['languages'] ) ) {
|
||||
$languages = explode( ',', $font['languages'] );
|
||||
@@ -52,8 +54,6 @@ foreach ( glob( '../fonts/*/font.ini' ) as $inifile ) {
|
||||
$list['fonts'][$fontname]['fontstyle'] = $font['fontstyle'];
|
||||
}
|
||||
|
||||
$dir = dirname( $inifile );
|
||||
|
||||
if ( isset( $font['ttf'] ) ) {
|
||||
$list['fonts'][$fontname]['ttf'] = basename( $dir ) . '/' . $font['ttf'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user