info.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <?php
  2. defined('ABSPATH') || exit;
  3. @include_once NEWSLETTER_INCLUDES_DIR . '/controls.php';
  4. $module = Newsletter::instance();
  5. $controls = new NewsletterControls();
  6. if (!$controls->is_action()) {
  7. $controls->data = get_option('newsletter_main');
  8. } else {
  9. if ($controls->is_action('save')) {
  10. $module->merge_options($controls->data);
  11. $module->save_options($controls->data, 'info');
  12. $controls->add_message_saved();
  13. }
  14. }
  15. ?>
  16. <div class="wrap" id="tnp-wrap">
  17. <?php include NEWSLETTER_DIR . '/tnp-header.php'; ?>
  18. <div id="tnp-heading">
  19. <h2><?php _e('Company Info', 'newsletter') ?></h2>
  20. </div>
  21. <div id="tnp-body">
  22. <form method="post" action="">
  23. <?php $controls->init(); ?>
  24. <div id="tabs">
  25. <ul>
  26. <li><a href="#tabs-general"><?php _e('General', 'newsletter') ?></a></li>
  27. <li><a href="#tabs-social"><?php _e('Social', 'newsletter') ?></a></li>
  28. </ul>
  29. <div id="tabs-general">
  30. <h3><?php _e('Header Settings', 'newsletter') ?></h3>
  31. <table class="form-table">
  32. <tr>
  33. <th>
  34. <?php _e('Logo', 'newsletter') ?><br>
  35. <?php $controls->help('https://www.thenewsletterplugin.com/documentation/newsletter-configuration#company-logo') ?>
  36. </th>
  37. <td style="cursor: pointer">
  38. <?php $controls->media('header_logo', 'medium'); ?>
  39. </td>
  40. </tr>
  41. <tr>
  42. <th><?php _e('Title', 'newsletter') ?></th>
  43. <td>
  44. <?php $controls->text('header_title', 40); ?>
  45. </td>
  46. </tr>
  47. <tr>
  48. <th><?php _e('Motto', 'newsletter') ?></th>
  49. <td>
  50. <?php $controls->text('header_sub', 40); ?>
  51. </td>
  52. </tr>
  53. </table>
  54. <h3><?php _e('Footer Settings', 'newsletter') ?></h3>
  55. <table class="form-table">
  56. <tr>
  57. <th><?php _e('Company name', 'newsletter') ?></th>
  58. <td>
  59. <?php $controls->text('footer_title', 40); ?>
  60. </td>
  61. </tr>
  62. <tr>
  63. <th><?php _e('Address', 'newsletter') ?></th>
  64. <td>
  65. <?php $controls->text('footer_contact', 40); ?>
  66. </td>
  67. </tr>
  68. <tr>
  69. <th><?php _e('Copyright or legal text', 'newsletter') ?></th>
  70. <td>
  71. <?php $controls->text('footer_legal', 40); ?>
  72. </td>
  73. </tr>
  74. </table>
  75. </div>
  76. <div id="tabs-social">
  77. <table class="form-table">
  78. <tr>
  79. <th>Facebook URL</th>
  80. <td>
  81. <?php $controls->text('facebook_url', 40); ?>
  82. </td>
  83. </tr>
  84. <tr>
  85. <th>Twitter URL</th>
  86. <td>
  87. <?php $controls->text('twitter_url', 40); ?>
  88. </td>
  89. </tr>
  90. <tr>
  91. <th>Instagram URL</th>
  92. <td>
  93. <?php $controls->text('instagram_url', 40); ?>
  94. </td>
  95. </tr>
  96. <tr>
  97. <th>Google+ URL</th>
  98. <td>
  99. <?php $controls->text('googleplus_url', 40); ?>
  100. </td>
  101. </tr>
  102. <tr>
  103. <th>Pinterest URL</th>
  104. <td>
  105. <?php $controls->text('pinterest_url', 40); ?>
  106. </td>
  107. </tr>
  108. <tr>
  109. <th>Linkedin URL</th>
  110. <td>
  111. <?php $controls->text('linkedin_url', 40); ?>
  112. </td>
  113. </tr>
  114. <tr>
  115. <th>Tumblr URL</th>
  116. <td>
  117. <?php $controls->text('tumblr_url', 40); ?>
  118. </td>
  119. </tr>
  120. <tr>
  121. <th>YouTube URL</th>
  122. <td>
  123. <?php $controls->text('youtube_url', 40); ?>
  124. </td>
  125. </tr>
  126. <tr>
  127. <th>Vimeo URL</th>
  128. <td>
  129. <?php $controls->text('vimeo_url', 40); ?>
  130. </td>
  131. </tr>
  132. <tr>
  133. <th>Soundcloud URL</th>
  134. <td>
  135. <?php $controls->text('soundcloud_url', 40); ?>
  136. </td>
  137. </tr>
  138. </table>
  139. </div>
  140. </div>
  141. <p>
  142. <?php $controls->button_save(); ?>
  143. </p>
  144. </form>
  145. </div>
  146. <?php include NEWSLETTER_DIR . '/tnp-footer.php'; ?>
  147. </div>