interface-wpseo-graph-piece.php 538 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * WPSEO plugin file.
  4. *
  5. * @package WPSEO\Frontend\Schema
  6. */
  7. if ( ! interface_exists( 'WPSEO_Graph_Piece' ) ) {
  8. /**
  9. * An interface for registering Schema Graph Pieces.
  10. *
  11. * @since 10.2
  12. */
  13. interface WPSEO_Graph_Piece {
  14. /**
  15. * Add your piece of the graph.
  16. *
  17. * @return array|bool $graph A graph piece on success, false on failure.
  18. */
  19. public function generate();
  20. /**
  21. * Determines whether or not a piece should be added to the graph.
  22. *
  23. * @return bool
  24. */
  25. public function is_needed();
  26. }
  27. }