-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
This is blowing up the editor:
wp-related-posts/src/RelatedPosts.php
Lines 330 to 338 in 0328b07
global $post; | |
$args = is_array($rawArgs) ? $rawArgs : $this->defaults; | |
$cleanArgs = []; | |
/** | |
* Ensure a $post is set and is a valid WP_POST object | |
*/ | |
$cleanArgs['post'] = array_key_exists('post', $args) ? $args['post'] : $post; | |
$cleanArgs['post'] = get_post($cleanArgs['post']); // returns a WP_Post or null |
Two things need to happen:
- 1. The editor block needs to send the post ID along with weights and post_types
- 2. The library needs to fall back to the most recently published post if nothing is provided.
Metadata
Metadata
Assignees
Labels
No labels