true ), 'objects' ) as $post_type ) { if ( 'attachment' == $post_type->name ) { $controller = new ACF_To_REST_API_Attachments_Controller( $post_type ); } else { $controller = new ACF_To_REST_API_Posts_Controller( $post_type ); } $controller->register(); } foreach ( get_taxonomies( array( 'show_in_rest' => true ), 'objects' ) as $taxonomy ) { $controller = new ACF_To_REST_API_Terms_Controller( $taxonomy ); $controller->register(); } $controller = new ACF_To_REST_API_Comments_Controller; $controller->register(); $controller = new ACF_To_REST_API_Options_Controller; $controller->register(); $controller = new ACF_To_REST_API_Users_Controller; $controller->register(); } public static function missing_notice() { if ( ! ACF_To_REST_API::is_plugin_active( 'rest-api' ) ) { include dirname( __FILE__ ) . '/../shared/includes/admin/views/html-notice-missing-rest-api.php'; } if ( ! ACF_To_REST_API::is_plugin_active( 'acf' ) ) { include dirname( __FILE__ ) . '/../shared/includes/admin/views/html-notice-missing-acf.php'; } } } }