(a) Association funds shall not be used for campaign purposes in connection with any association board election. Funds of the association shall not be used for campaign purposes in connection with any other association election except to the extent necessary to comply with duties of the association imposed by law.
(b) For the purposes of this section, "campaign purposes" includes, but is not limited to, the following:
(1) Expressly advocating the election or defeat of any candidate that is on the association election ballot.
(2) Including the photograph or prominently featuring the name of any candidate on a communication from the association or its board, excepting the ballot, ballot materials, or a communication that is legally required, within 30 days of an election. This is not a campaign purpose if the communication is one for which subdivision (a) of Section 5105 requires that equal access be provided to another candidate or advocate.