class="col-lg-6 summary entry-summary">'; } if ( ! empty( $porto_settings_optimize['lazyload_menu'] ) ) { $porto_vars['lazyload_menu'] = esc_js( $porto_settings_optimize['lazyload_menu'] ); } if ( class_exists( 'Woocommerce' ) && is_product() ) { $porto_vars['pre_order'] = ! empty( $porto_settings['woo-pre-order'] ); } if ( defined( 'VCV_VERSION' ) ) { $map_key = ( ! empty( $porto_settings['gmap_api'] ) ? 'key=' . $porto_settings['gmap_api'] . '&' : '' ); $porto_vars['gmap_uri'] = esc_js( $map_key . 'language=' . substr( get_locale(), 0, 2 ) ); $porto_vars['gmt_offset'] = esc_js( get_option( 'gmt_offset' ) ); } wp_localize_script( 'porto-theme', 'js_porto_vars', $porto_vars ); } } function porto_admin_css() { wp_deregister_style( 'font-awesome' ); wp_dequeue_style( 'font-awesome' ); wp_dequeue_style( 'yith-wcwl-font-awesome' ); if ( wp_style_is( 'rs-icon-set-fa-icon-', 'enqueued' ) ) { // wp_dequeue_style( 'rs-icon-set-fa-icon-' ); } wp_enqueue_style( 'font-awesome', PORTO_CSS . '/font-awesome.min.css', false, PORTO_VERSION, 'all' ); wp_dequeue_style( 'bsf-Simple-Line-Icons' ); wp_deregister_style( 'simple-line-icons' ); wp_dequeue_style( 'simple-line-icons' ); // simple line icon font wp_register_style( 'simple-line-icons', PORTO_CSS . '/Simple-Line-Icons/Simple-Line-Icons.css', false, PORTO_VERSION, 'all' ); global $pagenow; if ( 'post-new.php' == $pagenow || 'post.php' == $pagenow ) { // porto icon font wp_enqueue_style( 'porto-font', PORTO_CSS . '/Porto-Font/Porto-Font.css', false, PORTO_VERSION, 'all' ); wp_enqueue_style( 'simple-line-icons' ); } elseif ( is_customize_preview() ) { wp_enqueue_style( 'porto-customize-fonts', '//fonts.googleapis.com/css?family=Poppins%3A400%2C500%2C600%2C700' ); wp_enqueue_style( 'simple-line-icons' ); } elseif ( isset( $_GET['page'] ) && 'themes.php' == $pagenow && 'porto_settings' == $_GET['page'] ) { wp_enqueue_style( 'porto-admin-fonts', '//fonts.googleapis.com/css?family=Poppins%3A400%2C500%2C600%2C700' ); wp_enqueue_style( 'simple-line-icons' ); wp_enqueue_style( 'porto_theme_options', PORTO_CSS . '/admin_theme_options.css', false, PORTO_VERSION, 'all' ); } elseif ( isset( $_GET['page'] ) && 'admin.php' == $pagenow && 0 === strpos( $_GET['page'], 'porto' ) ) { wp_enqueue_style( 'porto-admin-fonts', '//fonts.googleapis.com/css?family=Poppins%3A400%2C500%2C700' ); } // wp default styles // admin style $deps = array(); if ( is_customize_preview() && get_theme_mod( 'theme_options_use_new_style', false ) ) { $deps[] = 'redux-fields-css'; $deps[] = 'redux-admin-css'; } wp_enqueue_style( 'porto_admin', PORTO_CSS . '/admin.min.css', $deps, PORTO_VERSION, 'all' ); wp_enqueue_style( 'porto_admin_bar', PORTO_CSS . '/admin_bar.css', $deps, PORTO_VERSION, 'all' ); porto_enqueue_revslider_css(); } function porto_admin_scripts() { if ( function_exists( 'add_thickbox' ) ) { add_thickbox(); } wp_enqueue_media(); global $pagenow; if ( 'themes.php' == $pagenow && isset( $_GET['page'] ) && 'porto_settings' === $_GET['page'] && defined( 'WPB_VC_VERSION' ) && ! wp_script_is( 'vc_waypoints', 'registered' ) ) { wp_register_script( 'vc_waypoints', vc_asset_url( 'lib/vc_waypoints/vc-waypoints.min.js' ), array( 'jquery' ), WPB_VC_VERSION, true ); wp_enqueue_script( 'vc_waypoints' ); } // admin script wp_register_script( 'porto-admin', PORTO_JS . '/admin/admin.min.js', array( 'common', 'jquery', 'media-upload', 'thickbox', 'wp-color-picker' ), PORTO_VERSION, true ); wp_enqueue_script( 'porto-admin' ); $admin_vars = array( 'import_options_msg' => esc_js( __( 'If you want to import demo, please backup current theme options in "Import / Export" section before import. Do you want to import demo?', 'porto' ) ), 'theme_option_url' => esc_url( admin_url( 'themes.php?page=porto_settings' ) ), ); if ( in_array( $pagenow, array( 'themes.php', 'customize.php' ) ) ) { $admin_vars['options_search_text'] = esc_js( __( 'Search for...', 'porto' ) ); $admin_vars['header_default_options'] = json_encode( porto_header_types_default_options() ); } wp_localize_script( 'porto-admin', 'js_porto_admin_vars', $admin_vars ); } function porto_enqueue_revslider_css() { global $porto_settings; $style = ''; if ( $porto_settings['skin-color'] ) { $style = '.tparrows:before{color:' . esc_html( $porto_settings['skin-color'] ) . ';text-shadow:0 0 3px #fff;}'; } $style .= '.revslider-initialised .tp-loader{z-index:18;}'; wp_add_inline_style( 'rs-plugin-settings', $style ); } // retrieves the attachment ID from the file URL function porto_get_image_id( $image_url ) { global $wpdb; $attachment = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE guid=%s", $image_url ) ); if ( isset( $attachment[0] ) ) { return $attachment[0]; } else { return false; } } // gravityform notifications add_filter( 'gform_validation_message', 'porto_gform_validation_message', 10, 2 ); function porto_gform_validation_message( $message, $form ) { return '
' . porto_strip_script_tags( $message ) . '
'; } add_filter( 'gform_confirmation', 'porto_gform_confirmation', 10, 4 ); function porto_gform_confirmation( $confirmation, $form, $entry, $ajax ) { if ( is_array( $confirmation ) ) { return $confirmation; } return '
' . $confirmation . '
'; } // Fix for PHP Fatal error: Call to undefined function YIT_Pointers() in \plugins\yith-woocommerce-wishlist\includes\class.yith-wcwl-admin-init.php if ( function_exists( 'yith_wishlist_constructor' ) && ! class_exists( 'YIT_Pointers' ) ) { require_once PORTO_DIR . '/woocommerce/yit-pointers.php'; } // Load Revslider Icon Fonts if ( ! function_exists( 'porto_revslider_icon_fonts' ) ) : function porto_revslider_icon_fonts() { global $pe_7s_var; if ( $pe_7s_var ) { echo "\n"; } } endif; /* Elementor Plugin */ if ( defined( 'ELEMENTOR_VERSION' ) ) { add_action( 'elementor/editor/after_enqueue_styles', 'porto_elementor_editor_styles' ); function porto_elementor_editor_styles() { // porto icon font wp_enqueue_style( 'porto-font', PORTO_CSS . '/Porto-Font/Porto-Font.css', false, PORTO_VERSION, 'all' ); // simple line icon font wp_dequeue_style( 'bsf-Simple-Line-Icons' ); wp_deregister_style( 'simple-line-icons' ); wp_dequeue_style( 'simple-line-icons' ); wp_enqueue_style( 'simple-line-icons', PORTO_CSS . '/Simple-Line-Icons/Simple-Line-Icons.css', false, PORTO_VERSION, 'all' ); } } /* Dequeue duplicated font awesome css */ if ( is_admin() && defined( 'WPB_VC_VERSION' ) ) { add_action( 'admin_print_scripts-post.php', 'porto_admin_dequeue_duplicated_css', 20 ); add_action( 'admin_print_scripts-post-new.php', 'porto_admin_dequeue_duplicated_css', 20 ); add_action( 'vc_base_register_admin_css', 'porto_admin_dequeue_duplicated_css', 20 ); add_action( 'vc_frontend_editor_render', 'porto_admin_dequeue_duplicated_css', 20 ); function porto_admin_dequeue_duplicated_css() { if ( wp_style_is( 'vc_font_awesome_5', 'enqueued' ) ) { wp_dequeue_style( 'vc_font_awesome_5' ); } } } remove_action( 'woocommerce_after_variative_product_summary', 'woocommerce_output_related_products', 20 ); remove_action( "wp_head", "wp_robots", 1 ); WordPress › Ошибка

На сайте возникла критическая ошибка.

Узнайте больше про решение проблем с WordPress.