Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save annalinneajohansson/52c60b28eeb7923340baae1bb5707c37 to your computer and use it in GitHub Desktop.
Save annalinneajohansson/52c60b28eeb7923340baae1bb5707c37 to your computer and use it in GitHub Desktop.
function __construct() {
parent::__construct( awsAccessKey, awsSecretKey );
$settings = get_option( 'op5dwnl_settings' );
$this->buckets = ( isset( $settings['buckets'] ) ) ? $settings['buckets'] : false;
add_filter( 'acf/load_field/name=amazon_s3_file', array( $this, 'acf_load_field' ) );
}
public function acf_load_field( $field ) {
$field['choices'] = array(
'Colors' => array(
'red' => 'Red',
'blue' => 'Blue'
),
'Shades' => array(
'black' => 'Black',
'white' => 'White'
),
);
return $field;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment