Last active
January 17, 2021 05:28
-
-
Save hirozed/a47ff6c07e3572cb213f91bace8e2fe1 to your computer and use it in GitHub Desktop.
WordPress CMB2 Image
This file contains 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
<?php | |
$cmb->add_field( | |
array( | |
'name' => __( '[CHANGEME-name]', '[CHANGEME-localization]' ), | |
'id' => '[CHANGEME-id]', | |
'desc' => __( '[CHANGEME-description]', '[CHANGEME-localization]' ), | |
'type' => 'file', | |
'options' => array( | |
'url' => false, | |
), | |
'query_args' => array( | |
'type' => array( | |
'image/gif', | |
'image/jpeg', | |
'image/png', | |
), | |
), | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment