shouldRender()) {
return;
}
$bar->add_node([
'id' => 'noted',
'title' => 'Noted!',
'href' => '#',
'meta' => ['class' => 'noted-icon'],
]);
}
/**
* Output the floating panel HTML in the footer.
*/
public function renderFloatingPanel(): void
{
if (! $this->shouldRender()) {
return;
}
$postId = PostType::currentPostId();
?>
settings->userCanView()) {
return false;
}
if (! $this->settings->bool('show_global_panel', true)) {
return false;
}
return true;
}
/**
* Detect whether the current request is an admin block-editor screen.
*/
public static function isBlockEditorScreen(): bool
{
if (! is_admin() || ! function_exists('get_current_screen')) {
return false;
}
$screen = get_current_screen();
return $screen && method_exists($screen, 'is_block_editor') && $screen->is_block_editor();
}
}