-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadme.txt
158 lines (104 loc) · 3.89 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
=== Jobbnorge Block ===
Contributors: PerS, dssweb
Tags: block
Tested up to: 6.4
Requires at least: 5.9
Requires PHP: 7.4
Stable tag: 2.1.5
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Retrieve and display job listings from Jobbnorge.no
== Description ==
In 2.0 the new Jobbnorge API is used, and the following features are available ( ~~strikethrough~~ means removed, since it's not in the new API):
- Sort jobs bye deadline, closest first.
- Does not show jobs that are past the deadline.
- Set the number of jobs to display.
- ~~Set the number of words in the excerpt.~~
- Set the no jobs message.
- Show or hide the job excerpt.
- Show or hide the job deadline.
- Show or hide the job scope.
- ~~Show or hide the job duration.~~
- Display the jobs in a grid or list view.
- Set the number of columns in the grid view.
**New features in 2.0**:
- Add more than one employer.
- If more than one employer is added, order jobs by employer or deadline.
- Define which employers are available in the block, using the `jobbnorge_employers` filter.
= Filters =
**jobbnorge_employers**
The `jobbnorge_employers` filter can be used to define which employers are available in the block:
`
add_filter( 'jobbnorge_employers', function( $employers ) {
$employers = [
[
'label' => 'Select employer',
'value' => '',
'disabled' => true, // Optional.
],
[
'label' => 'Employer 1',
'value' => '1234',
],
[
'label' => 'Employer 2',
'value' => '5678',
],
];
return $employers;
} );
`
**jobbnorge_cache_path**
The `jobbnorge_cache_path` filter can be used to define the cache path. Default is `WP_CONTENT_DIR . '/cache/jobbnorge'`.
**jobbnorge_cache_time**
The `jobbnorge_cache_time` filter can be used to define the cache time. Default is `30 * MINUTE_IN_SECONDS`.
= GitHub =
The plugin is also available on [GitHub](https://github.com/dss-web/jobbnorge-block)
== Installation ==
Either, add the block from the Block Directory:
1. To add a block from the Block Directory, navigate to the post editor.
1. Place your cursor where you would like a new block option.
1. Select the “Add Block” button in the top-left area of the editor screen.
1. Search for “Jobbnorge” and select the “Jobbnorge" block.
Or, add the block from the WordPress admin:
1. In the WordPress admin, go to the "Plugins" screen, click "Add New" and search for "Jobbnorge".
1. Click "Install Now" and then "Activate Plugin".
1. Use the Gutenberg editor to add the block to a page or post.
== Frequently Asked Questions ==
= Where to I find the employer ID? =
You get it from your Jobbnorge contact.
== Screenshots ==
1. Install the block from the Block Directory.
2. Add employer ID.
3. Listview with options.
4. Gridview with options.
5. Custom Select field for employer ID. Ctrl-click (Windows) or Cmd-click (Mac) to select multiple employers. Shift-click to select a range of employers.
== Changelog ==
= 2.1.5 =
* Add uninstall handler. Will remove the cache directory when the plugin is uninstalled.
= 2.1.4 =
* Update translation.
= 2.1.3 =
* Bump version.
= 2.1.2 =
* Update translation.
= 2.1.1 =
* Update translation.
= 2.1.0 =
* Use local cache. The local cache is a simple caching mechanism that stores data in PHP files. In theory, nothing is faster in PHP than loading and executing another PHP file. If you have PHP OPcache enabled, then the PHP content will be cached in memory, and the PHP file will not be parsed again.
* Add filter for cache path and cache time.
= 2.0.0 =
* BREAKING CHANGE, using the Public Jobbnorge API and you need to add the employer ID.
= 1.0.12 =
* Tested with WordPress 6.3
* Deadline format fix.
= 1.0.11 =
* Tested with WordPress 6.2
= 1.0.10 =
* Update translation.
= 1.0.9 =
* Rename functions to avoid conflicts.
= 1.0.8 =
* Rename plugin.
= 1.0.7 =
* Initial Release