CMB2_Options

Retrieves an instance of CMB2_Option based on the option key.

Defined (1)

The class is defined in the following location(s).

/includes/CMB2_Options.php  
  1. class CMB2_Options { 
  2. /** 
  3. * Array of all CMB2_Option instances 
  4. * @var array 
  5. * @since 1.0.0 
  6. */ 
  7. protected static $option_sets = array(); 
  8.  
  9. public static function get( $option_key ) { 
  10.  
  11. if ( empty( self::$option_sets ) || empty( self::$option_sets[ $option_key ] ) ) { 
  12. self::$option_sets[ $option_key ] = new CMB2_Option( $option_key ); 
  13.  
  14. return self::$option_sets[ $option_key ];