IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 425 | 425 | * When $output is OBJECT, a `WP_Post` instance is returned. |
| 426 | 426 | */ |
| 427 | 427 | function get_post( $post = null, $output = OBJECT, $filter = 'raw' ) { |
| | 428 | |
| | 429 | /** |
| | 430 | * Filter that allows a custom post to be provided when appropriate |
| | 431 | * |
| | 432 | * @since 4.4.0 |
| | 433 | * |
| | 434 | * @param object|null null Value to return if no custom post it to be provided |
| | 435 | * @param string $output Optional, default is Object. Accepts OBJECT, ARRAY_A, or ARRAY_N. |
| | 436 | * Default OBJECT. |
| | 437 | * @param string $filter Optional. Type of filter to apply. Accepts 'raw', 'edit', 'db', |
| | 438 | * or 'display'. Default 'raw'. |
| | 439 | */ |
| | 440 | if ( $custom_post = apply_filters( 'get_post', null, $output, $filter ) ) { |
| | 441 | return $custom_post; |
| | 442 | } |
| | 443 | |
| 428 | 444 | if ( empty( $post ) && isset( $GLOBALS['post'] ) ) |
| 429 | 445 | $post = $GLOBALS['post']; |
| 430 | 446 | |