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.
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.
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$.