Guest User

Untitled

a guest
Jun 18th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. attributes: {
  2. description: {
  3. type: "text",
  4. // no source, so it goes straight into the html comment, nice for dynamic rendering
  5. }
  6. }
  7.  
  8.  
  9. ...
  10. "render_callback" => function( $attributes ) {
  11. return "<p>" . $attributes["description"] . "</p>"
  12. }
  13.  
  14.  
  15. // var_dump($attributes["description"]
  16. array(3) {
  17. [0]=>
  18. string(24) "Rendering RichText with "
  19. [1]=>
  20. array(5) {
  21. ["type"]=>
  22. string(6) "strong"
  23. ["key"]=>
  24. string(10) "_domReact4"
  25. ["ref"]=>
  26. NULL
  27. ["props"]=>
  28. array(1) {
  29. ["children"]=>
  30. string(3) "php"
  31. }
  32. ["_ower"]=>
  33. NULL
  34. }
  35. [2]=>
  36. string(22) " is a pain in the a..."
  37. }
Add Comment
Please, Sign In to add comment