Skip to content

Commit cf501cb

Browse files
committed
show dropdown filter only on submissions page
1 parent e6e5651 commit cf501cb

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

classes/class-cpt-wplf-submission.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ function custom_columns_cpt( $columns ) {
106106
function form_filter_dropdown() {
107107
global $pagenow;
108108

109-
if( 'edit.php' != $pagenow ) {
109+
$allowed = array("wplf-submission"); // show filter on these post types (currently only one?)
110+
$post_type = get_query_var("post_type");
111+
112+
if( 'edit.php' != $pagenow || !in_array($post_type, $allowed)) {
110113
return;
111114
}
112115

@@ -201,4 +204,3 @@ function metabox_submission() {
201204
}
202205

203206
endif;
204-

0 commit comments

Comments
 (0)