t($this->settings[ $name ]); } /** * get_setting * * Returns a setting. * * @date 28/09/13 * @since 5.0.0 * * @param string $name * @return mixed */ function get_setting( $name ) { return isset($this->settings[ $name ]) ? $this->settings[ $name ] : null; } /** * update_setting * * Updates a setting. * * @date 28/09/13 * @since 5.0.0 * * @param string $name * @param mixed $value * @return n/a */ function update_setting( $name, $value ) { $this->settings[ $name ] = $value; return true; } /** * get_data * * Returns data. * * @date 28/09/13 * @since 5.0.0 * * @param string $name * @return mixed */ function get_data( $name ) { return isset($this->data[ $name ]) ? $this->data[ $name ] : null; } /** * set_data * * Sets data. * * @date 28/09/13 * @since 5.0.0 * * @param string $name * @param mixed $value * @return n/a */ function set_data( $name, $value ) { $this->data[ $name ] = $value; } /** * get_instance * * Returns an instance. * * @date 13/2/18 * @since 5.6.9 * * @param string $class The instance class name. * @return object */ function get_instance( $class ) { $name = strtolower($class); return isset($this->instances[ $name ]) ? $this->instances[ $name ] : null; } /** * new_instance * * Creates and stores an instance. * * @date 13/2/18 * @since 5.6.9 * * @param string $class The instance class name. * @return object */ function new_instance( $class ) { $instance = new $class(); $name = strtolower($class); $this->instances[ $name ] = $instance; return $instance; } } /* * acf * * The main function responsible for returning the one true acf Instance to functions everywhere. * Use this function like you would a global variable, except without needing to declare the global. * * Example: