_size[0];
}elseif( empty($image_size[0]) && !empty($image_size[1]) ){
$image_attr = 'height="'.$image_size[1].'"';
$image_args['h'] = $image_size[1];
}elseif( !empty($image_size[0]) && !empty($image_size[1]) ){
$image_attr = 'width="'.$image_size[0].'" height="'.$image_size[1].'"';
$image_args = array('w'=>$image_size[0], 'h'=>$image_size[1]);
}
$replace = "";
}else{
//since we previously didn't store image ids along with the url to the image (since taxonomies don't allow normal featured images), sometimes we won't be able to do this, which is why we check there's a valid image id first
if( $this->option_ms_global ) self::ms_global_switch();
$replace = wp_get_attachment_image($this->get_image_id(), $image_size);
if( $this->option_ms_global ) self::ms_global_switch_back();
}
}
}else{
$replace = "";
}
}
}
return $replace;
}
public function can_manage( $capability_owner = 'edit_event_taxonomy', $capability_admin = false, $user_to_check = false ){
global $em_capabilities_array;
//Figure out if this is multisite and require an extra bit of validation
$multisite_check = true;
$can_manage = current_user_can($capability_owner);
//if multisite and supoer admin, just return true
if( is_multisite() && em_wp_is_super_admin() ){ return true; }
if( EM_MS_GLOBAL && !is_main_site() ){
//User can't admin this bit, as they're on a sub-blog
$can_manage = false;
if(array_key_exists($capability_owner, $em_capabilities_array) ){
$this->add_error( $em_capabilities_array[$capability_owner]);
}
}
return $can_manage;
}
}