Gadzhidaudov Doctors Manager
A lightweight WordPress plugin for managing doctors, services, specialties, service categories, and doctor-service relationships.
by DG · github.com/gadzhidaudov/gadzhidaudov-doctors-manager
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/gadzhidaudov/gadzhidaudov-doctors-manager/archive/refs/heads/main.zipReadme
Gadzhidaudov Doctors Manager
Gadzhidaudov Doctors Manager is a lightweight, theme-independent WordPress plugin for managing Doctors, Services, Doctor Specialties, Service Categories, and doctor-service relationships. Themes remain responsible for presentation.
Current version: 0.1.0.
Features
- Doctor custom post type.
- Service custom post type.
- Doctor Specialties taxonomy.
- Service Categories taxonomy.
- Native WordPress structured metadata and admin editing.
- Service-to-Doctors relationships with ordered Doctor IDs.
- Automatically derived Doctor-to-Services relationships with no duplicate reverse metadata.
- REST-enabled content, taxonomies, and registered metadata.
- Public PHP integration API and developer hooks.
- Theme-independent architecture with no frontend CSS or templates.
- Non-destructive deactivation and uninstall behavior.
Philosophy
The plugin owns structured content and relationships. Themes own presentation. Gadzhidaudov Doctors Manager does not impose frontend templates, CSS, blocks, or page-builder requirements, and it does not require ACF.
Requirements
- WordPress 5.5 or later.
- PHP 7.1 or later.
Tested Environment
- WordPress 7.0
- PHP 8.2.18
- MySQL 8.0.30
Installation
- Download or clone this repository.
- Place the
gadzhidaudov-doctors-managerdirectory inwp-content/plugins/. - Activate Gadzhidaudov Doctors Manager from the WordPress Plugins screen.
- Use Doctors and Services in WordPress admin.
Content Model
Doctors
Native WordPress fields:
- Title: Doctor name.
- Editor: Full biography or content.
- Excerpt: Short biography.
- Featured Image: Doctor image.
- Menu Order: Optional ordering.
- Doctor Specialties: Taxonomy.
Structured DG fields:
- Position
- Experience
- Featured Doctor
- Education
- Career
- Additional Specializations
- Certificates / Credentials
Services
Native WordPress fields:
- Title
- Editor
- Excerpt
- Featured Image
- Menu Order
- Service Categories
Structured DG fields:
- Duration
- Price Note
- Key Facts
- Benefits
- Process Steps
- FAQ
Relationships
Service -> Doctors is the editable source of truth. A Service may have multiple Doctors, stored in the selected order.
Doctor -> Services is derived automatically from Service relationship data. No duplicate Doctor-side relationship is stored. Invalid, stale, or deleted Doctor IDs are ignored safely when relationship data is read.
Theme Integration
Gadzhidaudov Doctors Manager does not provide frontend templates in the current release. Themes may provide normal WordPress template-hierarchy files:
archive-doctor.php
single-doctor.php
taxonomy-doctor_specialty.php
archive-service.php
single-service.php
taxonomy-service_category.php
If these templates do not exist, WordPress uses the active theme's normal fallback hierarchy. Use DGDoctors\API for plugin-owned structured data and relationships; use native WordPress functions for titles, content, excerpts, featured images, permalinks, and menu order.
Public PHP API
Use DGDoctors\API for public access to DG structured fields, relationships, and taxonomy terms. The API returns data only and does not render HTML or templates. Do not depend on internal plugin classes.
get_doctor_field()
DGDoctors\API::get_doctor_field( $doctor_id, $field, $default = null )
Returns a supported Doctor field: a string for text fields, a boolean for is_featured, or $default for invalid posts, unsupported fields, or missing text values. Supported fields are position, experience, is_featured, education, career, specializations, and certificates.
$position = DGDoctors\API::get_doctor_field(
get_the_ID(),
'position'
);
if ( $position ) {
echo esc_html( $position );
}
get_service_field()
DGDoctors\API::get_service_field( $service_id, $field, $default = null )
Returns a supported Service string field or $default for invalid posts, unsupported fields, or missing values. Supported fields are duration, price_note, key_facts, benefits, process_steps, and faq.
get_doctor_ids_for_service()
DGDoctors\API::get_doctor_ids_for_service( $service_id )
Returns an ordered int[] of valid Doctor IDs for a Service, or an empty array when unavailable.
get_doctors_for_service()
DGDoctors\API::get_doctors_for_service( $service_id, $args = array() )
Returns published WP_Post[] Doctor objects in relationship order, with no fallback Doctors. The optional include_unpublished argument is honored only in authorized WordPress admin contexts.
$doctors = DGDoctors\API::get_doctors_for_service(
get_the_ID()
);
foreach ( $doctors as $doctor ) {
echo esc_html( get_the_title( $doctor ) );
}
get_services_for_doctor()
DGDoctors\API::get_services_for_doctor( $doctor_id, $args = array() )
Returns published WP_Post[] Service objects derived from Service-to-Doctor data, or an empty array. Optional arguments are reserved and do not currently change the public contract.
$services = DGDoctors\API::get_services_for_doctor(
get_the_ID()
);
foreach ( $services as $service ) {
echo esc_html( get_the_title( $service ) );
}
get_doctor_specialties()
DGDoctors\API::get_doctor_specialties( $doctor_id, $args = array() )
Returns WP_Term[] for a Doctor's doctor_specialty terms, or an empty array. Optional arguments support orderby and order.
get_service_categories()
DGDoctors\API::get_service_categories( $service_id, $args = array() )
Returns WP_Term[] for a Service's service_category terms, or an empty array. Optional arguments support orderby and order.
Public Hooks
dgdr_loadedaction: Fires once atafter_setup_themeafter normal plugin bootstrap. Use it to initialize an integration layer.dgdr_doctor_field_valuefilter: Filters a normalized Doctor field value. Arguments:$value,$field,$doctor_id. Return a value of the same expected type: boolean foris_featured, string for other Doctor fields.dgdr_service_field_valuefilter: Filters a normalized Service field string. Arguments:$value,$field,$service_id. Return a string.dgdr_doctor_ids_for_servicefilter: Filters valid Doctor IDs for a Service. Arguments:$doctor_ids,$service_id. Return an array of valid Doctor IDs.dgdr_services_for_doctorfilter: Filters derived Service results for a Doctor. Arguments:$services,$doctor_id. ReturnWP_Post[]Service objects.
REST API
Doctors, Services, Doctor Specialties, Service Categories, and registered DG metadata are REST enabled. Service related Doctor IDs are exposed through registered metadata as an integer array. Gadzhidaudov Doctors Manager does not currently create custom REST endpoints.
These fields are intended as content and integration data. Normal WordPress REST behavior and permissions apply.
Privacy
Gadzhidaudov Doctors Manager currently makes no external HTTP requests, performs no analytics or telemetry, sets no tracking cookies, sends no user data to external services, sends no emails, and stores no IP addresses itself.
Security
Please do not report security vulnerabilities in public issues. See SECURITY.md for the current reporting process.
License
Gadzhidaudov Doctors Manager is licensed under GPL-2.0-or-later.
Project Status
Gadzhidaudov Doctors Manager is currently in pre-1.0 development. Its core data, admin, relationship, REST, and PHP API functionality has been runtime tested, and the 0.1.0 WordPress.org submission package has completed its release audit.
Roadmap
- Broader compatibility testing.
- Plugin Check review.
- WordPress.org submission and review.
Contributing
See CONTRIBUTING.md for contribution guidance.