AtD_get_options

Returns an array of AtD user options specified by $name.

Description

AtD_get_options( $user_id, (string) $name ); 

Parameters (2)

0. $user_id
The user id.
1. $name (string)
The name.

Usage

  1. if ( !function_exists( 'AtD_get_options' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/after-the-deadline/config-options.php'; 
  3.  
  4. // The user id. 
  5. $user_id = null; 
  6.  
  7. // The name. 
  8. $name = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = AtD_get_options($user_id, $name); 
  12.  

Defined (1)

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

/modules/after-the-deadline/config-options.php  
  1. function AtD_get_options( $user_id, $name ) { 
  2. $options_raw = AtD_get_setting( $user_id, $name, 'single' ); 
  3.  
  4. $options = array(); 
  5. $options['name'] = $name; 
  6.  
  7. if ( $options_raw ) 
  8. foreach ( explode( ', ', $options_raw ) as $option ) 
  9. $options[ $option ] = 1; 
  10.  
  11. return $options;