Hi Metabox team
I'm struggling with the fields from my settings page to show them in the right dimensions:
I'm using the code snippet below. However in the RWMB_meta the array with the size parameter is added later on, but doesn't do anything in specific. The thing is, when i return the value of that in a field, it automatically shows it square as the thumbnail, but i want it to keep it's orginal ratio. Can anyone help me improve my code? I'm using a single image as meta box custom field.
/* Avoid Undefined Function Errors */
if ( ! function_exists( 'rwmb_meta' ) ) {
function rwmb_meta( $key, $args = '', $post_id = null ) {
return false;
}
}
/* Get the URL of logo image from the settings page */
function wpdd_get_mb_settings_logo_url( $field_id ) {
$logo = rwmb_meta( 'sitewide_logo', ['object_type' => 'setting'], 'general_settings', array( 'size' => 'Large' ) );
return $logo ? $logo['url'] : 'https://morlinsgarage.be/wp-content/uploads/2021/04/logomorlins2_Tekengebied-1.png';
}