PluginProbe
Polylang / 3.8.6
Polylang v3.8.6
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
polylang / src / translatable-object-with-types-interface.php

translatable-object-with-types-interface.php in Polylang 3.8.6, at src/translatable-object-with-types-interface.php

44 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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