0 ), $atts, 'acscf_form' ); $acscf_form_id = (int) $atts['id']; if ( ! $acscf_form_id || 'acscf_form' !== get_post_type( $acscf_form_id ) ) { return '

' . esc_html__( 'Form not found.', 'acs-contact-form' ) . '

'; } if ( 'publish' !== get_post_status( $acscf_form_id ) && ! current_user_can( 'edit_post', $acscf_form_id ) ) { return ''; } $template_path = ACSCF_PLUGIN_DIR . 'templates/form-template.php'; if ( ! file_exists( $template_path ) ) { return ''; } ob_start(); include $template_path; return (string) ob_get_clean(); } add_shortcode( 'acscf_form', 'acscf_form_shortcode' );