In the background field method the partition function is $$Z[J;\overline{\phi}]~:=~\int \! {\cal D}\frac{\phi}{\sqrt{\hbar}}~\exp\left\{ \frac{i}{\hbar} \left(S[\phi+\overline{\phi}]+J_k \phi^k\right)\right\}.\tag{A}$$ It has an interpretation as the sum of all$\color{red}{\rm all}$ Feynman diagrams with sources $J_k$ in a background $\overline{\phi}^k$, cf. e.g. eq. (3) in my Phys.SE answer here.
The linked cluster theorem. The generating functional for connected$\color{red}{\rm connected}$ diagrams $W_c[J;\overline{\phi}]$ satisfies $$ \exp\left\{ \frac{i}{\hbar} W_c[J;\overline{\phi}]\right\}~=~Z[J;\overline{\phi}]. \tag{B}$$ For a proof see e.g. this Phys.SE post.
Alternatively, we may define the generating functional for connected$\color{red}{\rm connected}$ diagrams as a sum of an appropriate subset of all diagrams $$\frac{i}{\hbar}W_c[\overline{\phi};J]~=~\int_\color{red}{\rm conn}\!{\cal D}\frac{\phi}{\sqrt{\hbar}}~\exp\left\{ \frac{i}{\hbar} \left(S[\phi+\overline{\phi}]+J_k \phi^k\right)\right\}.\tag{C}$$
The quantum effective action is defined as $$\Gamma[\phi_{\rm cl};\overline{\phi}]~=~W_c[J;\overline{\phi}]-J_k \phi_{\rm cl}^k~=~\Gamma[\phi_{\rm cl}+\overline{\phi}].\tag{D}$$$$\Gamma[\phi_{\rm cl};\overline{\phi}]~:=~W_c[J;\overline{\phi}]-J_k \phi_{\rm cl}^k~=~\Gamma[\phi_{\rm cl}+\overline{\phi}].\tag{D}$$ For the last equality in eq. (D), see Ref. [2]. The quantum effective action is the generating functional for connected 1PI$\color{red}{\text{connected 1PI}}$ diagrams, cf. e.g. this Phys.SE post.
Alternatively, we may define the generating functional for connected 1PI$\color{red}{\text{connected 1PI}}$ diagrams as a sum of an appropriate subset of all diagrams $$\frac{i}{\hbar}\Gamma[\overline{\phi};J]:=\int_\color{red}{\rm conn}^\color{red}{\rm 1PI}\!{\cal D}\frac{\phi}{\sqrt{\hbar}}~\exp\left\{ \frac{i}{\hbar} \left(S[\phi+\overline{\phi}]+J_k \phi^k\right)\right\}.\tag{16.1.17}$$ It follows that the 2 definitions (D) & (16.1.17) agree $$\Gamma[\overline{\phi};J\!=\!0] ~=~\Gamma[\phi_{\rm cl}\!=\!0;\overline{\phi}]~=~\Gamma[\overline{\phi}].\tag{E}$$$$\Gamma[\overline{\phi};J\!=\!0] ~=~\Gamma[\phi_{\rm cl}\!=\!0;\overline{\phi}]~\stackrel{(D)}{=}~\Gamma[\overline{\phi}].\tag{E}$$
References:
S. Weinberg, Quantum Theory of Fields, Vol. 2, 1995; Section 16.1.
M. Srednicki, QFT, 2007; Problem 21.3. A prepublication draft PDF file is available here.