HEX
Server: Apache/2.4.66 (Debian)
System: Linux 6dfabc3b2241 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64
User: (1000)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/plugins/wp-graphql/deprecated/TermObject.php
<?php

namespace WPGraphQL\Type\ObjectType;

use WP_Taxonomy;

/**
 * @todo Remove in 3.0.0
 * @deprecated 1.12.0
 * @codeCoverageIgnore
 */
class TermObject {

	/**
	 * Register the Type for each kind of Taxonomy
	 *
	 * @param \WP_Taxonomy $tax_object The taxonomy being registered
	 *
	 * @return void
	 * @throws \Exception
	 * @deprecated 1.12.0
	 */
	public static function register_taxonomy_object_type( WP_Taxonomy $tax_object ) {
		_doing_it_wrong(
			__FUNCTION__,
			sprintf(
				// translators: %s is the class name that is deprecated.
				esc_html__( 'This function will be removed in the next major version of WPGraphQL. Use %s instead.', 'wp-graphql' ),
				esc_html( \WPGraphQL\Registry\Utils\TermObject::class . '::register_types()' ),
			),
			'1.12.0'
		);

		\WPGraphQL\Registry\Utils\TermObject::register_types( $tax_object );
	}
}