Merged in release/release-1.09 (pull request #10)
Release/release 1.09 * Install missing plugins * rs set to 1 * rebase pantheon for aws * rebase pantheon for aws * prod config change * prod config change * fix campaing issue * revert Approved-by: Jay Sharma
This commit is contained in:
committed by
Jay Sharma
parent
779393381f
commit
22f10a9edd
@@ -28,7 +28,7 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema_Person' ) ) {
|
||||
$schema['@context'] = 'https://schema.org';
|
||||
$schema['@type'] = 'Person';
|
||||
|
||||
$schema['name'] = ! empty( $data['name'] ) ? wp_strip_all_tags( (string) $data['name'] ) : null;
|
||||
$schema['name'] = ! empty( $data['name'] ) ? wp_strip_all_tags( (string)$data['name'] ) : NULL;
|
||||
|
||||
if ( ( isset( $data['street'] ) && ! empty( $data['street'] ) ) ||
|
||||
( isset( $data['locality'] ) && ! empty( $data['locality'] ) ) ||
|
||||
@@ -37,35 +37,35 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema_Person' ) ) {
|
||||
|
||||
$schema['address']['@type'] = 'PostalAddress';
|
||||
|
||||
$schema['address']['addressLocality'] = ! empty( $data['locality'] ) ? wp_strip_all_tags( (string) $data['locality'] ) : null;
|
||||
$schema['address']['addressLocality'] = ! empty( $data['locality'] ) ? wp_strip_all_tags( (string)$data['locality'] ) : NULL;
|
||||
|
||||
$schema['address']['addressRegion'] = ! empty( $data['region'] ) ? wp_strip_all_tags( (string) $data['region'] ) : null;
|
||||
$schema['address']['addressRegion'] = ! empty( $data['region'] ) ? wp_strip_all_tags( (string)$data['region'] ) : NULL;
|
||||
|
||||
$schema['address']['postalCode'] = ! empty( $data['postal'] ) ? wp_strip_all_tags( (string) $data['postal'] ) : null;
|
||||
$schema['address']['postalCode'] = ! empty( $data['postal'] ) ? wp_strip_all_tags( (string)$data['postal'] ) : NULL;
|
||||
|
||||
$schema['address']['streetAddress'] = ! empty( $data['street'] ) ? wp_strip_all_tags( (string) $data['street'] ) : null;
|
||||
$schema['address']['streetAddress'] = ! empty( $data['street'] ) ? wp_strip_all_tags( (string)$data['street'] ) : NULL;
|
||||
}
|
||||
|
||||
$schema['email'] = ! empty( $data['email'] ) ? wp_strip_all_tags( (string) $data['email'] ) : null;
|
||||
$schema['email'] = ! empty( $data['email'] ) ? wp_strip_all_tags( (string)$data['email'] ) : NULL;
|
||||
|
||||
$schema['gender'] = ! empty( $data['gender'] ) ? wp_strip_all_tags( (string) $data['gender'] ) : null;
|
||||
$schema['gender'] = ! empty( $data['gender'] ) ? wp_strip_all_tags( (string)$data['gender'] ) : NULL;
|
||||
|
||||
if ( isset( $data['dob'] ) && ! empty( $data['dob'] ) ) {
|
||||
$date_informat = gmdate( 'Y.m.d', strtotime( $data['dob'] ) );
|
||||
$schema['birthDate'] = wp_strip_all_tags( (string) $date_informat );
|
||||
$schema['birthDate'] = wp_strip_all_tags( (string)$date_informat );
|
||||
}
|
||||
|
||||
$schema['memberOf'] = ! empty( $data['member'] ) ? wp_strip_all_tags( (string) $data['member'] ) : null;
|
||||
$schema['memberOf'] = ! empty( $data['member'] ) ? wp_strip_all_tags( (string)$data['member'] ) : NULL;
|
||||
|
||||
$schema['nationality'] = ! empty( $data['nationality'] ) ? wp_strip_all_tags( (string) $data['nationality'] ) : null;
|
||||
$schema['nationality'] = ! empty( $data['nationality'] ) ? wp_strip_all_tags( (string)$data['nationality'] ) : NULL;
|
||||
|
||||
if ( isset( $data['image'] ) && ! empty( $data['image'] ) ) {
|
||||
$schema['image'] = BSF_AIOSRS_Pro_Schema_Template::get_image_schema( $data['image'] );
|
||||
}
|
||||
|
||||
$schema['jobTitle'] = ! empty( $data['job-title'] ) ? wp_strip_all_tags( (string) $data['job-title'] ) : null;
|
||||
$schema['jobTitle'] = ! empty( $data['job-title'] ) ? wp_strip_all_tags( (string)$data['job-title'] ) : NULL;
|
||||
|
||||
$schema['telephone'] = ! empty( $data['telephone'] ) ? wp_strip_all_tags( (string) $data['telephone'] ) : null;
|
||||
$schema['telephone'] = ! empty( $data['telephone'] ) ? wp_strip_all_tags( (string)$data['telephone'] ) : NULL;
|
||||
|
||||
if ( isset( $data['homepage-url'] ) && ! empty( $data['homepage-url'] ) ) {
|
||||
$schema['url'] = esc_url( $data['homepage-url'] );
|
||||
@@ -86,22 +86,22 @@ if ( ! class_exists( 'BSF_AIOSRS_Pro_Schema_Person' ) ) {
|
||||
if ( '1' === $contact_type['cp-schema-type'] && true === apply_filters( 'wp_schema_pro_contactpoint_person_schema_enabled', true ) && isset( $contact_type['contact-type'] ) && ! empty( $contact_type['contact-type'] ) ) {
|
||||
$schema['ContactPoint']['@type'] = 'ContactPoint';
|
||||
|
||||
$schema ['ContactPoint']['contactType'] = ! empty( $contact_type['contact-type'] ) ? wp_strip_all_tags( (string) $contact_type['contact-type'] ) : null;
|
||||
$schema ['ContactPoint']['telephone'] = ! empty( $contact_type['telephone'] ) ? wp_strip_all_tags( (string) $contact_type['telephone'] ) : null;
|
||||
$schema ['ContactPoint']['contactType'] = ! empty( $contact_type['contact-type'] ) ? wp_strip_all_tags( (string)$contact_type['contact-type'] ) : NULL;
|
||||
$schema ['ContactPoint']['telephone'] = ! empty( $contact_type['telephone'] ) ? wp_strip_all_tags( (string)$contact_type['telephone'] ) : NULL;
|
||||
if ( isset( $contact_type['url'] ) && ! empty( $contact_type['url'] ) ) {
|
||||
$schema ['ContactPoint']['url'] = esc_url( $contact_type['url'] );
|
||||
}
|
||||
$schema ['ContactPoint']['email'] = ! empty( $contact_type['email'] ) ? wp_strip_all_tags( (string) $contact_type['email'] ) : null;
|
||||
$schema ['ContactPoint']['email'] = ! empty( $contact_type['email'] ) ? wp_strip_all_tags( (string)$contact_type['email'] ) : NULL;
|
||||
if ( isset( $contact_type['areaServed'] ) && ! empty( $contact_type['areaServed'] ) ) {
|
||||
$language = explode( ',', $contact_type['areaServed'] );
|
||||
foreach ( $language as $key => $value ) {
|
||||
$schema ['ContactPoint']['areaServed'][ $key ] = wp_strip_all_tags( (string) $value );
|
||||
$schema ['ContactPoint']['areaServed'][ $key ] = wp_strip_all_tags( (string)$value );
|
||||
}
|
||||
}
|
||||
foreach ( $contact_point_type as $key => $value ) {
|
||||
$schema ['ContactPoint']['contactOption'][ $key ] = wp_strip_all_tags( (string) $value );
|
||||
$schema ['ContactPoint']['contactOption'][ $key ] = wp_strip_all_tags( (string)$value );
|
||||
}
|
||||
$schema ['ContactPoint']['availableLanguage'] = ! empty( $contact_type['availableLanguage'] ) ? wp_strip_all_tags( (string) $contact_type['availableLanguage'] ) : null;
|
||||
$schema ['ContactPoint']['availableLanguage'] = ! empty( $contact_type['availableLanguage'] ) ? wp_strip_all_tags( (string)$contact_type['availableLanguage'] ) : NULL;
|
||||
}
|
||||
|
||||
return apply_filters( 'wp_schema_pro_schema_person', $schema, $data, $post );
|
||||
|
||||
Reference in New Issue
Block a user