BLUE
PHP 7.4.33
Path:
/var/www/candid-stg.bitkit.dk/httpdocs/wp-content/plugins/wp-graphql/deprecated
Run
Logout
Edit File
Size: 1.81 KB
Close
/var/www/candid-stg.bitkit.dk/httpdocs/wp-content/plugins/wp-graphql/deprecated/PostObjectUnion.php
Text
Base64
<?php namespace WPGraphQL\Type\Union; use WPGraphQL\Registry\TypeRegistry; /** * @todo Remove in 3.0.0 * @deprecated 1.14.1 * @codeCoverageIgnore */ class PostObjectUnion { /** * Registers the Type * * @param ?\WPGraphQL\Registry\TypeRegistry $type_registry * * @throws \Exception */ public static function register_type( ?TypeRegistry $type_registry = null ): void { register_graphql_union_type( 'PostObjectUnion', [ 'name' => 'PostObjectUnion', 'typeNames' => self::get_possible_types(), 'description' => static function () { return __( 'Union between the post, page and media item types', 'wp-graphql' ); }, 'resolveType' => static function ( $value ) { _doing_it_wrong( self::class, esc_attr__( 'The PostObjectUnion GraphQL type is deprecated. Use the ContentNode interface instead.', 'wp-graphql' ), '1.14.1' ); $type = null; if ( isset( $value->post_type ) ) { $post_type_object = get_post_type_object( $value->post_type ); if ( isset( $post_type_object->graphql_single_name ) ) { $type = \WPGraphQL::get_type_registry()->get_type( $post_type_object->graphql_single_name ); } } return ! empty( $type ) ? $type : null; }, ] ); } /** * Returns a list of possible types for the union * * @return string[] */ public static function get_possible_types() { $possible_types = []; $allowed_post_types = \WPGraphQL::get_allowed_post_types( 'objects', [ 'graphql_kind' => 'object' ] ); foreach ( $allowed_post_types as $post_type_object ) { if ( empty( $possible_types[ $post_type_object->name ] ) && isset( $post_type_object->graphql_single_name ) ) { $possible_types[ $post_type_object->name ] = $post_type_object->graphql_single_name; } } return $possible_types; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 13
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Comments.php
1.59 KB
lrw-r--r--
2026-02-02 10:01:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
MenuItemObjectUnion.php
2.64 KB
lrw-r--r--
2026-02-02 10:01:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
MenuItems.php
1.31 KB
lrw-r--r--
2026-02-02 10:01:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PostObject.php
1.71 KB
lrw-r--r--
2026-02-02 10:01:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PostObjects.php
1.71 KB
lrw-r--r--
2026-02-02 10:01:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PostObjectUnion.php
1.81 KB
lrw-r--r--
2026-02-02 10:01:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Taxonomies.php
812 B
lrw-r--r--
2026-02-02 10:01:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TermObject.php
853 B
lrw-r--r--
2026-02-02 10:01:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TermObjects.php
1.65 KB
lrw-r--r--
2026-02-02 10:01:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TermObjectUnion.php
1.83 KB
lrw-r--r--
2026-02-02 10:01:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Types.php
1.52 KB
lrw-r--r--
2026-02-02 10:01:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Users.php
1.27 KB
lrw-r--r--
2026-02-02 10:01:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
wp-cli.php
721 B
lrw-r--r--
2026-02-02 10:01:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).