Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Get People Image
list($titan, $options) = uwmpeople_get_plugin_options();
// By default, let's try to get the profile photo. This may return an integer
// or a URL. Thanks WordPress. If profile photo is empty, then we set it to
// default image, which ALSO might be an integer or a URL. Hopefully this covers all cases.
$featured_image = $titan->getOption('profile_photo', $post_id);
if ( empty($featured_image) )
$featured_image = $titan->getOption('default_image');
if ( strpos($featured_image, 'http' ) === false )
$featured_image = wp_get_attachment_url( $featured_image );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.