Skip to content

Instantly share code, notes, and snippets.

@goaround
Created April 6, 2021 10:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goaround/4fc2845de253c31e6a26448963fd87fc to your computer and use it in GitHub Desktop.
Save goaround/4fc2845de253c31e6a26448963fd87fc to your computer and use it in GitHub Desktop.
Adds revision support to the wp_block post type. Can be deleted after this issue https://github.com/WordPress/gutenberg/issues/19149 is closed & merged into WordPress Core
<?php
/*
Plugin Name: Reusable Block Revisions
Plugin URI: http://travel-dealz.de/
Description: Adds revision support to the wp_block post type. Can be deleted after this issue https://github.com/WordPress/gutenberg/issues/19149 is closed & merged into WordPress Core
Version: 1.0.0
Author: Johannes Kinast
Author URI: https://go-around.de
Min WP Version: 5.0
Max WP Version: 5.7
*/
namespace Reusable_Block_Revisions;
function reusable_block_revisions() {
add_post_type_support( 'wp_block', 'revisions' );
}
add_action( 'init', __NAMESPACE__ . '\reusable_block_revisions' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment