<?php
/**
 * Created by PhpStorm.
 * User: marco
 * Date: 06/07/18
 * Time: 17.03
 */

/**
 * @param int $model_id
 *
 * @return array
 */
function get_model_fields ($model_id){
	$fields_array = ['ERROR: no fields'];
	if (isset(o66TheModel::getTheModelFieldsArray()[$model_id])){
		$fields_array = o66TheModel::getTheModelFieldsArray()[$model_id];
	}
	return $fields_array;

}

function get_index_post_ID($post_type_slug){
    $return_id = get_field('index_page_'.$post_type_slug, 'option')->ID;
    return $return_id;
}

function get_model_field ($model_id, $field_key){
	$fields_array = ['ERROR: no fields'];
	if (isset(o66TheModel::getTheModelFieldsArray()[$model_id])){
		$fields_array = o66TheModel::getTheModelFieldsArray()[$model_id];
	}
	return $fields_array;

}