curver/functions/kirki/field/class-kirki-field-dropdown-pages.php

30 lines
560 B
PHP
Raw Normal View History

2019-02-17 14:28:35 +01:00
<?php
/**
* Override field methods
*
* @package Kirki
* @subpackage Controls
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
2020-02-25 18:04:54 +01:00
* @license https://opensource.org/licenses/MIT
2019-02-17 14:28:35 +01:00
* @since 3.0.36
*/
/**
* Field overrides.
*/
class Kirki_Field_Dropdown_Pages extends Kirki_Field_Select {
/**
* Sets the default value.
*
* @access protected
* @since 3.0.0
*/
protected function set_choices() {
$all_pages = get_pages();
foreach ( $all_pages as $page ) {
$this->choices[ $page->ID ] = $page->post_title;
}
}
}