Revision featured image

The featured image is saved as postmeta, and by default, postmeta is not stored in revisions. This means that if anyone removes the featured image and saves (updates) their post, that postmeta is removed and not associated to the post anywhere. If you need to modify this behavior for the future, you can programmatically enable … Read more

Conditional delete metadata does not works

Try applying these and your code might work: Looking at the expressions $type_of_running == ‘manually_run’ and $type_of_running == ‘planned_run’, where you’re expecting get_post_meta() to return a single meta value, you should then set the 3rd parameter to true: // Set the 3rd param to true to get a single meta value. $type_of_running = get_post_meta($post_id, ‘spusteni_dotazovani’, … Read more

Gutenberg: Prevent links from being clickable in the block. Error: “Cannot destructure property ‘frameElement’ of ‘r’ as it is null.”

It seems that this helped: $is_backend = defined(‘REST_REQUEST’) && true === REST_REQUEST && ‘edit’ === filter_input(INPUT_GET, ‘context’, FILTER_SANITIZE_STRING); if ( $is_backend == true) { $url = “#void”; } else { $url = get_permalink( $post_id ); }; $link = ‘<a ‘ . $fontsizeattr . ‘ href=”‘ . $url . ‘” target=”_self”>’ . $game_title . ‘</a>’; return … Read more