@@ 71-87 (lines=17) @@ | ||
68 | ||
69 | register_post_type( $this->object_type, apply_filters( 'pods_internal_register_post_type_object_helper', $args ) ); |
|
70 | ||
71 | if ( is_admin() ) { |
|
72 | add_filter( 'post_updated_messages', array( $this, 'setup_updated_messages' ), 10, 1 ); |
|
73 | ||
74 | add_action( 'dbx_post_advanced', array( $this, 'edit_page_form' ), 10 ); |
|
75 | ||
76 | add_action( 'pods_meta_groups', array( $this, 'add_meta_boxes' ) ); |
|
77 | add_filter( 'get_post_metadata', array( $this, 'get_meta' ), 10, 4 ); |
|
78 | add_filter( 'update_post_metadata', array( $this, 'save_meta' ), 10, 4 ); |
|
79 | ||
80 | add_action( 'pods_meta_save_pre_post__pods_helper', array( $this, 'fix_filters' ), 10, 5 ); |
|
81 | add_action( 'post_updated', array( $this, 'clear_cache' ), 10, 3 ); |
|
82 | add_action( 'delete_post', array( $this, 'clear_cache' ), 10, 1 ); |
|
83 | add_filter( 'post_row_actions', array( $this, 'remove_row_actions' ), 10, 2 ); |
|
84 | add_filter( 'bulk_actions-edit-' . $this->object_type, array( $this, 'remove_bulk_actions' ) ); |
|
85 | ||
86 | add_filter( 'builder_layout_filter_non_layout_post_types', array( $this, 'disable_builder_layout' ) ); |
|
87 | } |
|
88 | } |
|
89 | ||
90 | public function disable_builder_layout ( $post_types ) { |
@@ 100-116 (lines=17) @@ | ||
97 | ||
98 | if ( !is_admin() ) |
|
99 | add_action( 'load_textdomain', array( $this, 'page_check' ), 12 ); |
|
100 | else { |
|
101 | add_filter( 'post_updated_messages', array( $this, 'setup_updated_messages' ), 10, 1 ); |
|
102 | ||
103 | add_action( 'dbx_post_advanced', array( $this, 'edit_page_form' ), 10 ); |
|
104 | ||
105 | add_action( 'pods_meta_groups', array( $this, 'add_meta_boxes' ) ); |
|
106 | add_filter( 'get_post_metadata', array( $this, 'get_meta' ), 10, 4 ); |
|
107 | add_filter( 'update_post_metadata', array( $this, 'save_meta' ), 10, 4 ); |
|
108 | ||
109 | add_action( 'pods_meta_save_pre_post__pods_page', array( $this, 'fix_filters' ), 10, 5 ); |
|
110 | add_action( 'post_updated', array( $this, 'clear_cache' ), 10, 3 ); |
|
111 | add_action( 'delete_post', array( $this, 'clear_cache' ), 10, 1 ); |
|
112 | add_filter( 'post_row_actions', array( $this, 'remove_row_actions' ), 10, 2 ); |
|
113 | add_filter( 'bulk_actions-edit-' . $this->object_type, array( $this, 'remove_bulk_actions' ) ); |
|
114 | ||
115 | add_filter( 'builder_layout_filter_non_layout_post_types', array( $this, 'disable_builder_layout' ) ); |
|
116 | } |
|
117 | ||
118 | add_filter( 'members_get_capabilities', array( $this, 'get_capabilities' ) ); |
|
119 | } |
@@ 96-114 (lines=19) @@ | ||
93 | ||
94 | register_post_type( $this->object_type, apply_filters( 'pods_internal_register_post_type_object_template', $args ) ); |
|
95 | ||
96 | if ( is_admin() ) { |
|
97 | add_filter( 'post_updated_messages', array( $this, 'setup_updated_messages' ), 10, 1 ); |
|
98 | ||
99 | add_action( 'dbx_post_advanced', array( $this, 'edit_page_form' ), 10 ); |
|
100 | ||
101 | add_action( 'pods_meta_groups', array( $this, 'add_meta_boxes' ) ); |
|
102 | ||
103 | add_filter( 'get_post_metadata', array( $this, 'get_meta' ), 10, 4 ); |
|
104 | add_filter( 'update_post_metadata', array( $this, 'save_meta' ), 10, 4 ); |
|
105 | ||
106 | add_action( 'pods_meta_save_pre_post__pods_template', array( $this, 'fix_filters' ), 10, 5 ); |
|
107 | add_action( 'post_updated', array( $this, 'clear_cache' ), 10, 3 ); |
|
108 | add_action( 'delete_post', array( $this, 'clear_cache' ), 10, 1 ); |
|
109 | add_filter( 'post_row_actions', array( $this, 'remove_row_actions' ), 10, 2 ); |
|
110 | add_filter( 'bulk_actions-edit-' . $this->object_type, array( $this, 'remove_bulk_actions' ) ); |
|
111 | ||
112 | add_filter( 'builder_layout_filter_non_layout_post_types', array( $this, 'disable_builder_layout' ) ); |
|
113 | ||
114 | } |
|
115 | ||
116 | add_filter( 'members_get_capabilities', array( $this, 'get_capabilities' ) ); |
|
117 | } |