File tree 3 files changed +54
-0
lines changed
3 files changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,12 @@ Wordpress theme of the STC blog [studuj.digital](https://studuj.digital/).
8
8
## About project
9
9
Based on [ STCblog template] ( https://github.com/andreondra/stcblog ) .
10
10
11
+ ## Local development
12
+
13
+ ``` sh
14
+ docker-compose -p stcblog up --build # Build and run dev version in docker image
15
+ ```
16
+
11
17
## Features
12
18
### Responsive
13
19
![ responsivity showcase] ( docs/img/readme1.gif )
Original file line number Diff line number Diff line change
1
+ version : ' 3.8'
2
+ services :
3
+ wordpress :
4
+ image : wordpress:6.7.1
5
+ container_name : wordpress-dev
6
+ ports :
7
+ - " 8080:80"
8
+ environment :
9
+ WORDPRESS_DB_HOST : db
10
+ WORDPRESS_DB_USER : exampleuser
11
+ WORDPRESS_DB_PASSWORD : examplepass
12
+ WORDPRESS_DB_NAME : exampledb
13
+ volumes :
14
+ - ./:/var/www/html/wp-content/themes/current-theme
15
+
16
+ db :
17
+ image : mysql:8.0
18
+ container_name : wordpress-db
19
+ environment :
20
+ MYSQL_DATABASE : exampledb
21
+ MYSQL_USER : exampleuser
22
+ MYSQL_PASSWORD : examplepass
23
+ MYSQL_RANDOM_ROOT_PASSWORD : ' 1'
24
+ volumes :
25
+ - db:/var/lib/mysql
26
+
27
+ volumes :
28
+ db :
Original file line number Diff line number Diff line change @@ -393,4 +393,24 @@ function disable_emojis() {
393
393
}
394
394
add_action ('init ' , 'disable_emojis ' );
395
395
396
+
397
+ /**
398
+ * Disable Chromium feature that applies `contain-intrinsic-size` to images with
399
+ * `sizes="auto"` attribute. This prevents unexpected layout shifts caused by
400
+ * missing `width` and `height` attributes.
401
+ *
402
+ * WordPress 6.7 introduced a feature that automatically adds `loading="lazy"`
403
+ * to images without validating the presence of these attributes. This behavior
404
+ * can cause rendering issues, especially in Chromium-based browsers, due to
405
+ * their CSS adjustments for such images.
406
+ *
407
+ * Applying this filter disables the `auto-sizes` feature in WordPress until
408
+ * a permanent patch is released (scheduled for version 6.7.1).
409
+ *
410
+ * @link https://core.trac.wordpress.org/ticket/62413
411
+ * @link https://ericportis.com/posts/2023/auto-sizes-pretty-much-requires-width-and-height/
412
+ * @author Petr Kucera
413
+ */
414
+ add_filter ('wp_img_tag_add_auto_sizes ' , '__return_false ' );
415
+
396
416
?>
You can’t perform that action at this time.
0 commit comments