[ Index ]

MailPress 7.1

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-admin/includes/settings/filter_img/ -> form.php (source)

   1  <?php // filter_img
   2  
   3  if ( !isset( $filter_img ) )
   4  {
   5      $filter_img = get_option( MailPress_filter_img::option_name );
   6  }
   7  
   8  $filter_img['img'] = str_replace( '<', '&lt;', $filter_img['img'] );
   9  $filter_img['img'] = str_replace( '>', '&gt;', $filter_img['img'] );
  10  if ( !isset( $filter_img['align'] ) ) $filter_img['align'] = 'none';
  11  if ( !isset( $filter_img['extra_style'] ) ) $filter_img['extra_style'] = '';
  12  
  13  ?>
  14  <form name="<?php echo basename(__DIR__); ?>" method="post" class="mp_settings">
  15      <input type="hidden" name="_tab" value="<?php echo basename(__DIR__); ?>" />
  16      <table class="form-table">
  17  
  18  <!-- alignment -->
  19          <tr>
  20              <th><?php _e( '&lt;img&gt; defaults', 'MailPress' ); ?></th>
  21              <td class="field">
  22                  <table>
  23                      <tr>
  24                          <td class="nobd"><?php _e( 'Alignment' ); ?></td>
  25                          <td class="nobd">
  26                              <input type="radio" value="none"   name="filter_img[align]"  id="align-none"<?php checked( 'none', $filter_img['align'] ); ?> />
  27                              <label for="align-none" class="align image-align-none-label"><?php _e( 'None' ); ?></label>
  28                              <input type="radio" value="left"   name="filter_img[align]"  id="align-left"<?php checked( 'left', $filter_img['align'] ); ?> />
  29                              <label for="align-left" class="align image-align-left-label"><?php _e( 'Left' ); ?></label>
  30                              <input type="radio" value="center" name="filter_img[align]"  id="align-center"<?php checked( 'center', $filter_img['align'] ); ?> />
  31                              <label for="align-center" class="align image-align-center-label"><?php _e( 'Center' ); ?></label>
  32                              <input type="radio" value="right"  name="filter_img[align]"  id="align-right"<?php checked( 'right', $filter_img['align'] ); ?> />
  33                              <label for="align-right" class="align image-align-right-label"><?php _e( 'Right' ); ?></label>
  34                          </td>
  35                      </tr>
  36                      <tr>
  37                          <td class="nobd"><?php _e( 'style=', 'MailPress' ); ?></td>
  38                          <td class="nobd">
  39                              <textarea name="filter_img[extra_style]" class="courier" rows="2" cols="61"><?php echo htmlspecialchars( stripslashes( $filter_img['extra_style'] ),ENT_QUOTES );?></textarea>
  40                          </td>
  41                      </tr>
  42                  </table>
  43              </td>
  44          </tr>
  45  <!-- sample -->
  46          <tr>
  47              <th><?php _e( 'Enter full &lt;img&gt; html tag', 'MailPress' ); ?></th>
  48              <td>
  49                  <textarea name="filter_img[img]" class="courier" rows="2" cols="72"><?php echo esc_attr( $filter_img['img'] ); ?></textarea>
  50                  <br /><?php _e( 'this text is not controlled or sanitize, it is just for test purpose', 'MailPress' ); ?>
  51              </td>
  52          </tr>
  53  <?php 
  54  if ( !empty( $filter_img['img'] ) )
  55  {
  56  ?>
  57  <!-- result -->
  58          <tr>
  59              <th><?php _e( 'Filter result', 'MailPress' ); ?></th>
  60              <td class="courier">
  61                  <div class="filter-img bkgndc bd1sc">
  62  <?php 
  63      $x = $filter_img['img'];
  64      $x = stripslashes( $x );
  65      $x = htmlspecialchars_decode( $x );
  66      $x = MailPress_filter_img::img_mail( $x );
  67      $x = str_ireplace( '<!-- MailPress_filter_img start -->','',$x );
  68      $x = str_ireplace( '<!-- MailPress_filter_img end -->','',$x );
  69      $x = htmlspecialchars( $x,ENT_QUOTES );
  70      echo $x;
  71  ?>
  72                  </div>
  73              </td>
  74          </tr>
  75  <?php } ?>
  76  <!-- keep url -->
  77          <tr>
  78              <th><?php _e( 'Keep url', 'MailPress' ); ?></th>
  79              <td class="field">
  80                  <input type="checkbox" value="on" name="filter_img[keepurl]" id="attach-none"<?php if ( isset( $filter_img['keepurl'] ) ) checked( 'on', $filter_img['keepurl'] ); ?> />
  81                  <label for="attach-none"><?php printf( __( 'NO mail attachments with site images when full url (<i>&lt;img src="<b>%1$s/...</b>"</i>) is provided.', 'MailPress' ), site_url() ); ?></label>
  82              </td>
  83          </tr>
  84  
  85      </table>
  86  
  87  <?php MP_AdminPage::save_button(); ?>
  88  
  89  </form>


Generated: Mon Mar 11 18:33:33 2019 Cross-referenced by PHPXref 0.7.1