handling fixing empty anchor
This commit is contained in:
parent
e0b2e362e3
commit
915f0aca68
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
$relatedPostId = $attributes['relatedPostId'] ?? null;
|
||||
$relatedPost = get_post($relatedPostId);
|
||||
$anchor = isset($attributes['anchor']) ? esc_html($attributes['anchor']) : "post-content-container-" . $relatedPostId;
|
||||
$anchor = !empty($attributes['anchor']) ? esc_html($attributes['anchor']) : "post-content-container-" . $attributes['relatedPostId'];
|
||||
$content = get_the_content(null, null, $relatedPost);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
$relatedPostId = $attributes['relatedPostId'] ?? null;
|
||||
$relatedPost = get_post($relatedPostId);
|
||||
$anchor = isset($attributes['anchor']) ? esc_html($attributes['anchor']) : "post-content-container-" . $relatedPostId;
|
||||
$anchor = !empty($attributes['anchor']) ? esc_html($attributes['anchor']) : "post-content-container-" . $attributes['relatedPostId'];
|
||||
$content = get_the_content(null, null, $relatedPost);
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user