Skip to content

Commit

Permalink
remove bogus fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ziodave committed Mar 15, 2024
1 parent 8ae8aeb commit a6b8290
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions src/includes/class-wordlift-post-to-jsonld-converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class Wordlift_Post_To_Jsonld_Converter extends Wordlift_Abstract_Post_To_Jsonld
* Wordlift_Post_To_Jsonld_Converter constructor.
*
* @param Wordlift_Entity_Type_Service $entity_type_service A {@link Wordlift_Entity_Type_Service} instance.
* @param Wordlift_User_Service $user_service A {@link Wordlift_User_Service} instance.
* @param Wordlift_Attachment_Service $attachment_service A {@link Wordlift_Attachment_Service} instance.
* @param Wordlift_User_Service $user_service A {@link Wordlift_User_Service} instance.
* @param Wordlift_Attachment_Service $attachment_service A {@link Wordlift_Attachment_Service} instance.
*
* @since 3.10.0
*/
Expand All @@ -69,9 +69,9 @@ public function new_instance_with_filters_disabled() {
* Convert the provided {@link WP_Post} to a JSON-LD array. Any entity reference
* found while processing the post is set in the $references array.
*
* @param int $post_id The post id.
* @param int $post_id The post id.
* @param array<Reference> $references An array of entity references.
* @param array $references_infos
* @param array $references_infos
*
* @return array A JSON-LD array.
* @since 3.10.0
Expand All @@ -96,6 +96,12 @@ public function convert( $post_id, &$references = array(), &$references_infos =
// Get the entity name.
$jsonld['headline'] = $post->post_title;

$custom_fields = $this->entity_type_service->get_custom_fields_for_post( $post_id );

if ( isset( $custom_fields ) ) {
$this->process_type_custom_fields( $jsonld, $custom_fields, $post, $references, $references_infos );
}

// Set the published and modified dates.
/*
* Set the `datePublished` and `dateModified` using the local timezone.
Expand Down Expand Up @@ -256,7 +262,7 @@ public function convert( $post_id, &$references = array(), &$references_infos =
* The JSON-LD fragment is generated using the {@link WP_User}'s data or
* the referenced entity if configured for the {@link WP_User}.
*
* @param int $author_id The author {@link WP_User}'s `id`.
* @param int $author_id The author {@link WP_User}'s `id`.
* @param array $references An array of referenced entities.
*
* @return string|array A JSON-LD structure.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function after_get_jsonld( $jsonld_arr ) {
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
@header( 'X-Wordlift-IncludeExclude-Stage-1: Condition Matched for ' . $jsonld_arr[0]['url'] );
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
@header( 'X-Wordlift-IncludeExclude-Note: To bypass the Include/Exclude filter add a `X-Wordlift-Bypass-Include-Exclude` HTTP request header with any value.' );
@header( 'X-Wordlift-IncludeExclude-Note: To bypass the Include/Exclude filter add a `x-wordlift-bypass-include-exclude` HTTP request header with any value.' );

// If the URLs are included then publish them.
if ( $this->plugin_enabled->are_urls_included( $jsonld_arr[0]['url'] ) ) {
Expand Down

0 comments on commit a6b8290

Please sign in to comment.