corvée(fmt) formate

This commit is contained in:
gcch 2025-12-15 15:34:50 +01:00
commit fdb6aaa7e9
23 changed files with 138 additions and 155 deletions

View file

@ -71,10 +71,8 @@ new StarterSite();
/**
* Personnalisation du thème.
*
* @param mixed $wp_customize
*/
function enregistre_personnalisations_theme($wp_customize) {
function enregistre_personnalisations_theme(mixed $wp_customize): void {
// Section « Réseaux sociaux »
$wp_customize->add_section('liens_reseaux_sociaux', [
'title' => __('Liens des réseaux sociaux'),
@ -149,15 +147,15 @@ function enregistre_personnalisations_theme($wp_customize) {
add_action('customize_register', 'enregistre_personnalisations_theme');
function retire_tailles_image_par_defaut(mixed $sizes): mixed {
error_log(print_r($sizes, true));
/** @var array<string> */
/** @var list<string> */
$targets = ['full', 'thumbnail'];
foreach ($sizes as $size_index => $size) {
if (!in_array($size, $targets, true)) {
unset($sizes[$size_index]);
if (in_array($size, $targets, true)) {
continue;
}
unset($sizes[$size_index]);
}
return $sizes;
@ -171,7 +169,7 @@ add_filter('async_update_translation', '__return_false');
add_filter('auto_update_translation', '__return_false');
// Block Patterns
add_action('after_setup_theme', function () {
add_action('after_setup_theme', static function (): void {
remove_theme_support('core-block-patterns');
});
add_filter('should_load_remote_block_patterns', '__return_false');