/defaultroot/wp-content/themes/constructor/admin/settings/header.php

https://github.com/rohans/tradeinbooks · PHP · 140 lines · 117 code · 12 blank · 11 comment · 29 complexity · c32b5398d1d3f8101a9aa6dc721a753a MD5 · raw file

  1. <?php __('Header', 'constructor'); // required for correct translation ?>
  2. <input type="hidden" id="constructor-title-pos" name="constructor[title][pos]" value="<?php echo $constructor['title']['pos']?>"/>
  3. <input type="hidden" id="constructor-menu-pos" name="constructor[menu][pos]" value="<?php echo $constructor['menu']['pos']?>"/>
  4. <table class="form-table">
  5. <tr>
  6. <th scope="row" valign="top"><?php _e('Title position', 'constructor'); ?></th>
  7. <td class="position select" id="title-pos">
  8. <a href="#" title="<?php _e('Top Left', 'constructor'); ?>" name="left top" <?php if($constructor['title']['pos'] == 'left top') echo 'class="selected"'; ?>> </a>
  9. <a href="#" title="<?php _e('Top Center', 'constructor'); ?>" name="center top" <?php if($constructor['title']['pos'] == 'center top') echo 'class="selected"'; ?>> </a>
  10. <a href="#" title="<?php _e('Top Right', 'constructor'); ?>" name="right top" <?php if($constructor['title']['pos'] == 'right top') echo 'class="selected"'; ?>> </a>
  11. <br class="clear"/>
  12. <span name="center left"> </span>
  13. <span name="center center"> </span>
  14. <span name="center right"> </span>
  15. <br class="clear"/>
  16. <a href="#" title="<?php _e('Bottom Left', 'constructor'); ?>" name="left bottom" <?php if($constructor['title']['pos'] == 'left bottom') echo 'class="selected"'; ?>> </a>
  17. <a href="#" title="<?php _e('Bottom Center', 'constructor'); ?>" name="center bottom" <?php if($constructor['title']['pos'] == 'center bottom') echo 'class="selected"'; ?>> </a>
  18. <a href="#" title="<?php _e('Bottom Right', 'constructor'); ?>" name="right bottom" <?php if($constructor['title']['pos'] == 'right bottom') echo 'class="selected"'; ?>> </a>
  19. </td>
  20. </tr>
  21. <tr>
  22. <th scope="row" valign="top"><?php _e('Hidden title', 'constructor'); ?></th>
  23. <td>
  24. <input type="checkbox" id="constructor-title-hidden" name="constructor[title][hidden]" value="1" <?php if ($constructor['title']['hidden']) echo 'checked="checked"'; ?> />
  25. <label for="constructor-title-hidden"><?php _e('hide title by CSS', 'constructor'); ?></label>
  26. </td>
  27. </tr>
  28. <tr>
  29. <th scope="row" valign="top">
  30. <?php _e('Header menu', 'constructor'); ?><br/>
  31. <small><em><?php _e('menu can configured with <a href="widgets.php">widgets</a>, use "header" sidebar', 'constructor'); ?></em></small>
  32. </th>
  33. <td>
  34. <fieldset>
  35. <legend>
  36. <input type="checkbox" id="constructor-menu-flag" name="constructor[menu][flag]" value="1" <?php if ($constructor['menu']['flag']) echo 'checked="checked"'; ?> />
  37. <label for="constructor-menu-flag"><?php _e('Show top menu', 'constructor'); ?></label>
  38. </legend>
  39. <dl>
  40. <dt><?php _e('Position', 'constructor'); ?></dt>
  41. <dd class="position select" id="menu-pos">
  42. <a href="#" title="<?php _e('Top Left', 'constructor'); ?>" name="left top" <?php if ($constructor['menu']['pos'] == 'left top') echo 'class="selected"'; ?>> </a>
  43. <span name="center top"> </span>
  44. <a href="#" title="<?php _e('Top Right', 'constructor'); ?>" name="right top" <?php if ($constructor['menu']['pos'] == 'right top') echo 'class="selected"'; ?>> </a>
  45. <br class="clear"/>
  46. <a href="#" title="<?php _e('Center Left', 'constructor'); ?>" name="left center" <?php if ($constructor['menu']['pos'] == 'left center') echo 'class="selected"'; ?>> </a>
  47. <span name="center center"> </span>
  48. <a href="#" title="<?php _e('Center Right', 'constructor'); ?>" name="right center" <?php if ($constructor['menu']['pos'] == 'right center') echo 'class="selected"'; ?>> </a>
  49. <br class="clear"/>
  50. <a href="#" title="<?php _e('Bottom Left', 'constructor'); ?>" name="left bottom" <?php if ($constructor['menu']['pos'] == 'left bottom') echo 'class="selected"'; ?>> </a>
  51. <span name="center bottom"> </span>
  52. <a href="#" title="<?php _e('Bottom Right', 'constructor'); ?>" name="right bottom" <?php if ($constructor['menu']['pos'] == 'right bottom') echo 'class="selected"'; ?>> </a>
  53. <br class="clear"/>
  54. </dd>
  55. <dt><?php _e('Width', 'constructor'); ?></dt>
  56. <dd>
  57. <input type="checkbox" id="constructor-menu-width" name="constructor[menu][width]" value="100%" <?php if ($constructor['menu']['width'] == '100%') echo 'checked="checked"'; ?>/>
  58. <label for="constructor-menu-width"><?php _e('stretch across the width', 'constructor'); ?></label>
  59. </dd>
  60. <?php if (function_exists('wp_nav_menu')) : ?>
  61. <dt><?php _e('Header Menu', 'constructor'); ?></dt>
  62. <dd><?php _e('You can use <a href="nav-menus.php">navigation menu</a> with name "Header Menu"', 'constructor');?></dd>
  63. <?php endif; ?>
  64. <dt><?php _e('Pages', 'constructor'); ?></dt>
  65. <dd><select name="constructor[menu][pages][depth]" id="constructor-menu-pages">
  66. <option value="0" <?php if ($constructor['menu']['pages']['depth'] == 0) echo 'selected="selected"'; ?>><?php _e('Disable pages', 'constructor'); ?></option>
  67. <option value="1" <?php if ($constructor['menu']['pages']['depth'] == 1) echo 'selected="selected"'; ?>><?php _e('Show first-level pages', 'constructor'); ?></option>
  68. <option value="2" <?php if ($constructor['menu']['pages']['depth'] == 2) echo 'selected="selected"'; ?>><?php _e('Show pages in drop-down menu', 'constructor'); ?></option>
  69. <option value="3" <?php if ($constructor['menu']['pages']['depth'] == 3) echo 'selected="selected"'; ?>><?php _e('Show pages in drop-down menu (2-levels)', 'constructor'); ?></option>
  70. <option value="4" <?php if ($constructor['menu']['pages']['depth'] == 4) echo 'selected="selected"'; ?>><?php _e('Show pages in drop-down menu (3-levels)', 'constructor'); ?></option>
  71. </select>
  72. <br/>
  73. <label for="constructor-menu-pages-exclude"><?php _e('Exclude:', 'constructor'); ?></label>
  74. <input type="text" name="constructor[menu][pages][exclude]" id="constructor-menu-pages-exclude" value="<?php echo $constructor['menu']['pages']['exclude']; ?>"/>
  75. <span><?php _e('(IDs, coma separated)', 'constructor'); ?></span>
  76. </dd>
  77. <dt><?php _e('Categories', 'constructor'); ?></dt>
  78. <dd>
  79. <input type="checkbox" id="constructor-menu-categories-group" name="constructor[menu][categories][group]" value="1" <?php if ($constructor['menu']['categories']['group']) echo 'checked="checked"'; ?>/>
  80. <label for="constructor-menu-categories-group"><?php _e('Group categories in one menu item', 'constructor'); ?></label>
  81. <br/>
  82. <select name="constructor[menu][categories][depth]" id="constructor-menu-categories">
  83. <option value="0" <?php if ($constructor['menu']['categories']['depth'] == 0) echo 'selected="selected"'; ?>><?php _e('Disable categories', 'constructor'); ?></option>
  84. <option value="1" <?php if ($constructor['menu']['categories']['depth'] == 1) echo 'selected="selected"'; ?>><?php _e('Show first-level categories', 'constructor'); ?></option>
  85. <option value="2" <?php if ($constructor['menu']['categories']['depth'] == 2) echo 'selected="selected"'; ?>><?php _e('Show categories in drop-down menu', 'constructor'); ?></option>
  86. <option value="3" <?php if ($constructor['menu']['categories']['depth'] == 3) echo 'selected="selected"'; ?>><?php _e('Show categories in drop-down menu (2-levels)', 'constructor'); ?></option>
  87. <option value="4" <?php if ($constructor['menu']['categories']['depth'] == 4) echo 'selected="selected"'; ?>><?php _e('Show categories in drop-down menu (3-levels)', 'constructor'); ?></option>
  88. </select>
  89. <br/>
  90. <label for="constructor-menu-categories-exclude"><?php _e('Exclude:', 'constructor'); ?></label>
  91. <input type="text" name="constructor[menu][categories][exclude]" id="constructor-menu-categories-exclude" value="<?php echo $constructor['menu']['categories']['exclude']; ?>"/>
  92. <span><?php _e('(IDs, coma separated)', 'constructor'); ?></span>
  93. <br/>
  94. <label for="constructor-menu-categories-title"><?php _e('Custom title:', 'constructor'); ?></label>
  95. <input type="text" name="constructor[menu][categories][title]" id="constructor-menu-categories-title" value="<?php echo $constructor['menu']['categories']['title']; ?>"/>
  96. <br/>
  97. </dd>
  98. <dt><?php _e('Links', 'constructor'); ?></dt>
  99. <dd>
  100. <input type="checkbox" id="constructor-menu-home" name="constructor[menu][home]" value="1" <?php if ($constructor['menu']['home']) echo 'checked="checked"'; ?>/>
  101. <label for="constructor-menu-home"><?php _e('Show link to home page', 'constructor'); ?></label>
  102. <br/>
  103. <input type="checkbox" id="constructor-menu-rss" name="constructor[menu][rss]" value="1" <?php if ($constructor['menu']['rss']) echo 'checked="checked"'; ?>/>
  104. <label for="constructor-menu-rss"><?php _e('Show link to RSS feed', 'constructor'); ?></label>
  105. </dd>
  106. <dt><?php _e('Tools', 'constructor'); ?></dt>
  107. <dd>
  108. <input type="checkbox" id="constructor-menu-search" name="constructor[menu][search]" value="1" <?php if ($constructor['menu']['search']) echo 'checked="checked"'; ?>/>
  109. <label for="constructor-menu-search"><?php _e('Show search form', 'constructor'); ?></label>
  110. </dd>
  111. </dl>
  112. </fieldset>
  113. <?php
  114. /*
  115. // TODO: Requeried cookie support in constructor.js
  116. <br/>
  117. <input type="checkbox" id="constructor-menu-size" name="constructor[menu][size]" value="1" <?php if ($constructor['menu']['size']) echo 'checked="checked"'; ?>/>
  118. <label for="constructor-menu-size"><?php _e('Show font resizer', 'constructor'); ?></label>
  119. */
  120. /*
  121. // TODO: Theme switcher
  122. <br/>
  123. <input type="checkbox" id="constructor-menu-theme" name="constructor[menu][theme]" value="1" <?php if ($constructor['menu']['theme']) echo 'checked="checked"'; ?>/>
  124. <label for="constructor-menu-theme"><?php _e('Theme switcher', 'constructor'); ?></label>
  125. */ ?>
  126. </td>
  127. </tr>
  128. </table>