Boolean Algebra map extension theorem Consider the following theorem.

Let $M$ and $N$ be linear spaces. Fix $S\subseteq M$. Fix $\eta:S\to N$. Assume $\eta$ has a linear extension with domain $\mathrm{span}(S)$. There exists a linear function $f$ from $M$ to $N$ such that $f\circ id_S=\eta$.

Question: Is the following true?

Let $A$ and $B$ be boolean algebras. Fix $S\subseteq A$. Fix $\eta:S\to B$. Assume $\eta$ has a boolean extension with domain $\mathrm{cl}_{\scriptscriptstyle A}(S)$. There exists a boolean function $f$ from $A$ to $B$ such that $f\circ id_S=\eta$.

The collection of all maps $\eta:S\to N$ with $S\subseteq M$ and $\eta$ has a linear extension is of finite character. Therefore (using the axiom of choice) one can find maximal elements extending $\eta$, one can show the first theorem above since their domains must be all of $M$.
The collection of all maps $\eta:S\to B$ with $S\subseteq A$ and $\eta$ has a boolean extension is of finite character as well. However ensuring any maximal element has domain $A$ eludes me, and I have almost convinced myself that the answer to my question is NO.
Any remarks pertaining to my question is welcome.
EDIT(1):
I recently became aware of Sikorski's extension theorem; my question seems to be true when $B$ is complete.
 A: First of all, the set $S$ is totally irrelevant to the question.  You might as well just let $C$ be the subalgebra generated by $S$ and start with a homomorphism $\eta: C\to B$ and ask whether it can be extended to a homomorphism $f:A\to B$.
The answer then is no in general.  In fact, for fixed $B$, such an extension exists for all $A,C,$ and $\eta$ iff $B$ is complete.  (In the language of category theory, the injective objects of the category of Boolean algebras are the complete Boolean algebras.)
The key to the proof is the following lemma.

Lemma: Let $A$ and $B$ be Boolean algebras, let $C\subseteq A$ be a subalgebra, and suppose $A$ is generated by $C$ together with a single element $a\in A$.  Let $\eta:C\to B$ be a homomorphism and let $b\in B$.  Then $\eta$ extends to a homomorphism $f:A\to B$ such that $f(a)=b$ iff $b\leq \eta(c)$ for all $c\in C$ such that $a\leq c$ and $b\geq \eta(c)$ for all $c\in C$ such that $a\geq c$.
Proof: It is clear that the latter condition is necessary since $f$ must preserve the order.  Conversely, suppose $b$ satisfies the latter condition.  Since $A$ is generated by $C$ and $a$, every element of $A$ can be written (not uniquely) in the form $x=(a\wedge c)\vee (\neg a\wedge d)$ for $c,d\in C$.  We thus define $f$ by $$f(x)=(b\wedge \eta(c))\vee (\neg b\wedge \eta(d)).$$
I first claim that this is well-defined: that is, if $c,d,c',d'\in C$ are such that $$(a\wedge c)\vee (\neg a\wedge d)=(a\wedge c')\vee (\neg a\wedge d')$$ then $$(b\wedge \eta(c))\vee (\neg b\wedge \eta(d))=(b\wedge \eta(c'))\vee (\neg b\wedge \eta(d')).$$  Note first that the given equality implies $a\wedge c=a\wedge c'$ and $\neg a\wedge d=\neg a\wedge d'$.  But the first equality is equivalent to $c\leftrightarrow c'\geq a$, which by hypothesis implies $\eta(c)\leftrightarrow \eta(c')\geq b$, which then implies $b\wedge\eta(c)=b\wedge\eta(c')$.  Similarly, the second equality is equivalent to $\neg(d\leftrightarrow d')\leq a$ which implies $\neg(\eta(d)\leftrightarrow \eta(d'))\leq b$ and thus $\neg b\wedge \eta(d)=\neg b\wedge \eta(d')$.  Thus $(b\wedge \eta(c))\vee (\neg b\wedge \eta(d))=(b\wedge \eta(c'))\vee (\neg b\wedge \eta(d'))$.
Now that we have that $f$ is well-defined, it is easy to see it is a homomorphism, since Boolean operations in $x$ induce corresponding operations on $c$ and $d$.  For instance, the fact that $f$ preserves joins follows immediately from the fact that $$((a\wedge c)\vee (\neg a\wedge d))\vee((a\wedge c')\vee (\neg a\wedge d'))=(a\wedge (c\vee c'))\vee (\neg a\wedge (d\vee d')).$$  Also note that $f$ extends $\eta$ since if $x\in C$ we can pick $c=d=x$.  Thus, $f$ is the desired extension.

Now observe that if $B$ is complete, an element $b$ satisfying the conditions of the Lemma always exists: just take $b=\bigvee S$ where $S=\{\eta(c):c\in C,c\leq a\}$.  Clearly $b$ satisfies $b\geq\eta(c)$ for all $c\in C$ such that $a\geq c$.  Moreover, if $a\leq c$, then $\eta(d)\leq \eta(c)$ for all $d\in D$ such that $d\leq a$ so $\eta(c)$ is an upper bound for $S$ and $b\leq \eta(c)$.
So, when $B$ is complete, by the Lemma we can always extend $\eta$ to one more generator.  Iterating this transfinitely we can thus extend a homomorphism from any subalgebra $C\subseteq A$.
On the other hand, suppose $B$ is not complete, so there is some subset $S\subseteq B$ which does not have a join.  We can then extend $B$ to an algebra $A$ by adjoining a new element $a$ which is a join of $S$.  (You can explicitly write out a combinatorial description of such an algebra $A$, or if, like me, you're too lazy for that, you can embed $B$ in a power set Boolean algebra and let $A$ be the subalgebra of the power set generated by $B$ and $\bigcup S$).  Letting $\eta:B\to B$ be the identity map, in order to extend $\eta$ to $A$ we would need an element $b\in B$ such that $b\geq c$ for all $c\in B$ such that $a\geq c$ and $b\leq c$ for all $c\in B$ such that $a\leq c$.  But such an element $b$ is exactly a join of $S$, since the first condition implies $b$ is an upper bound for $S$ and the second condition implies it is below every other upper bound for $S$.  Thus no such $b$ exists and $\eta$ cannot be extended to a homomorphism $f:A\to B$.
