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
PageUpdateRequest.php
29 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 PageUpdateRequest extends Request |
| 11 | { |
| 12 | public function rules() |
| 13 | { |
| 14 | return [ |
| 15 | 'post_title' => 'string', |
| 16 | 'post_name' => 'string', |
| 17 | 'post_status' => 'string', |
| 18 | ]; |
| 19 | } |
| 20 | |
| 21 | public function filters() |
| 22 | { |
| 23 | return [ |
| 24 | 'post_title' => Sanitizer::TEXT, |
| 25 | 'post_name' => Sanitizer::TEXT, |
| 26 | 'post_status' => Sanitizer::TEXT, |
| 27 | ]; |
| 28 | } |
| 29 | } |