PluginProbe
JobWP – Job Board Plugin for WordPress | Job Listings, Career Page & Applications / 2.3.9
JobWP – Job Board Plugin for WordPress | Job Listings, Career Page & Applications v2.3.9
2.5.0 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 2.4.0 All 33 releases
jobwp / core / single-content.php

single-content.php in JobWP – Job Board Plugin for WordPress | Job Listings, Career Page & Applications 2.3.9, at core/single-content.php

216 lines 7.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit;
4 }
5
6 /**
7 * Trait: Single Content Settings
8 */
9 trait Jobwp_Single_Content_Settings
10 {
11 protected $fields, $settings, $options;
12
13 protected function jobwp_set_single_content_settings( $post ) {
14
15 $this->fields = $this->jobwp_single_content_option_fileds();
16
17 $this->options = $this->jobwp_build_set_settings_options( $this->fields, $post );
18
19 $this->settings = apply_filters( 'jobwp_single_content', $this->options, $post );
20
21 return update_option( 'jobwp_single_content', serialize( $this->settings ) );
22
23 }
24
25 function jobwp_get_single_content_settings() {
26
27 $this->fields = $this->jobwp_single_content_option_fileds();
28 $this->settings = stripslashes_deep( unserialize( get_option('jobwp_single_content') ) );
29
30 return $this->jobwp_build_get_settings_options( $this->fields, $this->settings );
31 }
32
33 function get_single_items_order() {
34
35 //Use delete_option to reset the sorting
36 //delete_option('jobwp_single_item_order_list');
37
38 if ( get_option( 'jobwp_single_item_order_list' ) ) {
39
40 $singleItems = get_option( 'jobwp_single_item_order_list' );
41
42 } else {
43
44 $singleItems = ['Overview', 'NoOfVacancies', 'Skills', 'ResponsibleFor', 'AdditionalRequirements', 'JobNature', 'EducationalRequirements',
45 'ExperienceRequirements', 'Location', 'Salary', 'Benefits', 'Level'];
46 }
47
48 return apply_filters( 'jobwp_single_item_order_list', $singleItems );
49 }
50
51 protected function jobwp_single_content_option_fileds() {
52
53 return [
54 [
55 'name' => 'jobwp_single_hide_overview',
56 'type' => 'boolean',
57 'default' => false,
58 ],
59 [
60 'name' => 'jobwp_single_overview_text',
61 'type' => 'text',
62 'default' => 'Overview',
63 ],
64 [
65 'name' => 'jobwp_single_hide_vacancies',
66 'type' => 'boolean',
67 'default' => false,
68 ],
69 [
70 'name' => 'jobwp_single_vacancies_text',
71 'type' => 'text',
72 'default' => 'No. of Vacancies',
73 ],
74 [
75 'name' => 'jobwp_single_hide_skills',
76 'type' => 'boolean',
77 'default' => false,
78 ],
79 [
80 'name' => 'jobwp_single_skills_text',
81 'type' => 'text',
82 'default' => 'Specific Skills',
83 ],
84 [
85 'name' => 'jobwp_single_hide_responsible',
86 'type' => 'boolean',
87 'default' => false,
88 ],
89 [
90 'name' => 'jobwp_single_responsible_text',
91 'type' => 'text',
92 'default' => 'Responsible For',
93 ],
94 [
95 'name' => 'jobwp_single_hide_requirements',
96 'type' => 'boolean',
97 'default' => false,
98 ],
99 [
100 'name' => 'jobwp_single_requirements_text',
101 'type' => 'text',
102 'default' => 'Additional Requirements',
103 ],
104 [
105 'name' => 'jobwp_single_hide_job_type',
106 'type' => 'boolean',
107 'default' => false,
108 ],
109 [
110 'name' => 'jobwp_single_job_type_text',
111 'type' => 'text',
112 'default' => 'Job Nature',
113 ],
114 [
115 'name' => 'jobwp_single_hide_education',
116 'type' => 'boolean',
117 'default' => false,
118 ],
119 [
120 'name' => 'jobwp_single_education_text',
121 'type' => 'text',
122 'default' => 'Educational Requirements',
123 ],
124 [
125 'name' => 'jobwp_single_hide_experience',
126 'type' => 'boolean',
127 'default' => false,
128 ],
129 [
130 'name' => 'jobwp_single_experience_text',
131 'type' => 'text',
132 'default' => 'Experience Requirements',
133 ],
134 [
135 'name' => 'jobwp_single_hide_loc',
136 'type' => 'boolean',
137 'default' => false,
138 ],
139 [
140 'name' => 'jobwp_single_loc_text',
141 'type' => 'text',
142 'default' => 'Job Location',
143 ],
144 [
145 'name' => 'jobwp_single_hide_salary',
146 'type' => 'boolean',
147 'default' => false,
148 ],
149 [
150 'name' => 'jobwp_single_salary_text',
151 'type' => 'text',
152 'default' => 'Salary',
153 ],
154 [
155 'name' => 'jobwp_single_hide_benefit',
156 'type' => 'boolean',
157 'default' => false,
158 ],
159 [
160 'name' => 'jobwp_single_benefit_text',
161 'type' => 'text',
162 'default' => 'Other Benefits',
163 ],
164 [
165 'name' => 'jobwp_single_hide_level',
166 'type' => 'boolean',
167 'default' => false,
168 ],
169 [
170 'name' => 'jobwp_single_level_text',
171 'type' => 'text',
172 'default' => 'Job Level',
173 ],
174 [
175 'name' => 'jobwp_hide_apply_procedure',
176 'type' => 'boolean',
177 'default' => false,
178 ],
179 [
180 'name' => 'jobwp_apply_procedure_title',
181 'type' => 'text',
182 'default' => 'How to Apply',
183 ],
184 [
185 'name' => 'jobwp_apply_procedure_content',
186 'type' => 'kses_post',
187 'default' => 'Interested candidates can send their resumes to career@your-domain.com mentioning "Job Title" in the subject line.',
188 ],
189 [
190 'name' => 'jobwp_hide_apply_button',
191 'type' => 'boolean',
192 'default' => false,
193 ],
194 [
195 'name' => 'jobwp_apply_button_text',
196 'type' => 'text',
197 'default' => 'Apply Online',
198 ],
199 [
200 'name' => 'jobwp_single_title_tag',
201 'type' => 'text',
202 'default' => 'h2',
203 ],
204 [
205 'name' => 'jobwp_single_display_company_name',
206 'type' => 'boolean',
207 'default' => false,
208 ],
209 [
210 'name' => 'jobwp_single_display_company_logo',
211 'type' => 'boolean',
212 'default' => false,
213 ],
214 ];
215 }
216 }