Add PSR HTTP Message Interfaces and Dependencies

- Implemented StreamInterface, UploadedFileInterface, and UriInterface as per PSR standards.
- Added getallheaders function to retrieve HTTP headers in a compatible manner.
- Included LICENSE files for ralouphie/getallheaders and symfony/deprecation-contracts.
- Introduced function for triggering deprecation notices in Symfony.
This commit is contained in:
2025-12-28 12:44:00 +01:00
parent cf600ae727
commit cd264483f8
410 changed files with 60841 additions and 16 deletions

View File

@@ -9,7 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
define( 'HELLO_ELEMENTOR_VERSION', '3.4.4' );
define( 'HELLO_ELEMENTOR_VERSION', '3.4.5' );
define( 'EHP_THEME_SLUG', 'hello-elementor' );
define( 'HELLO_THEME_PATH', get_template_directory() );
@@ -80,7 +80,7 @@ if ( ! function_exists( 'hello_elementor_setup' ) ) {
* Editor Styles
*/
add_theme_support( 'editor-styles' );
add_editor_style( 'editor-styles.css' );
add_editor_style( 'assets/css/editor-styles.css' );
/*
* WooCommerce.
@@ -271,15 +271,31 @@ if ( ! function_exists( 'hello_elementor_body_open' ) ) {
require HELLO_THEME_PATH . '/theme.php';
HelloTheme\Theme::instance();
add_action( 'wp_enqueue_scripts', 'hello_custom_styles', 999 );
function hello_custom_styles() {
wp_enqueue_style(
'hello-custom-style',
get_stylesheet_directory_uri() . '/assets/css/custom.css',
array(),
filemtime( get_stylesheet_directory() . '/assets/css/custom.css' ),
'all'
);
}
/* --- Start: Naprawa błędu sprintf --- */
function naprawa_bledu_sprintf() {
?>
<script type="text/javascript">
/* Naprawa błędu sprintf is not defined */
window.onload = function() {
if (typeof sprintf === 'undefined') {
if (typeof wp !== 'undefined' && typeof wp.i18n !== 'undefined') {
window.sprintf = wp.i18n.sprintf;
} else {
window.sprintf = function(format) {
var args = Array.prototype.slice.call(arguments, 1);
var i = 0;
return format.replace(/%s/g, function() {
return args[i++] != undefined ? args[i-1] : '';
});
};
}
}
};
</script>
<?php
}
// Dodaj do stopki panelu admina
add_action('admin_footer', 'naprawa_bledu_sprintf');
// Dodaj do stopki strony głównej
add_action('wp_footer', 'naprawa_bledu_sprintf');
/* --- Koniec: Naprawa błędu sprintf --- */