致命错误:在第61行的/public_html/wp-content/plugins/radiantthemes-addons/custom-menu/class-radiantthemes-style-menu.php的写上下文中不能使用函数返回值
'description' => empty( rt_get_menu() ) ? esc_html__( 'Custom menus not found. Please visit <b>Appearance > Menus</b> page to create new menu.', 'radiantthemes-addons' ) : esc_html__( 'Select menu to display.', 'radiantthemes-addons' ),
答案 0 :(得分:0)
这可以通过在变量中采用这样的值来解决
$description = empty( rt_get_menu() ) ? esc_html__( 'Custom menus not found. Please visit <b>Appearance > Menus</b> page to create new menu.', 'radiantthemes-addons' ) : esc_html__( 'Select menu to display.', 'radiantthemes-addons' );
并像这样使用它
'description' => $description,
答案 1 :(得分:0)
首先,您必须将rt_get_menu()
函数返回值存储在类似$rt_get_menu = rt_get_menu();
的变量中
只需将您的行代码替换为-
'description' => empty( $rt_get_menu ) ? esc_html__( 'Custom menus not found. Please visit <b>Appearance > Menus</b> page to create new menu.', 'radiantthemes-addons' ) : esc_html__( 'Select menu to display.', 'radiantthemes-addons' ),