You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Action hooks allow developers to execute custom functions at specific points in the plugin's code. These functions can perform actions such as displaying content, updating data, or sending notifications. Action hooks in Comfort Job are typically triggered by events such as saving a job listing or deleting a company.
28
+
1.**`comfortjob_job_single_start`**
29
+
- Triggered at the start of the single job template.
Filter hooks allow developers to modify or filter data before it is displayed or processed by the plugin. Filters in Comfort Job are used to customize the output of job listings, companies, or other data displayed by the plugin. Developers can use filter hooks to change text, alter URLs, or modify data structures.
To use hooks and filters in Comfort Job, developers can create custom functions in their theme's `functions.php` file or in a custom plugin. These functions should be defined with the `add_action()` or `add_filter()` functions, specifying the hook name and the custom function to be executed.
157
+
---
51
158
52
-
For example, to add a custom function to the `comfortjob_after_job_listing` action hook, developers can use the following code:
159
+
## ComfortJobPro Plugin
53
160
54
-
```php
55
-
function my_custom_function() {
56
-
// Custom code to be executed after a job listing is displayed
57
-
}
58
-
add_action('comfortjob_after_job_listing');
59
-
```
161
+
### Action Hooks
162
+
163
+
1. **`comfortjob_company_delete_after`**
164
+
- Triggered after a company is deleted.
165
+
- **Parameters**:
166
+
- `$company_id` (int): The ID of the deleted company.
This documentation provides an overview of the available hooks and filters in the `ComfortJob` and `ComfortJobPro` plugins. Use these to extend or customize the functionality as needed.
Copy file name to clipboardExpand all lines: docs/comfortjob/index.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,6 @@ card: "article"
11
11
12
12
# Comfort Job Documentation
13
13
14
-
Welcome to the Comfort Job main page.
14
+
ComfortJob allows you to create and manage job listings directly from your WordPress site. Employers can post jobs, and candidates can apply seamlessly.
0 commit comments