1 | <?php |
||
6 | class Jetpack_SEO_Utils { |
||
7 | /** |
||
8 | * Site option name used to store front page meta description. |
||
9 | */ |
||
10 | const FRONT_PAGE_META_OPTION = 'advanced_seo_front_page_description'; |
||
11 | |||
12 | /** |
||
13 | * Initially setting the front page meta description was for all sites, then the feature was grouped to a paid plan. |
||
14 | * The LEGACY_META_OPTION was added at that time to support legacy usage. Later on, a decision was made to have |
||
15 | * the JP seo-tools features for all JP sites (paid plan or not). |
||
16 | */ |
||
17 | const LEGACY_META_OPTION = 'seo_meta_description'; |
||
18 | |||
19 | /** |
||
20 | * Used to check whether SEO tools are enabled for given site. |
||
21 | * |
||
22 | * @return bool True if SEO tools are enabled, false otherwise. |
||
23 | */ |
||
24 | public static function is_enabled_jetpack_seo() { |
||
40 | |||
41 | /** |
||
42 | * Returns front page meta description for current site. |
||
43 | * |
||
44 | * @return string Front page meta description string or empty string. |
||
45 | */ |
||
46 | public static function get_front_page_meta_description() { |
||
58 | |||
59 | /** |
||
60 | * Sanitizes the custom front page meta description input. |
||
61 | * |
||
62 | * @param string $value Front page meta string. |
||
63 | * |
||
64 | * @return string The sanitized string. |
||
65 | */ |
||
66 | public static function sanitize_front_page_meta_description( $value ) { |
||
69 | |||
70 | /** |
||
71 | * Updates the site option value for front page meta description. |
||
72 | * |
||
73 | * @param string $value New value for front page meta description. |
||
74 | * @param bool $delete_legacy_meta_option Delete the LEGACY_META_OPTION if true. |
||
75 | * |
||
76 | * @return string Saved value, or empty string if no update was performed. |
||
77 | */ |
||
78 | public static function update_front_page_meta_description( $value, $delete_legacy_meta_option = false ) { |
||
110 | } |
||
111 |