WordPress.org

Support

Support » Plugins and Hacks » Custom Content Type Manager » [Plugin: Custom Content Type Manager] Bug in get_custom_field_meta and get_custom_field_def

[Plugin: Custom Content Type Manager] Bug in get_custom_field_meta and get_custom_field_def

Viewing 1 replies (of 1 total)
  • Plugin Contributor fireproofsocks

    @fireproofsocks

    Ah, you’re right, thanks for catching that… I’ve updated the functions file — my intention was to merge the 2 functions because they are so similar, but I probably got distracted when I was working on that and I neglected to update the wiki. The wiki has been updated now: http://code.google.com/p/wordpress-custom-content-type-manager/wiki/get_custom_field_meta

    So in your includes/functions.php file, the get_custom_field_meta() function should look like this:

    function get_custom_field_meta($fieldname, $item=null) {
    	$data = get_option( CCTM::db_key, array() );
    
    	if (isset($data['custom_field_defs'][$fieldname])) {
    		if ($item && isset($data['custom_field_defs'][$fieldname][$item])) {
    			return $data['custom_field_defs'][$fieldname][$item];
    		}
    		else {
    			return $data['custom_field_defs'][$fieldname]
    		}
    	}
    	else {
    		return sprintf( __('Invalid field name: %s', CCTM_TXTDOMAIN), $fieldname );
    	}
    }

    This fix will be in 0.9.6.1.

    Just a reminder to please file a bugs in the bug tracker: http://code.google.com/p/wordpress-custom-content-type-manager/issues/list

    if they’re not in the bug-tracker, then there’s no guarantee they’ll get fixed, and if they do happen to get fixed, there’s no record of them.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Custom Content Type Manager] Bug in get_custom_field_meta and get_custom_field_def’ is closed to new replies.
Skip to toolbar