| @@ -9,8 +9,9 @@ | ||
| 9 | 9 | use ABlocks\Classes\AssetsGenerator; |
| 10 | 10 | use ABlocks\Classes\RegisterScripts; |
| 11 | 11 | use ABlocks\Classes\GlobalCssGenerator; |
| 12 | 12 | use ABlocks\Classes\GlobalClasses; |
| 13 | +use ABlocks\Classes\AtomicStyles; | |
| 13 | 14 | use ABlocks\Classes\FontLoadLocally; |
| 14 | 15 | use ABlocks\Admin\Menu; |
| 15 | 16 | use ABlocks\Helper; |
| 16 | 17 | |
| @@ -881,12 +882,17 @@ | ||
| 881 | 882 | */ |
| 882 | 883 | public static function build_revision() { |
| 883 | 884 | $stamp = get_option( self::BUILD_OPTION ); |
| 884 | 885 | |
| 886 | + // The compiler's output revision is part of the key, so an emission | |
| 887 | + // change stales every baked page even without a version bump. See | |
| 888 | + // AtomicStyles::OUTPUT_REVISION. | |
| 889 | + $build = ABLOCKS_VERSION . '+' . AtomicStyles::OUTPUT_REVISION; | |
| 890 | + | |
| 885 | 891 | if ( |
| 886 | 892 | is_array( $stamp ) && |
| 887 | 893 | isset( $stamp['version'], $stamp['time'] ) && |
| 888 | - ABLOCKS_VERSION === $stamp['version'] | |
| 894 | + $build === $stamp['version'] | |
| 889 | 895 | ) { |
| 890 | 896 | return (int) $stamp['time']; |
| 891 | 897 | } |
| 892 | 898 | |
| @@ -893,9 +899,9 @@ | ||
| 893 | 899 | $now = time(); |
| 894 | 900 | update_option( |
| 895 | 901 | self::BUILD_OPTION, |
| 896 | 902 | [ |
| 897 | - 'version' => ABLOCKS_VERSION, | |
| 903 | + 'version' => $build, | |
| 898 | 904 | 'time' => $now, |
| 899 | 905 | ], |
| 900 | 906 | true |
| 901 | 907 | ); |