fluffypaws
Ответы в темах
-
Форум: Темы и шаблоны
Тема: Function create_function() is deprecatedНе подскажете, где лучше искать людей, кто сможет помочь с этой проблемой?
Форум: Темы и шаблоны
Тема: Function create_function() is deprecatedДа, темы.
Хорошо, попробую проверить cURL.
Если не поможет, буду искать тех, кто сможет этот самопал исправить.
Спасибо.Форум: Темы и шаблоны
Тема: Function create_function() is deprecatedА, нет.
Предупреждения
count(): Parameter must be an array or an object that implements Countable 1 ошибка
wp-content/themes/vks/shortcodes/testimonials.php:20
WPBakeryShortCode_testimonials->content()
wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php:362
WPBakeryShortCode->output()
wp-content/plugins/js_composer/include/helpers/helpers.php:1316
vc_do_shortcode()
wp-includes/shortcodes.php:343
do_shortcode_tag()
Неизвестное расположение
preg_replace_callback()
wp-includes/shortcodes.php:218
do_shortcode()
wp-content/plugins/js_composer/include/helpers/helpers.php:240
wpb_js_remove_wpautop()
wp-content/plugins/js_composer/include/templates/shortcodes/vc_column.php:94
WPBakeryShortCode->loadTemplate()
wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php:244
WPBakeryShortCode->content()
wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php:362
WPBakeryShortCode->output()
wp-content/plugins/js_composer/include/helpers/helpers.php:1316
vc_do_shortcode()
wp-includes/shortcodes.php:343
do_shortcode_tag()
Неизвестное расположение
preg_replace_callback()
wp-includes/shortcodes.php:218
do_shortcode()
wp-content/plugins/js_composer/include/helpers/helpers.php:240
wpb_js_remove_wpautop()
wp-content/plugins/js_composer/include/templates/shortcodes/vc_row.php:156
WPBakeryShortCode->loadTemplate()
wp-content/plugins/js_composer/include/classes/shortcodes/vc-row.php:40
WPBakeryShortCode_Vc_Row->content()
wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php:362
WPBakeryShortCode->output()
wp-content/plugins/js_composer/include/helpers/helpers.php:1316
vc_do_shortcode()
wp-includes/shortcodes.php:343
do_shortcode_tag()
Неизвестное расположение
preg_replace_callback()
wp-includes/shortcodes.php:218
do_shortcode()
wp-includes/class-wp-hook.php:287
apply_filters(‘the_content’)
wp-includes/post-template.php:253
the_content()
wp-content/themes/vks/front-page.php:4
Плагин: js_composerУведомления Trying to access array offset on value of type null 18 ошибок
wp-content/plugins/js_composer/include/autoload/vc-shortcode-autoloader.php:64
VcShortcodeAutoloader::includeClass()
wp-content/plugins/js_composer/include/classes/shortcodes/core/class-vc-shortcodes-manager.php:107
Vc_Shortcodes_Manager->getElementClass()
wp-content/plugins/js_composer/include/helpers/helpers.php:1316
vc_do_shortcode()
wp-includes/shortcodes.php:343
do_shortcode_tag()
Неизвестное расположение
preg_replace_callback()
wp-includes/shortcodes.php:218
do_shortcode()
wp-includes/class-wp-hook.php:287
apply_filters(‘the_content’)
wp-includes/post-template.php:253
the_content()
wp-content/themes/vks/front-page.php:4- Ответ изменён 5 лет, 4 месяца назад пользователем fluffypaws.
Форум: Темы и шаблоны
Тема: Function create_function() is deprecatedБлагодарю за Ваш скорый ответ.
Надеюсь получится это решить, не я автор сайта.
Но мне необходимо решить это, потому что это заставляет висеть загрузку страницы по 10 секунд.Форум: Темы и шаблоны
Тема: Function create_function() is deprecated1) Он в самом начале файла functions.php.
__________________________________________________
<?php
session_start();acf_add_options_page();
acf_add_options_sub_page( ‘Settings’ );include_once( get_template_directory() . ‘/inc/breadcrumbs.php’ );
include_once( get_template_directory() . ‘/inc/sat.php’ );
include_once( get_template_directory() . ‘/shortcodes/handler.php’ );
include_once( get_template_directory() . ‘/inc/post_types.php’ );add_filter( ‘jpeg_quality’, function ( $quality ) { return 100; } );
add_filter( ‘wp_editor_set_quality’, function($arg){ return 100; } );add_theme_support( ‘post-thumbnails’ );
add_theme_support( ‘menus’ );register_nav_menus( array(
‘header_menu’ => ‘Меню в шапке’,
‘footer_menu’ => ‘Меню в подвале’
) );add_image_size( ‘client_logo’, 270, 150, true );
add_image_size( ‘about_banner’, 1170, 540, true );
add_image_size( ‘about_banner_second’, 570, 340, true );
add_image_size( ’employee_photo’, 270, 345, true );if( isset( $_GET[‘city’] ) ) {
$_SESSION[‘selected_city’] = $_GET[‘city’];
}if( !isset( $_SESSION[‘selected_city’] ) ) {
$cities = get_field( ‘city’, ‘options’ );
$city = current( $cities );$_SESSION[‘selected_city’] = $city[‘code’];
}function get_current_city_data() {
$cities = get_field( ‘city’, ‘options’ );
$current_city = $_SESSION[‘selected_city’];foreach( $cities as $city ) {
if( $city[‘code’] != $current_city )
continue;return $city;
}
}function delete_p_tag( $str ) {
$str = str_replace( ‘<p>’, », wpautop( $str ) );
return str_replace( ‘</p>’, », $str );
}function get_all_cities_employees( $cities ) {
$employees = [];foreach( $cities as $city ) {
if( !$city[’employees’] || !count( $city[’employees’] ) ) {
continue;
}$employees = array_merge( $employees, $city[’employees’] );
}return $employees;
}
___________________________________________________
2. Я смотрел настройки php.ini. Вы про них же? Как понимаю проблема не в разрешённых размерах. На что стоит посмотреть?
___________________________________________________
3. Поменял, ошибка пропала, но теперь
GET https://koopwork.ru/wp-json/wp/v2/types/post
?context=edit cURL error 28: Operation timed out after 10001 milliseconds with 0 out of -1 bytes receivedWP_Site_Health->get_test_rest_availability()
wp-admin/includes/class-wp-site-health.php:1941
WP_Site_Health->perform_test()
wp-admin/includes/class-wp-site-health.php:175
WP_Site_Health->enqueue_scripts()
wp-admin/includes/class-wp-site-health.php:122
do_action(‘admin_enqueue_scripts’)