Created
July 30, 2016 06:42
-
-
Save annalinneajohansson/52c60b28eeb7923340baae1bb5707c37 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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