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 | * The LEGACY_META_OPTION is used to support legacy usage on WPcom simple sites (free or paid). |
||
14 | * For WPorg JP sites, the JP seo-tools features were made free for all sites (free or paid). |
||
15 | */ |
||
16 | const LEGACY_META_OPTION = 'seo_meta_description'; |
||
17 | |||
18 | /** |
||
19 | * Used to check whether SEO tools are enabled for given site. |
||
20 | * |
||
21 | * @param int $site_id Optional. Defaults to current blog id if not given. |
||
22 | * |
||
23 | * @return bool True if SEO tools are enabled, false otherwise. |
||
24 | */ |
||
25 | public static function is_enabled_jetpack_seo( $site_id = 0 ) { |
||
51 | |||
52 | /** |
||
53 | * Checks if this option was set while it was freely available to all WPcom simple sites. |
||
54 | * |
||
55 | * @return bool True if we should enable legacy usage, false otherwise. |
||
56 | */ |
||
57 | public static function has_legacy_front_page_meta() { |
||
60 | |||
61 | /** |
||
62 | * Returns front page meta description for current site. |
||
63 | * |
||
64 | * @return string Front page meta description string or empty string. |
||
65 | */ |
||
66 | public static function get_front_page_meta_description() { |
||
75 | |||
76 | /** |
||
77 | * Sanitizes the custom front page meta description input. |
||
78 | * |
||
79 | * @param string $value Front page meta string. |
||
80 | * |
||
81 | * @return string The sanitized string. |
||
82 | */ |
||
83 | public static function sanitize_front_page_meta_description( $value ) { |
||
86 | |||
87 | /** |
||
88 | * Updates the site option value for front page meta description. |
||
89 | * |
||
90 | * @param string $value New value for front page meta description. |
||
91 | * |
||
92 | * @return string Saved value, or empty string if no update was performed. |
||
93 | */ |
||
94 | public static function update_front_page_meta_description( $value ) { |
||
132 | } |
||
133 |