| @@ 32-56 (lines=25) @@ | ||
| 29 | * @return n/a |
|
| 30 | */ |
|
| 31 | ||
| 32 | function __construct() { |
|
| 33 | ||
| 34 | // vars |
|
| 35 | $this->name = 'oembed'; |
|
| 36 | $this->label = __("oEmbed",'acf'); |
|
| 37 | $this->category = 'content'; |
|
| 38 | $this->defaults = array( |
|
| 39 | 'width' => '', |
|
| 40 | 'height' => '', |
|
| 41 | ); |
|
| 42 | $this->default_values = array( |
|
| 43 | 'width' => 640, |
|
| 44 | 'height' => 390 |
|
| 45 | ); |
|
| 46 | ||
| 47 | ||
| 48 | // extra |
|
| 49 | add_action('wp_ajax_acf/fields/oembed/search', array($this, 'ajax_search')); |
|
| 50 | add_action('wp_ajax_nopriv_acf/fields/oembed/search', array($this, 'ajax_search')); |
|
| 51 | ||
| 52 | ||
| 53 | // do not delete! |
|
| 54 | parent::__construct(); |
|
| 55 | ||
| 56 | } |
|
| 57 | ||
| 58 | ||
| 59 | /* |
|
| @@ 32-54 (lines=23) @@ | ||
| 29 | * @return n/a |
|
| 30 | */ |
|
| 31 | ||
| 32 | function __construct() { |
|
| 33 | ||
| 34 | // vars |
|
| 35 | $this->name = 'page_link'; |
|
| 36 | $this->label = __("Page Link",'acf'); |
|
| 37 | $this->category = 'relational'; |
|
| 38 | $this->defaults = array( |
|
| 39 | 'post_type' => array(), |
|
| 40 | 'taxonomy' => array(), |
|
| 41 | 'allow_null' => 0, |
|
| 42 | 'multiple' => 0, |
|
| 43 | ); |
|
| 44 | ||
| 45 | ||
| 46 | // extra |
|
| 47 | add_action('wp_ajax_acf/fields/page_link/query', array($this, 'ajax_query')); |
|
| 48 | add_action('wp_ajax_nopriv_acf/fields/page_link/query', array($this, 'ajax_query')); |
|
| 49 | ||
| 50 | ||
| 51 | // do not delete! |
|
| 52 | parent::__construct(); |
|
| 53 | ||
| 54 | } |
|
| 55 | ||
| 56 | ||
| 57 | /* |
|
| @@ 32-53 (lines=22) @@ | ||
| 29 | * @return n/a |
|
| 30 | */ |
|
| 31 | ||
| 32 | function __construct() { |
|
| 33 | ||
| 34 | // vars |
|
| 35 | $this->name = 'user'; |
|
| 36 | $this->label = __("User",'acf'); |
|
| 37 | $this->category = 'relational'; |
|
| 38 | $this->defaults = array( |
|
| 39 | 'role' => '', |
|
| 40 | 'multiple' => 0, |
|
| 41 | 'allow_null' => 0, |
|
| 42 | ); |
|
| 43 | ||
| 44 | ||
| 45 | // extra |
|
| 46 | add_action('wp_ajax_acf/fields/user/query', array($this, 'ajax_query')); |
|
| 47 | add_action('wp_ajax_nopriv_acf/fields/user/query', array($this, 'ajax_query')); |
|
| 48 | ||
| 49 | ||
| 50 | // do not delete! |
|
| 51 | parent::__construct(); |
|
| 52 | ||
| 53 | } |
|
| 54 | ||
| 55 | ||
| 56 | /* |
|