я использовал этот код для удаления ярлыков v c из rest-api, но оставил этот символ \ во всем коде, есть ли способ исправить эту ошибку?
add_action( 'rest_api_init', function ()
{
register_rest_field(
'destination-item',
'content',
array(
'get_callback' => 'compasshb_do_shortcodes',
'update_callback' => null,
'schema' => null,
)
);
});
function compasshb_do_shortcodes( $object, $field_name, $request )
{
WPBMap::addAllMappedShortcodes(); // This does all the work
global $post;
$post = get_post ($object['id']);
$output['rendered'] = apply_filters( 'the_content', get_the_content());
// EDIT: add custom CSS to $output:
$output[ 'yb_wpb_post_custom_css' ] = get_post_meta( $object[ 'id' ], '_wpb_post_custom_css', true);
return $output;
}
"rendered" : "
[vc_row] [vc_column] [vc_empty_space height =” 25px ”]
необходимо удалить ярлыки, но затем обработать такой грязный код
" rendered ":"