@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | 'public' => true, |
| 243 | 243 | ), 'objects' ); |
| 244 | 244 | $post_types = array_combine( array_keys( $post_types ), wp_list_pluck( $post_types, 'label' ) ); |
| 245 | - unset( $post_types[ 'attachment' ] ); |
|
| 245 | + unset( $post_types[ 'attachment' ] ); |
|
| 246 | 246 | |
| 247 | 247 | /** |
| 248 | 248 | * Set which post types are allowed |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | 'public' => true, |
| 268 | 268 | ), 'names' ); |
| 269 | 269 | //$post_types = array_combine( array_keys( $post_types ), wp_list_pluck( $post_types, 'label' ) ); |
| 270 | - unset( $post_types[ 'attachment' ] ); |
|
| 270 | + unset( $post_types[ 'attachment' ] ); |
|
| 271 | 271 | |
| 272 | 272 | /** |
| 273 | 273 | * Set which post types are allowed |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | */ |
| 371 | 371 | if ( !function_exists( 'lasso_user_can' ) ): |
| 372 | 372 | function lasso_user_can( $action = '', $postid = 0 ) { |
| 373 | - $result = false; |
|
| 373 | + $result = false; |
|
| 374 | 374 | if ( empty( $action ) ) |
| 375 | 375 | $action = 'edit_posts'; |
| 376 | 376 | |
@@ -383,17 +383,17 @@ discard block |
||
| 383 | 383 | |
| 384 | 384 | |
| 385 | 385 | |
| 386 | - if (!empty($allowed_post_types) && !empty($postid)) { |
|
| 386 | + if (!empty($allowed_post_types) && !empty($postid)) { |
|
| 387 | 387 | $type = get_post_type( $postid ); |
| 388 | - $allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types ); |
|
| 388 | + $allowed_post_types = apply_filters( 'lasso_allowed_post_types', $allowed_post_types ); |
|
| 389 | 389 | |
| 390 | - if ( in_array( $type, $allowed_post_types ) ) { |
|
| 390 | + if ( in_array( $type, $allowed_post_types ) ) { |
|
| 391 | 391 | $result = true; |
| 392 | - } |
|
| 393 | - } else { |
|
| 394 | - //we are not checking against a post, return true |
|
| 392 | + } |
|
| 393 | + } else { |
|
| 394 | + //we are not checking against a post, return true |
|
| 395 | 395 | $result = true; |
| 396 | - } |
|
| 396 | + } |
|
| 397 | 397 | } else { |
| 398 | 398 | $result = false; |
| 399 | 399 | } |