Directions
Okay, here's a list of the shortcodes provided by the Client Sync plugin, based on the provided code, along with their descriptions:
-
[cs__registration]
-
File: registration.php
-
Function: cs_registration_form_shortcode()
-
Description: Displays a user registration form. This form includes standard WordPress registration fields (username, email, password) and any "Client Custom Fields" that have been defined in the plugin settings. It handles form submission, validation (including required custom fields), and user creation.
-
-
[cs__appointment]
-
File: appointments.php
-
Function: cs_appointment_form_shortcode()
-
Description: Displays the main frontend appointment booking interface. This includes a FullCalendar for selecting available time slots, a form for "Appointment Custom Fields", and payment options if WooCommerce integration is enabled and configured. Logged-in users can select a slot and submit their appointment request. AJAX is used to load calendar events.
-
-
[cs__user_account]
-
File: user-account.php
-
Function: cs_user_account_shortcode()
-
Description: Allows logged-in users to view and update their account information. This includes standard fields like first name, last name, and email, as well as any "Client Custom Fields" defined in the plugin settings. It handles form submission and updates the user's profile data and meta.
-
-
[cs__view_notes]
-
File: notes.php
-
Function: cs_view_notes_shortcode()
-
Description: Displays a sortable and searchable table of the currently logged-in user's appointments. It shows appointment title, date, and time, and provides a "View Details" link for each appointment, which typically directs to a page using the [cs_appointment_detail] shortcode.
-
-
[cs__appointment_detail]
-
File: appointment-detail.php
-
Function: cs_appointment_detail_shortcode()
-
Description: Displays the detailed information for a single, specific appointment. It expects an appointment_id to be passed via a URL parameter (e.g., ?view_id=123). It shows the appointment title, date, time, notes (from post content), and any "Appointment Custom Fields" associated with that appointment. Access is restricted to the appointment author or users with sufficient permissions.
-
-
[cs__manager_appointments]
-
File: manager-appointments.php
-
Function: cs_manager_appointments_shortcode()
-
Description: Displays a list of all scheduled appointments, intended for users with manager-level capabilities (e.g., 'edit_others_posts'). The list includes client name, date, time, status, and provides "Edit" (links to WP admin edit screen) and "Delete" actions for each appointment.
-
-
[cs__calendar]
-
File: manager-calendar.php
-
Function: cs_calendar_shortcode()
-
Description: Displays a FullCalendar view of all booked appointments, primarily for users with 'manage_options' capability (administrators/managers). It provides a visual overview of the schedule. Clicking on an event can show details or link to the admin edit screen for that appointment.
-
-
[cs__manager_edit_appointment]
-
File: manager-edit-appointment.php
-
Function: cs_manager_edit_appointment_details_shortcode()
-
Description: Allows a manager (user with sufficient permissions) to edit the custom field details of a specific appointment on the frontend. It requires an appointment_id to be passed either as a shortcode attribute (e.g., [cs_manager_edit_appointment appointment_id="123"]) or as a URL parameter.
-
-
[cs__manager_edit_notes]
-
File: manager-edit-notes.php
-
Function: cs_manager_edit_notes_shortcode()
-
Description: Provides an interface for managers to edit the notes (stored in post_content) for appointments. It displays a list of appointments, and selecting one allows the manager to update its notes via a form on the same page.
-
-
[cs__display_user_info]
-
File: user-display.php
-
Function: cs_display_user_info_shortcode()
-
Description: Displays basic information (Welcome message with display name, and email address) for the currently logged-in user.
-
-
[cs__display_user_name]
-
File: user-display.php
-
Function: cs_display_user_name_shortcode()
-
Description: Displays a simple welcome message with the currently logged-in user's display name.
-
These shortcodes cover the main frontend functionalities of the Client Sync plugin, from user registration and account management to appointment booking, viewing, and administrative oversight.