【发布时间】:2015-11-11 20:26:57
【问题描述】:
这是我正在使用的代码 -
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);
}
}
}
}
这些是我收到的错误消息 -
警告:第 1035 行 /home/imposing/public_html/wp-content/themes/blackfyre/functions.php 中的非法字符串偏移 'face'
警告:第 1037 行 /home/imposing/public_html/wp-content/themes/blackfyre/functions.php 中的非法字符串偏移 'face'
我需要帮助来解决此错误和/或指出正确的方向。
【问题讨论】: