Simple quote make wrong code in generator

Support General Simple quote make wrong code in generatorResolved

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #30905
    Jeremie LahanqueJeremie 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.

    #30909
    Long NguyenLong 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 LahanqueJeremie 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 NguyenLong Nguyen
    Moderator

    Hi,

    Thanks for the feedback.

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

    #31412
    Long NguyenLong Nguyen
    Moderator

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

    #31413
    Jeremie LahanqueJeremie Lahanque
    Participant

    Good job !

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