Created
July 25, 2017 04:30
-
-
Save westonruter/78e224f1f8aae32dd878fcabcaaa17c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/php/class-post-type.php b/php/class-post-type.php | |
index 7a5ac99..9542453 100644 | |
--- a/php/class-post-type.php | |
+++ b/php/class-post-type.php | |
@@ -74,7 +74,7 @@ class Post_Type { | |
add_action( 'load-revision.php', array( $this, 'suspend_kses_for_snapshot_revision_restore' ) ); | |
add_filter( 'get_the_excerpt', array( $this, 'filter_snapshot_excerpt' ), 10, 2 ); | |
add_filter( 'post_row_actions', array( $this, 'filter_post_row_actions' ), 10, 2 ); | |
- add_filter( 'user_has_cap', array( $this, 'filter_user_has_cap' ), 10, 2 ); | |
+// add_filter( 'user_has_cap', array( $this, 'filter_user_has_cap' ), 10, 2 ); | |
add_action( 'post_submitbox_minor_actions', array( $this, 'hide_disabled_publishing_actions' ) ); | |
add_filter( 'content_save_pre', array( $this, 'filter_out_settings_if_removed_in_metabox' ), 10 ); | |
add_action( 'admin_print_scripts-revision.php', array( $this, 'disable_revision_ui_for_published_posts' ) ); | |
@@ -99,7 +99,7 @@ class Post_Type { | |
add_filter( 'post_link', array( $this, 'filter_post_type_link' ), 10, 2 ); | |
add_action( 'add_meta_boxes_' . static::SLUG, array( $this, 'setup_metaboxes' ), 10, 1 ); | |
add_action( 'admin_menu',array( $this, 'add_admin_menu_item' ), 99 ); | |
- add_filter( 'map_meta_cap', array( $this, 'remap_customize_meta_cap' ), 5, 4 ); | |
+// add_filter( 'map_meta_cap', array( $this, 'remap_customize_meta_cap' ), 5, 4 ); | |
add_filter( 'bulk_actions-edit-' . static::SLUG, array( $this, 'add_snapshot_bulk_actions' ) ); | |
add_filter( 'handle_bulk_actions-edit-' . static::SLUG, array( $this, 'handle_snapshot_merge' ), 10, 3 ); | |
add_action( 'admin_print_styles-edit.php', array( $this, 'hide_add_new_changeset_button' ) ); | |
@@ -114,15 +114,15 @@ class Post_Type { | |
$post_type_obj->show_ui = true; | |
$post_type_obj->show_in_menu = true; | |
$post_type_obj->_edit_link = 'post.php?post=%d'; | |
- $arg = array( | |
- 'capability_type' => Post_Type::SLUG, | |
- 'map_meta_cap' => true, | |
- 'capabilities' => array( | |
- 'publish_posts' => 'customize_publish', | |
- ), | |
- ); | |
- $arg = (object) $arg; | |
- $post_type_obj->cap = get_post_type_capabilities( $arg ); | |
+// $arg = array( | |
+// 'capability_type' => Post_Type::SLUG, | |
+// 'map_meta_cap' => true, | |
+// 'capabilities' => array( | |
+// 'publish_posts' => 'customize_publish', | |
+// ), | |
+// ); | |
+// $arg = (object) $arg; | |
+// $post_type_obj->cap = get_post_type_capabilities( $arg ); | |
$post_type_obj->show_in_customizer = false; | |
$post_type_obj->customize_snapshot_post_type_obj = $this; | |
$post_type_obj->show_in_rest = true; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment