| 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 |
|