Viewing 3 reply threads
  • Author
    Posts
    • #5434
      hirschbrat
      Member

      Hi,

      I use the following code to change the Author of a CPT. Since v9.9.7 it’s not possible to change the post_author anymore with this field. After updating/saving the post, the author is still the same as before. The code worked in v9.4.

      
      piklist('field', array(
          'type' => 'select'
          ,'scope' => 'post'
          ,'field' => 'post_author'
          ,'label' => 'Zuständiger Bearbeiter:'
          ,'attributes' => array(
              'class' => 'text'
          )
          ,'choices' => piklist(
              get_users(
                  array(
                      'orderby' => 'display_name'
                      ,'order' => 'asc'
                  )
              ,'objects'
              )
              ,array(
                  'ID'
                  ,'display_name'
              )
          )
      ));
    • #5444
      Steve
      Keymaster

      @hirschbrat– Are you also displaying the AUTHOR meta box on the edit post screen? Piklist is now way more strict and won’t allow that. Remove the author meta box and all should be good.

    • #5448
      hirschbrat
      Member

      Hi Steve,
      the Author meta box is hidden (defined in the ‘hide_meta_box’ array of the CPT definition). I also added/removed ‘author’ in the ‘supports’ array, but still wasn’t able to change the author with the piklist field.

    • #5449
      Steve
      Keymaster

      @hirschbrat– I just confirmed the bug. We’ll get it fixed in the next version of Piklist.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.