Guest User

post-gallery-slider/templates/options-page.php (inactive)

a guest
Mar 29th, 2015
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.70 KB | None | 0 0
  1. <div class="wrap">
  2. <div class="icon32" id="icon-options-general"><br></div>
  3. <h2>Post Gallery Slider</h2>
  4. <!--Some optional text here explaining the overall purpose of the options and what they relate to etc.-->
  5. <form method="post" action="options.php">
  6. <?php settings_fields('post_gallery_slider'); ?>
  7. <!--<h3>Main Section</h3>
  8. <p>Some section description</p>-->
  9. <table class="form-table">
  10. <tbody>
  11. <tr valign="top">
  12. <th scope="row"><label for="post_gallery_slider_size">Image size:</label></th>
  13. <td>
  14. <select id="post_gallery_slider_size" name="post_gallery_slider[size]">
  15. <?php foreach ($sizes as $size => $title): if ($title == "custom" && !function_exists("add_image_size")) continue; ?>
  16. <option value="<?php echo $size ?>"<?php echo $size == $options["size"] ? ' selected="selected"' : '' ?>><?php echo $title ?></option>
  17. <?php endforeach; ?>
  18. </select>
  19. &nbsp;
  20. <span id="post_gallery_slider_size_custom"<?php echo $options["size"] != "gallery-image" ? ' style="display:none"' : ''?>>
  21. <label for="post_gallery_slider_width">Width:</label> <input id="post_gallery_slider_width" name="post_gallery_slider[width]" size="4" type="text" value="<?php echo $options["width"] ?>">
  22. <label for="post_gallery_slider_height">Height:</label> <input id="post_gallery_slider_height" name="post_gallery_slider[height]" size="4" type="text" value="<?php echo $options["height"] ?>">
  23. </span>
  24. </td>
  25. </tr>
  26. <tr valign="top">
  27. <th scope="row"><label for="post_gallery_slider_show_thumbs">Show thumbnails:</label></th>
  28. <td>
  29. <select id="post_gallery_slider_show_thumbs" name="post_gallery_slider[show_thumbs]">
  30. <option value="before"<?php echo $options["show_thumbs"] == "before" ? ' selected="selected"' : '' ?>>Before slider</option>
  31. <option value="after"<?php echo $options["show_thumbs"] == "after" ? ' selected="selected"' : '' ?>>After slider</option>
  32. <option value=""<?php echo $options["show_thumbs"] == "" ? ' selected="selected"' : '' ?>>Do not show</option>
  33. </select>
  34. </td>
  35. </tr>
  36. <tr valign="top" id="post_gallery_slider_thumb_size_row"<?php echo $options["show_thumbs"] == "" ? ' style="display:none"' : '' ?>>
  37. <th scope="row"><label for="post_gallery_slider_thumb_size">Thumbnails size:</label></th>
  38. <td>
  39. <select id="post_gallery_slider_thumb_size" name="post_gallery_slider[thumb_size]">
  40. <?php foreach ($thumb_sizes as $size => $title): if ($title == "custom" && !function_exists("add_image_size")) continue; ?>
  41. <option value="<?php echo $size ?>"<?php echo $size == $options["thumb_size"] ? ' selected="selected"' : '' ?>><?php echo $title ?></option>
  42. <?php endforeach; ?>
  43. </select>
  44. &nbsp;
  45. <span id="post_gallery_slider_thumb_size_custom"<?php echo $options["thumb_size"] != "gallery-thumb" ? ' style="display:none"' : ''?>>
  46. <label for="post_gallery_slider_thumb_width">Width:</label> <input id="post_gallery_slider_thumb_width" name="post_gallery_slider[thumb_width]" size="4" type="text" value="<?php echo $options["thumb_width"] ?>" />
  47. <label for="post_gallery_slider_thumb_height">Height:</label> <input id="post_gallery_slider_thumb_height" name="post_gallery_slider[thumb_height]" size="4" type="text" value="<?php echo $options["thumb_height"] ?>" />
  48. </span>
  49. </td>
  50. </tr>
  51. <tr valign="top">
  52. <th scope="row"><label for="post_gallery_slider_restore">Restore defaults:</label></th>
  53. <td><input id="post_gallery_slider_restore" name="post_gallery_slider[restore]" type="checkbox" /></td>
  54. </tr>
  55. <tr valign="top">
  56. <th scope="row">Customize:</th>
  57. <td><a href="<?php echo admin_url("plugin-editor.php?file=post-gallery-slider%2Fcss%2Fgallery.css&plugin=post-gallery-slider%2Fpost-gallery-slider.php")?>">Edit CSS</a></td>
  58. </tr>
  59. </tbody>
  60. </table>
  61. <?php submit_button(); ?>
  62. </form>
  63. </div>
  64. <script type="text/javascript">
  65. jQuery(document).ready(function($) {
  66. $("#post_gallery_slider_size").change(function() {
  67. if (this.value == "gallery-image")
  68. $("#post_gallery_slider_size_custom").show();
  69. else
  70. $("#post_gallery_slider_size_custom").hide();
  71. });
  72. $("#post_gallery_slider_show_thumbs").change(function() {
  73. if (this.value == "") {
  74. $("#post_gallery_slider_thumb_size_row").hide();
  75. }
  76. else {
  77. $("#post_gallery_slider_thumb_size_row").show();
  78. }
  79. });
  80. $("#post_gallery_slider_thumb_size").change(function() {
  81. if (this.value == "gallery-thumb")
  82. $("#post_gallery_slider_thumb_size_custom").show();
  83. else
  84. $("#post_gallery_slider_thumb_size_custom").hide();
  85. });
  86. });
  87. </script>
Advertisement
Add Comment
Please, Sign In to add comment