我的网站显示“解析”错误,当我尝试禁用特定插件时,情况变得更糟,并开始在另一个jetpack插件中显示错误,如果我禁用了所有插件,该错误将显示在其他文件中。请帮忙,我的网站停了两天。
尝试禁用插件,重新安装插件,删除错误代码行
/**
* Define Mega Menu constants
*
* @since 1.0
*/
private function define_constants() {
define( 'MEGAMENU_VERSION', $this->version );
define( 'MEGAMENU_BASE_URL', trailingslashit( plugins_url( 'megamenu' ) ) );
define( 'MEGAMENU_PATH', plugin_dir_path( __FILE__ ) );
}
// populate grid sub menus
if ( $item->depth === 0 && $item->megamenu_settings['type'] == 'grid' || ( $item->depth === 1 && $item->parent_submenu_type == 'tabbed' && $item->megamenu_settings['type'] == 'grid') ) {
$saved_grid = $widget_manager->get_grid_widgets_and_menu_items_for_menu_id( $item->ID, $args->menu->term_id, $items );
$next_order = $this->menu_order_of_next_sibling( $item->ID, $item->menu_item_parent, $items) - 999;
foreach ( $saved_grid as $row => $row_data ) {
$rolling_dummy_id++;
$next_order++;
错误消息:
Parse error: syntax error, unexpected 'if' (T_IF), expecting function (T_FUNCTION) in /home/u912283588/domains/meersgavhb.com/public_html/wp-content/plugins/megamenu/megamenu.php on line 309
The site is experiencing technical difficulties.