PageRenderTime 44ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/wp-content/themes/vantage/premium/extras/css/page.php

https://gitlab.com/haque.mdmanzurul/wp-harpar-carolyn
PHP | 64 lines | 52 code | 12 blank | 0 comment | 3 complexity | f8ecf63be33cf8530713360e8cae3384 MD5 | raw file
  1. <div class="wrap">
  2. <h2><?php _e( 'Custom CSS', 'vantage' ) ?></h2>
  3. <?php if(isset($_POST['siteorigin_custom_css_save'])) : ?>
  4. <div class="updated settings-error">
  5. <p><?php _e('Custom CSS Updated', 'vantage') ?></p>
  6. </div>
  7. <?php endif; ?>
  8. <?php if(!empty($revision)) : ?>
  9. <div class="updated settings-error">
  10. <p><?php _e('Viewing a revision. Save CSS to use this revision.', 'vantage') ?></p>
  11. </div>
  12. <?php endif; ?>
  13. <div id="poststuff">
  14. <div id="so-custom-css-info">
  15. <div class="postbox" id="so-custom-css-revisions">
  16. <h3 class="hndle"><span><?php _e('CSS Revisions', 'vantage') ?></span></h3>
  17. <div class="inside">
  18. <ol data-confirm="<?php esc_attr_e('Are you sure you want to load this revision?', 'vantage') ?>">
  19. <?php
  20. if( is_array($custom_css_revisions) ) {
  21. foreach($custom_css_revisions as $time => $css) {
  22. ?>
  23. <li>
  24. <a href="<?php echo add_query_arg(array('theme' => $theme, 'time' => $time)) ?>" class="load-css-revision"><?php echo date('j F Y @ H:i:s', $time) ?></a>
  25. (<?php printf(__('%d chars', 'vantage'), strlen($css)) ?>)
  26. </li>
  27. <?php
  28. }
  29. }
  30. ?>
  31. </ol>
  32. </div>
  33. </div>
  34. </div>
  35. <form action="<?php echo esc_url( add_query_arg( array( 'theme' => false, 'time' => false ) ) ) ?>" method="POST" id="so-custom-css-form">
  36. <div id="custom-css-container" style="border:1px solid #D0D0D0; padding: 8px; background: #FCFCFC; cursor: text">
  37. <textarea name="custom_css" id="custom-css-textarea"><?php echo esc_textarea( $custom_css ) ?></textarea>
  38. <?php wp_nonce_field( 'custom_css', '_sononce' ) ?>
  39. </div>
  40. <p class="description">
  41. <?php
  42. $theme = basename( get_template_directory() );
  43. printf( __( 'Changes apply to %s and its child themes', 'vantage' ), ucfirst( $theme ) );
  44. ?>
  45. </p>
  46. <p class="submit">
  47. <input type="submit" name="siteorigin_custom_css_save" class="button-primary" value="<?php esc_attr_e( 'Save CSS', 'vantage' ); ?>" />
  48. </p>
  49. </form>
  50. </div>
  51. <div class="clear"></div>
  52. </div>