hideEnabled() ) { return (bool) $show; } // Anyone who can edit content keeps the bar; only customers lose it. if ( current_user_can( 'edit_posts' ) ) { return (bool) $show; } return false; } /** * Whether the hide-admin-bar setting is on, defaulting off when unconfigured. * * @return bool */ private function hideEnabled(): bool { $settings = get_option( self::SETTINGS_OPTION ); if ( is_array( $settings ) && isset( $settings['frontend']['hide_admin_bar'] ) ) { return (bool) $settings['frontend']['hide_admin_bar']; } return false; } }