theme-options.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. /*
  3. * This is a pre packaged theme options page. Every option name
  4. * must start with "theme_" so Newsletter can distinguish them from other
  5. * options that are specific to the object using the theme.
  6. *
  7. * An array of theme default options should always be present and that default options
  8. * should be merged with the current complete set of options as shown below.
  9. *
  10. * Every theme can define its own set of options, the will be used in the theme.php
  11. * file while composing the email body. Newsletter knows nothing about theme options
  12. * (other than saving them) and does not use or relies on any of them.
  13. *
  14. * For multilanguage purpose you can actually check the constants "WP_LANG", until
  15. * a decent system will be implemented.
  16. */
  17. /* @var $controls NewsletterControls */
  18. defined('ABSPATH') || exit;
  19. ?>
  20. <div id="tabs">
  21. <ul>
  22. <li><a href="#tabs-a"><?php _e('General', 'newsletter') ?></a></li>
  23. <li><a href="#tabs-b"><?php _e('Social', 'newsletter') ?></a></li>
  24. </ul>
  25. <div id="tabs-a">
  26. <table class="form-table">
  27. <tr>
  28. <th>Max new posts to include</th>
  29. <td>
  30. <?php $controls->select_number('theme_max_posts', 1, 50); ?>
  31. </td>
  32. </tr>
  33. <tr>
  34. <th>Categories to include</th>
  35. <td><?php $controls->categories_group('theme_categories'); ?></td>
  36. </tr>
  37. <tr>
  38. <th>Post types</th>
  39. <td>
  40. <?php $controls->post_types('theme_post_types'); ?>
  41. <p class="description">Leave all uncheck for a default behavior.</p>
  42. </td>
  43. </tr>
  44. <tr>
  45. <th>Pre header message</th>
  46. <td>
  47. <?php $controls->textarea_fixed('theme_pre_message', '100%', 120); ?>
  48. </td>
  49. </tr>
  50. <tr>
  51. <th>Footer message</th>
  52. <td>
  53. <?php $controls->textarea_fixed('theme_footer_message', '100%', 120); ?>
  54. </td>
  55. </tr>
  56. <tr>
  57. <th>Read more label</th>
  58. <td>
  59. <?php $controls->text('theme_read_more'); ?>
  60. </td>
  61. </tr>
  62. </table>
  63. </div>
  64. <div id="tabs-b">
  65. <?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social-options.php'; ?>
  66. </div>
  67. </div>