wp-papi / papi

:rocket: WordPress Page Type API with custom fields
https://wp-papi.github.io
MIT License
263 stars 32 forks source link

Fix autosave draft #242

Closed frozzare closed 7 years ago

frozzare commented 7 years ago

Description

This will fix autosave when a post is created and not saved, a autosave draft. When it's a autosave draft the post id it's the same but when it's a normal autosave the post id will be different so two cases to validate.

This pull request also fixes:

Checklist

codecov-io commented 7 years ago

Codecov Report

Merging #242 into master will increase coverage by <.01%. The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #242      +/-   ##
============================================
+ Coverage     89.78%   89.79%   +<.01%     
- Complexity     2002     2004       +2     
============================================
  Files            96       96              
  Lines          7091     7093       +2     
============================================
+ Hits           6367     6369       +2     
  Misses          724      724
Impacted Files Coverage Δ Complexity Δ
src/admin/class-papi-admin-meta-handler.php 92.1% <100%> (+0.14%) 50 <0> (+2) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 71f09cd...e8e141d. Read the comment docs.