Create New Item
×
Item Type
File
Folder
Item Name
×
Search file in folder and subfolders...
File Manager
/
wp-content
/
plugins
/
advanced-custom-fields
/
includes
/
locations
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php if (!defined('ABSPATH')) { exit; } if (!class_exists('ACF_Location_Page')) { class ACF_Location_Page extends ACF_Location { public function initialize() { $this->name = 'page'; $this->label = __('Page', 'acf'); $this->category = 'page'; $this->object_type = 'post'; $this->object_subtype = 'page'; } public function match($rule, $screen, $field_group) { return acf_get_location_type('post')->match($rule, $screen, $field_group); } public function get_values($rule) { $choices = array(); $groups = acf_get_grouped_posts(array('post_type' => array('page'))); $posts = reset($groups); if ($posts) { foreach ($posts as $post) { $choices[$post->ID] = acf_get_post_title($post); } } return $choices; } } acf_register_location_type('ACF_Location_Page'); }