rest_api_localize_response, false
rest_api_localize_response, false
Appears in: jetpack.16.0.1
Hook Type: filter
Displaying hooks found in version: jetpack.16.0.1apply_filters('rest_api_localize_response, false') is found 2 times:
- /json-endpoints/class.wpcom-json-api-list-post-type-taxonomies-endpoint.php line 112
* @param string $post_type - the post type. */ protected function localize_initial_taxonomies( $post_type ) { /** This filter is documented in jetpack/json-endpoints/class.wpcom-json-api-list-post-types-endpoint.php */ if ( ! apply_filters( 'rest_api_localize_response', false ) ) { return; } // Since recreating initial taxonomies will restore the default post // types to which they are associated, save post type's taxonomies in // case it was customized via `register_taxonomy_for_object_type`. - /json-endpoints/class.wpcom-json-api-list-post-types-endpoint.php line 84
* for Jetpack; may be true for WP.com requests. * * @since 3.9.2 */ if ( apply_filters( 'rest_api_localize_response', false ) ) { // API localization occurs after the initial post types have been // registered, so let's get the post type labels translated. if ( 'en' !== get_locale() ) { global $wp_post_types; foreach ( $wp_post_types as $post_type_object ) { foreach ( array_keys( (array) $post_type_object->labels ) as $label_key ) {