(b) A hold on the release of a defendant from custody shall only be ordered by a magistrate or judge if any of the following occurs: (1) A peace officer, as defined in Section 830, files a declaration executed under penalty of perjury setting forth probable cause to believe that the source of any consideration, pledge, security, deposit, or indemnification paid, given, made, or promised for its execution was feloniously obtained. (2) A prosecutor files a declaration executed under penalty of perjury setting forth probable cause to believe that the source of any consideration, pledge, security, deposit, or indemnification paid, given, made, or promised for its execution was feloniously obtained. A prosecutor shall have absolute civil immunity for executing a declaration pursuant to this paragraph. (3) The magistrate or judge has probable cause to believe that the source of any consideration, pledge, security, deposit, or indemnification paid, given, made, or promised for its execution was feloniously obtained.