| @@ -1,12 +1,12 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * Plugin Name: Gutenberg |
| 4 | 4 | * Plugin URI: https://github.com/WordPress/gutenberg |
| 5 | - * Description: Printing since 1440. This is the development plugin for the new block editor in core. | |
| 6 | - * Requires at least: 5.8 | |
| 7 | - * Requires PHP: 5.6 | |
| 8 | - * Version: 12.6.0 | |
| 5 | + * Description: Printing since 1440. This is the development plugin for the block editor, site editor, and other future WordPress core functionality. | |
| 6 | + * Requires at least: 6.8 | |
| 7 | + * Requires PHP: 7.4 | |
| 8 | + * Version: 22.7.0 | |
| 9 | 9 | * Author: Gutenberg Team |
| 10 | 10 | * Text Domain: gutenberg |
| 11 | 11 | * |
| 12 | 12 | * @package gutenberg |
| @@ -11,12 +11,9 @@ | ||
| 11 | 11 | * |
| 12 | 12 | * @package gutenberg |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -### BEGIN AUTO-GENERATED DEFINES | |
| 16 | -define( 'GUTENBERG_VERSION', '12.6.0' ); | |
| 17 | -define( 'GUTENBERG_GIT_COMMIT', 'b0a9d08da24fd1b89a83a78566beb1c4a778cedf' ); | |
| 18 | -### END AUTO-GENERATED DEFINES | |
| 15 | +defined( 'GUTENBERG_MINIMUM_WP_VERSION' ) or define( 'GUTENBERG_MINIMUM_WP_VERSION', '6.8' ); | |
| 19 | 16 | |
| 20 | 17 | gutenberg_pre_init(); |
| 21 | 18 | |
| 22 | 19 | /** |
| @@ -26,9 +23,9 @@ | ||
| 26 | 23 | */ |
| 27 | 24 | function gutenberg_wordpress_version_notice() { |
| 28 | 25 | echo '<div class="error"><p>'; |
| 29 | 26 | /* translators: %s: Minimum required version */ |
| 30 | - printf( __( 'Gutenberg requires WordPress %s or later to function properly. Please upgrade WordPress before activating Gutenberg.', 'gutenberg' ), '5.8' ); | |
| 27 | + printf( __( 'Gutenberg requires WordPress %s or later to function properly. Please upgrade WordPress before activating Gutenberg.', 'gutenberg' ), GUTENBERG_MINIMUM_WP_VERSION ); | |
| 31 | 28 | echo '</p></div>'; |
| 32 | 29 | |
| 33 | 30 | deactivate_plugins( array( 'gutenberg/gutenberg.php' ) ); |
| 34 | 31 | } |
| @@ -47,12 +44,15 @@ | ||
| 47 | 44 | /** |
| 48 | 45 | * Verify that we can initialize the Gutenberg editor , then load it. |
| 49 | 46 | * |
| 50 | 47 | * @since 1.5.0 |
| 48 | + * | |
| 49 | + * @global string $wp_version The WordPress version string. | |
| 50 | + * | |
| 51 | 51 | */ |
| 52 | 52 | function gutenberg_pre_init() { |
| 53 | 53 | global $wp_version; |
| 54 | - if ( defined( 'GUTENBERG_DEVELOPMENT_MODE' ) && GUTENBERG_DEVELOPMENT_MODE && ! file_exists( __DIR__ . '/build/blocks' ) ) { | |
| 54 | + if ( ! file_exists( __DIR__ . '/build/scripts/blocks' ) ) { | |
| 55 | 55 | add_action( 'admin_notices', 'gutenberg_build_files_notice' ); |
| 56 | 56 | return; |
| 57 | 57 | } |
| 58 | 58 | |
| @@ -64,9 +64,9 @@ | ||
| 64 | 64 | |
| 65 | 65 | // Compare against major release versions (X.Y) rather than minor (X.Y.Z) |
| 66 | 66 | // unless a minor release is the actual minimum requirement. WordPress reports |
| 67 | 67 | // X.Y for its major releases. |
| 68 | - if ( version_compare( $version, '5.8', '<' ) ) { | |
| 68 | + if ( version_compare( $version, GUTENBERG_MINIMUM_WP_VERSION, '<' ) ) { | |
| 69 | 69 | add_action( 'admin_notices', 'gutenberg_wordpress_version_notice' ); |
| 70 | 70 | return; |
| 71 | 71 | } |
| 72 | 72 | |