acf_field_page_link::initialize
__construct
This function will setup the field type data
Method of the class: acf_field_page_link{}
No Hooks.
Returns
null. Nothing (null).
Usage
$acf_field_page_link = new acf_field_page_link(); $acf_field_page_link->initialize();
Changelog
| Since 5.0.0 | Introduced. |
acf_field_page_link::initialize() acf field page link::initialize code ACF 6.0.4
function initialize() {
// vars
$this->name = 'page_link';
$this->label = __( 'Page Link', 'acf' );
$this->category = 'relational';
$this->defaults = array(
'post_type' => array(),
'taxonomy' => array(),
'allow_null' => 0,
'multiple' => 0,
'allow_archives' => 1,
);
// extra
add_action( 'wp_ajax_acf/fields/page_link/query', array( $this, 'ajax_query' ) );
add_action( 'wp_ajax_nopriv_acf/fields/page_link/query', array( $this, 'ajax_query' ) );
}