PluginProbe
WPGraphQL / trunk
WPGraphQL vtrunk
2.22.3 2.22.2 2.22.1 2.22.0 2.21.1 2.21.0 2.20.0 2.19.0 2.18.0 2.17.0 2.16.0 2.15.1 2.15.0 2.14.1 2.14.0 2.13.0 2.2.0 2.3.0 2.3.3 2.3.6 2.3.8 2.5.0 2.5.1 2.5.2 2.5.3 All 177 releases
wp-graphql / deprecated / TermObject.php

TermObject.php in WPGraphQL trunk, at deprecated/TermObject.php

37 lines 853 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WPGraphQL\Type\ObjectType;
4
5 use WP_Taxonomy;
6
7 /**
8 * @todo Remove in 3.0.0
9 * @deprecated 1.12.0
10 * @codeCoverageIgnore
11 */
12 class TermObject {
13
14 /**
15 * Register the Type for each kind of Taxonomy
16 *
17 * @param \WP_Taxonomy $tax_object The taxonomy being registered
18 *
19 * @return void
20 * @throws \Exception
21 * @deprecated 1.12.0
22 */
23 public static function register_taxonomy_object_type( WP_Taxonomy $tax_object ) {
24 _doing_it_wrong(
25 __FUNCTION__,
26 sprintf(
27 // translators: %s is the class name that is deprecated.
28 esc_html__( 'This function will be removed in the next major version of WPGraphQL. Use %s instead.', 'wp-graphql' ),
29 esc_html( \WPGraphQL\Registry\Utils\TermObject::class . '::register_types()' ),
30 ),
31 '1.12.0'
32 );
33
34 \WPGraphQL\Registry\Utils\TermObject::register_types( $tax_object );
35 }
36 }
37