WordPress.org

Ready to get started?Download WordPress

Forums

Custom Post Type Archives
[FIX] Stripslashes missing (1 post)

  1. Ydalb
    Member
    Posted 1 year ago #

    Hi there !

    Just to tell you that at least 1 stripslashes is missing in your lovely script :

    If I add a new Custom Post Type with a quote in the name, a slash will appear in the admin menu.

    To fix this, I added a stripslashes() in the function cpt_create_custom_post_types() when you declare $cpt_label.

    Before:
    $cpt_label = ( !$cpt_post_type["label"] ) ? esc_html($cpt_post_type["name"]) : esc_html($cpt_post_type["label"]);

    After:
    $cpt_label = stripslashes( ( !$cpt_post_type["label"] ) ? esc_html($cpt_post_type["name"]) : esc_html($cpt_post_type["label"]) );

    Regards,
    Quentin.

    http://wordpress.org/extend/plugins/custom-post-type-archives/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic