AdminOptions.php
1 month ago
editor.php
1 month ago
manager.php
1 month ago
metabox.php
1 month ago
settings.php
1 month ago
whatsnew.php
1 month ago
AdminOptions.php
53 lines
| 1 | <?php |
| 2 | if ( ! defined( 'ABSPATH' ) ) exit; |
| 3 | function tcmp_ui_admin_options() { |
| 4 | global $tcmp; |
| 5 | |
| 6 | ?> |
| 7 | <div style="float:left; min-width:750px"> |
| 8 | |
| 9 | <?php |
| 10 | |
| 11 | $tcmp->form->prefix = 'AdminOptions'; |
| 12 | $tcmp->form->form_starts(); |
| 13 | |
| 14 | if ( $tcmp->check->nonce( 'tcmp_admin_options' ) ) { |
| 15 | $tcmp->options->setSkipCodeSanitization( $tcmp->utils->iqs( 'skipCodeSanitization' ) ); |
| 16 | $tcmp->options->setModifySuperglobalVariable( $tcmp->utils->iqs( 'checkbox' ) ); |
| 17 | $tcmp->options->setAdditionalRecognizedTags( $tcmp->utils->qs( 'tags' ) ); |
| 18 | $tcmp->options->setAdditionalRecognizedAttributes( $tcmp->utils->qs( 'attributes' ) ); |
| 19 | tcmp_free_add_additional_tags_atts(); |
| 20 | $tcmp->options->writeMessages(); |
| 21 | } |
| 22 | |
| 23 | $tcmp->form->p( __( 'Add additional tags and/or attributes to the code whitelist' ) ); |
| 24 | |
| 25 | $tags = $tcmp->options->getAdditionalRecognizedTags(); |
| 26 | $attributes = $tcmp->options->getAdditionalRecognizedAttributes(); |
| 27 | |
| 28 | $tcmp->form->textarea( 'tags', $tags, array('rows' => 2) ); |
| 29 | $tcmp->form->textarea( 'attributes', $attributes, array('rows' => 2) ); |
| 30 | |
| 31 | $tcmp->form->p( __( 'Skip the Sanitization of all Tracking Codes' ) ); |
| 32 | |
| 33 | $skip = $tcmp->options->getSkipCodeSanitization(); |
| 34 | |
| 35 | $tcmp->form->checkbox( 'skipCodeSanitization', $skip ); |
| 36 | |
| 37 | $tcmp->form->p( __( 'Enable option to change cache behavior' ) ); |
| 38 | |
| 39 | $modify = $tcmp->options->getModifySuperglobalVariable(); |
| 40 | |
| 41 | $tcmp->form->checkbox( 'checkbox', $modify ); |
| 42 | $tcmp->form->p( 'NOTE: From time to time, Support may recommend the superglobal switch to be turned on. Please do not turn it on unless support gives you direction to do so.' ); |
| 43 | |
| 44 | $tcmp->form->nonce( 'tcmp_admin_options' ); |
| 45 | $tcmp->form->br(); |
| 46 | $tcmp->form->submit( 'Save' ); |
| 47 | $tcmp->form->form_ends(); |
| 48 | |
| 49 | ?> |
| 50 | </div> |
| 51 | <?php |
| 52 | } |
| 53 |