ns-rx / poetwp

0 stars 0 forks source link

Refactor demo poem function #21

Closed ns-rx closed 2 months ago

ns-rx commented 3 months ago
          Consider flipping this conditional so that it returns early (guard clause) to avoid basically indenting the rest of the function.
    if ( $existing_poem->have_posts() ) {
        return;
    }

    $poem_content = ...

_Originally posted by @GaryJones in https://github.com/ns-rx/poetwp/pull/13#discussion_r1730401311_