API Documentation
Table of Contents
Namespaces
Constants
- BUDDYC_PLUGIN_DIR = plugin_dir_path(__FILE__)
- BUDDYC_PLUGIN_FILE = __FILE__
- BUDDYC_PLUGIN_NAME = 'BuddyClients Free'
- BUDDYC_PLUGIN_URL = plugin_dir_url(__FILE__)
- BUDDYC_PLUGIN_VERSION = '1.0.29'
- BUDDYC_URL = 'https://buddyclients.com'
- BUDDYC_VENDOR_DIR = BUDDYC_PLUGIN_DIR . 'vendor'
Functions
- buddyc_admin_filter_submission() : mixed
- Checks for admin table filter form submission.
- buddyc_admin_icon() : string
- Admin icons.
- buddyc_admin_info() : mixed
- Initializes the AdminInfo class.
- buddyc_dismiss_admin_tips() : mixed
- Dismisses admin tips.
- buddyc_admin_notice() : mixed
- Builds an admin notice.
- buddyc_admin_notice_id() : mixed
- Builds the ID for the admin notice.
- buddyc_admin_notice_dismissed() : mixed
- Checks whether an admin notice is dimissed.
- buddyc_dismiss_admin_notice() : mixed
- Dismisses an admin notice.
- buddyc_admin_table() : mixed
- Outputs an admin table.
- buddyc_add_preview_column() : array<string|int, mixed>
- Adds a preview column to the brief type taxonomy.
- buddyc_render_preview_button() : string
- Populates the new column with preview buttons.
- buddyc_handle_preview_request() : mixed
- Handles the preview request by redirecting to the preview.
- buddyc_create_preview_draft() : int|false
- Creates a draft post for preview based on the taxonomy term ID.
- buddyc_redirect_to_preview() : mixed
- Redirects to the draft post for preview.
- buddyc_delete_brief_preview_drafts() : mixed
- Deletes draft brief preview posts.
- buddyc_check_and_run_draft_deletion() : mixed
- Runs draft deletion before the main query is executed on the buddyc_brief archive page.
- buddyc_version_cache() : mixed
- Initializes VersionCache.
- buddyc_bookings_dashboard() : mixed
- Builds the bookings overview content.
- buddyc_dashboard_content() : mixed
- The callback for the top-level menu.
- buddyc_handle_booking_action() : mixed
- Handles booking actions (delete/update).
- buddyc_flush_permalinks() : mixed
- Flush permalinks
- buddyc_gutenberg_editor() : bool
- Checks if we're on a gutenberg page.
- buddyc_options() : mixed
- Generates an options array.
- buddyc_create_plugin_page() : mixed
- Handle create page button clicks.
- buddyc_plugin_page_links() : mixed
- Initializes the links added to the plugin page.
- buddyc_init_upgrade() : mixed
- Initializes the upgrade page.
- buddyc_init_welcome_message() : mixed
- Initializes the WelcomeMessage.
- buddyc_xprofile_filter_options() : mixed
- Builds array of all Xprofile filter field options.
- buddyclients_free() : BuddyClients|null
- Returns the one true BuddyClients Instance.
- buddyc_installed_notice() : mixed
- Displays an admin notice if multiple versions of BuddyClients are installed.
- buddyc_missing_bp_notice_free() : mixed
- Displays an admin notice when BuddyPress is missing.
- buddyc_groups_disabled_notice_free() : mixed
- Displays an admin notice when groups are not enabled.
- buddyc_delete_booking_intent_payments() : mixed
- Deletes all Payments associated with a BookingIntent.
- buddyc_delete_booking_intent_booked_services() : mixed
- Deletes all BookedServices associated with a BookingIntent.
- buddyc_get_booked_services_by() : mixed
- Retrieves all BookedServices for a specific property.
- buddyc_get_all_booked_services() : mixed
- Retrieves all BookedService objects.
- buddyc_get_all_payments() : mixed
- Retrieves all Payment objects.
- buddyc_payment_eligible() : mixed
- Updates payment status to eligible.
- buddyc_check_booking_status() : mixed
- Checks if all services for a booking intent are complete.
- buddyc_get_booking_intent() : mixed
- Retrieves a BookingIntent object.
- buddyc_get_all_booking_intents() : mixed
- Retrieves all BookingIntent objects.
- buddyc_update_booking_intent() : mixed
- Updates a BookingIntent object.
- buddyc_get_booking_intent_status() : mixed
- Retrieves the status of a BookingIntent.
- buddyc_get_booking_intent_payment_ids() : mixed
- Retrieves the IDs of the associated BookingPayments.
- buddyc_abandoned_booking_check() : mixed
- Checks whether to send an abandoned booking email.
- buddyc_booking_intent_services_complete() : BookingIntent
- Updates the BookingIntent when all services are complete.
- buddyc_deposits_enabled() : bool
- Checks whether deposits are enabled.
- buddyc_get_booking_payment() : BookingPayment
- Retrieves a BookingPayment by ID.
- buddyc_update_booking_payment() : mixed
- Updates a single property of a BookingPayment.
- buddyc_update_booking_payments() : mixed
- Updates a single property of multiple BookingPayment objects.
- buddyc_new_booking_payment() : mixed
- Creates a new BookingPayment.
- buddyc_new_booking_payment_id() : mixed
- Returns the ID of a new BookingPayment.
- buddyc_build_pay_link() : string
- Builds the url where clients can pay the fee.
- buddyc_get_unpaid_payment_data() : array<string|int, mixed>
- Builds an array of data for the open BookingPayments for a single BookingIntent.
- buddyc_get_payment_booking_status() : mixed
- Retrieves the status of the BookingIntent attached to a BookingPayment.
- buddyc_get_all_active_payments() : mixed
- Retrieves all active BookingPayment objects.
- buddyc_delete_booking_intent_booking_payments() : mixed
- Deletes all BookingPayment objects associated with a BookingIntent.
- buddyc_succeed_booking_payment() : mixed
- Updates a BookingPayment on successful Stripe payment.
- buddyc_booking_payments_due() : mixed
- Marks a BookingPayment as due.
- buddyc_unsucceed_booking_payment() : mixed
- Unsucceeds a BookingPayment. Used manually in the admin area.
- buddyc_handle_booking_payment_action() : mixed
- Handles booking actions (delete/update).
- buddyc_create_line_item() : mixed
- Handles AJAX calls to create line items.
- buddyc_get_project() : mixed
- Handles AJAX calls to retrieve project data.
- buddyc_booking_success() : mixed
- Handles a successful booking event.
- buddyc_payment_success() : mixed
- Handles a successful payment event.
- buddyc_team_filter_match() : bool
- Handles AJAX calls to check team filter matches.
- buddyc_team_select_help() : mixed
- Generates a help link describing the team selection process.
- buddyc_email_log_admin_notice() : mixed
- Generates an admin notice for the email log.
- buddyc_email_hooks() : mixed
- Defines email hooks.
- buddyc_email_enabled() : bool
- Checks whether a certain email is enabled.
- buddyc_get_email() : mixed
- Retrieves an Email object by ID.
- buddyc_get_all_emails() : mixed
- Retrieves all Email objects.
- buddyc_get_service_cache() : mixed
- Retrieves the cached value or a new instance of a service component class.
- buddyc_clear_service_cache_on_update() : mixed
- Clears the cache on post updates.
- buddyc_adjustment_option_count() : mixed
- Retrieves the current number of AdjustmentOptions attached to an Adjustment.
- buddyc_cache_get() : mixed
- Retrieves a cached value from the preferred caching method.
- buddyc_cache_set() : bool
- Stores a value in the cache.
- buddyc_cache_delete() : bool
- Deletes a cached value.
- buddyc_cache_clear_all() : mixed
- Clears all cached values belonging to this plugin (transients, options, and wp_cache).
- buddyc_license_handler() : mixed
- Initializes the LicenseHandler.
- buddyc_get_license() : mixed
- Retrieves the license from the LicenseHandler.
- buddyc_get_product() : mixed
- Retrieves the product from the LicenseHandler.
- buddyc_allowed_html_form() : mixed
- Defines allowed html for forms.
- buddyc_update_safe_styles() : mixed
- Adds safe styles to the Wordpress list.
- buddyc_allowed_html_signature() : mixed
- Defines allowed html for forms with signature script.
- buddyc_check_htaccess() : mixed
- Ensures the htaccess domain is up to date.
- buddyc_init_cleanup() : mixed
- Initializes Cleanup manager.
- buddyc_handle_version_switch() : mixed
- Handles switch between BuddyClients and BuddyClients Free.
- buddyc_handle_version_update() : mixed
- Handles an update to a new BuddyClients version.
- buddyc_alert() : mixed
- Outputs a front end alert.
- buddyc_testimonials_shortcode() : mixed
- Outputs the testimonials archive from a shortcode.
- buddyc_build_archive() : mixed
- Outputs the archive from a shortcode.
- buddyc_components_map() : mixed
- Defines component names.
- buddyc_component_name() : mixed
- Retrieves translatable component name.
- buddyc_contact_message() : mixed
- Generates a contact message based on provided settings.
- buddyc_copy_to_clipboard() : mixed
- Generates a copy to clipboard field.
- buddyc_checkout_create_account() : mixed
- Handle create account form submission.
- buddyc_validate_password_strength() : string|null
- Validates password strength.
- buddyc_generate_login_name() : mixed
- Generates login name.
- buddyc_download_links() : mixed
- Generates file download links.
- buddyc_file_names() : mixed
- Generates list of file names.
- buddyc_email_triggers() : mixed
- Initializes email triggers.
- buddyc_set_featured_image() : mixed
- Sets featured image for a post.
- buddyc_get_file_upload_id() : mixed
- Retrieves the upload ID of a File.
- buddyc_file_handler() : mixed
- Generates a new FileHandler instance.
- buddyc_file_object_handler() : mixed
- Initializes the File ObjectHandler.
- buddyc_build_form() : mixed
- Generates a new Form.
- buddyc_echo_form() : mixed
- Generates a new Form.
- buddyc_freelancer_mode() : mixed
- Checks for Freelancer Mode.
- buddyc_freelancer_id() : mixed
- Retrieves the Freelancer ID.
- buddyc_curr_url() : string
- Retrieves the current url.
- buddyc_truncate_content() : string
- Clips content by word count.
- buddyc_truncate_content_by_char() : string
- Clips content by character count.
- buddyc_format_status() : mixed
- Formats status value for display.
- buddyc_time_has_passed() : bool
- Checks whether a time has passed.
- buddyc_hex_to_rgba() : mixed
- Converts a hex code to rgba.
- buddyc_js_alert() : mixed
- Outputs a javascript alert.
- buddyc_inline_style() : mixed
- Adds inline styles to the front end.
- buddyc_inline_script() : mixed
- Adds inline scripts to the front end or admin area.
- buddyc_group_link() : mixed
- Outputs an html-formatted group link.
- buddyc_group_name() : mixed
- Outputs the group name.
- buddyc_update_booking_intent_email() : mixed
- Handles AJAX calls to update BookingIntent with newly entered email.
- buddyc_object_handler() : mixed
- Initializes an instance of the ObjectHandler class.
- buddyc_get_all_objects() : mixed
- Retrieves all items of a class.
- buddyc_param_manager() : mixed
- Creates a new ParamManager instance.
- buddyc_get_param() : mixed
- Retrieves the value of a url parameter.
- buddyc_get_all_params() : array<string|int, mixed>
- Retrieves all url parameters.
- buddyc_add_params() : string
- Retrieves all url parameters.
- buddyc_remove_param() : string
- Removes a url parameter.
- buddyc_strip_params() : string
- Removes all url parameters.
- buddyc_pdf() : mixed
- Generates a new PDF instance.
- buddyc_create_pdf() : int
- Generates a new PDF.
- buddyc_tcpdf_library() : mixed
- Includes the TCPDF library.
- buddyc_pdf_download_link() : mixed
- Generates a PDF download link.
- buddyc_get_popup_content() : mixed
- Retrieves help doc content.
- buddyc_help_link() : mixed
- Outputs a popup link.
- buddyc_output_popup() : mixed
- Manually outputs a popup.
- buddyc_update_popup() : mixed
- Updates popup content.
- buddyc_init_overlay() : mixed
- Initializes the overlay.
- buddyc_post_query() : mixed
- Performs a post query.
- buddyc_profile_link() : mixed
- Generates a link to a user's profile.
- buddyc_profile_ext_link() : string
- Retrieves profile extension link.
- buddyc_enqueue_recaptcha_script() : mixed
- Enqueues the Google reCAPTCHA script.
- buddyc_recaptcha_site_key() : mixed
- Fetches the reCAPTCHA site key.
- buddyc_recaptcha_secret_key() : mixed
- Fetches the reCAPTCHA secret key.
- buddyc_recaptcha_enabled() : mixed
- Checks that the reCAPTCHA keys exist and reCAPTCHA is enabled.
- buddyc_recaptcha_threshold() : mixed
- Fetches the reCAPTCHA threhold setting.
- buddyc_get_reference_post_id() : mixed
- Retrieves the ID of a reference post by key.
- buddyc_add_reference_post() : mixed
- Adds a new reference post.
- buddyc_cta_btn_text() : mixed
- Retrieves the CTA button text from settings.
- buddyc_cta_btn_url() : mixed
- Retrieves the CTA button url from settings.
- buddyc_enable_cta_btn() : mixed
- Checks if the CTA button is enabledin settings.
- buddyc_header_btn_info() : mixed
- Builds the array of info for localizing the header button script.
- buddyc_init_scheduler() : mixed
- Initializes the Scheduler.
- buddyc_schedule() : mixed
- Schedules a new event.
- buddyc_services_exist() : bool
- Checks whether any valid services exist.
- buddyc_adjustment_options() : mixed
- Retrieves the adjustment options for an adjustment post.
- buddyc_adjustment_options_count() : mixed
- Retrieves the number of adjustment options for an adjustment post.
- buddyc_get_setting() : mixed
- Retrieves the value of plugin settings.
- buddyc_update_setting() : mixed
- Retrieves the value of plugin settings.
- buddyc_help_post_types() : mixed
- Retrieves an array of help post type slugs.
- buddyc_color() : mixed
- Retrieves colors from settings.
- buddyc_get_page_link() : int|string
- Retrieves the permalink to a page defined in the plugin settings.
- buddyc_shortcodes_data() : array<string|int, mixed>
- Retrieves the array of shortcodes data.
- buddyc_get_shortcode() : mixed
- Retrieves the shortcode by key.
- buddyc_shortcode_exists() : bool
- Checks whether a shortcode is present in the page content.
- buddyc_any_shortcode_exists() : bool
- Checks whether any plugin shortcode is present in the page content.
- buddyc_btn() : mixed
- Generates button html.
- buddyc_buddyboss_theme() : bool
- Check for BuddyBoss theme.
- buddyc_icon() : string
- Outputs icon html.
- buddyc_icon_class() : string
- Outputs a string of icon classes
- buddyc_is_wp_theme() : bool
- Checks whether the active theme is a Wordpress default theme.
- init_template_manager() : mixed
- Initializes TemplateManager.
- buddyc_is_team() : str|bool
- Check if user is a team member.
- buddyc_is_client() : str|bool
- Check if user is a client.
- buddyc_is_admin() : bool
- Check if user is a site admin.
- buddyc_admin_id() : mixed
- Get site admin id.
- buddyc_all_team() : mixed
- Get all team members.
- buddyc_all_clients() : mixed
- Get all clients.
- buddyc_member_types() : array<string|int, mixed>
- Retrieves member types.
- buddyc_all_xprofile() : mixed
- Retrieves all xprofile fields.
- buddyc_update_filter_field() : mixed
- Initializes FilterField class on post updates.
- buddyc_roles_field_id() : mixed
- Retrieves Roles field ID.
- buddyc_roles_options() : mixed
- Builds array of options for roles xprofile field.
- buddyc_xprofile_manager() : mixed
- Initializes XprofileManager.
- buddyc_show_role_xprofile() : mixed
- Allows team to self-select roles.
- buddyc_no_roles_updates() : mixed
- Disallows manual updates to the roles field.
Constants
BUDDYC_PLUGIN_DIR
public
mixed
BUDDYC_PLUGIN_DIR
= plugin_dir_path(__FILE__)
BUDDYC_PLUGIN_FILE
public
mixed
BUDDYC_PLUGIN_FILE
= __FILE__
BUDDYC_PLUGIN_NAME
public
mixed
BUDDYC_PLUGIN_NAME
= 'BuddyClients Free'
BUDDYC_PLUGIN_URL
public
mixed
BUDDYC_PLUGIN_URL
= plugin_dir_url(__FILE__)
BUDDYC_PLUGIN_VERSION
public
mixed
BUDDYC_PLUGIN_VERSION
= '1.0.29'
BUDDYC_URL
public
mixed
BUDDYC_URL
= 'https://buddyclients.com'
BUDDYC_VENDOR_DIR
public
mixed
BUDDYC_VENDOR_DIR
= BUDDYC_PLUGIN_DIR . 'vendor'
Functions
buddyc_admin_filter_submission()
Checks for admin table filter form submission.
buddyc_admin_filter_submission() : mixed
Tags
buddyc_admin_icon()
Admin icons.
Use buddyc_icon.
buddyc_admin_icon(string $icon) : string
Parameters
- $icon : string
-
Icon key.
Tags
Return values
string —HTML-formatted icon.
buddyc_admin_info()
Initializes the AdminInfo class.
buddyc_admin_info(mixed $active_tab) : mixed
Parameters
- $active_tab : mixed
Tags
buddyc_dismiss_admin_tips()
Dismisses admin tips.
buddyc_dismiss_admin_tips() : mixed
Tags
buddyc_admin_notice()
Builds an admin notice.
buddyc_admin_notice(array<string|int, mixed> $args) : mixed
Parameters
- $args : array<string|int, mixed>
-
{ An array of arguments for building the admin notice.
@type string $repair_link The link to the repair page. @type string $repair_link_text Optional. The link text. Defaults to 'Repair'. @type string $message The message to display in the notice. @type bool $dismissable Optional. Whether the notice should be dismissable. Defaults to false. @type string $color Optional. The color of the notice. Accepts 'green', 'blue', 'orange', 'red'. Defaults to blue.}
Tags
buddyc_admin_notice_id()
Builds the ID for the admin notice.
buddyc_admin_notice_id(string $key) : mixed
Parameters
- $key : string
-
The unique key for the admin notice.
Tags
buddyc_admin_notice_dismissed()
Checks whether an admin notice is dimissed.
buddyc_admin_notice_dismissed(string $key) : mixed
Parameters
- $key : string
-
The key of the notice.
Tags
buddyc_dismiss_admin_notice()
Dismisses an admin notice.
buddyc_dismiss_admin_notice() : mixed
Tags
buddyc_admin_table()
Outputs an admin table.
buddyc_admin_table(string $key) : mixed
Parameters
- $key : string
-
The table key.
Tags
buddyc_add_preview_column()
Adds a preview column to the brief type taxonomy.
buddyc_add_preview_column(array<string|int, mixed> $columns) : array<string|int, mixed>
Parameters
- $columns : array<string|int, mixed>
-
The array of columns data.
Tags
Return values
array<string|int, mixed> —The modified array of columns data.
buddyc_render_preview_button()
Populates the new column with preview buttons.
buddyc_render_preview_button(string $content, string $column_name, int $term_id) : string
Parameters
- $content : string
-
The content of the column.
- $column_name : string
-
The name of the column.
- $term_id : int
-
The ID of the term.
Tags
Return values
string —The modified content of the column.
buddyc_handle_preview_request()
Handles the preview request by redirecting to the preview.
buddyc_handle_preview_request() : mixed
Tags
buddyc_create_preview_draft()
Creates a draft post for preview based on the taxonomy term ID.
buddyc_create_preview_draft(int $taxonomy_term_id) : int|false
Parameters
- $taxonomy_term_id : int
-
The taxonomy term ID.
Tags
Return values
int|false —The post ID of the draft, or false on failure.
buddyc_redirect_to_preview()
Redirects to the draft post for preview.
buddyc_redirect_to_preview(int $taxonomy_term_id) : mixed
Parameters
- $taxonomy_term_id : int
-
The taxonomy term ID.
Tags
buddyc_delete_brief_preview_drafts()
Deletes draft brief preview posts.
buddyc_delete_brief_preview_drafts() : mixed
Tags
buddyc_check_and_run_draft_deletion()
Runs draft deletion before the main query is executed on the buddyc_brief archive page.
buddyc_check_and_run_draft_deletion(WP_Query $query) : mixed
Parameters
- $query : WP_Query
-
The WP_Query instance (passed by reference).
Tags
buddyc_version_cache()
Initializes VersionCache.
buddyc_version_cache() : mixed
Tags
buddyc_bookings_dashboard()
Builds the bookings overview content.
buddyc_bookings_dashboard() : mixed
Tags
buddyc_dashboard_content()
The callback for the top-level menu.
buddyc_dashboard_content() : mixed
Tags
buddyc_handle_booking_action()
Handles booking actions (delete/update).
buddyc_handle_booking_action() : mixed
Tags
buddyc_flush_permalinks()
Flush permalinks
buddyc_flush_permalinks() : mixed
Tags
buddyc_gutenberg_editor()
Checks if we're on a gutenberg page.
buddyc_gutenberg_editor() : bool
Tags
Return values
boolbuddyc_options()
Generates an options array.
buddyc_options(string $key[, array<string|int, mixed> $args = null ]) : mixed
Parameters
- $key : string
-
The key denoting which options to generate. Accepts 'clients', 'team', 'affiliates', 'users', 'projects'
- $args : array<string|int, mixed> = null
-
Optional. An array of args to pass to the callback.
Tags
buddyc_create_plugin_page()
Handle create page button clicks.
buddyc_create_plugin_page() : mixed
Tags
buddyc_plugin_page_links()
Initializes the links added to the plugin page.
buddyc_plugin_page_links() : mixed
Tags
buddyc_init_upgrade()
Initializes the upgrade page.
buddyc_init_upgrade() : mixed
Tags
buddyc_init_welcome_message()
Initializes the WelcomeMessage.
buddyc_init_welcome_message() : mixed
Tags
buddyc_xprofile_filter_options()
Builds array of all Xprofile filter field options.
buddyc_xprofile_filter_options() : mixed
Tags
buddyclients_free()
Returns the one true BuddyClients Instance.
buddyclients_free() : BuddyClients|null
Tags
Return values
BuddyClients|null —The one true BuddyClients Instance.
buddyc_installed_notice()
Displays an admin notice if multiple versions of BuddyClients are installed.
buddyc_installed_notice() : mixed
Tags
buddyc_missing_bp_notice_free()
Displays an admin notice when BuddyPress is missing.
buddyc_missing_bp_notice_free() : mixed
Tags
buddyc_groups_disabled_notice_free()
Displays an admin notice when groups are not enabled.
buddyc_groups_disabled_notice_free() : mixed
Tags
buddyc_delete_booking_intent_payments()
Deletes all Payments associated with a BookingIntent.
buddyc_delete_booking_intent_payments(int $booking_intent_id) : mixed
Parameters
- $booking_intent_id : int
-
The ID of the BookingIntent.
Tags
buddyc_delete_booking_intent_booked_services()
Deletes all BookedServices associated with a BookingIntent.
buddyc_delete_booking_intent_booked_services(int $booking_intent_id) : mixed
Parameters
- $booking_intent_id : int
-
The ID of the BookingIntent.
Tags
buddyc_get_booked_services_by()
Retrieves all BookedServices for a specific property.
buddyc_get_booked_services_by(string $property, mixed $value) : mixed
Parameters
- $property : string
-
The property to search by.
- $value : mixed
-
The value to filter by.
Tags
buddyc_get_all_booked_services()
Retrieves all BookedService objects.
buddyc_get_all_booked_services() : mixed
Tags
buddyc_get_all_payments()
Retrieves all Payment objects.
buddyc_get_all_payments() : mixed
Tags
buddyc_payment_eligible()
Updates payment status to eligible.
buddyc_payment_eligible(int $payment_id, string $cancellation_window, string $time_scheduled) : mixed
Parameters
- $payment_id : int
-
The ID of the Payment.
- $cancellation_window : string
-
The cancellation window setting at the time of scheduling.
- $time_scheduled : string
-
The time the function was scheduled.
Tags
buddyc_check_booking_status()
Checks if all services for a booking intent are complete.
buddyc_check_booking_status(BookedService $booked_service) : mixed
Parameters
- $booked_service : BookedService
-
The last updated BookedService object.
Tags
buddyc_get_booking_intent()
Retrieves a BookingIntent object.
buddyc_get_booking_intent(int $booking_intent_id) : mixed
Parameters
- $booking_intent_id : int
-
The ID of the BookingIntent to retrieve.
Tags
buddyc_get_all_booking_intents()
Retrieves all BookingIntent objects.
buddyc_get_all_booking_intents() : mixed
Tags
buddyc_update_booking_intent()
Updates a BookingIntent object.
buddyc_update_booking_intent(int $ID, string $property, mixed $value) : mixed
Parameters
- $ID : int
-
The BookingIntent ID.
- $property : string
-
The property to update.
- $value : mixed
-
The new value for the property.
Tags
buddyc_get_booking_intent_status()
Retrieves the status of a BookingIntent.
buddyc_get_booking_intent_status(int $booking_intent_id) : mixed
Parameters
- $booking_intent_id : int
-
The ID of the BookingIntent to retrieve.
Tags
buddyc_get_booking_intent_payment_ids()
Retrieves the IDs of the associated BookingPayments.
buddyc_get_booking_intent_payment_ids(int $booking_intent_id) : mixed
Parameters
- $booking_intent_id : int
-
The ID of the BookingIntent.
Tags
buddyc_abandoned_booking_check()
Checks whether to send an abandoned booking email.
buddyc_abandoned_booking_check(int $booking_intent_id) : mixed
Parameters
- $booking_intent_id : int
-
The ID of the BookingIntent to check.
Tags
buddyc_booking_intent_services_complete()
Updates the BookingIntent when all services are complete.
buddyc_booking_intent_services_complete(int $booking_intent_id[, bool $services_complete = true ]) : BookingIntent
Parameters
- $booking_intent_id : int
-
The ID of the BookingIntent to update.
- $services_complete : bool = true
-
Optional. Whether all services are complete. Defaults to true.
Tags
Return values
BookingIntent —The updated BookingIntent object.
buddyc_deposits_enabled()
Checks whether deposits are enabled.
buddyc_deposits_enabled() : bool
Tags
Return values
bool —True if deposits are enabled, false if not.
buddyc_get_booking_payment()
Retrieves a BookingPayment by ID.
buddyc_get_booking_payment(int $payment_id) : BookingPayment
Parameters
- $payment_id : int
-
The ID of the BookingPayment.
Tags
Return values
BookingPayment —The BookingPayment object.
buddyc_update_booking_payment()
Updates a single property of a BookingPayment.
buddyc_update_booking_payment(int $ID, string $property, mixed $value) : mixed
Parameters
- $ID : int
-
The BookingPayment ID.
- $property : string
-
The property to update.
- $value : mixed
-
The new value for the property.
Tags
buddyc_update_booking_payments()
Updates a single property of multiple BookingPayment objects.
buddyc_update_booking_payments(array<string|int, mixed> $payment_ids, string $property, mixed $value) : mixed
Parameters
- $payment_ids : array<string|int, mixed>
-
The BookingPayment IDs.
- $property : string
-
The property to update.
- $value : mixed
-
The new value for the property.
Tags
buddyc_new_booking_payment()
Creates a new BookingPayment.
buddyc_new_booking_payment(BookingIntent $booking_intent, string $type) : mixed
Parameters
- $booking_intent : BookingIntent
-
The BookingIntent object.
- $type : string
-
The type of BookingPayment to create. Accepts 'deposit' and 'final'.
Tags
buddyc_new_booking_payment_id()
Returns the ID of a new BookingPayment.
buddyc_new_booking_payment_id(BookingIntent $booking_intent, string $type) : mixed
Parameters
- $booking_intent : BookingIntent
-
The BookingIntent object.
- $type : string
-
The type of BookingPayment to create. Accepts 'deposit' and 'final'.
Tags
buddyc_build_pay_link()
Builds the url where clients can pay the fee.
buddyc_build_pay_link(int $payment_id[, int $booking_intent_id = null ]) : string
Parameters
- $payment_id : int
-
The ID of the BookingPayment.
- $booking_intent_id : int = null
-
Optional. The ID of the BookingIntent.
Tags
Return values
string —The url to pay.
buddyc_get_unpaid_payment_data()
Builds an array of data for the open BookingPayments for a single BookingIntent.
buddyc_get_unpaid_payment_data(int $booking_intent_id) : array<string|int, mixed>
Parameters
- $booking_intent_id : int
-
The ID of the BookingIntent.
Tags
Return values
array<string|int, mixed> —{ An array of data for unpaid payments for the BookingIntent.
@type string $pay_link The url to submit payment.
@type string $type The type of payment (final or deposit).
@type string $type_label The formatted label for the type.
@type float $amount The amount of the payment.
@status string $status The status of the payment (paid or unpaid).
}
buddyc_get_payment_booking_status()
Retrieves the status of the BookingIntent attached to a BookingPayment.
buddyc_get_payment_booking_status(int $payment_id) : mixed
Parameters
- $payment_id : int
-
The ID of the BookingPayment.
Tags
buddyc_get_all_active_payments()
Retrieves all active BookingPayment objects.
buddyc_get_all_active_payments() : mixed
Active BookingPayment objects are attached to a succeeded BookingIntent.
Tags
buddyc_delete_booking_intent_booking_payments()
Deletes all BookingPayment objects associated with a BookingIntent.
buddyc_delete_booking_intent_booking_payments(int $booking_intent_id) : mixed
Parameters
- $booking_intent_id : int
-
The ID of the BookingIntent.
Tags
buddyc_succeed_booking_payment()
Updates a BookingPayment on successful Stripe payment.
buddyc_succeed_booking_payment(PaymentIntent $payment_intent) : mixed
Parameters
- $payment_intent : PaymentIntent
-
The PaymentIntent from Stripe.
Tags
buddyc_booking_payments_due()
Marks a BookingPayment as due.
buddyc_booking_payments_due(int $booking_intent_id[, bool $due = true ]) : mixed
Parameters
- $booking_intent_id : int
-
The ID of the BookingIntent.
- $due : bool = true
-
Optional. Whether the BookingPayments should be marked as due. Defaults to true.
Tags
buddyc_unsucceed_booking_payment()
Unsucceeds a BookingPayment. Used manually in the admin area.
buddyc_unsucceed_booking_payment(mixed $payment_id) : mixed
Parameters
- $payment_id : mixed
Tags
buddyc_handle_booking_payment_action()
Handles booking actions (delete/update).
buddyc_handle_booking_payment_action() : mixed
Tags
buddyc_create_line_item()
Handles AJAX calls to create line items.
buddyc_create_line_item() : mixed
Tags
buddyc_get_project()
Handles AJAX calls to retrieve project data.
buddyc_get_project() : mixed
Tags
buddyc_booking_success()
Handles a successful booking event.
buddyc_booking_success(int $booking_intent_id[, string $status = 'succeeded' ]) : mixed
Parameters
- $booking_intent_id : int
-
The ID of the successful BookingIntent.
- $status : string = 'succeeded'
-
Optional. The new status for the BookingIntent. Defaults to 'succeeded'.
Tags
buddyc_payment_success()
Handles a successful payment event.
buddyc_payment_success([int $booking_payment_id = null ][, PaymentIntent $payment_intent = null ]) : mixed
Parameters
- $booking_payment_id : int = null
-
The ID of the BookingPayment.
- $payment_intent : PaymentIntent = null
-
Optional. The Stripe PaymentIntent.
Tags
buddyc_team_filter_match()
Handles AJAX calls to check team filter matches.
buddyc_team_filter_match() : bool
Tags
Return values
bool —Whether the filters match.
buddyc_team_select_help()
Generates a help link describing the team selection process.
buddyc_team_select_help() : mixed
Tags
buddyc_email_log_admin_notice()
Generates an admin notice for the email log.
buddyc_email_log_admin_notice() : mixed
Tags
buddyc_email_hooks()
Defines email hooks.
buddyc_email_hooks() : mixed
Tags
buddyc_email_enabled()
Checks whether a certain email is enabled.
buddyc_email_enabled(string $key) : bool
Parameters
- $key : string
-
The email key.
Tags
Return values
bool —True if enabled, false if not.
buddyc_get_email()
Retrieves an Email object by ID.
buddyc_get_email(int $email_id) : mixed
Parameters
- $email_id : int
-
The ID of the Email.
Tags
buddyc_get_all_emails()
Retrieves all Email objects.
buddyc_get_all_emails() : mixed
Tags
buddyc_get_service_cache()
Retrieves the cached value or a new instance of a service component class.
buddyc_get_service_cache(mixed $class_key, mixed $post_id) : mixed
Parameters
- $class_key : mixed
- $post_id : mixed
Tags
buddyc_clear_service_cache_on_update()
Clears the cache on post updates.
buddyc_clear_service_cache_on_update(mixed $post_id, mixed $post) : mixed
Parameters
- $post_id : mixed
- $post : mixed
Tags
buddyc_adjustment_option_count()
Retrieves the current number of AdjustmentOptions attached to an Adjustment.
buddyc_adjustment_option_count(int $ID) : mixed
Parameters
- $ID : int
-
The ID of the Adjustment.
Tags
buddyc_cache_get()
Retrieves a cached value from the preferred caching method.
buddyc_cache_get(string $key[, string $group = 'default' ][, string $type = 'wp_cache' ]) : mixed
Parameters
- $key : string
-
The cache key.
- $group : string = 'default'
-
Optional. Cache group for wp_cache. Default is 'default'.
- $type : string = 'wp_cache'
-
Optional. Cache type: 'wp_cache', 'transient', or 'option'. Default is 'wp_cache'.
Tags
Return values
mixed —Cached value or false if not found.
buddyc_cache_set()
Stores a value in the cache.
buddyc_cache_set(string $key, mixed $value[, int $expires = HOUR_IN_SECONDS ][, string $group = 'default' ][, string $type = 'wp_cache' ]) : bool
Parameters
- $key : string
-
The cache key.
- $value : mixed
-
The value to store.
- $expires : int = HOUR_IN_SECONDS
-
Expiration time in seconds. Default is 1 hour.
- $group : string = 'default'
-
Optional. Cache group for wp_cache.
- $type : string = 'wp_cache'
-
Optional. Cache type: 'wp_cache', 'transient', or 'option'. Default is 'wp_cache'.
Tags
Return values
bool —True on success, false on failure.
buddyc_cache_delete()
Deletes a cached value.
buddyc_cache_delete(string $key[, string $group = 'default' ][, string $type = 'wp_cache' ]) : bool
Parameters
- $key : string
-
The cache key.
- $group : string = 'default'
-
Optional. Cache group for wp_cache.
- $type : string = 'wp_cache'
-
Optional. Cache type: 'wp_cache', 'transient', or 'option'. Default is 'wp_cache'.
Tags
Return values
bool —True on success, false on failure.
buddyc_cache_clear_all()
Clears all cached values belonging to this plugin (transients, options, and wp_cache).
buddyc_cache_clear_all() : mixed
Tags
buddyc_license_handler()
Initializes the LicenseHandler.
buddyc_license_handler() : mixed
Tags
buddyc_get_license()
Retrieves the license from the LicenseHandler.
buddyc_get_license() : mixed
Tags
buddyc_get_product()
Retrieves the product from the LicenseHandler.
buddyc_get_product() : mixed
Tags
buddyc_allowed_html_form()
Defines allowed html for forms.
buddyc_allowed_html_form() : mixed
Tags
buddyc_update_safe_styles()
Adds safe styles to the Wordpress list.
buddyc_update_safe_styles() : mixed
Tags
buddyc_allowed_html_signature()
Defines allowed html for forms with signature script.
buddyc_allowed_html_signature() : mixed
Tags
buddyc_check_htaccess()
Ensures the htaccess domain is up to date.
buddyc_check_htaccess() : mixed
Tags
buddyc_init_cleanup()
Initializes Cleanup manager.
buddyc_init_cleanup() : mixed
Tags
buddyc_handle_version_switch()
Handles switch between BuddyClients and BuddyClients Free.
buddyc_handle_version_switch() : mixed
Tags
buddyc_handle_version_update()
Handles an update to a new BuddyClients version.
buddyc_handle_version_update() : mixed
Tags
buddyc_alert()
Outputs a front end alert.
buddyc_alert(string $content[, int|null $priority = null ]) : mixed
Parameters
- $content : string
-
The content to display.
- $priority : int|null = null
-
Optional. The priority of the alert.
Tags
buddyc_testimonials_shortcode()
Outputs the testimonials archive from a shortcode.
buddyc_testimonials_shortcode(mixed $atts) : mixed
Parameters
- $atts : mixed
Tags
buddyc_build_archive()
Outputs the archive from a shortcode.
buddyc_build_archive(string $post_type[, array<string|int, mixed> $args = [] ]) : mixed
Parameters
- $post_type : string
-
The slug of the post type.
- $args : array<string|int, mixed> = []
-
{ An optional array of args.
@type string $tags An associative array of tags to filter by.}
Tags
buddyc_components_map()
Defines component names.
buddyc_components_map() : mixed
Tags
buddyc_component_name()
Retrieves translatable component name.
buddyc_component_name(string $component) : mixed
Parameters
- $component : string
-
The component.
Tags
buddyc_contact_message()
Generates a contact message based on provided settings.
buddyc_contact_message([bool $site_name = false ][, bool $lowercase = false ]) : mixed
Parameters
- $site_name : bool = false
-
Whether to include the site name. Defaults to false and uses 'us'.
- $lowercase : bool = false
-
Whether to format as lowercase. Defaults to formatting as full sentence.
Tags
buddyc_copy_to_clipboard()
Generates a copy to clipboard field.
buddyc_copy_to_clipboard(string $content[, bool $input = true ]) : mixed
Parameters
- $content : string
-
The content to copy.
- $input : bool = true
-
Optional. Whether to generate an input field. Defaults to true.
Tags
buddyc_checkout_create_account()
Handle create account form submission.
buddyc_checkout_create_account() : mixed
Called by AJAX script.
Tags
buddyc_validate_password_strength()
Validates password strength.
buddyc_validate_password_strength(string $password) : string|null
Checks if the password meets strength requirements.
Parameters
- $password : string
-
The password to validate.
Tags
Return values
string|null —Returns error message if validation fails, otherwise null.
buddyc_generate_login_name()
Generates login name.
buddyc_generate_login_name(mixed $first_name) : mixed
Checks against existing users to ensure unique handle.
Parameters
- $first_name : mixed
Tags
buddyc_download_links()
Generates file download links.
buddyc_download_links(array<string|int, mixed> $file_ids[, bool $show_file_name = false ]) : mixed
Parameters
- $file_ids : array<string|int, mixed>
-
An array of file IDs.
- $show_file_name : bool = false
-
Optional. Whether to display the file name. Defaults to false.
Tags
buddyc_file_names()
Generates list of file names.
buddyc_file_names(array<string|int, mixed> $file_ids[, bool $comma_separated = false ]) : mixed
Parameters
- $file_ids : array<string|int, mixed>
-
An array of file IDs.
- $comma_separated : bool = false
-
Optional. Whether to display the file names as a comma separated list or with line breaks. Defaults to false.
Tags
buddyc_email_triggers()
Initializes email triggers.
buddyc_email_triggers() : mixed
Tags
buddyc_set_featured_image()
Sets featured image for a post.
buddyc_set_featured_image(int $post_id, File $file) : mixed
Parameters
- $post_id : int
-
The ID of the post.
- $file : File
-
The File object.
Tags
buddyc_get_file_upload_id()
Retrieves the upload ID of a File.
buddyc_get_file_upload_id(int $file_id) : mixed
Parameters
- $file_id : int
-
The ID of the File.
Tags
buddyc_file_handler()
Generates a new FileHandler instance.
buddyc_file_handler(mixed $files, array<string|int, mixed> $args) : mixed
Parameters
- $files : mixed
- $args : array<string|int, mixed>
-
{ Array of arguments for File creation.
@type bool $temporary Whether the files are temporary. @type ?int $user_id File owner ID. @type ?int $project_id Associated project ID.}
Tags
buddyc_file_object_handler()
Initializes the File ObjectHandler.
buddyc_file_object_handler() : mixed
Tags
buddyc_build_form()
Generates a new Form.
buddyc_build_form(array<string|int, mixed> $args) : mixed
Parameters
- $args : array<string|int, mixed>
-
{ An array of arguments to create the form.
@type string $key The form key. @type callable $fields_callback The callback to generate the form fields. @type string $submission_class The class that handles the form submission. @type bool $submit_button Optional. Whether to include a submit button. @type string $submit_text Optional. The text of the submit button. Defaults to 'Submit'. @type string $submit_classes Optional. Classes to apply to the submit button. @type array $values Optional. A keyed array of values to populate the form fields. @type int $avatar Optional. Creates a user avatar above the form. @type string $form_classes Optional. Classes to apply to the form.}
Tags
buddyc_echo_form()
Generates a new Form.
buddyc_echo_form(array<string|int, mixed> $args) : mixed
Parameters
- $args : array<string|int, mixed>
-
{ An array of arguments to create the form.
@type string $key The form key. @type callable $fields_callback The callback to generate the form fields. @type string $submission_class The class that handles the form submission. @type bool $submit_button Optional. Whether to include a submit button. @type string $submit_text Optional. The text of the submit button. Defaults to 'Submit'. @type string $submit_classes Optional. Classes to apply to the submit button. @type array $values Optional. A keyed array of values to populate the form fields. @type int $avatar Optional. Creates a user avatar above the form. @type string $form_classes Optional. Classes to apply to the form.}
Tags
buddyc_freelancer_mode()
Checks for Freelancer Mode.
buddyc_freelancer_mode() : mixed
Tags
buddyc_freelancer_id()
Retrieves the Freelancer ID.
buddyc_freelancer_id() : mixed
Tags
buddyc_curr_url()
Retrieves the current url.
buddyc_curr_url() : string
Tags
Return values
string —The current url, or an empty string on failure.
buddyc_truncate_content()
Clips content by word count.
buddyc_truncate_content(string $content, int $word_count) : string
Parameters
- $content : string
-
Content to truncate.
- $word_count : int
-
Number of words.
Tags
Return values
string —$content Truncated content.
buddyc_truncate_content_by_char()
Clips content by character count.
buddyc_truncate_content_by_char(string $content, int $char_count) : string
Parameters
- $content : string
-
Content to truncate.
- $char_count : int
-
Number of characters.
Tags
Return values
string —$content Truncated content.
buddyc_format_status()
Formats status value for display.
buddyc_format_status(string $value[, mixed $add_class = null ]) : mixed
Parameters
- $value : string
-
The value to format.
- $add_class : mixed = null
Tags
buddyc_time_has_passed()
Checks whether a time has passed.
buddyc_time_has_passed(string|int $target_time) : bool
Parameters
- $target_time : string|int
-
The time to check.
Tags
Return values
bool —True if the time has passed, false if not.
buddyc_hex_to_rgba()
Converts a hex code to rgba.
buddyc_hex_to_rgba(string $hex[, int $alpha = 0.6 ]) : mixed
Parameters
- $hex : string
-
The hex code to convert.
- $alpha : int = 0.6
-
Optional. The alpha value for transparency. Defaults to 0.6.
Tags
buddyc_js_alert()
Outputs a javascript alert.
buddyc_js_alert(string $message[, bool $admin = false ]) : mixed
Parameters
- $message : string
-
The alert text.
- $admin : bool = false
-
Optional. Whether to also apply the script to the admin area. Defaults to false (i.e., front end).
Tags
buddyc_inline_style()
Adds inline styles to the front end.
buddyc_inline_style(string $css[, bool $admin = false ]) : mixed
Parameters
- $css : string
-
The CSS to add.
- $admin : bool = false
-
Optional. Whether to also apply the styles to the admin area. Defaults to false.
Note: This function should be called on a hook that runs before
wp_enqueue_scripts, such asinit, to ensure the styles are properly enqueued and applied.
Tags
buddyc_inline_script()
Adds inline scripts to the front end or admin area.
buddyc_inline_script(string $script[, bool $admin = false ][, bool $direct = false ]) : mixed
Parameters
- $script : string
-
The JavaScript to add.
- $admin : bool = false
-
Optional. Whether to also apply the script to the admin area. Defaults to false (i.e., front end).
- $direct : bool = false
-
Optional. Whether to call the inline script function immediately, as opposed to using a hook. Defaults to false.
Tags
buddyc_group_link()
Outputs an html-formatted group link.
buddyc_group_link(int $group_id) : mixed
Parameters
- $group_id : int
-
The ID of the group.
Tags
buddyc_group_name()
Outputs the group name.
buddyc_group_name(int $group_id) : mixed
Parameters
- $group_id : int
-
The ID of the group.
Tags
buddyc_update_booking_intent_email()
Handles AJAX calls to update BookingIntent with newly entered email.
buddyc_update_booking_intent_email() : mixed
Tags
buddyc_object_handler()
Initializes an instance of the ObjectHandler class.
buddyc_object_handler(string $class) : mixed
Parameters
- $class : string
-
The fully qualified class name.
Tags
buddyc_get_all_objects()
Retrieves all items of a class.
buddyc_get_all_objects(string $class) : mixed
Parameters
- $class : string
-
The fully qualified class name.
Tags
buddyc_param_manager()
Creates a new ParamManager instance.
buddyc_param_manager([string $url = null ]) : mixed
Parameters
- $url : string = null
-
Optional. The url to modify. Defaults to the current url.
Tags
buddyc_get_param()
Retrieves the value of a url parameter.
buddyc_get_param(string $param[, string $url = null ]) : mixed
Parameters
- $param : string
-
The key of the parameter to retrieve.
- $url : string = null
-
Optional. The url to modify. Defaults to the current url.
Tags
buddyc_get_all_params()
Retrieves all url parameters.
buddyc_get_all_params([string $url = null ]) : array<string|int, mixed>
Parameters
- $url : string = null
-
Optional. The url to modify. Defaults to the current url.
Tags
Return values
array<string|int, mixed> —An associative array of all url parameters.
buddyc_add_params()
Retrieves all url parameters.
buddyc_add_params(array<string|int, mixed> $params[, string $url = null ]) : string
Parameters
- $params : array<string|int, mixed>
-
An associative array of params and values.
- $url : string = null
-
Optional. The url to modify. Defaults to the current url.
Tags
Return values
string —The new url.
buddyc_remove_param()
Removes a url parameter.
buddyc_remove_param(string $param[, string $url = null ]) : string
Parameters
- $param : string
-
The param to remove.
- $url : string = null
-
Optional. The url to modify. Defaults to the current url.
Tags
Return values
string —The new url.
buddyc_strip_params()
Removes all url parameters.
buddyc_strip_params([string $url = null ]) : string
Parameters
- $url : string = null
-
Optional. The url to modify. Defaults to the current url.
Tags
Return values
string —The new url.
buddyc_pdf()
Generates a new PDF instance.
buddyc_pdf([int $ID = null ]) : mixed
Parameters
- $ID : int = null
-
Optional. The ID of the PDF.
Tags
buddyc_create_pdf()
Generates a new PDF.
buddyc_create_pdf(array<string|int, mixed> $args) : int
Parameters
- $args : array<string|int, mixed>
-
{ An array of arguments for generating the PDF content.
@int $user_id Optional. The user to whom the PDF belongs. @string $type The type of PDF document. @string $title The title of the PDF document. @string $content The primary content to include in the PDF. @array $items Optional. An array of strings to append to the document. @string $image_path Optional. The file path to an image to include.}
Tags
Return values
int —The ID of the newly created PDF.
buddyc_tcpdf_library()
Includes the TCPDF library.
buddyc_tcpdf_library() : mixed
Tags
buddyc_pdf_download_link()
Generates a PDF download link.
buddyc_pdf_download_link(int $pdf_id) : mixed
Parameters
- $pdf_id : int
-
The ID of the PDF file.
Tags
buddyc_get_popup_content()
Retrieves help doc content.
buddyc_get_popup_content() : mixed
AJAX callback.
Tags
buddyc_help_link()
Outputs a popup link.
buddyc_help_link([int $post_id = null ][, string $link_text = null ][, string $url = null ][, mixed $raw_content = null ]) : mixed
Parameters
- $post_id : int = null
-
The ID of the post from which to retrieve the content.
- $link_text : string = null
-
Optional. The text to display. Defaults to ? icon.
- $url : string = null
-
Optional. The full url of the page to display.
- $raw_content : mixed = null
Tags
buddyc_output_popup()
Manually outputs a popup.
buddyc_output_popup(mixed $content) : mixed
Parameters
- $content : mixed
-
string The content of the popup.
Tags
buddyc_update_popup()
Updates popup content.
buddyc_update_popup(mixed $content) : mixed
Parameters
- $content : mixed
-
string The content of the popup.
Tags
buddyc_init_overlay()
Initializes the overlay.
buddyc_init_overlay() : mixed
Tags
buddyc_post_query()
Performs a post query.
buddyc_post_query(string $post_type[, array<string|int, mixed> $args = [] ]) : mixed
Parameters
- $post_type : string
-
The slug of the post type.
- $args : array<string|int, mixed> = []
-
} An optional array of args for the post query.
@array array $meta An associative array of meta keys and values. @string string $compare The compare operator for the meta queries. Defaults to '='. @array array $tax An associative arary of tax names and tags. @int int $max The maximum number of posts to retrieve.}
Tags
buddyc_profile_link()
Generates a link to a user's profile.
buddyc_profile_link([array<string|int, mixed> $args = null ]) : mixed
Parameters
- $args : array<string|int, mixed> = null
-
{ An array of arguments to build the link.
@int $user_id Optional. The ID of the user. @string $slug Optional. The slug to append to the profile link.}
Tags
buddyc_profile_ext_link()
Retrieves profile extension link.
buddyc_profile_ext_link(mixed $key[, int $user_id = null ]) : string
Parameters
- $key : mixed
- $user_id : int = null
-
Optional. The ID of the user. Defaults to current user.
Tags
Return values
string —The url to the profile extension tab.
buddyc_enqueue_recaptcha_script()
Enqueues the Google reCAPTCHA script.
buddyc_enqueue_recaptcha_script() : mixed
Tags
buddyc_recaptcha_site_key()
Fetches the reCAPTCHA site key.
buddyc_recaptcha_site_key() : mixed
Tags
buddyc_recaptcha_secret_key()
Fetches the reCAPTCHA secret key.
buddyc_recaptcha_secret_key() : mixed
Tags
buddyc_recaptcha_enabled()
Checks that the reCAPTCHA keys exist and reCAPTCHA is enabled.
buddyc_recaptcha_enabled() : mixed
Tags
buddyc_recaptcha_threshold()
Fetches the reCAPTCHA threhold setting.
buddyc_recaptcha_threshold() : mixed
Defaults to 0.5 (0 most suspicous, 1.0 least suspicious).
Tags
buddyc_get_reference_post_id()
Retrieves the ID of a reference post by key.
buddyc_get_reference_post_id(string $key) : mixed
Parameters
- $key : string
-
The key of the post ID to retrieve.
Tags
buddyc_add_reference_post()
Adds a new reference post.
buddyc_add_reference_post(string $key, array<string|int, mixed> $args) : mixed
Parameters
- $key : string
-
The unique key for the reference post.
- $args : array<string|int, mixed>
-
{ An array of arguments for creating the new reference post.
@string $content The content of the post. @string $title The title of the post.}
Tags
buddyc_cta_btn_text()
Retrieves the CTA button text from settings.
buddyc_cta_btn_text() : mixed
Tags
buddyc_cta_btn_url()
Retrieves the CTA button url from settings.
buddyc_cta_btn_url() : mixed
Tags
buddyc_enable_cta_btn()
Checks if the CTA button is enabledin settings.
buddyc_enable_cta_btn() : mixed
Tags
buddyc_header_btn_info()
Builds the array of info for localizing the header button script.
buddyc_header_btn_info() : mixed
Tags
buddyc_init_scheduler()
Initializes the Scheduler.
buddyc_init_scheduler() : mixed
Tags
buddyc_schedule()
Schedules a new event.
buddyc_schedule(array<string|int, mixed> $args) : mixed
Parameters
- $args : array<string|int, mixed>
-
{ An array of args to construct the scheduled event.
@param string $event_key The event key. @param string $timeout The timeout timestamp. @param array $args Optional. An array of args to pass to the callback. Defaults to empty array. @param string|int $identifier Optional. An identifier to prevent duplicate events.}
Tags
buddyc_services_exist()
Checks whether any valid services exist.
buddyc_services_exist() : bool
Tags
Return values
bool —True if services exist, false if not.
buddyc_adjustment_options()
Retrieves the adjustment options for an adjustment post.
buddyc_adjustment_options(mixed $post_id) : mixed
Parameters
- $post_id : mixed
Tags
buddyc_adjustment_options_count()
Retrieves the number of adjustment options for an adjustment post.
buddyc_adjustment_options_count(mixed $post_id) : mixed
Parameters
- $post_id : mixed
Tags
buddyc_get_setting()
Retrieves the value of plugin settings.
buddyc_get_setting(string $settings_group[, string $settings_key = null ]) : mixed
Parameters
- $settings_group : string
-
The settings group to retrieve.
- $settings_key : string = null
-
Optional. The specific setting to retrieve.
Tags
buddyc_update_setting()
Retrieves the value of plugin settings.
buddyc_update_setting(string $settings_group, string $settings_key, mixed $value) : mixed
Parameters
- $settings_group : string
-
The settings group.
- $settings_key : string
-
The specific setting field.
- $value : mixed
-
The value to set.
Tags
buddyc_help_post_types()
Retrieves an array of help post type slugs.
buddyc_help_post_types() : mixed
Tags
buddyc_color()
Retrieves colors from settings.
buddyc_color(string $type) : mixed
Parameters
- $type : string
-
The color type to retrieve. Accepts 'primary', 'accent', and 'tertiary'.
Tags
buddyc_get_page_link()
Retrieves the permalink to a page defined in the plugin settings.
buddyc_get_page_link(string $page_key[, bool $return_link = true ]) : int|string
Parameters
- $page_key : string
-
The key of the page to retrieve.
- $return_link : bool = true
-
Optional. Whether to return the link or the page ID. Defaults to true and returns permalink.
Tags
Return values
int|string —The permalink or the page ID.
buddyc_shortcodes_data()
Retrieves the array of shortcodes data.
buddyc_shortcodes_data() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —An associative array of shortcode names and data.
buddyc_get_shortcode()
Retrieves the shortcode by key.
buddyc_get_shortcode(string $key) : mixed
Parameters
- $key : string
-
The shortcode key.
Tags
buddyc_shortcode_exists()
Checks whether a shortcode is present in the page content.
buddyc_shortcode_exists(string $shortcode_key) : bool
Parameters
- $shortcode_key : string
-
The shortcode key.
Tags
Return values
bool —True if the shortcode exists on the page, false if not.
buddyc_any_shortcode_exists()
Checks whether any plugin shortcode is present in the page content.
buddyc_any_shortcode_exists() : bool
Tags
Return values
bool —True if any shortcode exists on the page, false if not.
buddyc_btn()
Generates button html.
buddyc_btn(array<string|int, mixed> $args) : mixed
Parameters
- $args : array<string|int, mixed>
-
An array of arguments.
@type string $text The button text. Defaults to 'Learn More'. @type string $link The button url. @type string $style The type of style for the button. Accepts 'primary', 'secondary', 'outline'. Defaults to 'primary'. @type string $size Optional. The size of button. Accepts 'small', 'medium', 'large', 'wide'. Defaults to 'medium'.
Tags
buddyc_buddyboss_theme()
Check for BuddyBoss theme.
buddyc_buddyboss_theme() : bool
Tags
Return values
boolbuddyc_icon()
Outputs icon html.
buddyc_icon(string $key[, string $color = null ]) : string
Parameters
- $key : string
-
The identifying key of the icon.
- $color : string = null
-
Optional. The color of the icon. Accepts 'blue', 'black', 'green', 'red', or 'gray'.
Tags
Return values
string —The icon html.
buddyc_icon_class()
Outputs a string of icon classes
buddyc_icon_class(string $key[, string $color = null ]) : string
Parameters
- $key : string
-
The identifying key of the icon.
- $color : string = null
-
Optional. The color of the icon. Accepts 'blue', 'black', 'green', 'red', or 'gray'.
Tags
Return values
string —The string of icon classes.
buddyc_is_wp_theme()
Checks whether the active theme is a Wordpress default theme.
buddyc_is_wp_theme() : bool
Tags
Return values
bool —True if the active theme is a WP theme.
init_template_manager()
Initializes TemplateManager.
init_template_manager() : mixed
Tags
buddyc_is_team()
Check if user is a team member.
buddyc_is_team([mixed $user_id = null ]) : str|bool
Parameters
- $user_id : mixed = null
-
(optional. defaults to current user.)
Tags
Return values
str|bool —$member_type or false
buddyc_is_client()
Check if user is a client.
buddyc_is_client([mixed $user_id = null ]) : str|bool
Parameters
- $user_id : mixed = null
-
(optional. defaults to current user.)
Tags
Return values
str|bool —$member_type or false
buddyc_is_admin()
Check if user is a site admin.
buddyc_is_admin([mixed $user_id = null ]) : bool
Parameters
- $user_id : mixed = null
-
(optional. defaults to current user.)
Tags
Return values
boolbuddyc_admin_id()
Get site admin id.
buddyc_admin_id() : mixed
Tags
buddyc_all_team()
Get all team members.
buddyc_all_team() : mixed
Tags
buddyc_all_clients()
Get all clients.
buddyc_all_clients() : mixed
Tags
buddyc_member_types()
Retrieves member types.
buddyc_member_types([string $type = null ]) : array<string|int, mixed>
Parameters
- $type : string = null
-
The type of member types to return. Accepts 'client', 'team', 'sales'.
Tags
Return values
array<string|int, mixed> —Associative array of member type names and labels.
buddyc_all_xprofile()
Retrieves all xprofile fields.
buddyc_all_xprofile() : mixed
Tags
buddyc_update_filter_field()
Initializes FilterField class on post updates.
buddyc_update_filter_field(int $post_id) : mixed
Parameters
- $post_id : int
-
The ID of the post being saved.
Tags
buddyc_roles_field_id()
Retrieves Roles field ID.
buddyc_roles_field_id() : mixed
Creates or updates roles field if necessary.
Tags
buddyc_roles_options()
Builds array of options for roles xprofile field.
buddyc_roles_options(mixed $post_type) : mixed
Parameters
- $post_type : mixed
Tags
buddyc_xprofile_manager()
Initializes XprofileManager.
buddyc_xprofile_manager() : mixed
Tags
buddyc_show_role_xprofile()
Allows team to self-select roles.
buddyc_show_role_xprofile() : mixed
Hides or shows edit option based on setting.
Tags
buddyc_no_roles_updates()
Disallows manual updates to the roles field.
buddyc_no_roles_updates() : mixed