| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; |
| 4 |
} |
| 5 |
|
| 6 |
/** |
| 7 |
* Trait: Single Styles Settings |
| 8 |
*/ |
| 9 |
trait Jobwp_Single_Styles_Settings |
| 10 |
{ |
| 11 |
protected $fields, $settings, $options; |
| 12 |
|
| 13 |
protected function jobwp_set_single_styles_settings( $post ) { |
| 14 |
|
| 15 |
$this->fields = $this->jobwp_single_styles_option_fileds(); |
| 16 |
|
| 17 |
$this->options = $this->jobwp_build_set_settings_options( $this->fields, $post ); |
| 18 |
|
| 19 |
$this->settings = apply_filters( 'jobwp_single_styles', $this->options, $post ); |
| 20 |
|
| 21 |
return update_option( 'jobwp_single_styles', $this->settings ); |
| 22 |
|
| 23 |
} |
| 24 |
|
| 25 |
function jobwp_get_single_styles_settings() { |
| 26 |
|
| 27 |
$this->fields = $this->jobwp_single_styles_option_fileds(); |
| 28 |
$this->settings = get_option('jobwp_single_styles'); |
| 29 |
|
| 30 |
return $this->jobwp_build_get_settings_options( $this->fields, $this->settings ); |
| 31 |
} |
| 32 |
|
| 33 |
protected function jobwp_single_styles_option_fileds() { |
| 34 |
|
| 35 |
return [ |
| 36 |
[ |
| 37 |
'name' => 'jobwp_single_container_bg_color', |
| 38 |
'type' => 'text', |
| 39 |
'default' => '#FFFFFF', |
| 40 |
], |
| 41 |
[ |
| 42 |
'name' => 'jobwp_single_title_font_color', |
| 43 |
'type' => 'text', |
| 44 |
'default' => '#242424', |
| 45 |
], |
| 46 |
[ |
| 47 |
'name' => 'jobwp_single_title_font_size', |
| 48 |
'type' => 'number', |
| 49 |
'default' => '28', |
| 50 |
], |
| 51 |
[ |
| 52 |
'name' => 'jobwp_single_info_font_color', |
| 53 |
'type' => 'text', |
| 54 |
'default' => '#555555', |
| 55 |
], |
| 56 |
[ |
| 57 |
'name' => 'jobwp_single_apply_btn_bg_color', |
| 58 |
'type' => 'text', |
| 59 |
'default' => '#008b8b', |
| 60 |
], |
| 61 |
[ |
| 62 |
'name' => 'jobwp_single_title_bg_color', |
| 63 |
'type' => 'text', |
| 64 |
'default' => '#EEEEEE', |
| 65 |
], |
| 66 |
[ |
| 67 |
'name' => 'jobwp_single_how_to_apply_bg_color', |
| 68 |
'type' => 'text', |
| 69 |
'default' => '#EEEEEE', |
| 70 |
], |
| 71 |
[ |
| 72 |
'name' => 'jobwp_single_container_margin_top', |
| 73 |
'type' => 'number', |
| 74 |
'default' => '0', |
| 75 |
], |
| 76 |
[ |
| 77 |
'name' => 'jobwp_single_container_margin_btm', |
| 78 |
'type' => 'number', |
| 79 |
'default' => '0', |
| 80 |
], |
| 81 |
[ |
| 82 |
'name' => 'jobwp_single_apply_btn_font_size', |
| 83 |
'type' => 'number', |
| 84 |
'default' => '18', |
| 85 |
], |
| 86 |
[ |
| 87 |
'name' => 'jobwp_single_apply_btn_font_color', |
| 88 |
'type' => 'text', |
| 89 |
'default' => '#FFFFFF', |
| 90 |
], |
| 91 |
[ |
| 92 |
'name' => 'jobwp_single_apply_btn_padding_h', |
| 93 |
'type' => 'number', |
| 94 |
'default' => '15', |
| 95 |
], |
| 96 |
[ |
| 97 |
'name' => 'jobwp_single_apply_btn_padding_w', |
| 98 |
'type' => 'number', |
| 99 |
'default' => '15', |
| 100 |
], |
| 101 |
[ |
| 102 |
'name' => 'jobwp_single_apply_btn_border_color', |
| 103 |
'type' => 'text', |
| 104 |
'default' => '#008b8b', |
| 105 |
], |
| 106 |
[ |
| 107 |
'name' => 'jobwp_single_apply_btn_bg_clr_hvr', |
| 108 |
'type' => 'text', |
| 109 |
'default' => '#FFFFFF', |
| 110 |
], |
| 111 |
[ |
| 112 |
'name' => 'jobwp_single_apply_btn_brdr_clr_hvr', |
| 113 |
'type' => 'text', |
| 114 |
'default' => '#999999', |
| 115 |
], |
| 116 |
[ |
| 117 |
'name' => 'jobwp_single_apply_btn_font_clr_hvr', |
| 118 |
'type' => 'text', |
| 119 |
'default' => '#555555', |
| 120 |
], |
| 121 |
[ |
| 122 |
'name' => 'jobwp_single_apply_btn_brdr_radius', |
| 123 |
'type' => 'number', |
| 124 |
'default' => '0', |
| 125 |
], |
| 126 |
[ |
| 127 |
'name' => 'jobwp_single_howtoapply_title_font_clr', |
| 128 |
'type' => 'text', |
| 129 |
'default' => '#333333', |
| 130 |
], |
| 131 |
[ |
| 132 |
'name' => 'jobwp_single_howtoapply_title_font_size', |
| 133 |
'type' => 'number', |
| 134 |
'default' => '24', |
| 135 |
], |
| 136 |
[ |
| 137 |
'name' => 'jobwp_single_howtoapply_title_brdr_clr', |
| 138 |
'type' => 'text', |
| 139 |
'default' => '#CCCCCC', |
| 140 |
], |
| 141 |
[ |
| 142 |
'name' => 'jobwp_single_howtoapply_content_clr', |
| 143 |
'type' => 'text', |
| 144 |
'default' => '#555555', |
| 145 |
], |
| 146 |
[ |
| 147 |
'name' => 'jobwp_single_howtoapply_content_size', |
| 148 |
'type' => 'number', |
| 149 |
'default' => '13', |
| 150 |
], |
| 151 |
[ |
| 152 |
'name' => 'jobwp_single_info_column_left_width', |
| 153 |
'type' => 'number', |
| 154 |
'default' => '30', |
| 155 |
], |
| 156 |
[ |
| 157 |
'name' => 'jobwp_single_info_column_right_width', |
| 158 |
'type' => 'number', |
| 159 |
'default' => '70', |
| 160 |
], |
| 161 |
[ |
| 162 |
'name' => 'jobwp_single_info_lbl_font_size', |
| 163 |
'type' => 'number', |
| 164 |
'default' => '18', |
| 165 |
], |
| 166 |
[ |
| 167 |
'name' => 'jobwp_single_info_lbl_font_color', |
| 168 |
'type' => 'text', |
| 169 |
'default' => '#555555', |
| 170 |
], |
| 171 |
[ |
| 172 |
'name' => 'jobwp_single_info_font_size', |
| 173 |
'type' => 'number', |
| 174 |
'default' => '16', |
| 175 |
], |
| 176 |
]; |
| 177 |
} |
| 178 |
} |