| 1 | <?php |
||
| 6 | class Jetpack_SEO_Posts { |
||
| 7 | /** |
||
| 8 | * Key of the post meta value that will be used to store post custom description. |
||
| 9 | */ |
||
| 10 | const DESCRIPTION_META_KEY = 'advanced_seo_description'; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Build meta description for post SEO. |
||
| 14 | * |
||
| 15 | * @param WP_Post $post Source of data for custom description. |
||
| 16 | * |
||
| 17 | * @return string Post description or empty string. |
||
| 18 | */ |
||
| 19 | public static function get_post_description( $post ) { |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Returns post's custom meta description if it is set, and if |
||
| 44 | * SEO tools are enabled for current blog. |
||
| 45 | * |
||
| 46 | * @param WP_Post $post Source of data for custom description |
||
| 47 | * |
||
| 48 | * @return string Custom description or empty string |
||
| 49 | */ |
||
| 50 | public static function get_post_custom_description( $post ) { |
||
| 63 | } |
||
| 64 |