wp-papi / papi

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

Respect id when getting entry type id #227

Closed rasmusbe closed 7 years ago

rasmusbe commented 7 years ago

Description

Fixes papi_get_field for specific IDs on certain pages (term archive pages for example)

Also fixes some tests that didn't respect the ID / post type.

Checklist

codecov-io commented 7 years ago

Codecov Report

Merging #227 into master will decrease coverage by 0.51%. The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master    #227      +/-   ##
===========================================
- Coverage     90.62%   90.1%   -0.52%     
  Complexity     1912    1912              
===========================================
  Files            95      96       +1     
  Lines          5877    5983     +106     
===========================================
+ Hits           5326    5391      +65     
- Misses          551     592      +41
Impacted Files Coverage Δ Complexity Δ
src/lib/types/entry.php 99.29% <100%> (ø) 0 <0> (ø) :arrow_down:
src/admin/class-papi-admin.php 93.1% <100%> (ø) 30 <0> (ø) :arrow_down:
src/lib/types/page.php 98.75% <100%> (ø) 0 <0> (ø) :arrow_down:
src/properties/class-papi-property-post.php 74.8% <0%> (-4.7%) 46% <0%> (ø)
src/properties/class-papi-property-term.php 63.86% <0%> (-4.66%) 49% <0%> (ø)
src/rest-api/class-papi-rest-api-post.php 45.45% <0%> (-3.04%) 14% <0%> (ø)
src/properties/class-papi-property-reference.php 47.91% <0%> (-2.09%) 17% <0%> (ø)
src/properties/class-papi-property-file.php 76.54% <0%> (-2.03%) 66% <0%> (ø)
src/admin/class-papi-admin-meta-handler.php 94.04% <0%> (-1.2%) 41% <0%> (ø)
src/properties/class-papi-property-link.php 96.1% <0%> (-1.12%) 41% <0%> (ø)
... and 22 more

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 226c778...5276534. Read the comment docs.