WordPress.org

Ready to get started?Download WordPress

Forums

Custom Content Type Manager
get_custom_field(image) When image field empty (6 posts)

  1. logicdesignbe
    Member
    Posted 3 years ago #

    Hi, first of all i would like to thanks the creators of this marvelous plugin. I'm really fan.

    Now with the matter: When creating a custom content type, in a custom field image, when i call on the template the function get_custom_field('image4')and the image field was let empty, it return the url of the content type page instead of an empty string.

    It would be more logic to return an empty string or a 'false' so we can check easier if the field was empty.

    It's that a bug ? or it has a meaning i dont catch ?

    http://wordpress.org/extend/plugins/custom-content-type-manager/

  2. fireproofsocks
    Member
    Plugin Author

    Posted 3 years ago #

    Hey, thanks for the kind words -- I really hope the plugin is useful, but it has been a humbling experience for me to realize that no matter how hard I try to eliminate them, there are always bugs in a dev project.

    That sounds like a bug -- I apologize that I've been working on several non-WP projects the past month so I haven't had much time to spend updating CCTM. Would you mind filing a bug report?

    Thanks!

  3. logicdesignbe
    Member
    Posted 3 years ago #

    Hi! Well i was really in need of a custom content type that can handle image fields. So i'm very glad with yours.
    The amount of work is not small so is normal bugs appear.

    Right now i'm working on modifying the plugin to solve the "delete" boutton to erase lines on wp_metapost, and made a cheap arrangement for the bad return of the get_custom_field when field its empty.

    I fill that last one on a bug report.

    Cheers!

  4. logicdesignbe
    Member
    Posted 3 years ago #

    Bug repaired, there is just a simple check to do on he functions.php inside the plugin folder. The only lines modified are those with the /* FIX */ comment

    here is the fix to this problem as i posted on the custom content type manager bug forum:

    [Code moderated as per the Forum Rules. Please use the pastebin]

  5. fireproofsocks
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks for filing a bug report! Much appreciated!

  6. fireproofsocks
    Member
    Plugin Author

    Posted 3 years ago #

    Ooops -- looks like the forum stripped your code from the post. Could you post this fix in the bug tracker? Many thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic