Skip to content

Commit

Permalink
revert few changes
Browse files Browse the repository at this point in the history
  • Loading branch information
yssambare12 committed Apr 21, 2024
1 parent 8d594d9 commit e584de4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/class-bcf-google-fonts-compatibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ public function update_fse_theme_json() {
$font_slug = $this->get_font_slug( $font_family );
$font_data = get_post_meta( $id, 'fonts-data', true );

if ( ! empty( esc_html($font_data['variations']) ) ) {
foreach ( esc_html($font_data['variations']) as $variation ) {
if ( ! empty( $font_data['variations'] ) ) {
foreach ( $font_data['variations'] as $variation ) {
$font_weight = ! empty( $variation['font_weight'] ) ? $variation['font_weight'] : '';
$font_style = ! empty( $variation['font_style'] ) ? $variation['font_style'] : 'normal';

Expand Down Expand Up @@ -296,7 +296,7 @@ public function get_fonts_file_url( $font_family, $font_weight, $font_style, $fo
if ( ! is_null( $font_id ) && 'local' === get_post_meta( $font_id, 'font-type', true ) ) {
$font_data = get_post_meta( $font_id, 'fonts-data', true );
$fonts_link = '';
foreach ( esc_html($font_data['variations']) as $key => $var_arr ) {
foreach ( $font_data['variations'] as $key => $var_arr ) {
if ( ! empty( $var_arr['font_weight'] ) && $font_weight === $var_arr['font_weight'] && ! empty( $var_arr['font_url'][0] ) ) {
$fonts_link = $var_arr['font_url'][0];
break;
Expand Down

0 comments on commit e584de4

Please sign in to comment.