'', /* Normally left out: the connection knows which business this site is connected to and fills it in. It is an attribute at all so that a site connected to one business can still link to another's public form -- an agency's own site pointing at a client's waiver, which is a real thing people do. */ 'business' => '', 'label' => __( 'Sign now', 'signsealer' ), ), $atts, 'signsealer_sign' ); $workflow = sanitize_text_field( $atts['workflow'] ); $business = sanitize_text_field( $atts['business'] ); $c = SignSealer_Connection::get(); $own = isset( $c['slug'] ) ? (string) $c['slug'] : ''; if ( '' === $business ) { $business = $own; } if ( '' === $workflow || '' === $business ) { /* Nothing at all to a visitor, and a note to somebody who can fix it. A shortcode that renders an error on a live page tells a customer about a misconfiguration they cannot act on. */ return current_user_can( 'edit_posts' ) ? '
' . esc_html__( 'SignSealer: this shortcode needs a workflow, and this site to be connected — e.g. [signsealer_sign workflow="kayak-waiver"].', 'signsealer' ) . '
' : ''; } /* `/f/