API Documentation
Table of Contents
Namespaces
Constants
- BC_PLUGIN_DIR = plugin_dir_path(__FILE__)
- BC_PLUGIN_FILE = __FILE__
- BC_PLUGIN_NAME = 'BuddyClients'
- BC_PLUGIN_URL = plugin_dir_url(__FILE__)
- BC_PLUGIN_VERSION = '1.0.0'
- BC_URL = 'https://buddyclients.com'
Functions
- bc_admin_filter_submission() : mixed
- Checks for admin table filter form submission.
- bc_admin_icon() : string
- Admin icons.
- bc_admin_info() : mixed
- Initializes the AdminInfo class.
- bc_admin_loading() : mixed
- Generates admin loading message.
- bc_show_loading_spinner() : mixed
- Displays the loading spinner.
- bc_hide_loading_spinner() : mixed
- Hides the loading spinner.
- bc_admin_loading_start() : mixed
- Starts the loading message.
- bc_admin_loading_end() : mixed
- Ends the loading message.
- bc_admin_notice() : mixed
- Builds an admin notice.
- bc_icon() : string
- Defines icons for use across the plugin.
- bc_handle_delete_booking() : mixed
- Handles booking deletions.
- bc_favicon() : mixed
- BuddyClients favicon.
- bc_flush_permalinks() : mixed
- Flush permalinks
- bc_gutenberg_editor() : bool
- Checks if we're on a gutenberg page.
- bc_publish_legal_agreement() : mixed
- Handle newly published legal agreement.
- bc_options() : mixed
- Generates an options array.
- bc_user_options() : mixed
- Generates associative array of users.
- bc_project_options() : mixed
- Generates list of project options.
- bc_posts_options() : mixed
- Generates post type options arrays.
- bc_tax_options() : mixed
- Generates associative array of taxonomy options.
- bc_xprofile_options() : mixed
- Generates an array of xprofile field options.
- bc_create_plugin_page() : mixed
- Handle create page button clicks.
- bc_plugin_page_links() : mixed
- Initializes the plugin links.
- bc_validate_stripe_button() : mixed
- Generates a button to validate Stripe keys.
- bc_check_for_payments_button() : mixed
- Generates a button to check for new payments.
- bc_xprofile_filter_options() : mixed
- Builds array of all Xprofile filter field options.
- bc_xprofile_match_type_fields() : mixed
- Builds an array of match type fields based on xprofile filter selections.
- bc_dashboard_content() : mixed
- Callback to display all BookingIntents.
- bc_booked_services_table() : mixed
- Displays Booked Services.
- bc_bookings_dashboard() : mixed
- Builds the bookings dashboard content.
- bc_bookings_dashboard_filter_options() : mixed
- Defines the filter options.
- bc_bookings_filter_form() : mixed
- Displays filter form.
- bc_date_range_dates() : mixed
- Defines start and end dates for date range keys.
- get_bookings_service_fee() : mixed
- Retrieves the bookings dashboard data.
- bc_email_log_content() : mixed
- Callback to display email log content.
- bc_payments_list() : mixed
- Callback to display all Payments.
- bc_user_list() : mixed
- Callback to display all team and clients.
- buddyclients() : BuddyClients|null
- Returns the one true BuddyClients Instance.
- bc_missing_bp_notice() : mixed
- Displays an admin notice when BuddyPress is missing.
- bc_groups_disabled_notice() : mixed
- Displays an admin notice when groups are not enabled.
- bc_sanity_check_notice() : mixed
- Displays an admin notice when the sanity check fails.
- bc_affiliate_link() : mixed
- Retrieves the affiliate link for a user.
- bc_affiliate_email() : mixed
- Retrieves the affiliate's email.
- bc_get_availability() : mixed
- Retrieves a team member's availability.
- bc_payment_eligible() : mixed
- Updates payment status to eligible.
- bc_get_booking_intent() : mixed
- Retrieves a BookingIntent object.
- bc_update_booking_intent() : mixed
- Updates a BookingIntent object.
- bc_create_line_item() : mixed
- Handles AJAX calls to create line items.
- bc_get_project() : mixed
- Handles AJAX calls to retrieve project data.
- bc_team_filter_match() : bool
- Handles AJAX calls to check team filter matches.
- bc_team_select_help() : mixed
- Generates a help link describing the team selection process.
- bc_get_help_docs() : mixed
- Retrieves help docs for the search form.
- bc_email_enabled() : bool
- Checks whether a certain email is enabled.
- bc_legal_types() : mixed
- Retrieves the legal types.
- bc_payment_method_options() : mixed
- Generates the payment method options.
- bc_legal_user_data() : mixed
- Retrieves a user's legal data.
- bc_validate_quote() : mixed
- Validates custom quote on post save.
- bc_custom_quote_published() : mixed
- Handles a new custom quote.
- bc_sales_enabled() : bool
- Checks whether Sales Mode is enabled.
- bc_is_sales() : bool
- Checks whether a user can create sales bookings.
- bc_check_for_payments() : mixed
- Checks for successful Stripe payments.
- bc_stripe_customer() : int
- Retrieve or create Stripe customer.
- bc_stripe_library() : mixed
- Loads Stripe library.
- bc_stripe_valid_icon() : mixed
- Generates the icon for Stripe validation.
- bc_stripe_mode_valid_icon() : mixed
- Generates the icon for the full Stripe mode validation.
- bc_components_map() : mixed
- Defines component names.
- bc_component_name() : mixed
- Retrieves translatable component name.
- bc_sanity_check() : mixed
- Makes sure everything is five by five.
- bc_adjustment_options() : mixed
- Retrieves the adjustment options for an adjustment post.
- bc_adjustment_options_count() : mixed
- Retrieves the number of adjustment options for an adjustment post.
- bc_check_htaccess() : mixed
- Ensures the htaccess domain is up to date.
- bc_init_cleanup() : mixed
- Initializes Cleanup manager.
- bc_contact_message() : mixed
- Generates a contact message based on provided settings.
- bc_copy_to_clipboard() : mixed
- Generates a copy to clipboard field.
- bc_checkout_create_account() : mixed
- Handle create account form submission.
- bc_validate_password_strength() : string|null
- Validates password strength.
- bc_generate_login_name() : mixed
- Generates login name.
- bc_download_links() : mixed
- Generates file download links.
- bc_file_names() : mixed
- Generates list of file names.
- bc_email_triggers() : mixed
- Initializes email triggers.
- bc_profile_ext_link() : mixed
- Retrieves profile extension link.
- bc_services_profile_extension() : mixed
- Builds services profile extension.
- bc_affiliate_profile_extension() : mixed
- Builds affiliate profile extension.
- bc_team_agreement_profile_extension() : mixed
- Builds team member agreement profile extension.
- bc_user_files_profile_extension() : mixed
- Builds user files profile extension.
- bc_sales_commission_profile_extension() : mixed
- Builds sales commission profile extension.
- bc_set_featured_image() : mixed
- Sets featured image for a post.
- bc_freelancer_mode() : mixed
- Checks for Freelancer Mode.
- bc_freelancer_id() : mixed
- Retrieves the Freelancer ID.
- bc_help_link() : mixed
- Outputs a popup link.
- bc_loading_indicator() : mixed
- Outputs the loading indicator.
- bc_member_types() : array<string|int, mixed>
- Retrieves member types.
- bc_update_booking_intent_email() : mixed
- Handles AJAX calls to update BookingIntent with newly entered email.
- bc_pdf() : mixed
- Generates a new PDF instance.
- bc_create_pdf() : int
- Generates a new PDF.
- bc_tcpdf_library() : mixed
- Includes the TCPDF library.
- generate_service_agreement_pdf() : mixed
- Generates a PDF from service agreement ID.
- generate_legal_pdf_from_user_data() : mixed
- Generates a PDF from data.
- bc_include_pdf_content() : void
- Converts HTML content to formatted text with headings and lists.
- bc_split_paragraphs() : mixed
- Splits content into an array of paragraphs and elements.
- bc_process_node() : mixed
- Processes a single node.
- bc_get_popup_content() : mixed
- Get help doc content.
- bc_post_query() : mixed
- Performs a post query.
- bc_profile_link() : mixed
- Generates a link to a user's profile.
- bc_get_reference_post_id() : mixed
- Retrieves the ID of a reference post by key.
- bc_add_reference_post() : mixed
- Adds a new reference post.
- bc_registration_button_text() : mixed
- Change registration button text.
- bc_change_register_url() : mixed
- Change registration button link.
- bc_services_exist() : bool
- Checks whether any valid services exist.
- bc_get_setting() : mixed
- Retrieves the value of plugin settings.
- bc_update_setting() : mixed
- Retrieves the value of plugin settings.
- bc_help_post_types() : mixed
- Retrieves an array of help post type slugs.
- bc_get_page_link() : int|string
- Retrieves the permalink to a page defined in the plugin settings.
- bc_format_status() : mixed
- Formats status value for display.
- bc_stripe_keys() : mixed
- Retrieves Stripe keys.
- bc_color() : mixed
- Get colors.
- bc_buddyboss_theme() : bool
- Check for BuddyBoss theme.
- bc_archive_template() : mixed
- Registers custom archive template files.
- bc_single_post_template() : mixed
- Registers custom single post template files.
- bc_truncate_content() : string
- Clips content by word count.
- bc_truncate_content_by_char() : string
- Clips content by character count.
- bc_is_team() : str|bool
- Check if user is a team member.
- bc_is_client() : str|bool
- Check if user is a client.
- bc_is_admin() : bool
- Check if user is a site admin.
- bc_admin_id() : mixed
- Get site admin id.
- bc_all_team() : mixed
- Get all team members.
- bc_all_clients() : mixed
- Get all clients.
- bc_all_xprofile() : mixed
- Retrieves all xprofile fields.
- bc_update_filter_field() : mixed
- Initializes FilterField class on post updates.
- bc_roles_field_id() : mixed
- Retrieves Roles field ID.
- bc_roles_options() : mixed
- Builds array of options for roles xprofile field.
- bc_xprofile_manager() : mixed
- Initializes XprofileManager.
- bc_show_role_xprofile() : mixed
- Allows team to self-select roles.
- bc_no_roles_updates() : mixed
- Disallows manual updates to the roles field.
- bc_single_service_dependencies() : mixed
- Retrieves and formats service dependencies.
Constants
BC_PLUGIN_DIR
public
mixed
BC_PLUGIN_DIR
= plugin_dir_path(__FILE__)
BC_PLUGIN_FILE
public
mixed
BC_PLUGIN_FILE
= __FILE__
BC_PLUGIN_NAME
public
mixed
BC_PLUGIN_NAME
= 'BuddyClients'
BC_PLUGIN_URL
public
mixed
BC_PLUGIN_URL
= plugin_dir_url(__FILE__)
BC_PLUGIN_VERSION
public
mixed
BC_PLUGIN_VERSION
= '1.0.0'
BC_URL
public
mixed
BC_URL
= 'https://buddyclients.com'
Functions
bc_admin_filter_submission()
Checks for admin table filter form submission.
bc_admin_filter_submission() : mixed
Tags
bc_admin_icon()
Admin icons.
bc_admin_icon(string $icon) : string
Parameters
- $icon : string
-
Icon key.
Tags
Return values
string —HTML-formatted icon.
bc_admin_info()
Initializes the AdminInfo class.
bc_admin_info(mixed $active_tab) : mixed
Parameters
- $active_tab : mixed
Tags
bc_admin_loading()
Generates admin loading message.
bc_admin_loading(string $message) : mixed
Parameters
- $message : string
-
The loading message to display.
Tags
bc_show_loading_spinner()
Displays the loading spinner.
bc_show_loading_spinner() : mixed
Tags
bc_hide_loading_spinner()
Hides the loading spinner.
bc_hide_loading_spinner() : mixed
Tags
bc_admin_loading_start()
Starts the loading message.
bc_admin_loading_start() : mixed
Tags
bc_admin_loading_end()
Ends the loading message.
bc_admin_loading_end() : mixed
Tags
bc_admin_notice()
Builds an admin notice.
bc_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 $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. Defaults to blue.
}
Tags
bc_icon()
Defines icons for use across the plugin.
bc_icon(string $icon) : string
Parameters
- $icon : string
-
Icon key.
Tags
Return values
string —HTML-formatted icon.
bc_handle_delete_booking()
Handles booking deletions.
bc_handle_delete_booking() : mixed
Tags
bc_favicon()
BuddyClients favicon.
bc_favicon() : mixed
Tags
bc_flush_permalinks()
Flush permalinks
bc_flush_permalinks() : mixed
Tags
bc_gutenberg_editor()
Checks if we're on a gutenberg page.
bc_gutenberg_editor() : bool
Tags
Return values
boolbc_publish_legal_agreement()
Handle newly published legal agreement.
bc_publish_legal_agreement(mixed $new_status, mixed $old_status, mixed $post) : mixed
Parameters
- $new_status : mixed
- $old_status : mixed
- $post : mixed
Tags
bc_options()
Generates an options array.
bc_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
bc_user_options()
Generates associative array of users.
Use Options class.
bc_user_options(string $type) : mixed
Parameters
- $type : string
-
The key of the user type.
Tags
bc_project_options()
Generates list of project options.
Use Options class.
bc_project_options() : mixed
Tags
bc_posts_options()
Generates post type options arrays.
Use Options class.
bc_posts_options(string|array<string|int, mixed> $post_type) : mixed
Parameters
- $post_type : string|array<string|int, mixed>
-
The slug of the post type or array of slugs.
Tags
bc_tax_options()
Generates associative array of taxonomy options.
Use Options class.
bc_tax_options(string $taxonomy) : mixed
Parameters
- $taxonomy : string
-
The slug of the taxonomy type.
Tags
bc_xprofile_options()
Generates an array of xprofile field options.
Use Options class.
bc_xprofile_options([array<string|int, mixed> $existing = null ]) : mixed
Parameters
- $existing : array<string|int, mixed> = null
-
Optional. Array of key value pairs representing the post type and meta key to check.
Tags
bc_create_plugin_page()
Handle create page button clicks.
bc_create_plugin_page() : mixed
Tags
bc_plugin_page_links()
Initializes the plugin links.
bc_plugin_page_links() : mixed
Tags
bc_validate_stripe_button()
Generates a button to validate Stripe keys.
bc_validate_stripe_button(string $settings_key) : mixed
Parameters
- $settings_key : string
-
The key of the settings group.
Tags
bc_check_for_payments_button()
Generates a button to check for new payments.
bc_check_for_payments_button(string $settings_key) : mixed
Parameters
- $settings_key : string
-
The key of the settings group.
Tags
bc_xprofile_filter_options()
Builds array of all Xprofile filter field options.
bc_xprofile_filter_options() : mixed
Tags
bc_xprofile_match_type_fields()
Builds an array of match type fields based on xprofile filter selections.
bc_xprofile_match_type_fields() : mixed
Tags
bc_dashboard_content()
Callback to display all BookingIntents.
bc_dashboard_content() : mixed
Tags
bc_booked_services_table()
Displays Booked Services.
bc_booked_services_table() : mixed
Tags
bc_bookings_dashboard()
Builds the bookings dashboard content.
bc_bookings_dashboard() : mixed
Tags
bc_bookings_dashboard_filter_options()
Defines the filter options.
bc_bookings_dashboard_filter_options() : mixed
Tags
bc_bookings_filter_form()
Displays filter form.
bc_bookings_filter_form(string $selected_date_range) : mixed
Parameters
- $selected_date_range : string
-
The current selected date range.
Tags
bc_date_range_dates()
Defines start and end dates for date range keys.
bc_date_range_dates(string $date_range) : mixed
Parameters
- $date_range : string
-
The date range key.
Tags
get_bookings_service_fee()
Retrieves the bookings dashboard data.
get_bookings_service_fee([string $date_range = 'year_to_date' ]) : mixed
Parameters
- $date_range : string = 'year_to_date'
-
The date range for filtering the bookings.
Tags
bc_email_log_content()
Callback to display email log content.
bc_email_log_content() : mixed
Tags
bc_payments_list()
Callback to display all Payments.
bc_payments_list() : mixed
Tags
bc_user_list()
Callback to display all team and clients.
bc_user_list() : mixed
Tags
buddyclients()
Returns the one true BuddyClients Instance.
buddyclients() : BuddyClients|null
Tags
Return values
BuddyClients|null —The one true BuddyClients Instance.
bc_missing_bp_notice()
Displays an admin notice when BuddyPress is missing.
bc_missing_bp_notice() : mixed
Tags
bc_groups_disabled_notice()
Displays an admin notice when groups are not enabled.
bc_groups_disabled_notice() : mixed
Tags
bc_sanity_check_notice()
Displays an admin notice when the sanity check fails.
bc_sanity_check_notice() : mixed
Tags
bc_affiliate_link()
Retrieves the affiliate link for a user.
bc_affiliate_link(int $user_id) : mixed
Parameters
- $user_id : int
-
The ID of the user.
Tags
bc_affiliate_email()
Retrieves the affiliate's email.
bc_affiliate_email(int $user_id) : mixed
Parameters
- $user_id : int
-
The ID of the user.
Tags
bc_get_availability()
Retrieves a team member's availability.
bc_get_availability(int $user_id) : mixed
Parameters
- $user_id : int
-
The ID of the user.
Tags
bc_payment_eligible()
Updates payment status to eligible.
bc_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
bc_get_booking_intent()
Retrieves a BookingIntent object.
bc_get_booking_intent(int $booking_intent_id) : mixed
Parameters
- $booking_intent_id : int
-
The ID of the BookingIntent to retrieve.
Tags
bc_update_booking_intent()
Updates a BookingIntent object.
bc_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
bc_create_line_item()
Handles AJAX calls to create line items.
bc_create_line_item() : mixed
Tags
bc_get_project()
Handles AJAX calls to retrieve project data.
bc_get_project() : mixed
Tags
bc_team_filter_match()
Handles AJAX calls to check team filter matches.
bc_team_filter_match() : bool
Tags
Return values
bool —Whether the filters match.
bc_team_select_help()
Generates a help link describing the team selection process.
bc_team_select_help() : mixed
Tags
bc_get_help_docs()
Retrieves help docs for the search form.
bc_get_help_docs() : mixed
AJAX callback.
Tags
bc_email_enabled()
Checks whether a certain email is enabled.
bc_email_enabled(string $key) : bool
Parameters
- $key : string
-
The email key.
Tags
Return values
bool —True if enabled, false if not.
bc_legal_types()
Retrieves the legal types.
bc_legal_types() : mixed
Tags
bc_payment_method_options()
Generates the payment method options.
bc_payment_method_options() : mixed
Tags
bc_legal_user_data()
Retrieves a user's legal data.
bc_legal_user_data(string $type[, int $user_id = null ]) : mixed
Parameters
- $type : string
-
The type of legal data to retrieve. Accepts 'team', 'affiliate', 'client'.
- $user_id : int = null
-
The ID of the user. Defaults to current user.
Tags
bc_validate_quote()
Validates custom quote on post save.
bc_validate_quote(int $post_id) : mixed
Parameters
- $post_id : int
-
The ID of the Custom Quote post.
Tags
bc_custom_quote_published()
Handles a new custom quote.
bc_custom_quote_published(string $new_status, string $old_status, string $post) : mixed
Parameters
- $new_status : string
-
The new status of the post.
- $old_status : string
-
The old status of the post.
- $post : string
-
The post object.
Tags
bc_sales_enabled()
Checks whether Sales Mode is enabled.
bc_sales_enabled() : bool
Tags
Return values
bool —True if Sales Mode is enabled, false if not.
bc_is_sales()
Checks whether a user can create sales bookings.
bc_is_sales([int $user_id = null ]) : bool
Parameters
- $user_id : int = null
-
Optional. The ID of the user to check. Defaults to the current user.
Tags
Return values
boolbc_check_for_payments()
Checks for successful Stripe payments.
bc_check_for_payments() : mixed
Tags
bc_stripe_customer()
Retrieve or create Stripe customer.
bc_stripe_customer(int $user_id, mixed $booking_intent_id) : int
Parameters
- $user_id : int
- $booking_intent_id : mixed
Tags
Return values
int —$stripe_customer_id
bc_stripe_library()
Loads Stripe library.
bc_stripe_library() : mixed
Tags
bc_stripe_valid_icon()
Generates the icon for Stripe validation.
bc_stripe_valid_icon(mixed $key, mixed $value) : mixed
Parameters
- $key : mixed
- $value : mixed
Tags
bc_stripe_mode_valid_icon()
Generates the icon for the full Stripe mode validation.
bc_stripe_mode_valid_icon() : mixed
Tags
bc_components_map()
Defines component names.
bc_components_map() : mixed
Tags
bc_component_name()
Retrieves translatable component name.
bc_component_name(string $component) : mixed
Parameters
- $component : string
-
The component.
Tags
bc_sanity_check()
Makes sure everything is five by five.
bc_sanity_check() : mixed
Tags
bc_adjustment_options()
Retrieves the adjustment options for an adjustment post.
bc_adjustment_options(mixed $post_id) : mixed
Parameters
- $post_id : mixed
Tags
bc_adjustment_options_count()
Retrieves the number of adjustment options for an adjustment post.
bc_adjustment_options_count(mixed $post_id) : mixed
Parameters
- $post_id : mixed
Tags
bc_check_htaccess()
Ensures the htaccess domain is up to date.
bc_check_htaccess() : mixed
Tags
bc_init_cleanup()
Initializes Cleanup manager.
bc_init_cleanup() : mixed
Tags
bc_contact_message()
Generates a contact message based on provided settings.
bc_contact_message([bool $site_name = false ]) : mixed
Parameters
- $site_name : bool = false
-
Whether to include the site name. Defaults to false and uses 'us'.
Tags
bc_copy_to_clipboard()
Generates a copy to clipboard field.
bc_copy_to_clipboard(mixed $content, mixed $field_id) : mixed
Parameters
- $content : mixed
- $field_id : mixed
Tags
bc_checkout_create_account()
Handle create account form submission.
bc_checkout_create_account() : mixed
Called by AJAX script.
Tags
bc_validate_password_strength()
Validates password strength.
bc_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.
bc_generate_login_name()
Generates login name.
bc_generate_login_name(mixed $first_name) : mixed
Checks against existing users to ensure unique handle.
Parameters
- $first_name : mixed
Tags
bc_download_links()
Generates file download links.
bc_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
bc_file_names()
Generates list of file names.
bc_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
bc_email_triggers()
Initializes email triggers.
bc_email_triggers() : mixed
Tags
bc_profile_ext_link()
Retrieves profile extension link.
bc_profile_ext_link(string $key) : mixed
Parameters
- $key : string
-
The profile extension key.
Tags
bc_services_profile_extension()
Builds services profile extension.
bc_services_profile_extension() : mixed
Tags
bc_affiliate_profile_extension()
Builds affiliate profile extension.
bc_affiliate_profile_extension() : mixed
Tags
bc_team_agreement_profile_extension()
Builds team member agreement profile extension.
bc_team_agreement_profile_extension() : mixed
Tags
bc_user_files_profile_extension()
Builds user files profile extension.
bc_user_files_profile_extension() : mixed
Tags
bc_sales_commission_profile_extension()
Builds sales commission profile extension.
bc_sales_commission_profile_extension() : mixed
Tags
bc_set_featured_image()
Sets featured image for a post.
bc_set_featured_image(int $post_id, File $file) : mixed
Parameters
- $post_id : int
-
The ID of the post.
- $file : File
-
The File object.
Tags
bc_freelancer_mode()
Checks for Freelancer Mode.
bc_freelancer_mode() : mixed
Tags
bc_freelancer_id()
Retrieves the Freelancer ID.
bc_freelancer_id() : mixed
Tags
bc_help_link()
Outputs a popup link.
bc_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
bc_loading_indicator()
Outputs the loading indicator.
bc_loading_indicator() : mixed
Tags
bc_member_types()
Retrieves member types.
bc_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.
bc_update_booking_intent_email()
Handles AJAX calls to update BookingIntent with newly entered email.
bc_update_booking_intent_email() : mixed
Tags
bc_pdf()
Generates a new PDF instance.
bc_pdf([int $ID = null ]) : mixed
Parameters
- $ID : int = null
-
Optional. The ID of the PDF.
Tags
bc_create_pdf()
Generates a new PDF.
bc_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.
bc_tcpdf_library()
Includes the TCPDF library.
bc_tcpdf_library() : mixed
Tags
generate_service_agreement_pdf()
Generates a PDF from service agreement ID.
generate_service_agreement_pdf(BookingIntent $booking_intent) : mixed
Parameters
- $booking_intent : BookingIntent
-
The BookingIntent object.
Tags
generate_legal_pdf_from_user_data()
Generates a PDF from data.
generate_legal_pdf_from_user_data(array<string|int, mixed> $data, string $type) : mixed
Parameters
- $data : array<string|int, mixed>
-
The user's Legal data.
- $type : string
-
The type of agreement.
Tags
bc_include_pdf_content()
Converts HTML content to formatted text with headings and lists.
bc_include_pdf_content(TCPDF $pdf, string $content) : void
Parameters
- $pdf : TCPDF
-
TCPDF object for PDF generation.
- $content : string
-
HTML content to convert.
bc_split_paragraphs()
Splits content into an array of paragraphs and elements.
bc_split_paragraphs(mixed $content) : mixed
Parameters
- $content : mixed
Tags
bc_process_node()
Processes a single node.
bc_process_node(mixed $node, mixed &$paragraphs) : mixed
Parameters
- $node : mixed
- $paragraphs : mixed
Tags
bc_get_popup_content()
Get help doc content.
bc_get_popup_content() : mixed
AJAX callback.
Tags
bc_post_query()
Performs a post query.
bc_post_query(int $post_type[, array<string|int, mixed> $meta = null ]) : mixed
Parameters
- $post_type : int
-
The slug of the post type to query.
- $meta : array<string|int, mixed> = null
-
Optional. An associative array of meta keys and values to match.
Tags
bc_profile_link()
Generates a link to a user's profile.
bc_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
bc_get_reference_post_id()
Retrieves the ID of a reference post by key.
bc_get_reference_post_id(string $key) : mixed
Parameters
- $key : string
-
The key of the post ID to retrieve.
Tags
bc_add_reference_post()
Adds a new reference post.
bc_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
bc_registration_button_text()
Change registration button text.
bc_registration_button_text() : mixed
Tags
bc_change_register_url()
Change registration button link.
bc_change_register_url(string $url) : mixed
Parameters
- $url : string
-
The url to modify.
Tags
bc_services_exist()
Checks whether any valid services exist.
bc_services_exist() : bool
Tags
Return values
bool —True if services exist, false if not.
bc_get_setting()
Retrieves the value of plugin settings.
bc_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
bc_update_setting()
Retrieves the value of plugin settings.
bc_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
bc_help_post_types()
Retrieves an array of help post type slugs.
bc_help_post_types() : mixed
Tags
bc_get_page_link()
Retrieves the permalink to a page defined in the plugin settings.
bc_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.
bc_format_status()
Formats status value for display.
bc_format_status(string $value[, mixed $add_class = null ]) : mixed
Parameters
- $value : string
-
The value to format.
- $add_class : mixed = null
Tags
bc_stripe_keys()
Retrieves Stripe keys.
bc_stripe_keys() : mixed
Tags
bc_color()
Get colors.
bc_color(mixed $type) : mixed
Parameters
- $type : mixed
Tags
bc_buddyboss_theme()
Check for BuddyBoss theme.
bc_buddyboss_theme() : bool
Tags
Return values
boolbc_archive_template()
Registers custom archive template files.
bc_archive_template(mixed $template) : mixed
Parameters
- $template : mixed
Tags
bc_single_post_template()
Registers custom single post template files.
bc_single_post_template(mixed $template) : mixed
Parameters
- $template : mixed
Tags
bc_truncate_content()
Clips content by word count.
bc_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.
bc_truncate_content_by_char()
Clips content by character count.
bc_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.
bc_is_team()
Check if user is a team member.
bc_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
bc_is_client()
Check if user is a client.
bc_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
bc_is_admin()
Check if user is a site admin.
bc_is_admin([mixed $user_id = null ]) : bool
Parameters
- $user_id : mixed = null
-
(optional. defaults to current user.)
Tags
Return values
boolbc_admin_id()
Get site admin id.
bc_admin_id() : mixed
Tags
bc_all_team()
Get all team members.
bc_all_team() : mixed
Tags
bc_all_clients()
Get all clients.
bc_all_clients() : mixed
Tags
bc_all_xprofile()
Retrieves all xprofile fields.
bc_all_xprofile() : mixed
Tags
bc_update_filter_field()
Initializes FilterField class on post updates.
bc_update_filter_field(int $post_id) : mixed
Parameters
- $post_id : int
-
The ID of the post being saved.
Tags
bc_roles_field_id()
Retrieves Roles field ID.
bc_roles_field_id() : mixed
Creates or updates roles field if necessary.
Tags
bc_roles_options()
Builds array of options for roles xprofile field.
bc_roles_options(mixed $post_type) : mixed
Parameters
- $post_type : mixed
Tags
bc_xprofile_manager()
Initializes XprofileManager.
bc_xprofile_manager() : mixed
Tags
bc_show_role_xprofile()
Allows team to self-select roles.
bc_show_role_xprofile() : mixed
Hides or shows edit option based on setting.
Tags
bc_no_roles_updates()
Disallows manual updates to the roles field.
bc_no_roles_updates() : mixed
Tags
bc_single_service_dependencies()
Retrieves and formats service dependencies.
bc_single_service_dependencies(mixed $service_id) : mixed
Parameters
- $service_id : mixed