We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<!-- wp:carbon-fields/crb-test {"data":{"crb_text":"\u003cp\u003esome text\u003c/p\u003e"}} /-->
<!-- wp:carbon-fields/crb-test {"data":{"crb_text":"u003cpu003esome textu003c/pu003e"}} /-->
<?php use Carbon_Fields\Block; use Carbon_Fields\Field; Block::make("crb_test", "TEST") ->add_fields(array( Field::make('rich_text', 'crb_text', "Content") ->set_width(100) )) ->set_mode('preview') ->set_category('theme-blocks') ->set_render_callback(function ($fields, $attributes, $inner_blocks) { ?> <div> <?= $fields['crb_text']; ?> </div> <?php
wp_update_post
post_content
I'm used this snipped for checking wp_update_post behavior. functions.php
add_action('init', function () { $check = isset($_GET['test']); if (!$check) { return; } $created_post_id = 1245; $post = get_post($created_post_id); echo esc_html($post->post_content); if (has_blocks($post->post_content)) { wp_update_post([ 'ID' => $post->ID, 'post_content' => $post->post_content ]); } echo "<br>"; $post = get_post($created_post_id); echo esc_html($post->post_content); exit(200); });
Then visit website.com/?test
website.com/?test
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Version
Expected Behavior
<!-- wp:carbon-fields/crb-test {"data":{"crb_text":"\u003cp\u003esome text\u003c/p\u003e"}} /-->
Actual Behavior
<!-- wp:carbon-fields/crb-test {"data":{"crb_text":"u003cpu003esome textu003c/pu003e"}} /-->
Gutenberg block definition
Steps to Reproduce the Problem
wp_update_post
withpost_content
of created postComments
I'm used this snipped for checking wp_update_post behavior.
functions.php
Then visit
website.com/?test
The text was updated successfully, but these errors were encountered: