seiya-n1987 of WordPress
9/14/2017 - 2:15 AM

Acquisition of ACF selection list

<?php
/***********************************************
 *ACF 選択リストの取得
 ***********************************************/
function get_acf_selection_list($title){
	$post = get_page_by_title( $title, 'OBJECT', 'acf-field' );
	if( $post ) {
		$post_content = $post->post_content;
		$unserialize = maybe_unserialize( $post_content );
		$select = $unserialize[ 'choices' ];
		return $select;
	}
	return false;
}