Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- attributes: {
- description: {
- type: "text",
- // no source, so it goes straight into the html comment, nice for dynamic rendering
- }
- }
- ...
- "render_callback" => function( $attributes ) {
- return "<p>" . $attributes["description"] . "</p>"
- }
- // var_dump($attributes["description"]
- array(3) {
- [0]=>
- string(24) "Rendering RichText with "
- [1]=>
- array(5) {
- ["type"]=>
- string(6) "strong"
- ["key"]=>
- string(10) "_domReact4"
- ["ref"]=>
- NULL
- ["props"]=>
- array(1) {
- ["children"]=>
- string(3) "php"
- }
- ["_ower"]=>
- NULL
- }
- [2]=>
- string(22) " is a pain in the a..."
- }
Add Comment
Please, Sign In to add comment