AdminPageSetting.HTML.class.php
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Register and save an arbitrary HTML chunk in the admin menu |
| 5 | * |
| 6 | * This allows you to easily add in a dummy "setting" with any arbitrary HTML |
| 7 | * code. It's good for displaying a link to documentation, upgrades or anything |
| 8 | * else you can think of. |
| 9 | * |
| 10 | * Data in this field will not be saved or passed. It's purely for presenting |
| 11 | * information. |
| 12 | * |
| 13 | * @since 1.0 |
| 14 | * @package Simple Admin Pages |
| 15 | */ |
| 16 | |
| 17 | class sapAdminPageSettingHTML_2_6_19 extends sapAdminPageSetting_2_6_19 { |
| 18 | |
| 19 | public $html; // The HTML that should be displayed by this option |
| 20 | public $sanitize_callback = 'sanitize_text_field'; |
| 21 | |
| 22 | /** |
| 23 | * Display this setting |
| 24 | * @since 1.0 |
| 25 | */ |
| 26 | public function display_setting() { |
| 27 | |
| 28 | ?> |
| 29 | |
| 30 | <fieldset <?php $this->print_conditional_data(); ?>> |
| 31 | <?php echo wp_kses_post( $this->html ); ?> |
| 32 | </fieldset> |
| 33 | |
| 34 | <?php |
| 35 | |
| 36 | $this->display_description(); |
| 37 | |
| 38 | } |
| 39 | |
| 40 | } |
| 41 |