Plugin Directory

Changeset 3118672


Ignore:
Timestamp:
07/15/2024 07:06:57 PM (21 months ago)
Author:
skyword
Message:

Fix bug where authorTerm could be unavailable

Location:
skyword-publishing-api/tags/1.1.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • skyword-publishing-api/tags/1.1.3/php/routes/class-skyword-posts.php

    r3116651 r3118672  
    418418            $newPost['ID'] = (int) $data['id'];
    419419        }
    420         if ( null !== $data['author'] && is_numeric( trim( $data['author'] ) ) ) {
    421             $newPost['post_author'] = (int)$data['author'];
    422         } else if ( null !== $data['author'] && null !== $coauthors_plus ) {
     420        if ( null !== $data['author'] && null !== $coauthors_plus ) {
    423421            $data['author'] = str_replace( 'guest-', '', $data['author'] );
    424422            $author          = $coauthors_plus->guest_authors->get_guest_author_by( 'ID', $data['author'] );
    425423            $authorTerm      = $coauthors_plus->update_author_term( $author );
     424            $newPost['post_author'] = (int)$data['author'];
     425        } else if ( null !== $data['author'] && is_numeric( trim( $data['author'] ) ) ) {
    426426            $newPost['post_author'] = (int)$data['author'];
    427427        }
  • skyword-publishing-api/tags/1.1.3/readme.txt

    r3116645 r3118672  
    2424= 1.1.3 =
    2525* Feature flag to convert paragraph attributes to WP "align" classes
     26* Fix bug with author checking
    2627
    2728= 1.1.2 =
Note: See TracChangeset for help on using the changeset viewer.