NEXT craftinamerica.org. Base setup for headless wordpress https://www.craftinamerica.org
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

field-generic.php 508B

123456789101112131415161718192021222324252627
  1. <?php
  2. class P2P_Field_Generic implements P2P_Field {
  3. protected $key;
  4. protected $data;
  5. function __construct( $key, $data ) {
  6. $this->key = $key;
  7. $this->data = $data;
  8. }
  9. function get_title() {
  10. return $this->data['title'];
  11. }
  12. function render( $p2p_id, $_ ) {
  13. $args = $this->data;
  14. $args['name'] = array( 'p2p_meta', $p2p_id, $this->key );
  15. if ( 'select' == $args['type'] && !isset( $args['text'] ) )
  16. $args['text'] = '';
  17. return scbForms::input_from_meta( $args, $p2p_id, 'p2p' );
  18. }
  19. }