Skip to content

Instantly share code, notes, and snippets.

@bwonur
Last active January 20, 2020 08:28
Show Gist options
  • Save bwonur/a879b934b7d39718ead3fcc0baeaf9ef to your computer and use it in GitHub Desktop.
Save bwonur/a879b934b7d39718ead3fcc0baeaf9ef to your computer and use it in GitHub Desktop.

Revisions

  1. bwonur revised this gist Jan 20, 2020. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion remove-post-revisions.md
    Original file line number Diff line number Diff line change
    @@ -16,4 +16,5 @@ Change to:
    );
    register_post_type('book',$args);

    pealm.net
    pealm.net
    pealm.com
  2. bwonur revised this gist Jan 20, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion remove-post-revisions.md
    Original file line number Diff line number Diff line change
    @@ -16,4 +16,4 @@ Change to:
    );
    register_post_type('book',$args);

    pealm.net
    pealm.net
  3. bwonur revised this gist Jan 20, 2020. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion remove-post-revisions.md
    Original file line number Diff line number Diff line change
    @@ -14,4 +14,6 @@ Change to:
    // ...
    'supports' => array('title','editor','thumbnail','comments')
    );
    register_post_type('book',$args);
    register_post_type('book',$args);

    pealm.net
  4. bwonur created this gist Jan 20, 2020.
    17 changes: 17 additions & 0 deletions remove-post-revisions.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    Remove the `revisions` property inside the `supports` parameter of `register_post_type()`.

    **Example**

    $args = array(
    // ...
    'supports' => array('title','editor','thumbnail','comments','revisions')
    );
    register_post_type('book',$args);

    Change to:

    $args = array(
    // ...
    'supports' => array('title','editor','thumbnail','comments')
    );
    register_post_type('book',$args);