/** * Include and Init the PodsData class * * @see PodsData * * @param string|\Pod $pod The pod object to load * @param int $id (optional) Id of the pod to fetch * @param bool $strict (optional) If true throw an error if the pod does not exist * @param bool $unique (optional) If true always return a unique class * * @return PodsData * * @since 2.0 */ function pods_data($pod = null, $id = null, $strict = true, $unique = true) { require_once PODS_DIR . 'classes/PodsData.php'; if ($unique && false !== $pod) { return new PodsData($pod, $id, $strict); } return PodsData::init($pod, $id, $strict); }