Forum Replies Created

Viewing 1 replies (of 1 total)
  • I also noticed this. I’m running WP 3.2.1 and ECF 0.1.

    I’ve poked around a bit and it looks like the plugin is failing on this line:

    if ( !current_user_can( $post_type_object->edit_cap ) )

    From what I can tell, the $post_type_object, which is from get_post_type_object(), doesn’t actually contain edit_cap. The object does contain $post_type_object->capability_type, but as admin returns ‘post,’ which isn’t on this list for current_user_can() (https://codex.www.ads-software.com/Roles_and_Capabilities).

    In the end, I changed the line to:
    if ( !current_user_can( $post_type_object->cap->edit_post ) )

    There are several user roles under $post_type_object->cap. I figured if the user is allowed to edit the post, the should be allowed to add custom field data.

    Everything *seems* to be working now. YMMV.

Viewing 1 replies (of 1 total)