Skip to content

Instantly share code, notes, and snippets.

@nicmare
Created April 5, 2023 10:42
Show Gist options
  • Select an option

  • Save nicmare/d1e82d4b59787ff118a32a9ce950b475 to your computer and use it in GitHub Desktop.

Select an option

Save nicmare/d1e82d4b59787ff118a32a9ce950b475 to your computer and use it in GitHub Desktop.
<?php
function maybe_output_content_hook($content,$id){
if(get_post_type() != "set") return $content;
$is_unknown = (get_post_meta(get_the_ID(),"sync_status",1) == "unknown_item")??false;
if($is_unknown && get_the_title($id) == "Set-View")
$content = "";
if(!$is_unknown && get_the_title($id) == "Set-View: Syncing")
$content = "";
return $content;
}
add_filter("blocksy:pro:content-blocks:output-content",'maybe_output_content_hook',1,2);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment