@@ 171-186 (lines=16) @@ | ||
168 | * |
|
169 | * @return array Whitelisted post types. |
|
170 | */ |
|
171 | private function _get_whitelisted_post_types() { |
|
172 | $allowed_types = array( 'post', 'page', 'revision' ); |
|
173 | ||
174 | /** |
|
175 | * Filter the post types Jetpack has access to, and can synchronize with WordPress.com. |
|
176 | * |
|
177 | * @module json-api |
|
178 | * |
|
179 | * @since 2.2.3 |
|
180 | * |
|
181 | * @param array $allowed_types Array of whitelisted post types. Default to `array( 'post', 'page', 'revision' )`. |
|
182 | */ |
|
183 | $allowed_types = apply_filters( 'rest_api_allowed_post_types', $allowed_types ); |
|
184 | ||
185 | return array_unique( $allowed_types ); |
|
186 | } |
|
187 | ||
188 | // copied and modified a little from class.json-api-endpoints.php |
|
189 | private function user_can_view_post( $post ) { |
@@ 1561-1576 (lines=16) @@ | ||
1558 | * |
|
1559 | * @return array Whitelisted post types. |
|
1560 | */ |
|
1561 | protected function _get_whitelisted_post_types() { |
|
1562 | $allowed_types = array( 'post', 'page', 'revision' ); |
|
1563 | ||
1564 | /** |
|
1565 | * Filter the post types Jetpack has access to, and can synchronize with WordPress.com. |
|
1566 | * |
|
1567 | * @module json-api |
|
1568 | * |
|
1569 | * @since 2.2.3 |
|
1570 | * |
|
1571 | * @param array $allowed_types Array of whitelisted post types. Default to `array( 'post', 'page', 'revision' )`. |
|
1572 | */ |
|
1573 | $allowed_types = apply_filters( 'rest_api_allowed_post_types', $allowed_types ); |
|
1574 | ||
1575 | return array_unique( $allowed_types ); |
|
1576 | } |
|
1577 | ||
1578 | function handle_media_creation_v1_1( $media_files, $media_urls, $media_attrs = array(), $force_parent_id = false ) { |
|
1579 |