What developers can build on: hooks, shortcodes, blocks, REST routes and WP-CLI commands, taken from each plugin’s own readme and from what this site has registered.
DoctorX e-Sign
- REST routes:
/doctorx-esign/v1,/doctorx-esign/v1/envelopes/(?P<id>\d+),/doctorx-esign/v1/envelopes/(?P<id>\d+)/draft,/doctorx-esign/v1/envelopes/(?P<id>\d+)/apply-layout,/doctorx-esign/v1/envelopes/(?P<id>\d+)/send,/doctorx-esign/v1/portal/open,/doctorx-esign/v1/portal/code,/doctorx-esign/v1/portal/verify,/doctorx-esign/v1/portal/document,/doctorx-esign/v1/portal/fields,/doctorx-esign/v1/portal/submit,/doctorx-esign/v1/portal/declineand 2 more
Add-ons (for example an industry add-on with its own forms) can build on DoctorX e-Sign without changing it. Wait for the doctorx_esign_loaded action, then use:
Placement templates (recognise an uploaded PDF and lay out its fields, coordinates only)
doctorx_esign_register_placement_matcher( $id, $callback, $priority )— your callback receives the document facts (envelope_id,title,file_name,sha256,page_count,page_sizes,info(PDF properties),text(callable: best-effort text of the first pages),bytes(callable)) and returnsnullor a layout:id,label,roles(key,label,routing_order),fields(type,pagefrom 1,x,y,w,has fractions of the displayed page from the top-left corner,role,required,label). The sender sees "This document was recognised as …" with an Apply button.- Filters
doctorx_esign_placement_matchersanddoctorx_esign_placement_match(final say over the recognised layout). doctorx_esign_apply_field_placements( $envelope_id, $layout, $args )— apply a layout to a draft; signers are matched by role key and missing ones are created. Actiondoctorx_esign_placements_applied.doctorx_esign_replace_draft_pdf( $envelope_id, $bytes, $args )— replace a draft's PDF (for example after filling in blanks or appending pages); signers and fields stay, fields on pages that no longer exist (or fromremove_fields_from_pageon) are removed, and the change is recorded in the audit trail. Actiondoctorx_esign_draft_pdf_replaced.
Document templates, field types, identity checks
- Filter
doctorx_esign_document_templates— documents offered on "Send a document" (label,file= path to a PDF you provide, optionalrolesandfields). - Filter
doctorx_esign_field_types— add field types (label,input,kindimage/text/check, defaultwidth/height,required,auto,validate). - Filter
doctorx_esign_verification_methods— add signer identity checks (label,input,requires,available,send,verify,promptcallbacks).
Workflow
- Filter
doctorx_esign_pre_send_checks— return extra messages to block sending, shown to the sender. doctorx_esign_log_event( $envelope_id, $event, $details, $signer_id )— add an audit-trail entry (it also appears on the certificate). Filterdoctorx_esign_audit_event_labelsfor labels; actiondoctorx_esign_audit_event_logged.- Filter
doctorx_esign_certificate_sections— change the completion certificate content. - Actions
doctorx_esign_envelope_created,_sent,_signer_signed,_completed,_declined,_voided,_expired,_deleted. doctorx_esign_create_envelope(),doctorx_esign_get_envelope(),doctorx_esign_get_meta()/doctorx_esign_update_meta()(your own data on a document),doctorx_esign_completed_pdf(),doctorx_esign_completion_certificate_pdf()(the separate certificate, when the document's owner did not allow adding pages).- Action
doctorx_esign_privacy_erased— after a personal data erasure request was handled.
Protected PDFs
DoctorX_ESign_PDF_Reader::permissions()says what the owner allows (modify,annotate,fill,assemble);DoctorX_ESign_PDF_Writer::can()asks the same. In a protected fileoverlay_page()needsmodifyandappend_page()needsassemble; they throw aDoctorX_ESign_PDF_Exceptionwith a readable message otherwise.DoctorX_ESign_PDF_Builder::place_values( $writer, $fields )adds values (text, check marks, images) the way the permissions allow: drawn onto the page, as annotations, or as read-only form fields. Use it to write into a draft that may be protected.
Admin
- Filter
doctorx_esign_settings_tabs— add a settings tab (label,render,save; nonce and capability are checked for you). - Action
doctorx_esign_admin_menu— add pages under the e-Sign menu. Actiondoctorx_esign_envelope_details— add a panel to a document's details screen. Actiondoctorx_esign_editor_panels— add a panel above the field editor of a draft. - Other filters:
doctorx_esign_email,doctorx_esign_user_can_access,doctorx_esign_client_ip,doctorx_esign_signature_subfilter,doctorx_esign_tsa_request_args,doctorx_esign_portal_csp,doctorx_esign_storage_base_dir,doctorx_esign_normalize_phone.
Capabilities: drx_esign_send, drx_esign_view_all, drx_esign_manage.
Self-tests that run with plain PHP (no WordPress): php tests/selftest-signing.php, php tests/selftest-encryption.php, php tests/selftest-storage.php and php tests/selftest-workflow.php.
Third-party code
- PDF.js 3.11.174 by Mozilla, Apache License 2.0 (assets/vendor/pdfjs/LICENSE), bundled; used to show PDFs in the editor and on the signing page.
- Dancing Script, Alex Brush, Great Vibes and Sacramento fonts, SIL Open Font License 1.1 (assets/fonts/OFL-*.txt), for typed signatures.
- Character widths of the standard Helvetica fonts from the Adobe Core 14 font metrics.