| 1 |
<?php |
| 2 |
/** |
| 3 |
* @package Polylang |
| 4 |
*/ |
| 5 |
|
| 6 |
defined( 'ABSPATH' ) || exit; |
| 7 |
|
| 8 |
/** |
| 9 |
* Interface to use for objects that can have one or more types. |
| 10 |
* |
| 11 |
* @since 3.4 |
| 12 |
* |
| 13 |
* @phpstan-type DBInfoWithType array{ |
| 14 |
* table: non-empty-string, |
| 15 |
* id_column: non-empty-string, |
| 16 |
* type_column: non-empty-string, |
| 17 |
* default_alias: non-empty-string |
| 18 |
* } |
| 19 |
*/ |
| 20 |
interface PLL_Translatable_Object_With_Types_Interface { |
| 21 |
|
| 22 |
/** |
| 23 |
* Returns object types that need to be translated. |
| 24 |
* |
| 25 |
* @since 3.4 |
| 26 |
* |
| 27 |
* @param bool $filter True if we should return only valid registered object types. |
| 28 |
* @return string[] Object type names for which Polylang manages languages. |
| 29 |
* |
| 30 |
* @phpstan-return array<non-empty-string, non-empty-string> |
| 31 |
*/ |
| 32 |
public function get_translated_object_types( $filter = true ); |
| 33 |
|
| 34 |
/** |
| 35 |
* Returns true if Polylang manages languages for this object type. |
| 36 |
* |
| 37 |
* @since 3.4 |
| 38 |
* |
| 39 |
* @param string|string[] $object_type Object type name or array of object type names. |
| 40 |
* @return bool |
| 41 |
*/ |
| 42 |
public function is_translated_object_type( $object_type ); |
| 43 |
} |
| 44 |
|