|
@@ 732-746 (lines=15) @@
|
| 729 |
|
} |
| 730 |
|
break; |
| 731 |
|
|
| 732 |
|
case Jetpack_SEO_Utils::FRONT_PAGE_META_OPTION: |
| 733 |
|
if ( ! Jetpack_SEO_Utils::is_enabled_jetpack_seo() && ! Jetpack_SEO_Utils::has_grandfathered_front_page_meta() ) { |
| 734 |
|
return new WP_Error( 'unauthorized', __( 'SEO tools are not enabled for this site.', 'jetpack' ), 403 ); |
| 735 |
|
} |
| 736 |
|
|
| 737 |
|
if ( ! is_string( $value ) ) { |
| 738 |
|
return new WP_Error( 'invalid_input', __( 'Invalid SEO meta description value.', 'jetpack' ), 400 ); |
| 739 |
|
} |
| 740 |
|
|
| 741 |
|
$new_description = Jetpack_SEO_Utils::update_front_page_meta_description( $value ); |
| 742 |
|
|
| 743 |
|
if ( ! empty( $new_description ) ) { |
| 744 |
|
$updated[ $key ] = $new_description; |
| 745 |
|
} |
| 746 |
|
break; |
| 747 |
|
|
| 748 |
|
case Jetpack_SEO_Titles::TITLE_FORMATS_OPTION: |
| 749 |
|
if ( ! Jetpack_SEO_Utils::is_enabled_jetpack_seo() ) { |
|
@@ 748-762 (lines=15) @@
|
| 745 |
|
} |
| 746 |
|
break; |
| 747 |
|
|
| 748 |
|
case Jetpack_SEO_Titles::TITLE_FORMATS_OPTION: |
| 749 |
|
if ( ! Jetpack_SEO_Utils::is_enabled_jetpack_seo() ) { |
| 750 |
|
return new WP_Error( 'unauthorized', __( 'SEO tools are not enabled for this site.', 'jetpack' ), 403 ); |
| 751 |
|
} |
| 752 |
|
|
| 753 |
|
if ( ! Jetpack_SEO_Titles::are_valid_title_formats( $value ) ) { |
| 754 |
|
return new WP_Error( 'invalid_input', __( 'Invalid SEO title format.', 'jetpack' ), 400 ); |
| 755 |
|
} |
| 756 |
|
|
| 757 |
|
$new_title_formats = Jetpack_SEO_Titles::update_title_formats( $value ); |
| 758 |
|
|
| 759 |
|
if ( ! empty( $new_title_formats ) ) { |
| 760 |
|
$updated[ $key ] = $new_title_formats; |
| 761 |
|
} |
| 762 |
|
break; |
| 763 |
|
|
| 764 |
|
case 'verification_services_codes': |
| 765 |
|
$verification_codes = jetpack_verification_validate( $value ); |