wordpress-starter 0.1 → 0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +13 -0
- data/README.md +47 -4
- data/lib/wordpress-starter.rb +3 -2
- data/stylesheets/wordpress/_defaults.scss +267 -20
- data/stylesheets/wordpress/_page.scss +0 -363
- data/stylesheets/wordpress/_responsive.scss +0 -115
- data/stylesheets/wordpress/_theme.scss +0 -82
- data/stylesheets/wordpress/_typography.scss +0 -134
- data/templates/foundation/404.php +24 -0
- data/templates/{starter → foundation}/admin/README.txt +0 -0
- data/templates/{starter → foundation}/admin/assets/css/admin-style.css +0 -0
- data/templates/{starter → foundation}/admin/assets/css/colorpicker.css +0 -0
- data/templates/{starter → foundation}/admin/assets/images/1col.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/2-col-portfolio.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/2cl.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/2cr.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/3-col-portfolio.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/3cm.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/3cr.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/4-col-portfolio.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/accept.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/button_check.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/colorpicker/blank.gif +0 -0
- data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_background.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_hex.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_hsb_b.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_hsb_h.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_hsb_s.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_indic.gif +0 -0
- data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_overlay.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_rgb_b.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_rgb_g.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_rgb_r.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_select.gif +0 -0
- data/templates/{starter → foundation}/admin/assets/images/colorpicker/colorpicker_submit.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/colorpicker/select.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/dropdown-arrow.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/favicon.ico +0 -0
- data/templates/{starter → foundation}/admin/assets/images/icon-add.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/icon-backup.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/icon-delete.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/icon-docs.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/icon-edit.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/icon-home.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/icon-info.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/icon-notice.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/icon-paint.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/icon-settings.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/icon-slider.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/icon-warn.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/icon_option.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/loading-bottom.gif +0 -0
- data/templates/{starter → foundation}/admin/assets/images/select.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/sign_warning.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/stop.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/toggle_tabs.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/warning.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/wrench.png +0 -0
- data/templates/{starter → foundation}/admin/assets/images/wrench16.png +0 -0
- data/templates/{starter → foundation}/admin/assets/js/ajaxupload.js +0 -0
- data/templates/{starter → foundation}/admin/assets/js/colorpicker.js +0 -0
- data/templates/{starter → foundation}/admin/assets/js/cookie.js +0 -0
- data/templates/{starter → foundation}/admin/assets/js/jquery.maskedinput-1.2.2.js +0 -0
- data/templates/{starter → foundation}/admin/assets/js/jquery.tipsy.js +0 -0
- data/templates/{starter → foundation}/admin/assets/js/of-medialibrary-uploader.js +0 -0
- data/templates/{starter → foundation}/admin/assets/js/smof.js +0 -0
- data/templates/foundation/admin/classes/class.options-machine.php +627 -0
- data/templates/{starter → foundation}/admin/front-end/options.php +0 -0
- data/templates/{starter → foundation}/admin/functions/functions.admin.php +0 -0
- data/templates/{starter → foundation}/admin/functions/functions.interface.php +0 -0
- data/templates/{starter → foundation}/admin/functions/functions.load.php +0 -0
- data/templates/foundation/admin/functions/functions.mediauploader.php +194 -0
- data/templates/foundation/admin/functions/functions.options.php +508 -0
- data/templates/{starter → foundation}/admin/functions/functions.php +0 -0
- data/templates/{starter → foundation}/admin/index.php +88 -86
- data/templates/{starter → foundation}/admin/layouts/default.css +0 -0
- data/templates/{starter → foundation}/admin/layouts/placebo.css +0 -0
- data/templates/foundation/archive.php +57 -0
- data/templates/foundation/category.php +40 -0
- data/templates/foundation/comments.php +65 -0
- data/templates/foundation/content-aside.php +26 -0
- data/templates/foundation/content-image.php +29 -0
- data/templates/foundation/content-link.php +27 -0
- data/templates/foundation/content-none.php +21 -0
- data/templates/foundation/content-page.php +24 -0
- data/templates/foundation/content-quote.php +26 -0
- data/templates/foundation/content-status.php +33 -0
- data/templates/foundation/content.php +67 -0
- data/templates/foundation/editor-style.scss +359 -0
- data/templates/foundation/footer.php +29 -0
- data/templates/foundation/functions.php +1425 -0
- data/templates/foundation/header.php +63 -0
- data/templates/foundation/ie.scss +1 -0
- data/templates/{starter → foundation}/images/bg/bg0.png +0 -0
- data/templates/{starter → foundation}/images/bg/bg1.png +0 -0
- data/templates/{starter → foundation}/images/bg/bg10.png +0 -0
- data/templates/{starter → foundation}/images/bg/bg11.png +0 -0
- data/templates/{starter → foundation}/images/bg/bg2.png +0 -0
- data/templates/{starter → foundation}/images/bg/bg3.png +0 -0
- data/templates/{starter → foundation}/images/bg/bg4.png +0 -0
- data/templates/{starter → foundation}/images/bg/bg5.png +0 -0
- data/templates/{starter → foundation}/images/bg/bg6.jpg +0 -0
- data/templates/{starter → foundation}/images/bg/bg7.jpg +0 -0
- data/templates/{starter → foundation}/images/bg/bg8.png +0 -0
- data/templates/{starter → foundation}/images/bg/bg9.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-behance-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-behance-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-behance.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-behance.svg +48 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-creativecloud-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-creativecloud-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-creativecloud.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-creativecloud.svg +48 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-dribbble-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-dribbble-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-dribbble.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-dribbble.svg +28 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-dropbox-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-dropbox-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-dropbox.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-dropbox.svg +73 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-evernote-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-evernote-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-evernote.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-evernote.svg +62 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-facebook-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-facebook-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-facebook.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-facebook.svg +15 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-flickr-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-flickr-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-flickr.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-flickr.svg +14 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-github-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-github-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-github.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-github.svg +38 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-googleplus-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-googleplus-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-googleplus.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-googleplus.svg +52 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-icloud-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-icloud-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-icloud.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-icloud.svg +26 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-linkedin-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-linkedin-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-linkedin.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-linkedin.svg +28 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-mail-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-mail-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-mail.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-mail.svg +27 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-msn-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-msn-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-msn.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-msn.svg +44 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-pinterest-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-pinterest-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-pinterest.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-pinterest.svg +42 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-rdio-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-rdio-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-rdio.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-rdio.svg +18 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-rss-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-rss-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-rss.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-rss.svg +18 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-skitch-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-skitch-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-skitch.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-skitch.svg +24 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-skype-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-skype-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-skype.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-skype.svg +25 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-spotify-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-spotify-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-spotify.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-spotify.svg +38 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-stumbleupon-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-stumbleupon-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-stumbleupon.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-stumbleupon.svg +22 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-tumblr-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-tumblr-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-tumblr.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-tumblr.svg +16 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-twitter-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-twitter-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-twitter.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-twitter.svg +24 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-vimeo-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-vimeo-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-vimeo.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-vimeo.svg +20 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-youtube-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-youtube-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-youtube.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-youtube.svg +106 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-youversion-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-youversion-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-youversion.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-youversion.svg +54 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-zerply-m.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-zerply-s.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-zerply.png +0 -0
- data/templates/foundation/images/fairhead-icons/fc-webicon-zerply.svg +20 -0
- data/templates/foundation/images/foundation/orbit/bullets.jpg +0 -0
- data/templates/foundation/images/foundation/orbit/left-arrow-small.png +0 -0
- data/templates/foundation/images/foundation/orbit/left-arrow.png +0 -0
- data/templates/foundation/images/foundation/orbit/loading.gif +0 -0
- data/templates/foundation/images/foundation/orbit/mask-black.png +0 -0
- data/templates/foundation/images/foundation/orbit/pause-black.png +0 -0
- data/templates/foundation/images/foundation/orbit/right-arrow-small.png +0 -0
- data/templates/foundation/images/foundation/orbit/right-arrow.png +0 -0
- data/templates/foundation/images/foundation/orbit/rotator-black.png +0 -0
- data/templates/foundation/images/foundation/orbit/timer-black.png +0 -0
- data/templates/foundation/index.php +19 -0
- data/templates/foundation/javascripts/app.js +38 -0
- data/templates/foundation/javascripts/foundation.min.js +77 -0
- data/templates/foundation/javascripts/jquery.foundation.accordion.js +39 -0
- data/templates/foundation/javascripts/jquery.foundation.alerts.js +20 -0
- data/templates/foundation/javascripts/jquery.foundation.buttons.js +79 -0
- data/templates/foundation/javascripts/jquery.foundation.clearing.js +480 -0
- data/templates/foundation/javascripts/jquery.foundation.forms.js +494 -0
- data/templates/foundation/javascripts/jquery.foundation.joyride.js +639 -0
- data/templates/foundation/javascripts/jquery.foundation.magellan.js +86 -0
- data/templates/foundation/javascripts/jquery.foundation.mediaQueryToggle.js +27 -0
- data/templates/foundation/javascripts/jquery.foundation.navigation.js +55 -0
- data/templates/foundation/javascripts/jquery.foundation.orbit.js +897 -0
- data/templates/foundation/javascripts/jquery.foundation.reveal.js +794 -0
- data/templates/foundation/javascripts/jquery.foundation.tabs.js +56 -0
- data/templates/foundation/javascripts/jquery.foundation.tooltips.js +193 -0
- data/templates/foundation/javascripts/jquery.foundation.topbar.js +156 -0
- data/templates/foundation/javascripts/modernizr.foundation.js +4 -0
- data/templates/foundation/languages/readme.txt +6 -0
- data/templates/foundation/license.txt +281 -0
- data/templates/foundation/loop.php +30 -0
- data/templates/foundation/manifest.rb +285 -0
- data/templates/foundation/options.php +43 -0
- data/templates/foundation/page.php +29 -0
- data/templates/foundation/print.css +1 -0
- data/templates/foundation/print.scss +1 -0
- data/templates/foundation/readme.txt +6 -0
- data/templates/foundation/sass/_app.scss +50 -0
- data/templates/foundation/sass/_settings.scss +243 -0
- data/templates/foundation/screen.scss +1 -0
- data/templates/foundation/screenshot.png +0 -0
- data/templates/foundation/search.php +31 -0
- data/templates/{starter → foundation}/search.png +0 -0
- data/templates/foundation/searchform.php +14 -0
- data/templates/foundation/sidebar.php +15 -0
- data/templates/foundation/single.php +31 -0
- data/templates/foundation/style.css +17 -0
- data/templates/foundation/stylesheets/fc-webicons.css +156 -0
- data/templates/foundation/tag.php +41 -0
- data/templates/project/404.php +24 -0
- data/templates/project/admin/README.txt +25 -0
- data/templates/project/admin/assets/css/admin-style.css +838 -0
- data/templates/project/admin/assets/css/colorpicker.css +177 -0
- data/templates/project/admin/assets/images/1col.png +0 -0
- data/templates/project/admin/assets/images/2-col-portfolio.png +0 -0
- data/templates/project/admin/assets/images/2cl.png +0 -0
- data/templates/project/admin/assets/images/2cr.png +0 -0
- data/templates/project/admin/assets/images/3-col-portfolio.png +0 -0
- data/templates/project/admin/assets/images/3cm.png +0 -0
- data/templates/project/admin/assets/images/3cr.png +0 -0
- data/templates/project/admin/assets/images/4-col-portfolio.png +0 -0
- data/templates/project/admin/assets/images/accept.png +0 -0
- data/templates/project/admin/assets/images/button_check.png +0 -0
- data/templates/project/admin/assets/images/colorpicker/blank.gif +0 -0
- data/templates/project/admin/assets/images/colorpicker/colorpicker_background.png +0 -0
- data/templates/project/admin/assets/images/colorpicker/colorpicker_hex.png +0 -0
- data/templates/project/admin/assets/images/colorpicker/colorpicker_hsb_b.png +0 -0
- data/templates/project/admin/assets/images/colorpicker/colorpicker_hsb_h.png +0 -0
- data/templates/project/admin/assets/images/colorpicker/colorpicker_hsb_s.png +0 -0
- data/templates/project/admin/assets/images/colorpicker/colorpicker_indic.gif +0 -0
- data/templates/project/admin/assets/images/colorpicker/colorpicker_overlay.png +0 -0
- data/templates/project/admin/assets/images/colorpicker/colorpicker_rgb_b.png +0 -0
- data/templates/project/admin/assets/images/colorpicker/colorpicker_rgb_g.png +0 -0
- data/templates/project/admin/assets/images/colorpicker/colorpicker_rgb_r.png +0 -0
- data/templates/project/admin/assets/images/colorpicker/colorpicker_select.gif +0 -0
- data/templates/project/admin/assets/images/colorpicker/colorpicker_submit.png +0 -0
- data/templates/project/admin/assets/images/colorpicker/select.png +0 -0
- data/templates/project/admin/assets/images/dropdown-arrow.png +0 -0
- data/templates/project/admin/assets/images/favicon.ico +0 -0
- data/templates/project/admin/assets/images/icon-add.png +0 -0
- data/templates/project/admin/assets/images/icon-backup.png +0 -0
- data/templates/project/admin/assets/images/icon-delete.png +0 -0
- data/templates/project/admin/assets/images/icon-docs.png +0 -0
- data/templates/project/admin/assets/images/icon-edit.png +0 -0
- data/templates/project/admin/assets/images/icon-home.png +0 -0
- data/templates/project/admin/assets/images/icon-info.png +0 -0
- data/templates/project/admin/assets/images/icon-notice.png +0 -0
- data/templates/project/admin/assets/images/icon-paint.png +0 -0
- data/templates/project/admin/assets/images/icon-settings.png +0 -0
- data/templates/project/admin/assets/images/icon-slider.png +0 -0
- data/templates/project/admin/assets/images/icon-warn.png +0 -0
- data/templates/project/admin/assets/images/icon_option.png +0 -0
- data/templates/project/admin/assets/images/loading-bottom.gif +0 -0
- data/templates/project/admin/assets/images/select.png +0 -0
- data/templates/project/admin/assets/images/sign_warning.png +0 -0
- data/templates/project/admin/assets/images/stop.png +0 -0
- data/templates/project/admin/assets/images/toggle_tabs.png +0 -0
- data/templates/project/admin/assets/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/templates/project/admin/assets/images/warning.png +0 -0
- data/templates/project/admin/assets/images/wrench.png +0 -0
- data/templates/project/admin/assets/images/wrench16.png +0 -0
- data/templates/project/admin/assets/js/ajaxupload.js +606 -0
- data/templates/project/admin/assets/js/colorpicker.js +455 -0
- data/templates/project/admin/assets/js/cookie.js +1 -0
- data/templates/project/admin/assets/js/jquery.maskedinput-1.2.2.js +252 -0
- data/templates/project/admin/assets/js/jquery.tipsy.js +241 -0
- data/templates/project/admin/assets/js/of-medialibrary-uploader.js +168 -0
- data/templates/project/admin/assets/js/smof.js +623 -0
- data/templates/{starter → project}/admin/classes/class.options-machine.php +0 -0
- data/templates/project/admin/front-end/options.php +77 -0
- data/templates/project/admin/functions/functions.admin.php +76 -0
- data/templates/project/admin/functions/functions.interface.php +232 -0
- data/templates/project/admin/functions/functions.load.php +14 -0
- data/templates/{starter → project}/admin/functions/functions.mediauploader.php +0 -0
- data/templates/project/admin/functions/functions.options.php +508 -0
- data/templates/project/admin/functions/functions.php +0 -0
- data/templates/project/admin/index.php +87 -0
- data/templates/project/admin/layouts/default.css +0 -0
- data/templates/project/admin/layouts/placebo.css +0 -0
- data/templates/project/archive.php +57 -0
- data/templates/{starter → project}/category.php +0 -0
- data/templates/project/comments.php +65 -0
- data/templates/{starter → project}/content-aside.php +0 -0
- data/templates/{starter → project}/content-image.php +0 -0
- data/templates/{starter → project}/content-link.php +0 -0
- data/templates/{starter → project}/content-none.php +0 -0
- data/templates/project/content-page.php +24 -0
- data/templates/{starter → project}/content-quote.php +0 -0
- data/templates/{starter → project}/content-status.php +0 -0
- data/templates/project/content.php +67 -0
- data/templates/{starter → project}/editor-style.scss +0 -0
- data/templates/project/footer.php +29 -0
- data/templates/project/functions.php +1233 -0
- data/templates/project/header.php +63 -0
- data/templates/project/images/bg/bg0.png +0 -0
- data/templates/project/images/bg/bg1.png +0 -0
- data/templates/project/images/bg/bg10.png +0 -0
- data/templates/project/images/bg/bg11.png +0 -0
- data/templates/project/images/bg/bg2.png +0 -0
- data/templates/project/images/bg/bg3.png +0 -0
- data/templates/project/images/bg/bg4.png +0 -0
- data/templates/project/images/bg/bg5.png +0 -0
- data/templates/project/images/bg/bg6.jpg +0 -0
- data/templates/project/images/bg/bg7.jpg +0 -0
- data/templates/project/images/bg/bg8.png +0 -0
- data/templates/project/images/bg/bg9.png +0 -0
- data/templates/project/index.php +19 -0
- data/templates/project/javascripts/app.js +6 -0
- data/templates/{starter → project/javascripts}/moderninzr.min.js +0 -0
- data/templates/project/languages/readme.txt +6 -0
- data/templates/project/license.txt +281 -0
- data/templates/{starter → project}/loop.php +0 -0
- data/templates/project/manifest.rb +131 -4
- data/templates/project/options.php +42 -0
- data/templates/project/page.php +29 -0
- data/templates/project/readme.txt +6 -1
- data/templates/project/screenshot.png +0 -0
- data/templates/project/search.php +31 -0
- data/templates/project/searchform.php +14 -0
- data/templates/project/sidebar.php +15 -0
- data/templates/project/single.php +31 -0
- data/templates/project/style.css +5 -0
- data/templates/{starter → project}/tag.php +0 -0
- data/templates/starter/404.php +42 -19
- data/templates/starter/README.md +41 -0
- data/templates/starter/archive.php +89 -49
- data/templates/starter/comments.php +43 -32
- data/templates/starter/content-page.php +12 -16
- data/templates/starter/content-single.php +59 -0
- data/templates/starter/content.php +52 -58
- data/templates/starter/footer.php +20 -22
- data/templates/starter/functions.php +60 -1156
- data/templates/starter/header.php +31 -52
- data/templates/starter/image.php +111 -0
- data/templates/starter/inc/custom-header.php +184 -0
- data/templates/starter/inc/extras.php +79 -0
- data/templates/starter/inc/template-tags.php +175 -0
- data/templates/starter/inc/theme-options/theme-options.php +306 -0
- data/templates/starter/index.php +41 -11
- data/templates/starter/javascripts/html5.js +6 -0
- data/templates/starter/javascripts/keyboard-image-navigation.js +14 -0
- data/templates/starter/javascripts/small-menu.js +39 -0
- data/templates/starter/languages/readme.txt +6 -0
- data/templates/starter/layouts/content-sidebar-sidebar.css +27 -0
- data/templates/starter/layouts/content-sidebar.css +25 -0
- data/templates/starter/layouts/sidebar-content-sidebar.css +27 -0
- data/templates/starter/layouts/sidebar-content.css +25 -0
- data/templates/starter/layouts/sidebar-sidebar-content.css +22 -0
- data/templates/starter/license.txt +281 -0
- data/templates/starter/manifest.rb +22 -110
- data/templates/starter/no-results.php +34 -0
- data/templates/starter/page.php +16 -14
- data/templates/starter/print.scss +1 -104
- data/templates/starter/rtl.css +17 -0
- data/templates/starter/screen.scss +653 -1
- data/templates/starter/screenshot.png +0 -0
- data/templates/starter/search.php +31 -21
- data/templates/starter/searchform.php +8 -9
- data/templates/starter/sidebar.php +29 -10
- data/templates/starter/single.php +24 -21
- data/templates/starter/style.css +10 -6
- metadata +401 -100
- data/templates/project/print.css +0 -4
- data/templates/starter/admin/functions/functions.options.php +0 -507
- data/templates/starter/app.js +0 -97
- data/templates/starter/options.php +0 -407
- data/templates/starter/readme.txt +0 -1
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
/**
|
|
3
|
+
* Custom template tags for this theme.
|
|
4
|
+
*
|
|
5
|
+
* Eventually, some of the functionality here could be replaced by core features
|
|
6
|
+
*
|
|
7
|
+
* @package starter
|
|
8
|
+
* @since starter 1.0
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
if ( ! function_exists( 'starter_content_nav' ) ) :
|
|
12
|
+
/**
|
|
13
|
+
* Display navigation to next/previous pages when applicable
|
|
14
|
+
*
|
|
15
|
+
* @since starter 1.0
|
|
16
|
+
*/
|
|
17
|
+
function starter_content_nav( $nav_id ) {
|
|
18
|
+
global $wp_query, $post;
|
|
19
|
+
|
|
20
|
+
// Don't print empty markup on single pages if there's nowhere to navigate.
|
|
21
|
+
if ( is_single() ) {
|
|
22
|
+
$previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true );
|
|
23
|
+
$next = get_adjacent_post( false, '', false );
|
|
24
|
+
|
|
25
|
+
if ( ! $next && ! $previous )
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Don't print empty markup in archives if there's only one page.
|
|
30
|
+
if ( $wp_query->max_num_pages < 2 && ( is_home() || is_archive() || is_search() ) )
|
|
31
|
+
return;
|
|
32
|
+
|
|
33
|
+
$nav_class = 'site-navigation paging-navigation';
|
|
34
|
+
if ( is_single() )
|
|
35
|
+
$nav_class = 'site-navigation post-navigation';
|
|
36
|
+
|
|
37
|
+
?>
|
|
38
|
+
<nav role="navigation" id="<?php echo $nav_id; ?>" class="<?php echo $nav_class; ?>">
|
|
39
|
+
<h1 class="assistive-text"><?php _e( 'Post navigation', 'starter' ); ?></h1>
|
|
40
|
+
|
|
41
|
+
<?php if ( is_single() ) : // navigation links for single posts ?>
|
|
42
|
+
|
|
43
|
+
<?php previous_post_link( '<div class="nav-previous">%link</div>', '<span class="meta-nav">' . _x( '←', 'Previous post link', 'starter' ) . '</span> %title' ); ?>
|
|
44
|
+
<?php next_post_link( '<div class="nav-next">%link</div>', '%title <span class="meta-nav">' . _x( '→', 'Next post link', 'starter' ) . '</span>' ); ?>
|
|
45
|
+
|
|
46
|
+
<?php elseif ( $wp_query->max_num_pages > 1 && ( is_home() || is_archive() || is_search() ) ) : // navigation links for home, archive, and search pages ?>
|
|
47
|
+
|
|
48
|
+
<?php if ( get_next_posts_link() ) : ?>
|
|
49
|
+
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'starter' ) ); ?></div>
|
|
50
|
+
<?php endif; ?>
|
|
51
|
+
|
|
52
|
+
<?php if ( get_previous_posts_link() ) : ?>
|
|
53
|
+
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'starter' ) ); ?></div>
|
|
54
|
+
<?php endif; ?>
|
|
55
|
+
|
|
56
|
+
<?php endif; ?>
|
|
57
|
+
|
|
58
|
+
</nav><!-- #<?php echo $nav_id; ?> -->
|
|
59
|
+
<?php
|
|
60
|
+
}
|
|
61
|
+
endif; // starter_content_nav
|
|
62
|
+
|
|
63
|
+
if ( ! function_exists( 'starter_comment' ) ) :
|
|
64
|
+
/**
|
|
65
|
+
* Template for comments and pingbacks.
|
|
66
|
+
*
|
|
67
|
+
* Used as a callback by wp_list_comments() for displaying the comments.
|
|
68
|
+
*
|
|
69
|
+
* @since starter 1.0
|
|
70
|
+
*/
|
|
71
|
+
function starter_comment( $comment, $args, $depth ) {
|
|
72
|
+
$GLOBALS['comment'] = $comment;
|
|
73
|
+
switch ( $comment->comment_type ) :
|
|
74
|
+
case 'pingback' :
|
|
75
|
+
case 'trackback' :
|
|
76
|
+
?>
|
|
77
|
+
<li class="post pingback">
|
|
78
|
+
<p><?php _e( 'Pingback:', 'starter' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'starter' ), ' ' ); ?></p>
|
|
79
|
+
<?php
|
|
80
|
+
break;
|
|
81
|
+
default :
|
|
82
|
+
?>
|
|
83
|
+
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
|
|
84
|
+
<article id="comment-<?php comment_ID(); ?>" class="comment">
|
|
85
|
+
<footer>
|
|
86
|
+
<div class="comment-author vcard">
|
|
87
|
+
<?php echo get_avatar( $comment, 40 ); ?>
|
|
88
|
+
<?php printf( __( '%s <span class="says">says:</span>', 'starter' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?>
|
|
89
|
+
</div><!-- .comment-author .vcard -->
|
|
90
|
+
<?php if ( $comment->comment_approved == '0' ) : ?>
|
|
91
|
+
<em><?php _e( 'Your comment is awaiting moderation.', 'starter' ); ?></em>
|
|
92
|
+
<br />
|
|
93
|
+
<?php endif; ?>
|
|
94
|
+
|
|
95
|
+
<div class="comment-meta commentmetadata">
|
|
96
|
+
<a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"><time pubdate datetime="<?php comment_time( 'c' ); ?>">
|
|
97
|
+
<?php
|
|
98
|
+
/* translators: 1: date, 2: time */
|
|
99
|
+
printf( __( '%1$s at %2$s', 'starter' ), get_comment_date(), get_comment_time() ); ?>
|
|
100
|
+
</time></a>
|
|
101
|
+
<?php edit_comment_link( __( '(Edit)', 'starter' ), ' ' );
|
|
102
|
+
?>
|
|
103
|
+
</div><!-- .comment-meta .commentmetadata -->
|
|
104
|
+
</footer>
|
|
105
|
+
|
|
106
|
+
<div class="comment-content"><?php comment_text(); ?></div>
|
|
107
|
+
|
|
108
|
+
<div class="reply">
|
|
109
|
+
<?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
|
|
110
|
+
</div><!-- .reply -->
|
|
111
|
+
</article><!-- #comment-## -->
|
|
112
|
+
|
|
113
|
+
<?php
|
|
114
|
+
break;
|
|
115
|
+
endswitch;
|
|
116
|
+
}
|
|
117
|
+
endif; // ends check for starter_comment()
|
|
118
|
+
|
|
119
|
+
if ( ! function_exists( 'starter_posted_on' ) ) :
|
|
120
|
+
/**
|
|
121
|
+
* Prints HTML with meta information for the current post-date/time and author.
|
|
122
|
+
*
|
|
123
|
+
* @since starter 1.0
|
|
124
|
+
*/
|
|
125
|
+
function starter_posted_on() {
|
|
126
|
+
printf( __( 'Posted on <a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" pubdate>%4$s</time></a><span class="byline"> by <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', 'starter' ),
|
|
127
|
+
esc_url( get_permalink() ),
|
|
128
|
+
esc_attr( get_the_time() ),
|
|
129
|
+
esc_attr( get_the_date( 'c' ) ),
|
|
130
|
+
esc_html( get_the_date() ),
|
|
131
|
+
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
|
|
132
|
+
esc_attr( sprintf( __( 'View all posts by %s', 'starter' ), get_the_author() ) ),
|
|
133
|
+
esc_html( get_the_author() )
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
endif;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Returns true if a blog has more than 1 category
|
|
140
|
+
*
|
|
141
|
+
* @since starter 1.0
|
|
142
|
+
*/
|
|
143
|
+
function starter_categorized_blog() {
|
|
144
|
+
if ( false === ( $all_the_cool_cats = get_transient( 'all_the_cool_cats' ) ) ) {
|
|
145
|
+
// Create an array of all the categories that are attached to posts
|
|
146
|
+
$all_the_cool_cats = get_categories( array(
|
|
147
|
+
'hide_empty' => 1,
|
|
148
|
+
) );
|
|
149
|
+
|
|
150
|
+
// Count the number of categories that are attached to the posts
|
|
151
|
+
$all_the_cool_cats = count( $all_the_cool_cats );
|
|
152
|
+
|
|
153
|
+
set_transient( 'all_the_cool_cats', $all_the_cool_cats );
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if ( '1' != $all_the_cool_cats ) {
|
|
157
|
+
// This blog has more than 1 category so starter_categorized_blog should return true
|
|
158
|
+
return true;
|
|
159
|
+
} else {
|
|
160
|
+
// This blog has only 1 category so starter_categorized_blog should return false
|
|
161
|
+
return false;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Flush out the transients used in starter_categorized_blog
|
|
167
|
+
*
|
|
168
|
+
* @since starter 1.0
|
|
169
|
+
*/
|
|
170
|
+
function starter_category_transient_flusher() {
|
|
171
|
+
// Like, beat it. Dig?
|
|
172
|
+
delete_transient( 'all_the_cool_cats' );
|
|
173
|
+
}
|
|
174
|
+
add_action( 'edit_category', 'starter_category_transient_flusher' );
|
|
175
|
+
add_action( 'save_post', 'starter_category_transient_flusher' );
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
/**
|
|
3
|
+
* starter Theme Options
|
|
4
|
+
*
|
|
5
|
+
* @package starter
|
|
6
|
+
* @since starter 1.0
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Register the form setting for our starter_options array.
|
|
11
|
+
*
|
|
12
|
+
* This function is attached to the admin_init action hook.
|
|
13
|
+
*
|
|
14
|
+
* This call to register_setting() registers a validation callback, starter_theme_options_validate(),
|
|
15
|
+
* which is used when the option is saved, to ensure that our option values are properly
|
|
16
|
+
* formatted, and safe.
|
|
17
|
+
*
|
|
18
|
+
* @since starter 1.0
|
|
19
|
+
*/
|
|
20
|
+
function starter_theme_options_init() {
|
|
21
|
+
register_setting(
|
|
22
|
+
'starter_options', // Options group, see settings_fields() call in starter_theme_options_render_page()
|
|
23
|
+
'starter_theme_options', // Database option, see starter_get_theme_options()
|
|
24
|
+
'starter_theme_options_validate' // The sanitization callback, see starter_theme_options_validate()
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
// Register our settings field group
|
|
28
|
+
add_settings_section(
|
|
29
|
+
'general', // Unique identifier for the settings section
|
|
30
|
+
'', // Section title (we don't want one)
|
|
31
|
+
'__return_false', // Section callback (we don't want anything)
|
|
32
|
+
'theme_options' // Menu slug, used to uniquely identify the page; see starter_theme_options_add_page()
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
// Register our individual settings fields
|
|
36
|
+
add_settings_field(
|
|
37
|
+
'sample_checkbox', // Unique identifier for the field for this section
|
|
38
|
+
__( 'Sample Checkbox', 'starter' ), // Setting field label
|
|
39
|
+
'starter_settings_field_sample_checkbox', // Function that renders the settings field
|
|
40
|
+
'theme_options', // Menu slug, used to uniquely identify the page; see starter_theme_options_add_page()
|
|
41
|
+
'general' // Settings section. Same as the first argument in the add_settings_section() above
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
add_settings_field( 'sample_text_input', __( 'Sample Text Input', 'starter' ), 'starter_settings_field_sample_text_input', 'theme_options', 'general' );
|
|
45
|
+
add_settings_field( 'sample_select_options', __( 'Sample Select Options', 'starter' ), 'starter_settings_field_sample_select_options', 'theme_options', 'general' );
|
|
46
|
+
add_settings_field( 'sample_radio_buttons', __( 'Sample Radio Buttons', 'starter' ), 'starter_settings_field_sample_radio_buttons', 'theme_options', 'general' );
|
|
47
|
+
add_settings_field( 'sample_textarea', __( 'Sample Textarea', 'starter' ), 'starter_settings_field_sample_textarea', 'theme_options', 'general' );
|
|
48
|
+
}
|
|
49
|
+
add_action( 'admin_init', 'starter_theme_options_init' );
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Change the capability required to save the 'starter_options' options group.
|
|
53
|
+
*
|
|
54
|
+
* @see starter_theme_options_init() First parameter to register_setting() is the name of the options group.
|
|
55
|
+
* @see starter_theme_options_add_page() The edit_theme_options capability is used for viewing the page.
|
|
56
|
+
*
|
|
57
|
+
* @param string $capability The capability used for the page, which is manage_options by default.
|
|
58
|
+
* @return string The capability to actually use.
|
|
59
|
+
*/
|
|
60
|
+
function starter_option_page_capability( $capability ) {
|
|
61
|
+
return 'edit_theme_options';
|
|
62
|
+
}
|
|
63
|
+
add_filter( 'option_page_capability_starter_options', 'starter_option_page_capability' );
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Add our theme options page to the admin menu.
|
|
67
|
+
*
|
|
68
|
+
* This function is attached to the admin_menu action hook.
|
|
69
|
+
*
|
|
70
|
+
* @since starter 1.0
|
|
71
|
+
*/
|
|
72
|
+
function starter_theme_options_add_page() {
|
|
73
|
+
$theme_page = add_theme_page(
|
|
74
|
+
__( 'Theme Options', 'starter' ), // Name of page
|
|
75
|
+
__( 'Theme Options', 'starter' ), // Label in menu
|
|
76
|
+
'edit_theme_options', // Capability required
|
|
77
|
+
'theme_options', // Menu slug, used to uniquely identify the page
|
|
78
|
+
'starter_theme_options_render_page' // Function that renders the options page
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
add_action( 'admin_menu', 'starter_theme_options_add_page' );
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Returns an array of sample select options registered for starter.
|
|
85
|
+
*
|
|
86
|
+
* @since starter 1.0
|
|
87
|
+
*/
|
|
88
|
+
function starter_sample_select_options() {
|
|
89
|
+
$sample_select_options = array(
|
|
90
|
+
'0' => array(
|
|
91
|
+
'value' => '0',
|
|
92
|
+
'label' => __( 'Zero', 'starter' )
|
|
93
|
+
),
|
|
94
|
+
'1' => array(
|
|
95
|
+
'value' => '1',
|
|
96
|
+
'label' => __( 'One', 'starter' )
|
|
97
|
+
),
|
|
98
|
+
'2' => array(
|
|
99
|
+
'value' => '2',
|
|
100
|
+
'label' => __( 'Two', 'starter' )
|
|
101
|
+
),
|
|
102
|
+
'3' => array(
|
|
103
|
+
'value' => '3',
|
|
104
|
+
'label' => __( 'Three', 'starter' )
|
|
105
|
+
),
|
|
106
|
+
'4' => array(
|
|
107
|
+
'value' => '4',
|
|
108
|
+
'label' => __( 'Four', 'starter' )
|
|
109
|
+
),
|
|
110
|
+
'5' => array(
|
|
111
|
+
'value' => '5',
|
|
112
|
+
'label' => __( 'Five', 'starter' )
|
|
113
|
+
)
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
return apply_filters( 'starter_sample_select_options', $sample_select_options );
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Returns an array of sample radio options registered for starter.
|
|
121
|
+
*
|
|
122
|
+
* @since starter 1.0
|
|
123
|
+
*/
|
|
124
|
+
function starter_sample_radio_buttons() {
|
|
125
|
+
$sample_radio_buttons = array(
|
|
126
|
+
'yes' => array(
|
|
127
|
+
'value' => 'yes',
|
|
128
|
+
'label' => __( 'Yes', 'starter' )
|
|
129
|
+
),
|
|
130
|
+
'no' => array(
|
|
131
|
+
'value' => 'no',
|
|
132
|
+
'label' => __( 'No', 'starter' )
|
|
133
|
+
),
|
|
134
|
+
'maybe' => array(
|
|
135
|
+
'value' => 'maybe',
|
|
136
|
+
'label' => __( 'Maybe', 'starter' )
|
|
137
|
+
)
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
return apply_filters( 'starter_sample_radio_buttons', $sample_radio_buttons );
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Returns the options array for starter.
|
|
145
|
+
*
|
|
146
|
+
* @since starter 1.0
|
|
147
|
+
*/
|
|
148
|
+
function starter_get_theme_options() {
|
|
149
|
+
$saved = (array) get_option( 'starter_theme_options' );
|
|
150
|
+
$defaults = array(
|
|
151
|
+
'sample_checkbox' => 'off',
|
|
152
|
+
'sample_text_input' => '',
|
|
153
|
+
'sample_select_options' => '',
|
|
154
|
+
'sample_radio_buttons' => '',
|
|
155
|
+
'sample_textarea' => '',
|
|
156
|
+
);
|
|
157
|
+
|
|
158
|
+
$defaults = apply_filters( 'starter_default_theme_options', $defaults );
|
|
159
|
+
|
|
160
|
+
$options = wp_parse_args( $saved, $defaults );
|
|
161
|
+
$options = array_intersect_key( $options, $defaults );
|
|
162
|
+
|
|
163
|
+
return $options;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Renders the sample checkbox setting field.
|
|
168
|
+
*/
|
|
169
|
+
function starter_settings_field_sample_checkbox() {
|
|
170
|
+
$options = starter_get_theme_options();
|
|
171
|
+
?>
|
|
172
|
+
<label for="sample-checkbox">
|
|
173
|
+
<input type="checkbox" name="starter_theme_options[sample_checkbox]" id="sample-checkbox" <?php checked( 'on', $options['sample_checkbox'] ); ?> />
|
|
174
|
+
<?php _e( 'A sample checkbox.', 'starter' ); ?>
|
|
175
|
+
</label>
|
|
176
|
+
<?php
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Renders the sample text input setting field.
|
|
181
|
+
*/
|
|
182
|
+
function starter_settings_field_sample_text_input() {
|
|
183
|
+
$options = starter_get_theme_options();
|
|
184
|
+
?>
|
|
185
|
+
<input type="text" name="starter_theme_options[sample_text_input]" id="sample-text-input" value="<?php echo esc_attr( $options['sample_text_input'] ); ?>" />
|
|
186
|
+
<label class="description" for="sample-text-input"><?php _e( 'Sample text input', 'starter' ); ?></label>
|
|
187
|
+
<?php
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Renders the sample select options setting field.
|
|
192
|
+
*/
|
|
193
|
+
function starter_settings_field_sample_select_options() {
|
|
194
|
+
$options = starter_get_theme_options();
|
|
195
|
+
?>
|
|
196
|
+
<select name="starter_theme_options[sample_select_options]" id="sample-select-options">
|
|
197
|
+
<?php
|
|
198
|
+
$selected = $options['sample_select_options'];
|
|
199
|
+
$p = '';
|
|
200
|
+
$r = '';
|
|
201
|
+
|
|
202
|
+
foreach ( starter_sample_select_options() as $option ) {
|
|
203
|
+
$label = $option['label'];
|
|
204
|
+
if ( $selected == $option['value'] ) // Make default first in list
|
|
205
|
+
$p = "\n\t<option style=\"padding-right: 10px;\" selected='selected' value='" . esc_attr( $option['value'] ) . "'>$label</option>";
|
|
206
|
+
else
|
|
207
|
+
$r .= "\n\t<option style=\"padding-right: 10px;\" value='" . esc_attr( $option['value'] ) . "'>$label</option>";
|
|
208
|
+
}
|
|
209
|
+
echo $p . $r;
|
|
210
|
+
?>
|
|
211
|
+
</select>
|
|
212
|
+
<label class="description" for="sample_theme_options[selectinput]"><?php _e( 'Sample select input', 'starter' ); ?></label>
|
|
213
|
+
<?php
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Renders the radio options setting field.
|
|
218
|
+
*
|
|
219
|
+
* @since starter 1.0
|
|
220
|
+
*/
|
|
221
|
+
function starter_settings_field_sample_radio_buttons() {
|
|
222
|
+
$options = starter_get_theme_options();
|
|
223
|
+
|
|
224
|
+
foreach ( starter_sample_radio_buttons() as $button ) {
|
|
225
|
+
?>
|
|
226
|
+
<div class="layout">
|
|
227
|
+
<label class="description">
|
|
228
|
+
<input type="radio" name="starter_theme_options[sample_radio_buttons]" value="<?php echo esc_attr( $button['value'] ); ?>" <?php checked( $options['sample_radio_buttons'], $button['value'] ); ?> />
|
|
229
|
+
<?php echo $button['label']; ?>
|
|
230
|
+
</label>
|
|
231
|
+
</div>
|
|
232
|
+
<?php
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Renders the sample textarea setting field.
|
|
238
|
+
*/
|
|
239
|
+
function starter_settings_field_sample_textarea() {
|
|
240
|
+
$options = starter_get_theme_options();
|
|
241
|
+
?>
|
|
242
|
+
<textarea class="large-text" type="text" name="starter_theme_options[sample_textarea]" id="sample-textarea" cols="50" rows="10" /><?php echo esc_textarea( $options['sample_textarea'] ); ?></textarea>
|
|
243
|
+
<label class="description" for="sample-textarea"><?php _e( 'Sample textarea', 'starter' ); ?></label>
|
|
244
|
+
<?php
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Renders the Theme Options administration screen.
|
|
249
|
+
*
|
|
250
|
+
* @since starter 1.0
|
|
251
|
+
*/
|
|
252
|
+
function starter_theme_options_render_page() {
|
|
253
|
+
?>
|
|
254
|
+
<div class="wrap">
|
|
255
|
+
<?php screen_icon(); ?>
|
|
256
|
+
<?php $theme_name = function_exists( 'wp_get_theme' ) ? wp_get_theme() : get_current_theme(); ?>
|
|
257
|
+
<h2><?php printf( __( '%s Theme Options', 'starter' ), $theme_name ); ?></h2>
|
|
258
|
+
<?php settings_errors(); ?>
|
|
259
|
+
|
|
260
|
+
<form method="post" action="options.php">
|
|
261
|
+
<?php
|
|
262
|
+
settings_fields( 'starter_options' );
|
|
263
|
+
do_settings_sections( 'theme_options' );
|
|
264
|
+
submit_button();
|
|
265
|
+
?>
|
|
266
|
+
</form>
|
|
267
|
+
</div>
|
|
268
|
+
<?php
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Sanitize and validate form input. Accepts an array, return a sanitized array.
|
|
273
|
+
*
|
|
274
|
+
* @see starter_theme_options_init()
|
|
275
|
+
* @todo set up Reset Options action
|
|
276
|
+
*
|
|
277
|
+
* @param array $input Unknown values.
|
|
278
|
+
* @return array Sanitized theme options ready to be stored in the database.
|
|
279
|
+
*
|
|
280
|
+
* @since starter 1.0
|
|
281
|
+
*/
|
|
282
|
+
function starter_theme_options_validate( $input ) {
|
|
283
|
+
$output = array();
|
|
284
|
+
|
|
285
|
+
// Checkboxes will only be present if checked.
|
|
286
|
+
if ( isset( $input['sample_checkbox'] ) )
|
|
287
|
+
$output['sample_checkbox'] = 'on';
|
|
288
|
+
|
|
289
|
+
// The sample text input must be safe text with no HTML tags
|
|
290
|
+
if ( isset( $input['sample_text_input'] ) && ! empty( $input['sample_text_input'] ) )
|
|
291
|
+
$output['sample_text_input'] = wp_filter_nohtml_kses( $input['sample_text_input'] );
|
|
292
|
+
|
|
293
|
+
// The sample select option must actually be in the array of select options
|
|
294
|
+
if ( isset( $input['sample_select_options'] ) && array_key_exists( $input['sample_select_options'], starter_sample_select_options() ) )
|
|
295
|
+
$output['sample_select_options'] = $input['sample_select_options'];
|
|
296
|
+
|
|
297
|
+
// The sample radio button value must be in our array of radio button values
|
|
298
|
+
if ( isset( $input['sample_radio_buttons'] ) && array_key_exists( $input['sample_radio_buttons'], starter_sample_radio_buttons() ) )
|
|
299
|
+
$output['sample_radio_buttons'] = $input['sample_radio_buttons'];
|
|
300
|
+
|
|
301
|
+
// The sample textarea must be safe text with the allowed tags for posts
|
|
302
|
+
if ( isset( $input['sample_textarea'] ) && ! empty( $input['sample_textarea'] ) )
|
|
303
|
+
$output['sample_textarea'] = wp_filter_post_kses( $input['sample_textarea'] );
|
|
304
|
+
|
|
305
|
+
return apply_filters( 'starter_theme_options_validate', $output, $input );
|
|
306
|
+
}
|