PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.3
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.3
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / src / user-meta / domain / custom-meta-interface.php

custom-meta-interface.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 28.3, at src/user-meta/domain/custom-meta-interface.php

63 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Yoast\WP\SEO\User_Meta\Domain;
4
5 /**
6 * This interface describes a custom meta.
7 */
8 interface Custom_Meta_Interface {
9
10 /**
11 * Returns the priority which the custom meta's form field should be rendered with.
12 *
13 * @return int.
14 */
15 public function get_render_priority(): int;
16
17 /**
18 * Returns the db key of the custom meta.
19 *
20 * @return string
21 */
22 public function get_key(): string;
23
24 /**
25 * Returns the id of the custom meta's form field.
26 *
27 * @return string
28 */
29 public function get_field_id(): string;
30
31 /**
32 * Returns the meta value.
33 *
34 * @param int $user_id The user ID.
35 *
36 * @return string
37 */
38 public function get_value( $user_id ): string;
39
40 /**
41 * Returns whether the respective global setting is enabled.
42 *
43 * @return bool
44 */
45 public function is_setting_enabled(): bool;
46
47 /**
48 * Returns whether the custom meta is allowed to be empty.
49 *
50 * @return bool
51 */
52 public function is_empty_allowed(): bool;
53
54 /**
55 * Renders the custom meta's field in the user form.
56 *
57 * @param int $user_id The user ID.
58 *
59 * @return void
60 */
61 public function render_field( $user_id ): void;
62 }
63