PageDataRequest.php
3 weeks ago
PageRequest.php
3 weeks ago
PageSettingsRequest.php
3 weeks ago
PageUpdateRequest.php
3 weeks ago
PopupRequest.php
3 weeks ago
TogglePageSymbolRequest.php
3 weeks ago
PageSettingsRequest.php
37 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Kirki\App\Http\Requests\Page; |
| 4 | |
| 5 | defined('ABSPATH') || exit; |
| 6 | |
| 7 | use Kirki\Framework\Http\Request; |
| 8 | use Kirki\Framework\Sanitizer; |
| 9 | |
| 10 | class PageSettingsRequest extends Request |
| 11 | { |
| 12 | public function rules() |
| 13 | { |
| 14 | return [ |
| 15 | 'page_title' => 'string', |
| 16 | 'slug' => 'string', |
| 17 | 'page_description' => 'string', |
| 18 | 'post_status' => 'string', |
| 19 | 'featured_image' => 'url', |
| 20 | 'seo_settings' => 'array', |
| 21 | 'custom_code' => 'array', |
| 22 | ]; |
| 23 | } |
| 24 | |
| 25 | public function filters() |
| 26 | { |
| 27 | return [ |
| 28 | 'page_title' => Sanitizer::TEXT, |
| 29 | 'slug' => Sanitizer::TEXT, |
| 30 | 'page_description' => Sanitizer::TEXT, |
| 31 | 'post_status' => Sanitizer::TEXT, |
| 32 | 'featured_image' => Sanitizer::URL, |
| 33 | 'seo_settings' => Sanitizer::ARRAY, |
| 34 | 'custom_code' => Sanitizer::ARRAY, |
| 35 | ]; |
| 36 | } |
| 37 | } |