| @@ -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 block editor, site editor, and other future WordPress core functionality. | |
| 6 | - * Requires at least: 6.8 | |
| 7 | - * Requires PHP: 7.4 | |
| 8 | - * Version: 23.2.1 | |
| 5 | + * Description: Printing since 1440. This is the development plugin for the new block editor in core. | |
| 6 | + * Requires at least: 5.7 | |
| 7 | + * Requires PHP: 5.6 | |
| 8 | + * Version: 12.1.0 | |
| 9 | 9 | * Author: Gutenberg Team |
| 10 | 10 | * Text Domain: gutenberg |
| 11 | 11 | * |
| 12 | 12 | * @package gutenberg |
| @@ -11,9 +11,12 @@ | ||
| 11 | 11 | * |
| 12 | 12 | * @package gutenberg |
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | -defined( 'GUTENBERG_MINIMUM_WP_VERSION' ) or define( 'GUTENBERG_MINIMUM_WP_VERSION', '6.8' ); | |
| 15 | +### BEGIN AUTO-GENERATED DEFINES | |
| 16 | +define( 'GUTENBERG_VERSION', '12.1.0' ); | |
| 17 | +define( 'GUTENBERG_GIT_COMMIT', '78b235a583f3ab67f82301eff635e1ff95266db5' ); | |
| 18 | +### END AUTO-GENERATED DEFINES | |
| 16 | 19 | |
| 17 | 20 | gutenberg_pre_init(); |
| 18 | 21 | |
| 19 | 22 | /** |
| @@ -23,9 +26,9 @@ | ||
| 23 | 26 | */ |
| 24 | 27 | function gutenberg_wordpress_version_notice() { |
| 25 | 28 | echo '<div class="error"><p>'; |
| 26 | 29 | /* translators: %s: Minimum required version */ |
| 27 | - printf( __( 'Gutenberg requires WordPress %s or later to function properly. Please upgrade WordPress before activating Gutenberg.', 'gutenberg' ), GUTENBERG_MINIMUM_WP_VERSION ); | |
| 30 | + printf( __( 'Gutenberg requires WordPress %s or later to function properly. Please upgrade WordPress before activating Gutenberg.', 'gutenberg' ), '5.7' ); | |
| 28 | 31 | echo '</p></div>'; |
| 29 | 32 | |
| 30 | 33 | deactivate_plugins( array( 'gutenberg/gutenberg.php' ) ); |
| 31 | 34 | } |
| @@ -44,15 +47,12 @@ | ||
| 44 | 47 | /** |
| 45 | 48 | * Verify that we can initialize the Gutenberg editor , then load it. |
| 46 | 49 | * |
| 47 | 50 | * @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 ( ! file_exists( __DIR__ . '/build/scripts/blocks' ) ) { | |
| 54 | + if ( defined( 'GUTENBERG_DEVELOPMENT_MODE' ) && GUTENBERG_DEVELOPMENT_MODE && ! file_exists( __DIR__ . '/build/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, GUTENBERG_MINIMUM_WP_VERSION, '<' ) ) { | |
| 68 | + if ( version_compare( $version, '5.7', '<' ) ) { | |
| 69 | 69 | add_action( 'admin_notices', 'gutenberg_wordpress_version_notice' ); |
| 70 | 70 | return; |
| 71 | 71 | } |
| 72 | 72 | |