wordpress-starter 0.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (417) hide show
  1. data/CHANGELOG.md +13 -0
  2. data/README.md +47 -4
  3. data/lib/wordpress-starter.rb +3 -2
  4. data/stylesheets/wordpress/_defaults.scss +267 -20
  5. data/stylesheets/wordpress/_page.scss +0 -363
  6. data/stylesheets/wordpress/_responsive.scss +0 -115
  7. data/stylesheets/wordpress/_theme.scss +0 -82
  8. data/stylesheets/wordpress/_typography.scss +0 -134
  9. data/templates/foundation/404.php +24 -0
  10. data/templates/{starter → foundation}/admin/README.txt +0 -0
  11. data/templates/{starter → foundation}/admin/assets/css/admin-style.css +0 -0
  12. data/templates/{starter → foundation}/admin/assets/css/colorpicker.css +0 -0
  13. data/templates/{starter → foundation}/admin/assets/images/1col.png +0 -0
  14. data/templates/{starter → foundation}/admin/assets/images/2-col-portfolio.png +0 -0
  15. data/templates/{starter → foundation}/admin/assets/images/2cl.png +0 -0
  16. data/templates/{starter → foundation}/admin/assets/images/2cr.png +0 -0
  17. data/templates/{starter → foundation}/admin/assets/images/3-col-portfolio.png +0 -0
  18. data/templates/{starter → foundation}/admin/assets/images/3cm.png +0 -0
  19. data/templates/{starter → foundation}/admin/assets/images/3cr.png +0 -0
  20. data/templates/{starter → foundation}/admin/assets/images/4-col-portfolio.png +0 -0
  21. data/templates/{starter → foundation}/admin/assets/images/accept.png +0 -0
  22. data/templates/{starter → foundation}/admin/assets/images/button_check.png +0 -0
  23. data/templates/{starter → foundation}/admin/assets/images/colorpicker/blank.gif +0 -0
  24. data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_background.png +0 -0
  25. data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_hex.png +0 -0
  26. data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_hsb_b.png +0 -0
  27. data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_hsb_h.png +0 -0
  28. data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_hsb_s.png +0 -0
  29. data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_indic.gif +0 -0
  30. data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_overlay.png +0 -0
  31. data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_rgb_b.png +0 -0
  32. data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_rgb_g.png +0 -0
  33. data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_rgb_r.png +0 -0
  34. data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_select.gif +0 -0
  35. data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_submit.png +0 -0
  36. data/templates/{starter → foundation}/admin/assets/images/colorpicker/select.png +0 -0
  37. data/templates/{starter → foundation}/admin/assets/images/dropdown-arrow.png +0 -0
  38. data/templates/{starter → foundation}/admin/assets/images/favicon.ico +0 -0
  39. data/templates/{starter → foundation}/admin/assets/images/icon-add.png +0 -0
  40. data/templates/{starter → foundation}/admin/assets/images/icon-backup.png +0 -0
  41. data/templates/{starter → foundation}/admin/assets/images/icon-delete.png +0 -0
  42. data/templates/{starter → foundation}/admin/assets/images/icon-docs.png +0 -0
  43. data/templates/{starter → foundation}/admin/assets/images/icon-edit.png +0 -0
  44. data/templates/{starter → foundation}/admin/assets/images/icon-home.png +0 -0
  45. data/templates/{starter → foundation}/admin/assets/images/icon-info.png +0 -0
  46. data/templates/{starter → foundation}/admin/assets/images/icon-notice.png +0 -0
  47. data/templates/{starter → foundation}/admin/assets/images/icon-paint.png +0 -0
  48. data/templates/{starter → foundation}/admin/assets/images/icon-settings.png +0 -0
  49. data/templates/{starter → foundation}/admin/assets/images/icon-slider.png +0 -0
  50. data/templates/{starter → foundation}/admin/assets/images/icon-warn.png +0 -0
  51. data/templates/{starter → foundation}/admin/assets/images/icon_option.png +0 -0
  52. data/templates/{starter → foundation}/admin/assets/images/loading-bottom.gif +0 -0
  53. data/templates/{starter → foundation}/admin/assets/images/select.png +0 -0
  54. data/templates/{starter → foundation}/admin/assets/images/sign_warning.png +0 -0
  55. data/templates/{starter → foundation}/admin/assets/images/stop.png +0 -0
  56. data/templates/{starter → foundation}/admin/assets/images/toggle_tabs.png +0 -0
  57. data/templates/{starter → foundation}/admin/assets/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  58. data/templates/{starter → foundation}/admin/assets/images/warning.png +0 -0
  59. data/templates/{starter → foundation}/admin/assets/images/wrench.png +0 -0
  60. data/templates/{starter → foundation}/admin/assets/images/wrench16.png +0 -0
  61. data/templates/{starter → foundation}/admin/assets/js/ajaxupload.js +0 -0
  62. data/templates/{starter → foundation}/admin/assets/js/colorpicker.js +0 -0
  63. data/templates/{starter → foundation}/admin/assets/js/cookie.js +0 -0
  64. data/templates/{starter → foundation}/admin/assets/js/jquery.maskedinput-1.2.2.js +0 -0
  65. data/templates/{starter → foundation}/admin/assets/js/jquery.tipsy.js +0 -0
  66. data/templates/{starter → foundation}/admin/assets/js/of-medialibrary-uploader.js +0 -0
  67. data/templates/{starter → foundation}/admin/assets/js/smof.js +0 -0
  68. data/templates/foundation/admin/classes/class.options-machine.php +627 -0
  69. data/templates/{starter → foundation}/admin/front-end/options.php +0 -0
  70. data/templates/{starter → foundation}/admin/functions/functions.admin.php +0 -0
  71. data/templates/{starter → foundation}/admin/functions/functions.interface.php +0 -0
  72. data/templates/{starter → foundation}/admin/functions/functions.load.php +0 -0
  73. data/templates/foundation/admin/functions/functions.mediauploader.php +194 -0
  74. data/templates/foundation/admin/functions/functions.options.php +508 -0
  75. data/templates/{starter → foundation}/admin/functions/functions.php +0 -0
  76. data/templates/{starter → foundation}/admin/index.php +88 -86
  77. data/templates/{starter → foundation}/admin/layouts/default.css +0 -0
  78. data/templates/{starter → foundation}/admin/layouts/placebo.css +0 -0
  79. data/templates/foundation/archive.php +57 -0
  80. data/templates/foundation/category.php +40 -0
  81. data/templates/foundation/comments.php +65 -0
  82. data/templates/foundation/content-aside.php +26 -0
  83. data/templates/foundation/content-image.php +29 -0
  84. data/templates/foundation/content-link.php +27 -0
  85. data/templates/foundation/content-none.php +21 -0
  86. data/templates/foundation/content-page.php +24 -0
  87. data/templates/foundation/content-quote.php +26 -0
  88. data/templates/foundation/content-status.php +33 -0
  89. data/templates/foundation/content.php +67 -0
  90. data/templates/foundation/editor-style.scss +359 -0
  91. data/templates/foundation/footer.php +29 -0
  92. data/templates/foundation/functions.php +1425 -0
  93. data/templates/foundation/header.php +63 -0
  94. data/templates/foundation/ie.scss +1 -0
  95. data/templates/{starter → foundation}/images/bg/bg0.png +0 -0
  96. data/templates/{starter → foundation}/images/bg/bg1.png +0 -0
  97. data/templates/{starter → foundation}/images/bg/bg10.png +0 -0
  98. data/templates/{starter → foundation}/images/bg/bg11.png +0 -0
  99. data/templates/{starter → foundation}/images/bg/bg2.png +0 -0
  100. data/templates/{starter → foundation}/images/bg/bg3.png +0 -0
  101. data/templates/{starter → foundation}/images/bg/bg4.png +0 -0
  102. data/templates/{starter → foundation}/images/bg/bg5.png +0 -0
  103. data/templates/{starter → foundation}/images/bg/bg6.jpg +0 -0
  104. data/templates/{starter → foundation}/images/bg/bg7.jpg +0 -0
  105. data/templates/{starter → foundation}/images/bg/bg8.png +0 -0
  106. data/templates/{starter → foundation}/images/bg/bg9.png +0 -0
  107. data/templates/foundation/images/fairhead-icons/fc-webicon-behance-m.png +0 -0
  108. data/templates/foundation/images/fairhead-icons/fc-webicon-behance-s.png +0 -0
  109. data/templates/foundation/images/fairhead-icons/fc-webicon-behance.png +0 -0
  110. data/templates/foundation/images/fairhead-icons/fc-webicon-behance.svg +48 -0
  111. data/templates/foundation/images/fairhead-icons/fc-webicon-creativecloud-m.png +0 -0
  112. data/templates/foundation/images/fairhead-icons/fc-webicon-creativecloud-s.png +0 -0
  113. data/templates/foundation/images/fairhead-icons/fc-webicon-creativecloud.png +0 -0
  114. data/templates/foundation/images/fairhead-icons/fc-webicon-creativecloud.svg +48 -0
  115. data/templates/foundation/images/fairhead-icons/fc-webicon-dribbble-m.png +0 -0
  116. data/templates/foundation/images/fairhead-icons/fc-webicon-dribbble-s.png +0 -0
  117. data/templates/foundation/images/fairhead-icons/fc-webicon-dribbble.png +0 -0
  118. data/templates/foundation/images/fairhead-icons/fc-webicon-dribbble.svg +28 -0
  119. data/templates/foundation/images/fairhead-icons/fc-webicon-dropbox-m.png +0 -0
  120. data/templates/foundation/images/fairhead-icons/fc-webicon-dropbox-s.png +0 -0
  121. data/templates/foundation/images/fairhead-icons/fc-webicon-dropbox.png +0 -0
  122. data/templates/foundation/images/fairhead-icons/fc-webicon-dropbox.svg +73 -0
  123. data/templates/foundation/images/fairhead-icons/fc-webicon-evernote-m.png +0 -0
  124. data/templates/foundation/images/fairhead-icons/fc-webicon-evernote-s.png +0 -0
  125. data/templates/foundation/images/fairhead-icons/fc-webicon-evernote.png +0 -0
  126. data/templates/foundation/images/fairhead-icons/fc-webicon-evernote.svg +62 -0
  127. data/templates/foundation/images/fairhead-icons/fc-webicon-facebook-m.png +0 -0
  128. data/templates/foundation/images/fairhead-icons/fc-webicon-facebook-s.png +0 -0
  129. data/templates/foundation/images/fairhead-icons/fc-webicon-facebook.png +0 -0
  130. data/templates/foundation/images/fairhead-icons/fc-webicon-facebook.svg +15 -0
  131. data/templates/foundation/images/fairhead-icons/fc-webicon-flickr-m.png +0 -0
  132. data/templates/foundation/images/fairhead-icons/fc-webicon-flickr-s.png +0 -0
  133. data/templates/foundation/images/fairhead-icons/fc-webicon-flickr.png +0 -0
  134. data/templates/foundation/images/fairhead-icons/fc-webicon-flickr.svg +14 -0
  135. data/templates/foundation/images/fairhead-icons/fc-webicon-github-m.png +0 -0
  136. data/templates/foundation/images/fairhead-icons/fc-webicon-github-s.png +0 -0
  137. data/templates/foundation/images/fairhead-icons/fc-webicon-github.png +0 -0
  138. data/templates/foundation/images/fairhead-icons/fc-webicon-github.svg +38 -0
  139. data/templates/foundation/images/fairhead-icons/fc-webicon-googleplus-m.png +0 -0
  140. data/templates/foundation/images/fairhead-icons/fc-webicon-googleplus-s.png +0 -0
  141. data/templates/foundation/images/fairhead-icons/fc-webicon-googleplus.png +0 -0
  142. data/templates/foundation/images/fairhead-icons/fc-webicon-googleplus.svg +52 -0
  143. data/templates/foundation/images/fairhead-icons/fc-webicon-icloud-m.png +0 -0
  144. data/templates/foundation/images/fairhead-icons/fc-webicon-icloud-s.png +0 -0
  145. data/templates/foundation/images/fairhead-icons/fc-webicon-icloud.png +0 -0
  146. data/templates/foundation/images/fairhead-icons/fc-webicon-icloud.svg +26 -0
  147. data/templates/foundation/images/fairhead-icons/fc-webicon-linkedin-m.png +0 -0
  148. data/templates/foundation/images/fairhead-icons/fc-webicon-linkedin-s.png +0 -0
  149. data/templates/foundation/images/fairhead-icons/fc-webicon-linkedin.png +0 -0
  150. data/templates/foundation/images/fairhead-icons/fc-webicon-linkedin.svg +28 -0
  151. data/templates/foundation/images/fairhead-icons/fc-webicon-mail-m.png +0 -0
  152. data/templates/foundation/images/fairhead-icons/fc-webicon-mail-s.png +0 -0
  153. data/templates/foundation/images/fairhead-icons/fc-webicon-mail.png +0 -0
  154. data/templates/foundation/images/fairhead-icons/fc-webicon-mail.svg +27 -0
  155. data/templates/foundation/images/fairhead-icons/fc-webicon-msn-m.png +0 -0
  156. data/templates/foundation/images/fairhead-icons/fc-webicon-msn-s.png +0 -0
  157. data/templates/foundation/images/fairhead-icons/fc-webicon-msn.png +0 -0
  158. data/templates/foundation/images/fairhead-icons/fc-webicon-msn.svg +44 -0
  159. data/templates/foundation/images/fairhead-icons/fc-webicon-pinterest-m.png +0 -0
  160. data/templates/foundation/images/fairhead-icons/fc-webicon-pinterest-s.png +0 -0
  161. data/templates/foundation/images/fairhead-icons/fc-webicon-pinterest.png +0 -0
  162. data/templates/foundation/images/fairhead-icons/fc-webicon-pinterest.svg +42 -0
  163. data/templates/foundation/images/fairhead-icons/fc-webicon-rdio-m.png +0 -0
  164. data/templates/foundation/images/fairhead-icons/fc-webicon-rdio-s.png +0 -0
  165. data/templates/foundation/images/fairhead-icons/fc-webicon-rdio.png +0 -0
  166. data/templates/foundation/images/fairhead-icons/fc-webicon-rdio.svg +18 -0
  167. data/templates/foundation/images/fairhead-icons/fc-webicon-rss-m.png +0 -0
  168. data/templates/foundation/images/fairhead-icons/fc-webicon-rss-s.png +0 -0
  169. data/templates/foundation/images/fairhead-icons/fc-webicon-rss.png +0 -0
  170. data/templates/foundation/images/fairhead-icons/fc-webicon-rss.svg +18 -0
  171. data/templates/foundation/images/fairhead-icons/fc-webicon-skitch-m.png +0 -0
  172. data/templates/foundation/images/fairhead-icons/fc-webicon-skitch-s.png +0 -0
  173. data/templates/foundation/images/fairhead-icons/fc-webicon-skitch.png +0 -0
  174. data/templates/foundation/images/fairhead-icons/fc-webicon-skitch.svg +24 -0
  175. data/templates/foundation/images/fairhead-icons/fc-webicon-skype-m.png +0 -0
  176. data/templates/foundation/images/fairhead-icons/fc-webicon-skype-s.png +0 -0
  177. data/templates/foundation/images/fairhead-icons/fc-webicon-skype.png +0 -0
  178. data/templates/foundation/images/fairhead-icons/fc-webicon-skype.svg +25 -0
  179. data/templates/foundation/images/fairhead-icons/fc-webicon-spotify-m.png +0 -0
  180. data/templates/foundation/images/fairhead-icons/fc-webicon-spotify-s.png +0 -0
  181. data/templates/foundation/images/fairhead-icons/fc-webicon-spotify.png +0 -0
  182. data/templates/foundation/images/fairhead-icons/fc-webicon-spotify.svg +38 -0
  183. data/templates/foundation/images/fairhead-icons/fc-webicon-stumbleupon-m.png +0 -0
  184. data/templates/foundation/images/fairhead-icons/fc-webicon-stumbleupon-s.png +0 -0
  185. data/templates/foundation/images/fairhead-icons/fc-webicon-stumbleupon.png +0 -0
  186. data/templates/foundation/images/fairhead-icons/fc-webicon-stumbleupon.svg +22 -0
  187. data/templates/foundation/images/fairhead-icons/fc-webicon-tumblr-m.png +0 -0
  188. data/templates/foundation/images/fairhead-icons/fc-webicon-tumblr-s.png +0 -0
  189. data/templates/foundation/images/fairhead-icons/fc-webicon-tumblr.png +0 -0
  190. data/templates/foundation/images/fairhead-icons/fc-webicon-tumblr.svg +16 -0
  191. data/templates/foundation/images/fairhead-icons/fc-webicon-twitter-m.png +0 -0
  192. data/templates/foundation/images/fairhead-icons/fc-webicon-twitter-s.png +0 -0
  193. data/templates/foundation/images/fairhead-icons/fc-webicon-twitter.png +0 -0
  194. data/templates/foundation/images/fairhead-icons/fc-webicon-twitter.svg +24 -0
  195. data/templates/foundation/images/fairhead-icons/fc-webicon-vimeo-m.png +0 -0
  196. data/templates/foundation/images/fairhead-icons/fc-webicon-vimeo-s.png +0 -0
  197. data/templates/foundation/images/fairhead-icons/fc-webicon-vimeo.png +0 -0
  198. data/templates/foundation/images/fairhead-icons/fc-webicon-vimeo.svg +20 -0
  199. data/templates/foundation/images/fairhead-icons/fc-webicon-youtube-m.png +0 -0
  200. data/templates/foundation/images/fairhead-icons/fc-webicon-youtube-s.png +0 -0
  201. data/templates/foundation/images/fairhead-icons/fc-webicon-youtube.png +0 -0
  202. data/templates/foundation/images/fairhead-icons/fc-webicon-youtube.svg +106 -0
  203. data/templates/foundation/images/fairhead-icons/fc-webicon-youversion-m.png +0 -0
  204. data/templates/foundation/images/fairhead-icons/fc-webicon-youversion-s.png +0 -0
  205. data/templates/foundation/images/fairhead-icons/fc-webicon-youversion.png +0 -0
  206. data/templates/foundation/images/fairhead-icons/fc-webicon-youversion.svg +54 -0
  207. data/templates/foundation/images/fairhead-icons/fc-webicon-zerply-m.png +0 -0
  208. data/templates/foundation/images/fairhead-icons/fc-webicon-zerply-s.png +0 -0
  209. data/templates/foundation/images/fairhead-icons/fc-webicon-zerply.png +0 -0
  210. data/templates/foundation/images/fairhead-icons/fc-webicon-zerply.svg +20 -0
  211. data/templates/foundation/images/foundation/orbit/bullets.jpg +0 -0
  212. data/templates/foundation/images/foundation/orbit/left-arrow-small.png +0 -0
  213. data/templates/foundation/images/foundation/orbit/left-arrow.png +0 -0
  214. data/templates/foundation/images/foundation/orbit/loading.gif +0 -0
  215. data/templates/foundation/images/foundation/orbit/mask-black.png +0 -0
  216. data/templates/foundation/images/foundation/orbit/pause-black.png +0 -0
  217. data/templates/foundation/images/foundation/orbit/right-arrow-small.png +0 -0
  218. data/templates/foundation/images/foundation/orbit/right-arrow.png +0 -0
  219. data/templates/foundation/images/foundation/orbit/rotator-black.png +0 -0
  220. data/templates/foundation/images/foundation/orbit/timer-black.png +0 -0
  221. data/templates/foundation/index.php +19 -0
  222. data/templates/foundation/javascripts/app.js +38 -0
  223. data/templates/foundation/javascripts/foundation.min.js +77 -0
  224. data/templates/foundation/javascripts/jquery.foundation.accordion.js +39 -0
  225. data/templates/foundation/javascripts/jquery.foundation.alerts.js +20 -0
  226. data/templates/foundation/javascripts/jquery.foundation.buttons.js +79 -0
  227. data/templates/foundation/javascripts/jquery.foundation.clearing.js +480 -0
  228. data/templates/foundation/javascripts/jquery.foundation.forms.js +494 -0
  229. data/templates/foundation/javascripts/jquery.foundation.joyride.js +639 -0
  230. data/templates/foundation/javascripts/jquery.foundation.magellan.js +86 -0
  231. data/templates/foundation/javascripts/jquery.foundation.mediaQueryToggle.js +27 -0
  232. data/templates/foundation/javascripts/jquery.foundation.navigation.js +55 -0
  233. data/templates/foundation/javascripts/jquery.foundation.orbit.js +897 -0
  234. data/templates/foundation/javascripts/jquery.foundation.reveal.js +794 -0
  235. data/templates/foundation/javascripts/jquery.foundation.tabs.js +56 -0
  236. data/templates/foundation/javascripts/jquery.foundation.tooltips.js +193 -0
  237. data/templates/foundation/javascripts/jquery.foundation.topbar.js +156 -0
  238. data/templates/foundation/javascripts/modernizr.foundation.js +4 -0
  239. data/templates/foundation/languages/readme.txt +6 -0
  240. data/templates/foundation/license.txt +281 -0
  241. data/templates/foundation/loop.php +30 -0
  242. data/templates/foundation/manifest.rb +285 -0
  243. data/templates/foundation/options.php +43 -0
  244. data/templates/foundation/page.php +29 -0
  245. data/templates/foundation/print.css +1 -0
  246. data/templates/foundation/print.scss +1 -0
  247. data/templates/foundation/readme.txt +6 -0
  248. data/templates/foundation/sass/_app.scss +50 -0
  249. data/templates/foundation/sass/_settings.scss +243 -0
  250. data/templates/foundation/screen.scss +1 -0
  251. data/templates/foundation/screenshot.png +0 -0
  252. data/templates/foundation/search.php +31 -0
  253. data/templates/{starter → foundation}/search.png +0 -0
  254. data/templates/foundation/searchform.php +14 -0
  255. data/templates/foundation/sidebar.php +15 -0
  256. data/templates/foundation/single.php +31 -0
  257. data/templates/foundation/style.css +17 -0
  258. data/templates/foundation/stylesheets/fc-webicons.css +156 -0
  259. data/templates/foundation/tag.php +41 -0
  260. data/templates/project/404.php +24 -0
  261. data/templates/project/admin/README.txt +25 -0
  262. data/templates/project/admin/assets/css/admin-style.css +838 -0
  263. data/templates/project/admin/assets/css/colorpicker.css +177 -0
  264. data/templates/project/admin/assets/images/1col.png +0 -0
  265. data/templates/project/admin/assets/images/2-col-portfolio.png +0 -0
  266. data/templates/project/admin/assets/images/2cl.png +0 -0
  267. data/templates/project/admin/assets/images/2cr.png +0 -0
  268. data/templates/project/admin/assets/images/3-col-portfolio.png +0 -0
  269. data/templates/project/admin/assets/images/3cm.png +0 -0
  270. data/templates/project/admin/assets/images/3cr.png +0 -0
  271. data/templates/project/admin/assets/images/4-col-portfolio.png +0 -0
  272. data/templates/project/admin/assets/images/accept.png +0 -0
  273. data/templates/project/admin/assets/images/button_check.png +0 -0
  274. data/templates/project/admin/assets/images/colorpicker/blank.gif +0 -0
  275. data/templates/project/admin/assets/images/colorpicker/colorpicker_background.png +0 -0
  276. data/templates/project/admin/assets/images/colorpicker/colorpicker_hex.png +0 -0
  277. data/templates/project/admin/assets/images/colorpicker/colorpicker_hsb_b.png +0 -0
  278. data/templates/project/admin/assets/images/colorpicker/colorpicker_hsb_h.png +0 -0
  279. data/templates/project/admin/assets/images/colorpicker/colorpicker_hsb_s.png +0 -0
  280. data/templates/project/admin/assets/images/colorpicker/colorpicker_indic.gif +0 -0
  281. data/templates/project/admin/assets/images/colorpicker/colorpicker_overlay.png +0 -0
  282. data/templates/project/admin/assets/images/colorpicker/colorpicker_rgb_b.png +0 -0
  283. data/templates/project/admin/assets/images/colorpicker/colorpicker_rgb_g.png +0 -0
  284. data/templates/project/admin/assets/images/colorpicker/colorpicker_rgb_r.png +0 -0
  285. data/templates/project/admin/assets/images/colorpicker/colorpicker_select.gif +0 -0
  286. data/templates/project/admin/assets/images/colorpicker/colorpicker_submit.png +0 -0
  287. data/templates/project/admin/assets/images/colorpicker/select.png +0 -0
  288. data/templates/project/admin/assets/images/dropdown-arrow.png +0 -0
  289. data/templates/project/admin/assets/images/favicon.ico +0 -0
  290. data/templates/project/admin/assets/images/icon-add.png +0 -0
  291. data/templates/project/admin/assets/images/icon-backup.png +0 -0
  292. data/templates/project/admin/assets/images/icon-delete.png +0 -0
  293. data/templates/project/admin/assets/images/icon-docs.png +0 -0
  294. data/templates/project/admin/assets/images/icon-edit.png +0 -0
  295. data/templates/project/admin/assets/images/icon-home.png +0 -0
  296. data/templates/project/admin/assets/images/icon-info.png +0 -0
  297. data/templates/project/admin/assets/images/icon-notice.png +0 -0
  298. data/templates/project/admin/assets/images/icon-paint.png +0 -0
  299. data/templates/project/admin/assets/images/icon-settings.png +0 -0
  300. data/templates/project/admin/assets/images/icon-slider.png +0 -0
  301. data/templates/project/admin/assets/images/icon-warn.png +0 -0
  302. data/templates/project/admin/assets/images/icon_option.png +0 -0
  303. data/templates/project/admin/assets/images/loading-bottom.gif +0 -0
  304. data/templates/project/admin/assets/images/select.png +0 -0
  305. data/templates/project/admin/assets/images/sign_warning.png +0 -0
  306. data/templates/project/admin/assets/images/stop.png +0 -0
  307. data/templates/project/admin/assets/images/toggle_tabs.png +0 -0
  308. data/templates/project/admin/assets/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  309. data/templates/project/admin/assets/images/warning.png +0 -0
  310. data/templates/project/admin/assets/images/wrench.png +0 -0
  311. data/templates/project/admin/assets/images/wrench16.png +0 -0
  312. data/templates/project/admin/assets/js/ajaxupload.js +606 -0
  313. data/templates/project/admin/assets/js/colorpicker.js +455 -0
  314. data/templates/project/admin/assets/js/cookie.js +1 -0
  315. data/templates/project/admin/assets/js/jquery.maskedinput-1.2.2.js +252 -0
  316. data/templates/project/admin/assets/js/jquery.tipsy.js +241 -0
  317. data/templates/project/admin/assets/js/of-medialibrary-uploader.js +168 -0
  318. data/templates/project/admin/assets/js/smof.js +623 -0
  319. data/templates/{starter → project}/admin/classes/class.options-machine.php +0 -0
  320. data/templates/project/admin/front-end/options.php +77 -0
  321. data/templates/project/admin/functions/functions.admin.php +76 -0
  322. data/templates/project/admin/functions/functions.interface.php +232 -0
  323. data/templates/project/admin/functions/functions.load.php +14 -0
  324. data/templates/{starter → project}/admin/functions/functions.mediauploader.php +0 -0
  325. data/templates/project/admin/functions/functions.options.php +508 -0
  326. data/templates/project/admin/functions/functions.php +0 -0
  327. data/templates/project/admin/index.php +87 -0
  328. data/templates/project/admin/layouts/default.css +0 -0
  329. data/templates/project/admin/layouts/placebo.css +0 -0
  330. data/templates/project/archive.php +57 -0
  331. data/templates/{starter → project}/category.php +0 -0
  332. data/templates/project/comments.php +65 -0
  333. data/templates/{starter → project}/content-aside.php +0 -0
  334. data/templates/{starter → project}/content-image.php +0 -0
  335. data/templates/{starter → project}/content-link.php +0 -0
  336. data/templates/{starter → project}/content-none.php +0 -0
  337. data/templates/project/content-page.php +24 -0
  338. data/templates/{starter → project}/content-quote.php +0 -0
  339. data/templates/{starter → project}/content-status.php +0 -0
  340. data/templates/project/content.php +67 -0
  341. data/templates/{starter → project}/editor-style.scss +0 -0
  342. data/templates/project/footer.php +29 -0
  343. data/templates/project/functions.php +1233 -0
  344. data/templates/project/header.php +63 -0
  345. data/templates/project/images/bg/bg0.png +0 -0
  346. data/templates/project/images/bg/bg1.png +0 -0
  347. data/templates/project/images/bg/bg10.png +0 -0
  348. data/templates/project/images/bg/bg11.png +0 -0
  349. data/templates/project/images/bg/bg2.png +0 -0
  350. data/templates/project/images/bg/bg3.png +0 -0
  351. data/templates/project/images/bg/bg4.png +0 -0
  352. data/templates/project/images/bg/bg5.png +0 -0
  353. data/templates/project/images/bg/bg6.jpg +0 -0
  354. data/templates/project/images/bg/bg7.jpg +0 -0
  355. data/templates/project/images/bg/bg8.png +0 -0
  356. data/templates/project/images/bg/bg9.png +0 -0
  357. data/templates/project/index.php +19 -0
  358. data/templates/project/javascripts/app.js +6 -0
  359. data/templates/{starter → project/javascripts}/moderninzr.min.js +0 -0
  360. data/templates/project/languages/readme.txt +6 -0
  361. data/templates/project/license.txt +281 -0
  362. data/templates/{starter → project}/loop.php +0 -0
  363. data/templates/project/manifest.rb +131 -4
  364. data/templates/project/options.php +42 -0
  365. data/templates/project/page.php +29 -0
  366. data/templates/project/readme.txt +6 -1
  367. data/templates/project/screenshot.png +0 -0
  368. data/templates/project/search.php +31 -0
  369. data/templates/project/searchform.php +14 -0
  370. data/templates/project/sidebar.php +15 -0
  371. data/templates/project/single.php +31 -0
  372. data/templates/project/style.css +5 -0
  373. data/templates/{starter → project}/tag.php +0 -0
  374. data/templates/starter/404.php +42 -19
  375. data/templates/starter/README.md +41 -0
  376. data/templates/starter/archive.php +89 -49
  377. data/templates/starter/comments.php +43 -32
  378. data/templates/starter/content-page.php +12 -16
  379. data/templates/starter/content-single.php +59 -0
  380. data/templates/starter/content.php +52 -58
  381. data/templates/starter/footer.php +20 -22
  382. data/templates/starter/functions.php +60 -1156
  383. data/templates/starter/header.php +31 -52
  384. data/templates/starter/image.php +111 -0
  385. data/templates/starter/inc/custom-header.php +184 -0
  386. data/templates/starter/inc/extras.php +79 -0
  387. data/templates/starter/inc/template-tags.php +175 -0
  388. data/templates/starter/inc/theme-options/theme-options.php +306 -0
  389. data/templates/starter/index.php +41 -11
  390. data/templates/starter/javascripts/html5.js +6 -0
  391. data/templates/starter/javascripts/keyboard-image-navigation.js +14 -0
  392. data/templates/starter/javascripts/small-menu.js +39 -0
  393. data/templates/starter/languages/readme.txt +6 -0
  394. data/templates/starter/layouts/content-sidebar-sidebar.css +27 -0
  395. data/templates/starter/layouts/content-sidebar.css +25 -0
  396. data/templates/starter/layouts/sidebar-content-sidebar.css +27 -0
  397. data/templates/starter/layouts/sidebar-content.css +25 -0
  398. data/templates/starter/layouts/sidebar-sidebar-content.css +22 -0
  399. data/templates/starter/license.txt +281 -0
  400. data/templates/starter/manifest.rb +22 -110
  401. data/templates/starter/no-results.php +34 -0
  402. data/templates/starter/page.php +16 -14
  403. data/templates/starter/print.scss +1 -104
  404. data/templates/starter/rtl.css +17 -0
  405. data/templates/starter/screen.scss +653 -1
  406. data/templates/starter/screenshot.png +0 -0
  407. data/templates/starter/search.php +31 -21
  408. data/templates/starter/searchform.php +8 -9
  409. data/templates/starter/sidebar.php +29 -10
  410. data/templates/starter/single.php +24 -21
  411. data/templates/starter/style.css +10 -6
  412. metadata +401 -100
  413. data/templates/project/print.css +0 -4
  414. data/templates/starter/admin/functions/functions.options.php +0 -507
  415. data/templates/starter/app.js +0 -97
  416. data/templates/starter/options.php +0 -407
  417. data/templates/starter/readme.txt +0 -1
@@ -0,0 +1,87 @@
1
+ <?php
2
+ /*
3
+ Title : SMOF
4
+ Description : Slightly Modified Options Framework
5
+ Version : 1.4.0
6
+ Author : Syamil MJ
7
+ Author URI : http://aquagraphite.com
8
+ License : WTFPL - http://sam.zoy.org/wtfpl/
9
+ Credits : Thematic Options Panel - http://wptheming.com/2010/11/thematic-options-panel-v2/
10
+ KIA Thematic Options Panel - https://github.com/helgatheviking/thematic-options-KIA
11
+ Woo Themes - http://woothemes.com/
12
+ Option Tree - http://wordpress.org/extend/plugins/option-tree/
13
+ */
14
+
15
+ /**
16
+ * Definitions
17
+ *
18
+ * @since 1.4.0
19
+ */
20
+ $theme_version = '';
21
+
22
+ if ( function_exists( 'wp_get_theme' ) ) {
23
+ if ( is_child_theme() ) {
24
+ $temp_obj = wp_get_theme();
25
+ $theme_obj = wp_get_theme( $temp_obj->get( 'Template' ) );
26
+ }
27
+ else {
28
+ $theme_obj = wp_get_theme();
29
+ }
30
+
31
+ $theme_version = $theme_obj->get( 'Version' );
32
+ $theme_name = $theme_obj->get( 'Name' );
33
+ $theme_uri = $theme_obj->get( 'ThemeURI' );
34
+ $author_uri = $theme_obj->get( 'AuthorURI' );
35
+ }
36
+ else {
37
+ $theme_data = get_theme_data( TEMPLATEPATH.'/style.css' );
38
+ $theme_version = $theme_data['Version'];
39
+ $theme_name = $theme_data['Name'];
40
+ $theme_uri = $theme_data['ThemeURI'];
41
+ $author_uri = $theme_data['AuthorURI'];
42
+ }
43
+
44
+
45
+ define( 'SMOF_VERSION', '1.4.0' );
46
+ define( 'ADMIN_PATH', TEMPLATEPATH . '/admin/' );
47
+ define( 'ADMIN_DIR', get_template_directory_uri() . '/admin/' );
48
+ define( 'LAYOUT_PATH', ADMIN_PATH . '/layouts/' );
49
+ define( 'THEMENAME', $theme_name );
50
+ /* Theme version, uri, and the author uri are not completely necessary, but may be helpful in adding functionality */
51
+ define( 'THEMEVERSION', $theme_version );
52
+ define( 'THEMEURI', $theme_uri );
53
+ define( 'THEMEAUTHORURI', $author_uri );
54
+
55
+ define( 'OPTIONS', $theme_name.'_options' );
56
+ define( 'BACKUPS', $theme_name.'_backups' );
57
+
58
+ /**
59
+ * Required action filters
60
+ *
61
+ * @uses add_action()
62
+ *
63
+ * @since 1.0.0
64
+ */
65
+ global $pagenow;
66
+ if ( is_admin() && isset( $_GET['activated'] ) && $pagenow == 'themes.php' )
67
+ add_action( 'admin_head', 'of_option_setup' );
68
+
69
+ add_action( 'admin_head', 'optionsframework_admin_message' );
70
+ add_action( 'admin_init', 'optionsframework_admin_init' );
71
+ add_action( 'admin_menu', 'optionsframework_add_admin' );
72
+ add_action( 'init', 'optionsframework_mlu_init' );
73
+
74
+ /**
75
+ * Required Files
76
+ *
77
+ * @since 1.0.0
78
+ */
79
+ require_once ADMIN_PATH . 'functions/functions.load.php';
80
+ require_once ADMIN_PATH . 'classes/class.options-machine.php';
81
+
82
+ /**
83
+ * AJAX Saving Options
84
+ *
85
+ * @since 1.0.0
86
+ */
87
+ add_action( 'wp_ajax_of_ajax_post_action', 'of_ajax_callback' );
@@ -0,0 +1,57 @@
1
+ <?php
2
+ /**
3
+ * The template for displaying Archive pages.
4
+ *
5
+ * Used to display archive-type pages if nothing more specific matches a query.
6
+ * For example, puts together date-based pages if no date.php file exists.
7
+ *
8
+ * If you'd like to further customize these archive views, you may create a
9
+ * new template file for each specific one. For example, Twenty Twelve already
10
+ * has tag.php for Tag archives, category.php for Category archives, and
11
+ * author.php for Author archives.
12
+ *
13
+ * Learn more: http://codex.wordpress.org/Template_Hierarchy
14
+ *
15
+ * @category Theme
16
+ * @package [starter]
17
+ * @author [Your Name]
18
+ * @copyright 2012 [Your Name]
19
+ */
20
+
21
+ get_header();
22
+
23
+ if ( have_posts() ):
24
+ ?>
25
+ <header class="archive-header">
26
+ <h1 class="archive-title">
27
+ <?php
28
+ if ( is_day() ) :
29
+ printf( __( 'Daily Archives: %s', 'starter' ), '<span>' . get_the_date() . '</span>' );
30
+ elseif ( is_month() ) :
31
+ printf( __( 'Monthly Archives: %s', 'starter' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'starter' ) ) . '</span>' );
32
+ elseif ( is_year() ) :
33
+ printf( __( 'Yearly Archives: %s', 'starter' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'starter' ) ) . '</span>' );
34
+ else :
35
+ _e( 'Archives', 'starter' );
36
+ endif;
37
+ ?>
38
+ </h1>
39
+ </header>
40
+ <?php
41
+ /* Start the Loop */
42
+ while ( have_posts() ):
43
+ the_post();
44
+
45
+ /* Include the post format-specific template for the content. If you want to
46
+ * this in a child theme then include a file called called content-___.php
47
+ * (where ___ is the post format) and that will be used instead.
48
+ */
49
+ get_template_part( 'content', get_post_format() );
50
+ endwhile;
51
+
52
+ do_action( 'pagination' );
53
+ else:
54
+ get_template_part( 'content', 'none' );
55
+ endif;
56
+
57
+ get_footer();
@@ -0,0 +1,65 @@
1
+ <?php
2
+ /**
3
+ * The template for displaying Comments.
4
+ *
5
+ * The area of the page that contains both current comments
6
+ * and the comment form. The actual display of comments is
7
+ * handled by a callback to starter_comment() which is
8
+ * located in the functions.php file.
9
+ *
10
+ * @category Theme
11
+ * @package [starter]
12
+ * @author [Your Name]
13
+ * @copyright 2012 [Your Name]
14
+ */
15
+
16
+ /*
17
+ * If the current post is protected by a password and
18
+ * the visitor has not yet entered the password we will
19
+ * return early without loading the comments.
20
+ */
21
+ if ( post_password_required() )
22
+ return;
23
+ ?>
24
+
25
+ <div id="comments" class="comments-area">
26
+
27
+ <?php // You can start editing here -- including this comment! ?>
28
+
29
+ <?php if ( have_comments() ) : ?>
30
+ <h2 class="comments-title">
31
+ <?php
32
+ printf(
33
+ _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'starter' ),
34
+ number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>'
35
+ );
36
+ ?>
37
+ </h2>
38
+
39
+ <ol class="commentlist">
40
+ <?php wp_list_comments( array( 'callback' => 'starter_comment', 'style' => 'ol' ) ); ?>
41
+ </ol>
42
+
43
+ <?php
44
+ if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ):
45
+ // are there comments to navigate through ?>
46
+ <nav id="comment-nav-below" class="navigation" role="navigation">
47
+ <h1 class="assistive-text section-heading"><?php _e( 'Comment navigation', 'starter' ); ?></h1>
48
+ <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'starter' ) ); ?></div>
49
+ <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'starter' ) ); ?></div>
50
+ </nav>
51
+ <?php endif; // check for comment navigation ?>
52
+
53
+ <?php
54
+ /* If there are no comments and comments are closed, let's leave a note.
55
+ * But we only want the note on posts and pages that had comments in the first place.
56
+ */
57
+ if ( ! comments_open() && get_comments_number() ) : ?>
58
+ <p class="nocomments"><?php _e( 'Comments are closed.' , 'starter' ); ?></p>
59
+ <?php endif; ?>
60
+
61
+ <?php endif; // have_comments() ?>
62
+
63
+ <?php comment_form(); ?>
64
+
65
+ </div>
@@ -0,0 +1,24 @@
1
+ <?php
2
+ /**
3
+ * The template used for displaying page content in page.php
4
+ *
5
+ * @category Theme
6
+ * @package [starter]
7
+ * @author [Your Name]
8
+ * @copyright 2012 [Your Name]
9
+ */
10
+ ?>
11
+
12
+ <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
13
+ <header class="entry-header">
14
+ <h1 class="entry-title"><?php the_title(); ?></h1>
15
+ </header>
16
+
17
+ <div class="entry-content">
18
+ <?php the_content(); ?>
19
+ <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'starter' ), 'after' => '</div>' ) ); ?>
20
+ </div>
21
+ <footer class="entry-meta">
22
+ <?php edit_post_link( __( 'Edit', 'starter' ), '<span class="edit-link">', '</span>' ); ?>
23
+ </footer>
24
+ </article>
@@ -0,0 +1,67 @@
1
+ <?php
2
+ /**
3
+ * The default template for displaying content. Used for both single and index/archive/search.
4
+ *
5
+ * @category Theme
6
+ * @package [starter]
7
+ * @author [Your Name]
8
+ * @copyright 2012 [Your Name]
9
+ */
10
+ ?>
11
+
12
+ <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
13
+ <?php if ( is_sticky() && is_home() && ! is_paged() ) : ?>
14
+ <div class="featured-post">
15
+ <?php _e( 'Featured post', 'starter' ); ?>
16
+ </div>
17
+ <?php endif; ?>
18
+ <header class="entry-header">
19
+ <?php the_post_thumbnail(); ?>
20
+ <?php if ( is_single() ) : ?>
21
+ <h1 class="entry-title"><?php the_title(); ?></h1>
22
+ <?php else : ?>
23
+ <h1 class="entry-title">
24
+ <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'starter' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
25
+ </h1>
26
+ <?php endif; // is_single() ?>
27
+ <?php if ( comments_open() ) : ?>
28
+ <div class="comments-link">
29
+ <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'starter' ) . '</span>', __( '1 Reply', 'starter' ), __( '% Replies', 'starter' ) ); ?>
30
+ </div>
31
+ <?php endif; // comments_open() ?>
32
+ </header>
33
+
34
+ <?php if ( is_search() ):
35
+ // Only display Excerpts for Search ?>
36
+ <div class="entry-summary">
37
+ <?php the_excerpt(); ?>
38
+ </div>
39
+ <?php else : ?>
40
+ <div class="entry-content">
41
+ <?php the_content( __( 'Continue reading', 'starter' ) ); ?>
42
+ <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'starter' ), 'after' => '</div>' ) ); ?>
43
+ </div>
44
+ <?php endif; ?>
45
+
46
+ <footer class="entry-meta clearfix">
47
+ <?php starter_entry_meta(); ?>
48
+ <?php edit_post_link( __( 'Edit', 'starter' ), '<span class="edit-link">', '</span>' ); ?>
49
+ <?php if ( is_singular() && get_the_author_meta( 'description' ) && is_multi_author() ):
50
+ // If a user has filled out their description and this is a multi-author blog, show a bio on their entries. ?>
51
+ <div class="author-info clearfix">
52
+ <div class="author-avatar">
53
+ <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'starter_author_bio_avatar_size', 68 ) ); ?>
54
+ </div>
55
+ <div class="author-description">
56
+ <h2><?php printf( __( 'About %s', 'starter' ), get_the_author() ); ?></h2>
57
+ <p><?php the_author_meta( 'description' ); ?></p>
58
+ <div class="author-link">
59
+ <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
60
+ <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'starter' ), get_the_author() ); ?>
61
+ </a>
62
+ </div>
63
+ </div>
64
+ </div>
65
+ <?php endif; ?>
66
+ </footer>
67
+ </article>
@@ -0,0 +1,29 @@
1
+ <?php
2
+ /**
3
+ * The default template for displaying footer
4
+ *
5
+ * @category Theme
6
+ * @package [starter]
7
+ * @author [Your Name]
8
+ * @copyright 2012 [Your Name]
9
+ */
10
+ ?>
11
+ </div>
12
+ <?php get_sidebar(); ?>
13
+ </section>
14
+ </div>
15
+ <footer class="footer" role="contentinfo">
16
+ <?php do_action( 'starter_footer' ); ?>
17
+ <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'starter' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'starter' ); ?>"><?php printf( __( 'Proudly powered by %s', 'starter' ), 'WordPress' ); ?></a>
18
+ </footer>
19
+ </div>
20
+ <?php
21
+ /* Always have wp_footer() just before the closing </body>
22
+ * tag of your theme, or you will break many plugins, which
23
+ * generally use this hook to reference JavaScript files.
24
+ */
25
+
26
+ wp_footer();
27
+ ?>
28
+ </body>
29
+ </html>
@@ -0,0 +1,1233 @@
1
+ <?php
2
+ /**
3
+ * [starter] theme functions and definitions
4
+ *
5
+ * For more information on hooks, actions, and filters, see http://codex.wordpress.org/Plugin_API.
6
+ *
7
+ * @category Theme
8
+ * @package [starter]
9
+ * @author [Your Name]
10
+ * @copyright 2012 [Your Name]
11
+ */
12
+
13
+ global $of_options, $data;
14
+
15
+ /**
16
+ * Set the content width based on the theme's design and stylesheet.
17
+ *
18
+ * Used to set the width of images and content. Should be equal to the width the theme
19
+ * is designed for, generally via the style.css stylesheet.
20
+ */
21
+ if ( ! isset( $content_width ) )
22
+ $content_width = 540;
23
+
24
+ /**
25
+ * Sets up theme defaults and registers support for various WordPress features.
26
+ *
27
+ * Note that this function is hooked into the after_setup_theme hook, which runs
28
+ * before the init hook. The init hook is too late for some features, such as indicating
29
+ * support post thumbnails.
30
+ *
31
+ * To override starter_setup() in a child theme, add your own starter_setup to your child theme's
32
+ * functions.php file.
33
+ *
34
+ * @uses add_theme_support() To add support for post thumbnails, automatic feed links and Post Formats.
35
+ * @uses register_nav_menus() To add support for navigation menus.
36
+ * @uses add_custom_background() To add support for a custom background.
37
+ * @uses add_editor_style() To style the visual editor.
38
+ * @uses load_theme_textdomain() For translation/localization support.
39
+ * @uses set_post_thumbnail_size() To set a custom post thumbnail size.
40
+ *
41
+ * @since [starter] 1.0
42
+ */
43
+ function starter_setup() {
44
+ // SET THEME LANGUAGES DIRECTORY
45
+ // Theme translations can be filed in the my_theme/languages/ directory
46
+ load_theme_textdomain( 'starter', get_template_directory() . '/languages' );
47
+
48
+ // This theme styles the visual editor with editor-style.css to match the theme style.
49
+ add_editor_style( 'stylesheets/editor-style.css' );
50
+
51
+ // Adds support for rss links
52
+ add_theme_support( 'automatic-feed-links' );
53
+
54
+ // Add support for a variety of post formats (http://codex.wordpress.org/Post_Formats)
55
+ // Child Themes inherit the post formats defined by the parent theme
56
+ add_theme_support( 'post-formats', array( 'aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat' ) );
57
+
58
+ // Add post thumbnails (http://codex.wordpress.org/Post_Thumbnails)
59
+ add_theme_support( 'post-thumbnails' );
60
+ set_post_thumbnail_size( 540, 230, true ); // Default Thumbnail Image
61
+
62
+ // Register wp_nav_menu() menus (http://codex.wordpress.org/Function_Reference/register_nav_menus)
63
+ register_nav_menu( 'primary', __( 'Primary menu', 'starter' ) );
64
+
65
+ /* Options Framework */
66
+ locate_template( 'options.php', true );
67
+ locate_template( 'admin/index.php', true );
68
+
69
+ do_action( 'starter_setup' );
70
+ }
71
+
72
+ add_action( 'after_setup_theme', 'starter_setup' );
73
+
74
+ /**
75
+ * Some cleanup
76
+ *
77
+ * @since [starter] 1.0
78
+ * @return void
79
+ */
80
+ function starter_init() {
81
+ // autolinks in comments
82
+ remove_filter( 'comment_text', 'make_clickable', 9 );
83
+
84
+ // Display the links to the general feeds: Post and Comment Feed
85
+ remove_action( 'wp_head', 'feed_links', 2 );
86
+
87
+ // Display the links to the extra feeds such as category feeds
88
+ remove_action( 'wp_head', 'feed_links_extra', 3 );
89
+
90
+ // Display the link to the Really Simple Discovery service endpoint, EditURI link
91
+ remove_action( 'wp_head', 'rsd_link' );
92
+
93
+ // Display the link to the Windows Live Writer manifest file.
94
+ remove_action( 'wp_head', 'wlwmanifest_link' );
95
+ remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );
96
+
97
+ // index link
98
+ remove_action( 'wp_head', 'index_rel_link' );
99
+
100
+ // prev link
101
+ remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 );
102
+
103
+ // start link
104
+ remove_action( 'wp_head', 'start_post_rel_link', 10, 0 );
105
+
106
+ // Display relational links for the posts adjacent to the current post.
107
+ remove_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 );
108
+
109
+ // Display the XHTML generator that is generated on the wp_head hook, WP version
110
+ remove_action( 'wp_head', 'wp_generator' );
111
+ remove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );
112
+
113
+ // remove jetpack open graph tags
114
+ remove_action( 'wp_head', 'jetpack_og_tags' );
115
+
116
+ add_filter( 'use_default_gallery_style', '__return_null' );
117
+
118
+ /* Custom oEmbed Providers */
119
+
120
+ // Add Soundcloud oEmbed
121
+ wp_oembed_add_provider( '#http://(www\.)?soundcloud\.com/.*#i', 'http://soundcloud.com/oembed', true );
122
+
123
+ // Add Kickstarter oEmbed
124
+ wp_oembed_add_provider( '#http://(www\.)?kickstarter\.com/projects/.*#i', 'http://www.kickstarter.com/services/oembed', true );
125
+
126
+ // Add Instagram oEmbed
127
+ wp_oembed_add_provider( '#http://(www\.)?instagr(am)?\.(am|com)/.*#i', 'http://api.instagram.com/oembed', true );
128
+
129
+ // Add Slideshare oEmbed
130
+ wp_oembed_add_provider( '#http://(www\.)?slideshare\.net/.*#i', 'http://api.embed.ly/v1/api/oembed', true );
131
+ }
132
+
133
+ add_action( 'init', 'starter_init' );
134
+
135
+ /**
136
+ * Remove the WordPress version from RSS feeds
137
+ */
138
+ add_filter( 'the_generator', '__return_false' );
139
+
140
+ /**
141
+ * Adds custom scripts to theme header
142
+ *
143
+ * @since [starter] 1.0
144
+ * @return void
145
+ */
146
+ function starter_enqueue_scripts() {
147
+ $theme = wp_get_theme();
148
+ $version = $theme['Version'];
149
+
150
+ wp_deregister_script( 'jquery' );
151
+ wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js', false, '1.8.3' );
152
+
153
+ /**
154
+ * We add some JavaScript to pages with the comment form
155
+ * to support sites with threaded comments (when in use).
156
+ */
157
+ if ( is_singular() and comments_open() and get_option( 'thread_comments' ) ) {
158
+ wp_enqueue_script( 'comment-reply' );
159
+ }
160
+
161
+ wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/javascripts/modernizr.min.js', false, '2.6.2' );
162
+ wp_enqueue_script( 'app', get_template_directory_uri() . '/javascripts/app.js', array( 'jquery' ), $version, true );
163
+ }
164
+
165
+ add_action( 'wp_enqueue_scripts', 'starter_enqueue_scripts' );
166
+
167
+ /**
168
+ * Adds custom styles to theme header
169
+ *
170
+ * @since [starter] 1.0
171
+ * @return void
172
+ */
173
+ function starter_enqueue_styles() {
174
+ $theme = wp_get_theme();
175
+ $version = $theme['Version'];
176
+
177
+ wp_enqueue_style( 'app', get_stylesheet_uri(), false, $version, 'all' );
178
+ }
179
+
180
+ add_action( 'wp_enqueue_scripts', 'starter_enqueue_styles' );
181
+
182
+ /**
183
+ * Makes some changes to the <title> tag, by filtering the output of wp_title().
184
+ *
185
+ * If we have a site description and we're viewing the home page or a blog posts
186
+ * page (when using a static front page), then we will add the site description.
187
+ *
188
+ * If we're viewing a search result, then we're going to recreate the title entirely.
189
+ * We're going to add page numbers to all titles as well, to the middle of a search
190
+ * result title and the end of all other titles.
191
+ *
192
+ * The site title also gets added to all titles.
193
+ *
194
+ * @since [starter] 1.0
195
+ *
196
+ * @param string $title Title generated by wp_title()
197
+ * @param string $separator The separator passed to wp_title(). Base theme uses a vertical bar, "|", as a separator in header.php.
198
+ * @return string The new title, ready for the <title> tag.
199
+ */
200
+ function starter_filter_wp_title( $title, $separator ) {
201
+ // Don't affect wp_title() calls in feeds.
202
+ if ( is_feed() or function_exists( 'get_wpseo_options' ) )
203
+ return $title;
204
+
205
+ // The $paged global variable contains the page number of a listing of posts.
206
+ // The $page global variable contains the page number of a single post that is paged.
207
+ // We'll display whichever one applies, if we're not looking at the first page.
208
+ global $paged, $page, $post;
209
+
210
+ if ( is_search() ) {
211
+ // If we're a search, let's start over:
212
+ $title = sprintf( __( 'Search results for %s', 'starter' ), '"' . get_search_query() . '"' );
213
+ // Add a page number if we're on page 2 or more:
214
+ if ( $paged >= 2 ) {
215
+ $title .= " $separator " . sprintf( __( 'Page %s', 'starter' ), $paged );
216
+ }
217
+ // Add the site name to the end:
218
+ $title .= " $separator " . get_bloginfo( 'name', 'display' );
219
+ // We're done. Let's send the new title back to wp_title():
220
+ return $title;
221
+ }
222
+
223
+ $return = array();
224
+
225
+ if ( $title != '' ) {
226
+ $return[] = str_replace( " $separator ", '', apply_filters( 'the_category', $title ) );
227
+ }
228
+
229
+ if ( is_single() ) {
230
+ if ( get_post_meta( $post->ID, 'title', true ) ) {
231
+ $return[] = stripslashes( get_post_meta( $post->ID, 'seo_title', true ) );
232
+ }
233
+ elseif ( ! in_array( $post->post_type, array( 'post', 'page', 'attachment' ) ) ) {
234
+ $post_type_obj = get_post_type_object( $post->post_type );
235
+ $return[] = apply_filters( 'post_type_archive_title', $post_type_obj->labels->name );
236
+ }
237
+ }
238
+
239
+ // Add a page number if necessary:
240
+ if ( $paged >= 2 or $page >= 2 ) {
241
+ $return[] = sprintf( __( 'Page %s', 'starter' ), max( $paged, $page ) );
242
+ }
243
+
244
+ // Add the site name to the end:
245
+ $return[] = get_bloginfo( 'name', 'display' );
246
+
247
+ // If we have a site description and we're on the home/front page, add the description:
248
+ $site_description = get_bloginfo( 'description', 'display' );
249
+ if ( $site_description and ( is_home() or is_front_page() ) ) {
250
+ $return[] = $site_description;
251
+ }
252
+
253
+ // Return the new title to wp_title():
254
+ return implode( " $separator ", $return );
255
+ }
256
+
257
+ add_filter( 'wp_title', 'starter_filter_wp_title', 10, 3 );
258
+
259
+ /**
260
+ * Adds code to header
261
+ *
262
+ * @since [starter] 1.0
263
+ * @return string misc
264
+ */
265
+ function starter_header() {
266
+ ?>
267
+ <!-- For third-generation iPad with high-resolution Retina display: -->
268
+ <link rel="apple-touch-icon-precomposed" sizes="144x144" href="apple-touch-icon-144x144-precomposed.png?1333401433">
269
+ <!-- For iPhone with high-resolution Retina display: -->
270
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="apple-touch-icon-114x114-precomposed.png?1333401433">
271
+ <!-- For first- and second-generation iPad: -->
272
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="apple-touch-icon-72x72-precomposed.png?1333401433">
273
+ <!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
274
+ <link rel="apple-touch-icon-precomposed" href="apple-touch-icon-precomposed.png?1333401433">
275
+ <!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
276
+ <link rel="shortcut icon" href="favicon.ico?1333401433" type="image/x-icon" />
277
+ <?php
278
+ do_action( 'starter_header' );
279
+ }
280
+
281
+ add_action( 'wp_head', 'starter_header', 10 );
282
+
283
+ /**
284
+ * Adds code to footer
285
+ *
286
+ * @since [starter] 1.0
287
+ * @return string misc
288
+ */
289
+ function starter_footer() {}
290
+
291
+ add_action( 'wp_footer', 'starter_footer', 10 );
292
+
293
+ /**
294
+ * Defines widget areas
295
+ *
296
+ * @since [starter] 1.0
297
+ * @return void
298
+ */
299
+ function starter_widgets_init() {
300
+ register_sidebar(
301
+ array(
302
+ 'name' => __( 'Primary widget area', 'starter' ),
303
+ 'id' => 'primary-widget-area',
304
+ 'description' => __( '', 'starter' ),
305
+ 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
306
+ 'after_widget' => '</li>',
307
+ 'before_title' => '<h3 class="widget-title">',
308
+ 'after_title' => '</h3>',
309
+ )
310
+ );
311
+ }
312
+
313
+ add_action( 'widgets_init', 'starter_widgets_init' );
314
+
315
+ /**
316
+ * Clean up output of stylesheet <link> tags
317
+ *
318
+ * @since [starter] 1.0
319
+ */
320
+ function starter_clean_style_tag( $input ) {
321
+ preg_match_all( "!<link rel='stylesheet'\s?(id='[^']+')?\s+href='(.*)' type='text/css' media='(.*)' />!", $input, $matches );
322
+ // Only display media if it's print
323
+ $media = $matches[3][0] == 'print' ? ' media="print"' : '';
324
+
325
+ return '<link rel="stylesheet" href="' . $matches[ 2 ][ 0 ] . '"' . $media . '>' . "\n";
326
+ }
327
+
328
+ add_filter( 'style_loader_tag', 'starter_clean_style_tag' );
329
+
330
+ /**
331
+ * Remove unnecessary self-closing tags
332
+ *
333
+ * @since [starter] 1.0
334
+ */
335
+ function starter_remove_self_closing_tags( $input ) {
336
+ return str_replace( ' />', '>', $input );
337
+ }
338
+
339
+ add_filter( 'get_avatar', 'starter_remove_self_closing_tags' ); // <img />
340
+ add_filter( 'comment_id_fields', 'starter_remove_self_closing_tags' ); // <input />
341
+ add_filter( 'post_thumbnail_html', 'starter_remove_self_closing_tags' ); // <img />
342
+
343
+ /**
344
+ * Wrap embedded media as suggested by Readability
345
+ *
346
+ * @link https://gist.github.com/965956
347
+ * @link http://www.readability.com/publishers/guidelines#publisher
348
+ * @since [starter] 1.0
349
+ */
350
+ function starter_embed_wrap( $cache, $url, $attr = '', $post_ID = '' ) {
351
+ return '<div class="entry-content-asset">' . $cache . '</div>';
352
+ }
353
+
354
+ add_filter( 'embed_oembed_html', 'starter_embed_wrap', 10, 4 );
355
+ add_filter( 'embed_googlevideo', 'starter_embed_wrap', 10, 2 );
356
+
357
+ /**
358
+ * Remove height/width attributes on images so they can be responsive
359
+ *
360
+ * @since [starter] 1.0
361
+ */
362
+ function starter_remove_thumbnail_dimensions( $html, $id, $alt, $title ) {
363
+ return preg_replace(
364
+ array(
365
+ '/\s+width="\d+"/i',
366
+ '/\s+height="\d+"/i',
367
+ '/alt=""/i',
368
+ ),
369
+ array(
370
+ '',
371
+ '',
372
+ '',
373
+ 'alt="' . $title . '"',
374
+ ),
375
+ $html
376
+ );
377
+ }
378
+
379
+ add_filter( 'post_thumbnail_html', 'starter_remove_thumbnail_dimensions', 10, 4 );
380
+ add_filter( 'image_send_to_editor', 'starter_remove_thumbnail_dimensions', 10, 4 );
381
+ add_filter( 'get_image_tag', 'starter_remove_thumbnail_dimensions', 10, 4 );
382
+ add_filter( 'starter_shortcode_caption_content', 'starter_remove_thumbnail_dimensions', 10, 4 );
383
+
384
+ /**
385
+ * Clean the output of attributes of images in editor.
386
+ *
387
+ * @link http://www.sitepoint.com/wordpress-change-img-tag-html/
388
+ * @since [starter] 1.0
389
+ */
390
+ function starter_image_tag_class( $class, $id, $align, $size ) {
391
+ $align = 'align' . esc_attr( $align );
392
+ return $align;
393
+ }
394
+
395
+ add_filter( 'get_image_tag_class', 'starter_image_tag_class', 0, 4 );
396
+
397
+ /**
398
+ * Add thumbnail class to thumbnail links
399
+ *
400
+ * @since [starter] 1.0
401
+ */
402
+ function starter_add_class_attachment_link( $html ) {
403
+ $postid = get_the_ID();
404
+ $html = str_replace( '<a', '<a class="thumbnail"', $html );
405
+
406
+ return $html;
407
+ }
408
+
409
+ add_filter( 'wp_get_attachment_link', 'starter_add_class_attachment_link', 10, 1 );
410
+ add_filter( 'starter_shortcode_caption_content', 'starter_add_class_attachment_link', 10, 1 );
411
+
412
+ /**
413
+ * Filter in a link to a content ID attribute for the next/previous image links on image attachment pages
414
+ *
415
+ * @since [starter] 1.0
416
+ */
417
+ function starter_enhanced_image_navigation( $url, $id ) {
418
+ if ( ! is_attachment() && ! wp_attachment_is_image( $id ) )
419
+ return $url;
420
+
421
+ $image = get_post( $id );
422
+ if ( ! empty( $image->post_parent ) && $image->post_parent != $id )
423
+ $url .= '#main';
424
+
425
+ return $url;
426
+ }
427
+
428
+ add_filter( 'attachment_link', 'starter_enhanced_image_navigation', 10, 2 );
429
+
430
+ /**
431
+ * Replace various active menu class names with "active"
432
+ * Remove the id="" on nav menu items
433
+ * Return 'menu-slug' for nav menu classes
434
+ *
435
+ * @since [starter] 1.0
436
+ */
437
+ function starter_wp_nav_menu_class( $classes, $item ) {
438
+ $slug = sanitize_title( $item->title );
439
+ $classes = preg_replace( '/(current(-menu-|[-_]page[-_])(item|parent|ancestor))/', 'active', $classes );
440
+ $classes = preg_replace( '/^((menu|page)[-_\w+]+)+/', '', $classes );
441
+
442
+ $classes[] = 'menu-' . $slug;
443
+
444
+ return array_filter( array_unique( $classes ), 'is_element_empty' );
445
+ }
446
+
447
+ add_filter( 'nav_menu_css_class', 'starter_wp_nav_menu_class', 10, 2 );
448
+ add_filter( 'nav_menu_item_id', '__return_null' );
449
+
450
+ /**
451
+ * Check if $element is empty
452
+ *
453
+ * @since [starter] 1.0
454
+ */
455
+ function is_element_empty( $element ) {
456
+ $element = trim( $element );
457
+
458
+ return ( bool ) ! empty( $element );
459
+ }
460
+
461
+ /**
462
+ * Create a graceful fallback to wp_page_menu
463
+ *
464
+ * @since [starter] 1.0
465
+ */
466
+ function starter_page_menu() {
467
+
468
+ $args = array(
469
+ 'sort_column' => 'menu_order, post_title',
470
+ 'menu_class' => 'nav-menu',
471
+ 'include' => '',
472
+ 'exclude' => '',
473
+ 'echo' => true,
474
+ 'show_home' => false,
475
+ 'link_before' => '',
476
+ 'link_after' => '',
477
+ );
478
+
479
+ wp_page_menu( $args );
480
+ }
481
+
482
+ /**
483
+ * Adds extra info to language attributes string
484
+ *
485
+ * @since [starter] 1.0
486
+ */
487
+ function starter_language_attributes() {
488
+ $attr = array();
489
+ $output = '';
490
+
491
+ if ( function_exists( 'is_rtl' ) ) {
492
+ if ( is_rtl() == 'rtl' ) {
493
+ $attr[] = 'dir="rtl"';
494
+ }
495
+ }
496
+
497
+ $lang = get_bloginfo( 'language' );
498
+
499
+ if ( $lang and $lang !== 'en-US' ) {
500
+ $attr[] = "lang=\"$lang\"";
501
+ }
502
+ else {
503
+ $attr[] = 'lang="en"';
504
+ }
505
+
506
+ return implode( ' ', $attr );
507
+ }
508
+
509
+ add_filter( 'language_attributes', 'starter_language_attributes' );
510
+
511
+ /**
512
+ * remove the p from around imgs
513
+ *
514
+ * @link https://gist.github.com/975026
515
+ * @since [starter] 1.0
516
+ */
517
+ function starter_filter_ptags_on_images( $content ) {
518
+ // Replace br tags inside figures
519
+ $content = preg_replace( '/(<figure .*>)?<br\s?\/?>\s*(<a .*>)?\s*(<img .* \/>)\s*(<\/a>)?\s*/iU', '\1\2\3\4', $content );
520
+ // do a regular expression replace...
521
+ // find all p tags that have just
522
+ // <p>maybe some white space<img all stuff up to /> then maybe whitespace </p>
523
+ // replace it with just the image tag...
524
+ $content = preg_replace( '/<p>\s*(<a .*>)?\s*(<img .* \/>)\s*(<\/a>)?\s*<\/p>/iU', '\1\2\3', $content );
525
+ // now pass that through and do the same for iframes...
526
+ return preg_replace( '/<p>\s*(<iframe .*>*.<\/iframe>)\s*<\/p>/iU', '\1', $content );
527
+ }
528
+
529
+ add_filter( 'the_content', 'starter_filter_ptags_on_images' );
530
+
531
+ /**
532
+ * Adds browser detection body class
533
+ * Adds extra classes to body tag on custom taxonomies
534
+ *
535
+ * @since [starter] 1.0
536
+ */
537
+ function starter_body_classes( $classes ) {
538
+ global $wp_query, $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;
539
+
540
+ if ( isset( $wp_query->query_vars['taxonomy'] ) or isset( $wp_query->query_vars['term'] ) ) {
541
+ array_push( $classes, 'custom-taxonomy-archive', 'custom-taxonomy-' . ( isset( $wp_query->query_vars[ 'taxonomy' ] ) ? get_query_var( 'taxonomy' ) : get_query_var( 'term' ) ) . '-archive' );
542
+ }
543
+
544
+ if ( $is_lynx ) $classes[] = 'lynx';
545
+ elseif ( $is_gecko ) $classes[] = 'gecko';
546
+ elseif ( $is_opera ) $classes[] = 'opera';
547
+ elseif ( $is_NS4 ) $classes[] = 'ns4';
548
+ elseif ( $is_safari ) $classes[] = 'safari';
549
+ elseif ( $is_chrome ) $classes[] = 'chrome';
550
+ elseif ( $is_IE ) $classes[] = 'ie';
551
+ else $classes[] = 'unknown';
552
+
553
+ if ( $is_iphone ) $classes[] = 'iphone';
554
+
555
+ // Add post/page slug
556
+ if ( is_single() or is_page() and ! is_front_page() ) {
557
+ $classes[] = basename( get_permalink() );
558
+ }
559
+
560
+ // Remove unnecessary classes
561
+ $home_id_class = 'page-id-' . get_option( 'page_on_front' );
562
+ $remove_classes = array(
563
+ 'page-template-default',
564
+ $home_id_class,
565
+ );
566
+
567
+ $classes = array_diff( $classes, $remove_classes );
568
+
569
+ return $classes;
570
+ }
571
+
572
+ add_filter( 'body_class', 'starter_body_classes' );
573
+
574
+ /**
575
+ * Modifies output of custom post formats.
576
+ *
577
+ * @since [starter] 1.0
578
+ */
579
+ function starter_custom_content( $content ) {
580
+ /* Check if we're displaying a 'quote' post. */
581
+ if ( has_post_format( 'quote' ) ) {
582
+ /* Match any <blockquote> elements. */
583
+ preg_match( '/<blockquote.*?>/', $content, $matches );
584
+
585
+ /* If no <blockquote> elements were found, wrap the entire content in one. */
586
+ if ( empty( $matches ) ) {
587
+ $content = "<blockquote>{$content}</blockquote>";
588
+ }
589
+ }
590
+ elseif ( has_post_format( 'aside' ) and ! is_singular() ) {
591
+ preg_match( '/<p>(.*?)<\/p>(?!\s*<p>)/', $content, $matches );
592
+
593
+ $content = str_replace( $matches[1], $matches[1] . ' <a href="' . get_permalink() . '">&#8734;</a>', $content );
594
+ }
595
+
596
+ return $content;
597
+ }
598
+
599
+ add_filter( 'the_content', 'starter_custom_content' );
600
+
601
+ /**
602
+ * Remove <p> and <br /> in the shortcodes
603
+ *
604
+ * @since [starter] 1.0
605
+ */
606
+ function starter_shortcode_empty_paragraph_fix( $content ) {
607
+ $array = array(
608
+ '<p>[' => '[',
609
+ ']</p>' => ']',
610
+ ']<br />' => ']',
611
+ );
612
+
613
+ // replace the strings in the $content
614
+ $content = strtr( $content, $array );
615
+
616
+ return $content;
617
+ }
618
+
619
+ add_filter( 'the_content', 'starter_shortcode_empty_paragraph_fix' );
620
+
621
+ /**
622
+ * Prints HTML with meta information for current post: categories, tags, permalink, author, and date.
623
+ *
624
+ * Create your own starter_entry_meta() to override in a child theme.
625
+ *
626
+ * @since [starter] 1.0
627
+ */
628
+ function starter_entry_meta() {
629
+ // Translators: used between list items, there is a space after the comma.
630
+ $categories_list = get_the_category_list( __( ', ', 'starter' ) );
631
+
632
+ // Translators: used between list items, there is a space after the comma.
633
+ $tag_list = get_the_tag_list( '', __( ', ', 'starter' ) );
634
+
635
+ $date = sprintf(
636
+ '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" pubdate>%4$s</time></a>',
637
+ esc_url( get_permalink() ),
638
+ esc_attr( get_the_time() ),
639
+ esc_attr( get_the_date( 'c' ) ),
640
+ esc_html( get_the_date() )
641
+ );
642
+
643
+ $author = sprintf(
644
+ '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
645
+ esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
646
+ esc_attr( sprintf( __( 'View all posts by %s', 'starter' ), get_the_author() ) ),
647
+ get_the_author()
648
+ );
649
+
650
+ // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.
651
+ if ( $tag_list ) {
652
+ $utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s<span class="by-author"> by %4$s</span>.', 'starter' );
653
+ }
654
+ elseif ( $categories_list ) {
655
+ $utility_text = __( 'This entry was posted in %1$s on %3$s<span class="by-author"> by %4$s</span>.', 'starter' );
656
+ }
657
+ else {
658
+ $utility_text = __( 'This entry was posted on %3$s<span class="by-author"> by %4$s</span>.', 'starter' );
659
+ }
660
+
661
+ printf(
662
+ $utility_text,
663
+ $categories_list,
664
+ $tag_list,
665
+ $date,
666
+ $author
667
+ );
668
+ }
669
+
670
+ /**
671
+ * Returns a "Continue Reading" link for excerpts
672
+ *
673
+ * @since [starter] 1.0
674
+ */
675
+ function starter_continue_reading_link() {
676
+ $read_more_link = ' <a href="' . get_permalink() . '" class="more-link">' . __( 'Continue reading', 'starter' ) . '</a>';
677
+
678
+ return $read_more_link;
679
+ }
680
+
681
+ /**
682
+ * Replaces "[...]" (appended to automatically generated excerpts ) with starter_continue_reading_link().
683
+ *
684
+ * To override this in a child theme, remove the filter and add your own
685
+ * function tied to the excerpt_more filter hook.
686
+ *
687
+ * @since [starter] 1.0
688
+ */
689
+ function starter_auto_excerpt_more( $more ) {
690
+ return starter_continue_reading_link();
691
+ }
692
+
693
+ add_filter( 'excerpt_more', 'starter_auto_excerpt_more' );
694
+ add_filter( 'the_content_more_link', 'starter_auto_excerpt_more' );
695
+
696
+ /**
697
+ * Adds a pretty "Continue Reading" link to custom post excerpts.
698
+ *
699
+ * To override this link in a child theme, remove the filter and add your own
700
+ * function tied to the get_the_excerpt filter hook.
701
+ *
702
+ * @since [starter] 1.0
703
+ */
704
+ function starter_custom_excerpt_more( $output ) {
705
+ if ( has_excerpt() and ! is_attachment() ) {
706
+ $output .= starter_continue_reading_link();
707
+ }
708
+ return $output;
709
+ }
710
+
711
+ add_filter( 'get_the_excerpt', 'starter_custom_excerpt_more' );
712
+
713
+ /**
714
+ * Adds nofollow rel atribute to content links
715
+ *
716
+ * @since [starter] 1.0
717
+ */
718
+ function starter_nofollow_links_in_post( $text ) {
719
+ global $post;
720
+
721
+ if ( get_post_meta( $post->ID, 'nofollow_links', true ) ) {
722
+ preg_match_all( '/<a.*? href=\"(.*? )\".*?>(.*? )<\/a>/i', $text, $links );
723
+ $match_count = count( $links[0] );
724
+
725
+ for ( $i = 0; $i < $match_count; ++$i ) {
726
+ if ( ! preg_match( '/rel=[\"\']*nofollow[\"\']*/', $links[0][$i] ) ) {
727
+ preg_match_all( '/<a.*? href=\"(.*? )\"(.*? )>(.*? )<\/a>/i', $links[0][$i], $link_text );
728
+
729
+ $search = '>'.$link_text[3][0].'</a>';
730
+ $replace = ' rel="nofollow">'.$link_text[3][0].'</a>';
731
+
732
+ $text = str_replace( $search, $replace, $text );
733
+ }
734
+ }
735
+ }
736
+
737
+ return $text;
738
+ }
739
+
740
+ add_action( 'the_content', 'starter_nofollow_links_in_post' );
741
+
742
+ /**
743
+ * Custom tag clould args
744
+ *
745
+ * @since [starter] 1.0
746
+ */
747
+ function starter_widget_tag_cloud_args( $args ) {
748
+ $args['number'] = 20; // show less tags
749
+ $args['largest'] = 13; // make largest and smallest the same
750
+ $args['smallest'] = 13;
751
+ $args['unit'] = 'px';
752
+ $args['format'] = 'list'; // ul with a class of wp-tag-cloud
753
+ // $args['exclude'] = array(20, 80, 92); // exclude tags by ID
754
+ // $args['taxonomy'] = array('post_tag', 'ingredients'); // add post tags and ingredients taxonomy
755
+
756
+ return $args;
757
+ }
758
+
759
+ add_filter( 'widget_tag_cloud_args', 'starter_widget_tag_cloud_args' );
760
+
761
+ /**
762
+ * Filter tag clould output so that it can be styled by CSS
763
+ *
764
+ * @since [starter] 1.0
765
+ */
766
+ function starter_add_tag_class( $taglinks ) {
767
+ $tags = explode( '</a>', $taglinks );
768
+ $regex = "#(.*tag-link[-])(.*)(' title.*)#e";
769
+ foreach ( $tags as $tag ) {
770
+ $tagn[] = preg_replace( $regex, "('$1$2 label tag-'.get_tag($2)->slug.'$3')", $tag );
771
+ }
772
+
773
+ return implode( '</a>', $tagn );
774
+ }
775
+
776
+ add_filter( 'wp_tag_cloud', 'starter_add_tag_class' );
777
+
778
+ /**
779
+ * Outputs WP Pagenavi pagination or wordpress navigation
780
+ *
781
+ * @since [starter] 1.0
782
+ */
783
+ function pagination( $query = false ) {
784
+ global $wp_query;
785
+
786
+ if ( is_single() ) {
787
+ ?>
788
+ <nav id="comment-nav-below" class="navigation" role="navigation">
789
+ <h1 class="assistive-text section-heading"><?php _e( 'Post Navigation', 'starter' ); ?></h1>
790
+ <?php
791
+ if ( $previous = get_previous_post() ):?>
792
+ <div class="nav-previous alignleft">
793
+ <a href="<?php echo get_permalink( $previous );?>" title="<?php printf( __( 'Permalink to %s', 'starter' ), get_the_title( $previous ) );?>"><?php _e( 'Previous', 'starter' ); ?></a>
794
+ </div>
795
+ <?php endif;?>
796
+ <?php
797
+ if ( $next = get_next_post() ):?>
798
+ <div class="nav-next alignright">
799
+ <a href="<?php echo get_permalink( $next );?>" title="<?php printf( __( 'Permalink to %s', 'starter' ), get_the_title( $next ) );?>"><?php _e( 'Next', 'starter' ); ?></a>
800
+ </div>
801
+ <?php endif;?>
802
+ </nav>
803
+ <?php
804
+ } else {
805
+ if ( $wp_query->max_num_pages > 1 ) {
806
+ if ( function_exists( 'wp_pagenavi' ) ) {
807
+ $args = array( 'options' => PageNavi_Core::$options->get_defaults() );
808
+ if ( $query !== false ) {
809
+ $args['query'] = $query;
810
+ }
811
+
812
+ wp_pagenavi( $args );
813
+ } else {
814
+ //get_template_part( 'templates/pager' );
815
+ $big = 999999999; // This needs to be an unlikely integer
816
+
817
+ // For more options and info view the docs for paginate_links()
818
+ // http://codex.wordpress.org/Function_Reference/paginate_links
819
+ $paginate_links = paginate_links(
820
+ array(
821
+ 'base' => str_replace( $big, '%#%', get_pagenum_link( $big ) ),
822
+ 'current' => max( 1, get_query_var( 'paged' ) ),
823
+ 'total' => $wp_query->max_num_pages,
824
+ 'mid_size' => 5,
825
+ 'prev_next' => True,
826
+ 'prev_text' => __( '&larr;' ),
827
+ 'next_text' => __( '&rarr;' ),
828
+ 'type' => 'list',
829
+ )
830
+ );
831
+
832
+ // Display the pagination if more than one page is found
833
+ if ( $paginate_links ) {
834
+ echo $paginate_links;
835
+ }
836
+ }
837
+ }
838
+ }
839
+ }
840
+
841
+ add_action( 'pagination', 'pagination' );
842
+
843
+ /**
844
+ * Template for comments and pingbacks.
845
+ * Used as a callback by wp_list_comments() for displaying the comments.
846
+ *
847
+ * @since [starter] 1.0
848
+ */
849
+ function starter_comment( $comment, $args, $depth ) {
850
+ $GLOBALS['comment'] = $comment;
851
+ switch ( $comment->comment_type ) {
852
+ case 'pingback' :
853
+ case 'trackback' :
854
+ // Display trackbacks differently than normal comments.
855
+ ?>
856
+ <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>">
857
+ <p><?php _e( 'Pingback:', 'starter' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'starter' ), '<span class="edit-link">', '</span>' ); ?></p>
858
+ <?php
859
+ break;
860
+ default :
861
+ // Proceed with normal comments.
862
+ global $post;
863
+ ?>
864
+ <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
865
+ <article id="comment-<?php comment_ID(); ?>" class="comment">
866
+ <header class="comment-meta comment-author vcard clearfix">
867
+ <?php
868
+ echo get_avatar( $comment, 44 );
869
+ printf(
870
+ '<cite class="fn">%1$s %2$s</cite>',
871
+ get_comment_author_link(),
872
+ // If current post author is also comment author, make it known visually.
873
+ ( $comment->user_id === $post->post_author ) ? '<span> ' . __( 'Post author', 'starter' ) . '</span>' : ''
874
+ );
875
+ printf(
876
+ '<a href="%1$s"><time datetime="%2$s">%3$s</time></a>',
877
+ esc_url( get_comment_link( $comment->comment_ID ) ),
878
+ get_comment_time( 'c' ),
879
+ /* translators: 1: date, 2: time */
880
+ sprintf( __( '%1$s at %2$s', 'starter' ), get_comment_date(), get_comment_time() )
881
+ );
882
+ ?>
883
+ </header>
884
+
885
+ <?php
886
+ if ( '0' == $comment->comment_approved ):
887
+ ?>
888
+ <p class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'starter' ); ?></p>
889
+ <?php endif; ?>
890
+
891
+ <section class="comment-content comment clearfix">
892
+ <?php comment_text(); ?>
893
+ </section>
894
+
895
+ <div class="reply">
896
+ <?php edit_comment_link( __( 'Edit', 'starter' ), '<span class="edit-link">', '</span> / ' ); ?>
897
+ <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'starter' ), 'after' => ' <span>&darr;</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
898
+ </div>
899
+ </article>
900
+ <?php
901
+ break;
902
+ } // end comment_type check
903
+ }
904
+
905
+ /**
906
+ * Redirect to post when search query returns single result
907
+ *
908
+ * @see http://wpsnipp.com/index.php/functions-php/redirect-to-post-when-search-query-returns-single-result/
909
+ * @since [starter] 1.0
910
+ */
911
+ function starter_single_result() {
912
+ if ( is_search() ) {
913
+ global $wp_query;
914
+ if ( $wp_query->post_count == 1 ) {
915
+ wp_redirect( get_permalink( $wp_query->posts['0']->ID ) );
916
+ }
917
+ }
918
+ }
919
+ add_action( 'template_redirect', 'starter_single_result' );
920
+
921
+ /**
922
+ * Add postMessage support for site title and description for the Theme Customizer.
923
+ *
924
+ * @since [starter] 1.0
925
+ *
926
+ * @param WP_Customize_Manager $wp_customize Theme Customizer object.
927
+ * @return void
928
+ */
929
+ function starter_customize_register( $wp_customize ) {
930
+ $wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
931
+ $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
932
+ }
933
+ add_action( 'customize_register', 'starter_customize_register' );
934
+
935
+ /* SHORTCODES */
936
+
937
+ // Allow shortcodes in widgets
938
+ add_filter( 'widget_text', 'do_shortcode' );
939
+
940
+ /**
941
+ * The supported attributes for the shortcode are 'id', 'align', 'width', and 'caption'.
942
+ *
943
+ * @since [starter] 1.0
944
+ */
945
+ function starter_shortcode_caption( $atts, $content = null ) {
946
+ extract(
947
+ shortcode_atts(
948
+ array(
949
+ 'id' => '',
950
+ 'align' => 'alignnone',
951
+ 'width' => '',
952
+ 'caption' => '',
953
+ ), $atts
954
+ )
955
+ );
956
+
957
+ if ( 1 > ( int ) $width )
958
+ return $content;
959
+
960
+ if ( empty( $caption ) ) {
961
+ preg_match( '/(<img[^>]+>)[ ]?(.*)/i', $content, $match );
962
+ $content = $match[1];
963
+ $caption = $match[2];
964
+ }
965
+
966
+ $id = $id ? $id : 'attachment_' . rand( 1, 999 );
967
+ $idtag = 'id="' . esc_attr( $id ) . '"';
968
+
969
+ $out[] = '<figure ' . $idtag . 'aria-describedby="figcaption_' . $id . '" class="post-image wp-caption ' . $align . '">';
970
+ $out[] = apply_filters( 'starter_shortcode_caption_content', do_shortcode( $content ), $id, '', '' );
971
+ $out[] = '<figcaption id="figcaption_' . $id . '" class="caption wp-caption-text">' . wpautop( wptexturize( $caption ) ) . '</figcaption>';
972
+ $out[] = '</figure>';
973
+
974
+ return implode( "\n", $out );
975
+ }
976
+
977
+ add_shortcode( 'wp_caption', 'starter_shortcode_caption' );
978
+ add_shortcode( 'caption', 'starter_shortcode_caption' );
979
+
980
+ /* ADMIN STUFF */
981
+
982
+ /**
983
+ * Remove unnecessary dashboard widgets
984
+ *
985
+ * @link http://www.deluxeblogtips.com/2011/01/remove-dashboard-widgets-in-wordpress.html
986
+ * @since [starter] 1.0
987
+ */
988
+ function starter_remove_dashboard_widgets() {
989
+ // Incoming Links Widget
990
+ remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );
991
+
992
+ // Plugins Widget
993
+ remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );
994
+
995
+ remove_meta_box( 'dashboard_primary', 'dashboard', 'normal' );
996
+ remove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );
997
+
998
+ // Sitepress WPML Plugin Widget
999
+ remove_meta_box( 'icl_dashboard_widget', 'dashboard', 'normal' );
1000
+
1001
+ // Yoast's SEO Plugin Widget
1002
+ remove_meta_box( 'yoast_db_widget', 'dashboard', 'normal' );
1003
+ }
1004
+
1005
+ add_action( 'admin_init', 'starter_remove_dashboard_widgets' );
1006
+
1007
+ /**
1008
+ * Adds custom menu to admin bar
1009
+ *
1010
+ * @since [starter] 1.0
1011
+ */
1012
+ function starter_bar_menu( $wp_admin_bar ) {
1013
+ if ( ! is_super_admin() or ! is_admin_bar_showing() )
1014
+ return;
1015
+
1016
+ /**
1017
+ * Change "Howdy"
1018
+ */
1019
+ // get the node that contains "howdy"
1020
+ $my_account = $wp_admin_bar->get_node( 'my-account' );
1021
+ // change the "howdy"
1022
+ $my_account->title = str_replace( 'Howdy,', __( 'Hi,', 'starter' ), $my_account->title );
1023
+ // remove the original node
1024
+ $wp_admin_bar->remove_node( 'my-account' );
1025
+ // add back our modified version
1026
+ $wp_admin_bar->add_node( $my_account );
1027
+
1028
+ /**
1029
+ * Removing the "W" menu
1030
+ * I have nothing against it, but I *never* use it
1031
+ */
1032
+ $wp_admin_bar->remove_menu( 'wp-logo' );
1033
+
1034
+ /**
1035
+ * Create a "Favorites" menu
1036
+ * First, just create the parent menu item
1037
+ */
1038
+ $wp_admin_bar->add_menu(
1039
+ array(
1040
+ 'id' => 'favorites',
1041
+ 'parent' => 'top-secondary', // puts it on the right-hand side
1042
+ 'title' => __( 'Favorites', 'starter' ),
1043
+ )
1044
+ );
1045
+
1046
+ /**
1047
+ * Then add links to it
1048
+ * This link goes to the All Settings page,
1049
+ * so only show it to users that have appropriate privileges
1050
+ */
1051
+ if ( current_user_can( 'manage_options' ) ) {
1052
+ $wp_admin_bar->add_menu(
1053
+ array(
1054
+ 'id' => 'all-settings',
1055
+ 'parent' => 'favorites',
1056
+ 'title' => __( 'Options', 'starter' ),
1057
+ 'href' => admin_url( 'options.php' ),
1058
+ )
1059
+ );
1060
+ }
1061
+
1062
+ // This one goes to the list of the current user's posts
1063
+ $wp_admin_bar->add_menu(
1064
+ array(
1065
+ 'id' => 'my-posts',
1066
+ 'parent' => 'favorites',
1067
+ 'title' => __( 'My Posts', 'starter' ),
1068
+ 'href' => admin_url( 'edit.php?post_type=post&author=' . get_current_user_id() ),
1069
+ )
1070
+ );
1071
+
1072
+ // MySQL query and script execution timer output
1073
+ $wp_admin_bar->add_menu(
1074
+ array(
1075
+ 'id' => 'do_query_bar',
1076
+ 'parent' => 'top-secondary', // puts it on the right-hand side
1077
+ 'title' => get_num_queries() . 'Q - ' . timer_stop() . 's', // link title
1078
+ 'href' => '#',
1079
+ 'meta' => false,
1080
+ )
1081
+ );
1082
+ }
1083
+
1084
+ add_action( 'admin_bar_menu', 'starter_bar_menu', '1000' );
1085
+
1086
+ /**
1087
+ * This simple hack will remove the AIM, Yahoo and Jabber fields and will replace them with a bunch of other social network profiles.
1088
+ *
1089
+ * @since [starter] 1.0
1090
+ */
1091
+ function starter_user_contactmethods( $contactmethods ) {
1092
+ unset( $contactmethods['aim'], $contactmethods['yim'], $contactmethods['jabber'] );
1093
+
1094
+ // Add Location
1095
+ $contactmethods['user_location'] = __( 'Location', 'starter' );
1096
+
1097
+ // Add Facebook
1098
+ $contactmethods['user_fb'] = __( 'Facebook', 'starter' );
1099
+
1100
+ // Add Pinterest
1101
+ $contactmethods['user_pt'] = __( 'Pinterest', 'starter' );
1102
+
1103
+ // Add Twitter
1104
+ $contactmethods['user_tw'] = __( 'Twitter', 'starter' );
1105
+
1106
+ // Add Linkedin
1107
+ $contactmethods['user_lk'] = __( 'Linkedin', 'starter' );
1108
+
1109
+ // Add Github
1110
+ $contactmethods['user_gh'] = __( 'Github', 'starter' );
1111
+
1112
+ // Add Google+
1113
+ $contactmethods['google_profile'] = __( 'Google+ profile', 'starter' );
1114
+
1115
+ return $contactmethods;
1116
+ }
1117
+
1118
+ add_filter( 'user_contactmethods', 'starter_user_contactmethods' );
1119
+
1120
+ /**
1121
+ * Allow more HTML tags in the editor
1122
+ * Add more languages to spell check
1123
+ *
1124
+ * @since [starter] 1.0
1125
+ */
1126
+ function starter_change_mce_options( $array ) {
1127
+ $ext = 'pre[id|name|class|style],iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]';
1128
+
1129
+ if ( isset( $array['extended_valid_elements'] ) ) {
1130
+ $array['extended_valid_elements'] .= ','.$ext;
1131
+ }
1132
+ else {
1133
+ $array['extended_valid_elements'] = $ext;
1134
+ }
1135
+
1136
+ // Add block format elements you want to show in dropdown
1137
+ $array['theme_advanced_blockformats'] = 'h1,h2,h3,h4,p,code,blockquote';
1138
+ $array['theme_advanced_disable'] = 'strikethrough,underline,forecolor,justifyfull';
1139
+ $array[ 'spellchecker_languages' ] = '+Spanish=sp, English=en';
1140
+
1141
+ return $array;
1142
+ }
1143
+
1144
+ add_filter( 'tiny_mce_before_init', 'starter_change_mce_options' );
1145
+
1146
+ /**
1147
+ * Adds previous/next links to post edition window
1148
+ *
1149
+ * @since [starter] 1.0
1150
+ */
1151
+ function starter_add_navigation_edit_posts() {
1152
+ if ( isset( $_GET['post'] ) and isset( $_GET['action'] ) and $_GET['action'] == 'edit' ) {
1153
+ global $post;
1154
+
1155
+ $args = array(
1156
+ 'public' => true,
1157
+ '_builtin' => false,
1158
+ );
1159
+ $output = 'names'; // names or objects, note names is the default
1160
+ $operator = 'and'; // 'and' or 'or'
1161
+
1162
+ $post_types = get_post_types( $args, $output, $operator );
1163
+
1164
+ $post_types['post'] = 'post';
1165
+ $post_types['page'] = 'page';
1166
+ if ( is_object( $post ) and in_array( $post->post_type, $post_types ) ) {
1167
+ $wtf = array( true, false );
1168
+ foreach ( $wtf as $prev ) {
1169
+ $p = get_adjacent_post( false, '', $prev );
1170
+
1171
+ if ( ! empty( $p ) ) {
1172
+ echo '<script>
1173
+ jQuery(function($) {
1174
+ $(".wrap h2" )
1175
+ .append(\'<a class="add-new-h2" href="' . admin_url( 'post.php?action=edit&post=' . $p->ID ) . '" title="' . __( 'Editar', 'starter' ) . ' ' . apply_filters( 'the_title', $p->post_title ) . '">' . ( $prev ? '&laquo; ' : '' ) . apply_filters( 'the_title', $p->post_title ) . ( ! $prev ? ' &raquo;' : '' ) . '</a>\' );
1176
+ });
1177
+ </script>';
1178
+ }
1179
+ }
1180
+ }
1181
+ }
1182
+ }
1183
+
1184
+ add_action( 'admin_head', 'starter_add_navigation_edit_posts' );
1185
+
1186
+ /**
1187
+ * Custom Login Logo Support
1188
+ *
1189
+ * @since [starter] 1.0
1190
+ */
1191
+ function starter_custom_login_logo() {
1192
+ echo '<style type="text/css">
1193
+ h1 a { background-image:url(' . get_template_directory_uri() . '/images/login-logo.png) !important; }
1194
+ </style>';
1195
+ }
1196
+
1197
+ add_action( 'login_head', 'starter_custom_login_logo' );
1198
+
1199
+ /**
1200
+ * Custom Login URL
1201
+ *
1202
+ * @since [starter] 1.0
1203
+ */
1204
+ function starter_wp_login_url() {
1205
+ return home_url();
1206
+ }
1207
+
1208
+ add_filter( 'login_headerurl', 'starter_wp_login_url' );
1209
+
1210
+ /**
1211
+ * Custom Login Title
1212
+ *
1213
+ * @since [starter] 1.0
1214
+ */
1215
+ function starter_wp_login_title() {
1216
+ return get_option( 'blogname' );
1217
+ }
1218
+
1219
+ add_filter( 'login_headertitle', 'starter_wp_login_title' );
1220
+
1221
+ /**
1222
+ * Custom Backend Footer
1223
+ *
1224
+ * @since [starter] 1.0
1225
+ */
1226
+ function starter_custom_admin_footer() {
1227
+ $credits = '<span id="footer-thankyou">Crafted by <a href="//alexsancho.name" target="_blank">Alex Sancho</a></span>.';
1228
+
1229
+ echo apply_filters( 'starter_custom_admin_footer', $credits );
1230
+ }
1231
+
1232
+ // adding it to the admin area
1233
+ add_filter( 'admin_footer_text', 'starter_custom_admin_footer' );