Post.php 605 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * Copyright © 2016 Ihor Vansach (ihor@magefan.com). All rights reserved.
  4. * See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
  5. *
  6. * Glory to Ukraine! Glory to the heroes!
  7. */
  8. namespace Magefan\Blog\Block\Amp\Ldjson;
  9. /**
  10. * Blog post list ldJson block
  11. */
  12. class Post extends \Magefan\Blog\Block\Post\View\Richsnippets
  13. {
  14. /**
  15. * Retrieve page structure structure data in JSON
  16. *
  17. * @return string
  18. */
  19. public function getJson()
  20. {
  21. $json = parent::getOptions();
  22. return str_replace('\/', '/', json_encode($json));
  23. }
  24. }