• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wp-graphql / wp-graphql / 13316763745

13 Feb 2025 08:45PM UTC coverage: 82.712% (-0.3%) from 83.023%
13316763745

push

github

web-flow
Merge pull request #3307 from wp-graphql/release/v2.0.0

release: v2.0.0

195 of 270 new or added lines in 20 files covered. (72.22%)

180 existing lines in 42 files now uncovered.

13836 of 16728 relevant lines covered (82.71%)

299.8 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Type/ObjectType/PostObject.php
1
<?php
2

3
namespace WPGraphQL\Type\ObjectType;
4

5
use WPGraphQL\Registry\TypeRegistry;
6
use WP_Post_Type;
7

8
/**
9
 * WPObject - PostObject
10
 *
11
 * @package WPGraphQL\Type
12
 * @deprecated 1.12.0
13
 */
14
class PostObject {
15

16
        /**
17
         * Registers a post_type WPObject type to the schema.
18
         *
19
         * @param \WP_Post_Type                    $post_type_object Post type.
20
         * @param \WPGraphQL\Registry\TypeRegistry $type_registry The Type Registry
21
         *
22
         * @return void
23
         * @throws \Exception
24
         * @deprecated 1.12.0
25
         */
UNCOV
26
        public static function register_post_object_types( WP_Post_Type $post_type_object, TypeRegistry $type_registry ) {
×
27
                _deprecated_function( __FUNCTION__, '1.12.0', esc_attr( \WPGraphQL\Registry\Utils\PostObject::class ) . '::register_types()' );
×
28

29
                \WPGraphQL\Registry\Utils\PostObject::register_types( $post_type_object );
×
30
        }
31

32
        /**
33
         * Registers common post type fields on schema type corresponding to provided post type object.
34
         *
35
         * @param \WP_Post_Type                    $post_type_object Post type.
36
         * @param \WPGraphQL\Registry\TypeRegistry $type_registry The Type Registry
37
         *
38
         * @deprecated 1.12.0
39
         *
40
         * @return array<string,array<string,mixed>>
41
         */
UNCOV
42
        public static function get_fields( $post_type_object, $type_registry ) {
×
43
                _deprecated_function( __FUNCTION__, '1.12.0', esc_attr( \WPGraphQL\Registry\Utils\PostObject::class ) . '::get_fields()' );
×
44

45
                return \WPGraphQL\Registry\Utils\PostObject::get_fields( $post_type_object );
×
46
        }
47
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc