2015-08-18 3 views
0

Это код, который я работаю с -Предупреждение: Illegal строка Смещение «лицо» в Wordpress Blackfyre

if (!function_exists('blackfyre_options_typography_google_fonts')) { 
    function blackfyre_options_typography_google_fonts() { 
     $all_google_fonts = array_keys(blackfyre_options_typography_get_google_fonts()); 
     // Define all the options that possibly have a unique Google font 
     $google_font = of_get_option('google_font', 'Rokkitt, serif'); 
     $google_mixed = of_get_option('google_mixed', false); 
     $google_mixed_2 = of_get_option('google_mixed_2', 'Arvo, serif'); 
     // Get the font face for each option and put it in an array 
     $selected_fonts = array(
      $google_font['face'], - 1035 line 
      $google_mixed['face'], 
      $google_mixed_2['face']); - 1037 line 
     // Remove any duplicates in the list 
     $selected_fonts = array_unique($selected_fonts); 
     // Check each of the unique fonts against the defined Google fonts 
     // If it is a Google font, go ahead and call the function to enqueue it 
     foreach ($selected_fonts as $font) { 
      if (in_array($font, $all_google_fonts)) { 
       blackfyre_options_typography_enqueue_google_font($font); 
      } 
     } 
    } 
} 

Эти сообщения об ошибках, которые я получаю -

Предупреждение: Illegal строка смещения 'face' в /home/imposing/public_html/wp-content/themes/blackfyre/functions.php в строке 1035

Предупреждение: Неверное смещение строки 'лицо' в/home/imping/public_html/wp-content/themes /blackfyre/functions.php в строке 1037

Мне нужна помощь, чтобы решить эту проблему и/или указать мне правильное направление.

ответ

0

Я была такой же проблема, как я отмечал в моем предыдущем комментарии по я установил ее, изменив код в экстра-functions.php, строка 105 - 107, чтобы:

$selected_fonts = array(
$google_font, 
$google_mixed, 
$google_mixed_2); 

как найден в Illegal string offset Warning in Wordpress

Я надеюсь, что решает его и для вас.

Cheers.

Смежные вопросы