|
@@ 638-644 (lines=7) @@
|
| 635 |
|
// REST API |
| 636 |
|
$rest_enabled = (boolean) pods_v( 'rest_enable', $post_type, false ); |
| 637 |
|
|
| 638 |
|
if ( $rest_enabled ) { |
| 639 |
|
$rest_base = sanitize_title( pods_v( 'rest_base', $post_type, $post_type_name ) ); |
| 640 |
|
|
| 641 |
|
$pods_post_types[ $post_type_name ]['show_in_rest'] = true; |
| 642 |
|
$pods_post_types[ $post_type_name ]['rest_base'] = $rest_base; |
| 643 |
|
$pods_post_types[ $post_type_name ]['rest_controller_class'] = 'WP_REST_Posts_Controller'; |
| 644 |
|
} |
| 645 |
|
|
| 646 |
|
// YARPP doesn't use 'supports' array option (yet) |
| 647 |
|
if ( ! empty( $cpt_supports['yarpp_support'] ) ) { |
|
@@ 812-818 (lines=7) @@
|
| 809 |
|
// REST API |
| 810 |
|
$rest_enabled = (boolean) pods_v( 'rest_enable', $taxonomy, false ); |
| 811 |
|
|
| 812 |
|
if ( $rest_enabled ) { |
| 813 |
|
$rest_base = sanitize_title( pods_v( 'rest_base', $taxonomy, $taxonomy_name ) ); |
| 814 |
|
|
| 815 |
|
$pods_taxonomies[ $taxonomy_name ]['show_in_rest'] = true; |
| 816 |
|
$pods_taxonomies[ $taxonomy_name ]['rest_base'] = $rest_base; |
| 817 |
|
$pods_taxonomies[ $taxonomy_name ]['rest_controller_class'] = 'WP_REST_Terms_Controller'; |
| 818 |
|
} |
| 819 |
|
|
| 820 |
|
// Integration for Single Value Taxonomy UI |
| 821 |
|
if ( function_exists( 'tax_single_value_meta_box' ) ) { |