Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Prevent post status publish on validate failed #4433
    cezarion
    Member

    Thank’s a lot.

    You’re plugin is really great. Long ago I had not code with WordPress and that I had not used.
    It is with pleasure that I reuses.

    in reply to: Upload File Mime Type filter #4431
    cezarion
    Member

    Yes, I saw, but it’s not about validation, just filtering media by type when the user open the media window and this filter is based on the rules of validations.
    I set my validations rules for this field. It’s works fine ! )-

    in reply to: Prevent post status publish on validate failed #4430
    cezarion
    Member

    I have activate piklist demo, and it’s not publishing; The custom post type have status ‘new’.
    My custom post type are not build with piklist. I used the Themosis Framework to create custom post type.
    Piklist is more advanced in the creation of field in custom metabox.

    But I’m sure the post is publishing.
    Themosis method use a wrapper to create metabox, but it’s the default wordpress custom post type how are defined.

    Does it work on the demonstration because an new custom status is set ?

    Create the custom post type

    PostType::make('media-brand', 'Medias Brands', 'Media brand')->set(array(
        'public'        => true,
        'menu_position' => 10,
        'supports'      => ['title','thumbnail'],
        'rewrite'       => true,
        'query_var'     => false,
        'has_archive'   => false,
        'menu_icon'     => 'dashicons-welcome-view-site'
    ));

    A metabox :

    
    <?php
    /*
    Title: Contents
    Post Type: media-brand, case-study, offer, geographic-universe, contents-universe
    Context: normal
    Order: 2
    Lock: true
    Collapse: false
    */
    
    piklist('field', array(
     'type' => 'textarea'
     ,'field' => 'heading'
     ,'label' => 'Chapeau'
     ,'description' => 'Entrez le chapeau du contenu.'
     ,'attributes' => array(
       'rows' => 10
       ,'cols' => 50
       ,'class' => 'large-text'
     )
     ,'required' => true
     ));
    
    piklist('field', array(
        'type' => 'editor'
        ,'field' => 'description'
        ,'label' => __('Description')
        ,'description' => __('Entrez le contenu.')
        ,'value' => ''
        ,'options' => array (
          'wpautop' => true
          ,'media_buttons' => true
          ,'tabindex' => ''
          ,'editor_css' => ''
          ,'editor_class' => ''
          ,'teeny' => false
          ,'dfw' => false
          ,'tinymce' => true
          ,'quicktags' => true
        )
        ,'required' => true
      ));
    
    in reply to: Upload File Mime Type filter #4419
    cezarion
    Member

    Updated : (semicolon missing)

    
        <a
          href="#"
          class="button piklist-upload-file-button piklist-field-part"
          title="<?php _e($options['modal_title']); ?>"
          data-type="<?php echo isset($options['mime_type']) ? $options['mime_type'] : ""; ?>"
        >
    
Viewing 4 posts - 1 through 4 (of 4 total)