| @@ 117-124 (lines=8) @@ | ||
| 114 | } |
|
| 115 | } |
|
| 116 | ||
| 117 | if ( isset( $args['page_handle'] ) ) { |
|
| 118 | $page_handle = wp_parse_args( $args['page_handle'] ); |
|
| 119 | if ( isset( $page_handle['value'] ) && isset( $page_handle['id'] ) ) { |
|
| 120 | // we have a valid looking page handle |
|
| 121 | $this->page_handle = $page_handle; |
|
| 122 | add_filter( 'posts_where', array( $this, 'handle_where_for_page_handle' ) ); |
|
| 123 | } |
|
| 124 | } |
|
| 125 | ||
| 126 | if ( $this->date_range ) { |
|
| 127 | add_filter( 'posts_where', array( $this, 'handle_date_range' ) ); |
|
| @@ 302-309 (lines=8) @@ | ||
| 299 | add_filter( 'posts_where', array( $this, 'handle_modified_range' ) ); |
|
| 300 | } |
|
| 301 | ||
| 302 | if ( isset( $args['page_handle'] ) ) { |
|
| 303 | $page_handle = wp_parse_args( $args['page_handle'] ); |
|
| 304 | if ( isset( $page_handle['value'] ) && isset( $page_handle['id'] ) ) { |
|
| 305 | // we have a valid looking page handle |
|
| 306 | $this->page_handle = $page_handle; |
|
| 307 | add_filter( 'posts_where', array( $this, 'handle_where_for_page_handle' ) ); |
|
| 308 | } |
|
| 309 | } |
|
| 310 | ||
| 311 | /** |
|
| 312 | * 'column' necessary for the me/posts endpoint (which extends sites/$site/posts). |
|