diff --git a/fields/icomoon-base-field.php b/fields/icomoon-base-field.php index baaca35..1b26f4e 100644 --- a/fields/icomoon-base-field.php +++ b/fields/icomoon-base-field.php @@ -60,13 +60,14 @@ public function parse_css() { return $out; } + $out = []; + // If not extract them from the CSS file $contents = file_get_contents( $filepath ); preg_match_all( '#.icon-(.*)::before#', $contents, $css ); array_shift( $css ); - foreach ( $css[0] as $cs ) { $out[] = array( 'id' => $cs, 'text' => $cs ); }