Custom Fields
Re-Envisioned
Support General Simple quote make wrong code in generator

  • Creator
    Topic
  • #30905
    Resolved Jeremie Lahanque
    Participant

    Hi,
    When i'm trying to create a custom post type, the generator give an error if you are using a simple quote in the name, title or any parameter fields of the CPT.

    The problem is that in french, simple quotes are used often.

    an simple the example here :
    https://i.ibb.co/nPcbtYt/2021-09-22-21h55-18.png

    Can you please update this feature ?

    another question.
    when i'm using this feature to create a CPT, where are stored CPT configuration data ? In a local file or in database ?

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #30909
    Long Nguyen
    Moderator

    Hi Jeremie,

    If you are using the Builder to create the post type and generate PHP code to add to the file functions.php, you need to add a backslash character before the single quote. Like this

    'add_new' => esc_html__( 'Add Ne\'w', 'your-textdomain' ),

    All the features of the Builder are the post types. For example, the feature Post Types is the post type mb-post-type and it is stored in the database like other post types.

    #30918
    Jeremie Lahanque
    Participant

    Thank for your reply.
    I know that i need to add a backslash ! But i would be great if the plugin did it !

    #30928
    Long Nguyen
    Moderator

    Hi,

    Thanks for the feedback.

    I will inform the development team to cover this issue in the next update.

    #31412
    Long Nguyen
    Moderator

    Resolved in the new version 2.2.5 of MB Custom Post Type.

    #31413
    Jeremie Lahanque
    Participant

    Good job !

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.