_instance = $instance; return $instance; } /** * Checks if a widgets checkbox is checked. * * Checks first for a value then verifies the value = checked * * @param string $name - name of checkbox. * * @since 7.2.0 * * @return bool */ public function checked( $name ) { return isset( $this->_instance[ $name ] ) && 'checked' === $this->_instance[ $name ]; } /** * Hide an element if a checkbox is checked. * * @param string $checkbox - name of checkbox element which controls this one * @param bool $reverse - hide on check instead of show on check * * @since 7.2.0 * * @return void */ public function hide_element( $checkbox, $reverse = false ) { if ( $reverse ) { if ( $this->checked( $checkbox ) ) { ?>style="display:none"checked( $checkbox ) ) { ?>style="display:none"_instance[ $name ] ) ) { $this->_instance[ $name ] = null; } ?> _instance[ $name ] ); ?> />