diff --git a/404.php b/404.php new file mode 100644 index 00000000..1a55cd5a --- /dev/null +++ b/404.php @@ -0,0 +1,23 @@ + + +
+ + + +
+ +
+ +
+ +
+

+
+ +
+ +
+ + + + \ No newline at end of file diff --git a/archive.php b/archive.php new file mode 100644 index 00000000..e84cfd90 --- /dev/null +++ b/archive.php @@ -0,0 +1,33 @@ + + +
+ + + +
+ + +
+ +
+ + + + +
+ '; while ( have_posts() ): the_post(); ?> + +
'; } $i++; endwhile; echo '
'; ?> +
+ + + + + +
+ +
+ + + + \ No newline at end of file diff --git a/changelog.txt b/changelog.txt new file mode 100644 index 00000000..a89607b7 --- /dev/null +++ b/changelog.txt @@ -0,0 +1,169 @@ + Theme : Hueman +Version : 2.0.8 + Author : Alexander "Alx" Agnarson - http://alxmedia.se + +December 27 2013 - 2.0.8 +=========================================================== +- Added missing "says:" language string for tabs widget +- Added direct links and search IDs to CC0 images used in screenshot.png to readme.txt + +December 24 2013 - 2.0.7 +=========================================================== +- Updated screenshot.png to larger size for WP 3.8 - all images are now CC0 (GPL-compatible) +- Added new content-featured.php + +December 20 2013 - 2.0.6 +=========================================================== +- Moved load_theme_textdomain from alx_setup to alx_load function +- Added nofollow to social links and footer credit links +- Fixed footer widget boxes to only show in admin if enabled +- Fixed blockquote icon position +- Fixed standard gallery captions being slightly visible even if not hovered over +- Fixed text caption boxes top padding +- Added icon for Twitter embeds +- Optimized font css +- WordPress 3.8 fixes: +-- Fixed topbar spacing with admin bar enabled from 28px to 32px +-- Improved admin styling for all custom widgets +-- Fixed OptionTree admin panel styling issues +-- Updated to the new fluid-layout and fixed-layout WordPress css tags + +December 8 2013 - 2.0.5 +=========================================================== +- Updated screenshot.png, added links to all images used to readme.txt +- Removed unused css +- Fixed typo on 404 pages +- Changed footer credit text +- Added better compatibility for plugins modifying site title +- Fixed minor css bugs +- Updated language files + +December 7 2013 - 2.0.4 +=========================================================== +- Optimized and rewrote layout class and sidebar code +- Simplified some admin panel descriptions +- Updated language files + +December 6 2013 - 2.0.3 +=========================================================== +- Made all additional function files pluggable for child themes +- Moved layout class to body_class +- Moved main and main-inner divs from templates to header and footer +- Added auto disable for custom wp_title if SEO by Yoast plugin is installed +- Added basic WooCommerce support +- Added option to disable category and/or date for AlxTabs and AlxPosts widgets +- Added forced lowercase letters on custom sidebar IDs +- Markup polish +- Updated language files + +December 4 2013 - 2.0.2 +=========================================================== +- Updated help dropdown +- Fixed bug with hidden sidebar-2 when specific page or post layout is set to 2 sidebars, when global is 1 or 0 +- Added child theme info to style.css warning and dynamic css notice +- Added download link to sample child theme in help dropdown + +December 3 2013 - 2.0.1 +=========================================================== +- Moved add_action and add_filter outside of function_exists +- Added function_exists to functions registering custom widgets + +November 30 2013 - 2.0.0 +=========================================================== +- Moved to 2.X.X version number to not receive auto-update notifications from the wordpress.org version +- Improved child theme support +- Updated help dropdown +- Added option for boxed layout for better background image support +- Added font selection option (also latin-ext, cyrillic) +- Added empty title/id/icon checks for social links and widget areas +- Added star indication for admin comments +- Rebuilt dynamic styling options: +-- Fixed for theme updates +-- Fixed for network and subdirectory installations +-- Fixed so that no file permission/chmod is required +-- Fixed css for each styling option to only be added if set +-- Added option to disable styling options css +-- Removed dynamic.css + +November 22 2013 - 1.1.3 +=========================================================== +- Improved IE8 support +- Added option for header image +- Fixed nav dropdowns expanding behind second nav row when too many menu links are used +- Removed custom css field in styling options, replaced with custom.css file option +- Fixed thumbnail comment count position with Disqus plugin enabled +- Fixed related posts heading appearing even if there are no related posts +- Changed page background area to full body background in styling options +- Changed theme license to GPLv3 + +November 18 2013 - 1.1.2 +=========================================================== +- Fixed broken comments pagination when there are pingbacks as well +- Polished and made post author comment icons slightly smaller + +November 18 2013 - 1.1.1 +=========================================================== +- Fixed tabs widget tab-button css for better mobile browser compatibility +- Fixed lists spacing + +November 15 2013 - 1.1.0 +=========================================================== +- Added styling option to change sidebar padding / width + +November 15 2013 - 1.0.9 +=========================================================== +- Added option to hide one or both sidebars for low-res mobile +- Moved to a single css grid percent-width system +- Centered footer bottom content on mobile +- Fixed sidebar padding for low-res mobile + +November 12 2013 - 1.0.8 +=========================================================== +- Fixed and polished styling for widgets +- Fixed primary color styling missing for slider controls + +November 11 2013 - 1.0.7 +=========================================================== +- Added sidebar layout option for category archives +- Added fade-in and auto focus of header search field + +November 9 2013 - 1.0.6 +=========================================================== +- Fixed double sidebar left layout, for expanded sidebar secondary +- Fixed hidden dropdowns behind toggle-expanded sidebars + +November 9 2013 - 1.0.5 +=========================================================== +- Added additional license information +- Moved no-js/js class javascript to functions.php + +November 8 2013 - 1.0.4 +=========================================================== +- Restructured functions.php according to wordpress best practices +- Loading IE-specific js via functions.php instead of template +- Moved & added new browser body classes to functions.php +- Fixed responsive embeds with Jetpack +- Fixed featured slider flickering issue on iPad + +November 7 2013 - 1.0.3 +=========================================================== +- Updated to Flexslider 2.2.0 +- Updated to Sharrre 1.3.5 +- Updated to Font Awesome 4.0.3 +- Removed reply button for pingbacks & trackbacks +- Fixed double site title in RSS feed + +November 2 2013 - 1.0.2 +=========================================================== +- Fixed margin issue with topbar menu disabled +- Fixed responsive columns + +November 1 2013 - 1.0.1 +=========================================================== +- Theme screenshot updated +- Detailed theme description added +- New default color combination + +October 31 2013 - 1.0.0 +=========================================================== +- Theme released \ No newline at end of file diff --git a/comments.php b/comments.php new file mode 100644 index 00000000..c6644c21 --- /dev/null +++ b/comments.php @@ -0,0 +1,61 @@ + + +
+ + + +

+ + + + +
+ +
    + +
+ + 1 && get_option('page_comments') ) : ?> + + + +
+ + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/content-featured.php b/content-featured.php new file mode 100644 index 00000000..b0858533 --- /dev/null +++ b/content-featured.php @@ -0,0 +1,36 @@ +
> +
+ +
+ + + + + <?php the_title(); ?> + + '; ?> + '; ?> + '; ?> + + + + +
+ + + +

+ +

+ + +
+ +
+ + +
+
\ No newline at end of file diff --git a/content.php b/content.php new file mode 100644 index 00000000..f3bdb624 --- /dev/null +++ b/content.php @@ -0,0 +1,36 @@ +
> +
+ +
+ + + + + <?php the_title(); ?> + + '; ?> + '; ?> + '; ?> + + + + +
+ + + +

+ +

+ + +
+ +
+ + +
+
\ No newline at end of file diff --git a/custom.css b/custom.css new file mode 100644 index 00000000..badc1859 --- /dev/null +++ b/custom.css @@ -0,0 +1,28 @@ +/* +Add your custom styles in this file instead of style.css so it +is easier to update the theme. Simply copy an existing style +from style.css to this file, and modify it to your liking. + +When you update your theme, backup this file and re-add it after. +*/ + +/* Global */ +.mystyle {} + + +/* Tablet - 800px, 768px & 720px */ +@media only screen and (min-width: 720px) and (max-width: 800px) { + .mystyle {} +} + + +/* Mobile - 480px & 320px */ +@media only screen and (max-width: 719px) { + .mystyle {} +} + + +/* Mobile - 320px */ +@media only screen and (max-width: 479px) { + .mystyle {} +} \ No newline at end of file diff --git a/fonts/FontAwesome.otf b/fonts/FontAwesome.otf new file mode 100644 index 00000000..8b0f54e4 Binary files /dev/null and b/fonts/FontAwesome.otf differ diff --git a/fonts/font-awesome.min.css b/fonts/font-awesome.min.css new file mode 100644 index 00000000..02f40295 --- /dev/null +++ b/fonts/font-awesome.min.css @@ -0,0 +1,4 @@ +/*! + * Font Awesome 4.0.3 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:'FontAwesome';src:url('fontawesome-webfont.eot?v=4.0.3');src:url('fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'),url('fontawesome-webfont.woff?v=4.0.3') format('woff'),url('fontawesome-webfont.ttf?v=4.0.3') format('truetype'),url('fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857142858em;text-align:center}.fa-ul{padding-left:0;margin-left:2.142857142857143em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;top:.14285714285714285em;text-align:center}.fa-li.fa-lg{left:-1.8571428571428572em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0,mirror=1);-webkit-transform:scale(-1,1);-moz-transform:scale(-1,1);-ms-transform:scale(-1,1);-o-transform:scale(-1,1);transform:scale(-1,1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2,mirror=1);-webkit-transform:scale(1,-1);-moz-transform:scale(1,-1);-ms-transform:scale(1,-1);-o-transform:scale(1,-1);transform:scale(1,-1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-asc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-desc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-reply-all:before{content:"\f122"}.fa-mail-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"} \ No newline at end of file diff --git a/fonts/fontawesome-webfont.eot b/fonts/fontawesome-webfont.eot new file mode 100644 index 00000000..7c79c6a6 Binary files /dev/null and b/fonts/fontawesome-webfont.eot differ diff --git a/fonts/fontawesome-webfont.svg b/fonts/fontawesome-webfont.svg new file mode 100644 index 00000000..45fdf338 --- /dev/null +++ b/fonts/fontawesome-webfont.svg @@ -0,0 +1,414 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fonts/fontawesome-webfont.ttf b/fonts/fontawesome-webfont.ttf new file mode 100644 index 00000000..e89738de Binary files /dev/null and b/fonts/fontawesome-webfont.ttf differ diff --git a/fonts/fontawesome-webfont.woff b/fonts/fontawesome-webfont.woff new file mode 100644 index 00000000..8c1748aa Binary files /dev/null and b/fonts/fontawesome-webfont.woff differ diff --git a/fonts/titillium-light-webfont.eot b/fonts/titillium-light-webfont.eot new file mode 100644 index 00000000..24942e31 Binary files /dev/null and b/fonts/titillium-light-webfont.eot differ diff --git a/fonts/titillium-light-webfont.svg b/fonts/titillium-light-webfont.svg new file mode 100644 index 00000000..4a7411e8 --- /dev/null +++ b/fonts/titillium-light-webfont.svg @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fonts/titillium-light-webfont.ttf b/fonts/titillium-light-webfont.ttf new file mode 100644 index 00000000..ff5ec1db Binary files /dev/null and b/fonts/titillium-light-webfont.ttf differ diff --git a/fonts/titillium-light-webfont.woff b/fonts/titillium-light-webfont.woff new file mode 100644 index 00000000..b6eb805d Binary files /dev/null and b/fonts/titillium-light-webfont.woff differ diff --git a/fonts/titillium-lightitalic-webfont.eot b/fonts/titillium-lightitalic-webfont.eot new file mode 100644 index 00000000..2920cd5d Binary files /dev/null and b/fonts/titillium-lightitalic-webfont.eot differ diff --git a/fonts/titillium-lightitalic-webfont.svg b/fonts/titillium-lightitalic-webfont.svg new file mode 100644 index 00000000..ea4b00af --- /dev/null +++ b/fonts/titillium-lightitalic-webfont.svg @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fonts/titillium-lightitalic-webfont.ttf b/fonts/titillium-lightitalic-webfont.ttf new file mode 100644 index 00000000..425f7374 Binary files /dev/null and b/fonts/titillium-lightitalic-webfont.ttf differ diff --git a/fonts/titillium-lightitalic-webfont.woff b/fonts/titillium-lightitalic-webfont.woff new file mode 100644 index 00000000..359b7c43 Binary files /dev/null and b/fonts/titillium-lightitalic-webfont.woff differ diff --git a/fonts/titillium-regular-webfont.eot b/fonts/titillium-regular-webfont.eot new file mode 100644 index 00000000..04426301 Binary files /dev/null and b/fonts/titillium-regular-webfont.eot differ diff --git a/fonts/titillium-regular-webfont.svg b/fonts/titillium-regular-webfont.svg new file mode 100644 index 00000000..88877e0e --- /dev/null +++ b/fonts/titillium-regular-webfont.svg @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fonts/titillium-regular-webfont.ttf b/fonts/titillium-regular-webfont.ttf new file mode 100644 index 00000000..5febb3d6 Binary files /dev/null and b/fonts/titillium-regular-webfont.ttf differ diff --git a/fonts/titillium-regular-webfont.woff b/fonts/titillium-regular-webfont.woff new file mode 100644 index 00000000..84ae6c3d Binary files /dev/null and b/fonts/titillium-regular-webfont.woff differ diff --git a/fonts/titillium-regularitalic-webfont.eot b/fonts/titillium-regularitalic-webfont.eot new file mode 100644 index 00000000..450c6a60 Binary files /dev/null and b/fonts/titillium-regularitalic-webfont.eot differ diff --git a/fonts/titillium-regularitalic-webfont.svg b/fonts/titillium-regularitalic-webfont.svg new file mode 100644 index 00000000..f5357703 --- /dev/null +++ b/fonts/titillium-regularitalic-webfont.svg @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fonts/titillium-regularitalic-webfont.ttf b/fonts/titillium-regularitalic-webfont.ttf new file mode 100644 index 00000000..92ebc1fc Binary files /dev/null and b/fonts/titillium-regularitalic-webfont.ttf differ diff --git a/fonts/titillium-regularitalic-webfont.woff b/fonts/titillium-regularitalic-webfont.woff new file mode 100644 index 00000000..0816cfd5 Binary files /dev/null and b/fonts/titillium-regularitalic-webfont.woff differ diff --git a/fonts/titillium-semibold-webfont.eot b/fonts/titillium-semibold-webfont.eot new file mode 100644 index 00000000..ec42bbfc Binary files /dev/null and b/fonts/titillium-semibold-webfont.eot differ diff --git a/fonts/titillium-semibold-webfont.svg b/fonts/titillium-semibold-webfont.svg new file mode 100644 index 00000000..f319eaa4 --- /dev/null +++ b/fonts/titillium-semibold-webfont.svg @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fonts/titillium-semibold-webfont.ttf b/fonts/titillium-semibold-webfont.ttf new file mode 100644 index 00000000..e05a0753 Binary files /dev/null and b/fonts/titillium-semibold-webfont.ttf differ diff --git a/fonts/titillium-semibold-webfont.woff b/fonts/titillium-semibold-webfont.woff new file mode 100644 index 00000000..0543b8ee Binary files /dev/null and b/fonts/titillium-semibold-webfont.woff differ diff --git a/footer.php b/footer.php new file mode 100644 index 00000000..551a7b2c --- /dev/null +++ b/footer.php @@ -0,0 +1,94 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/functions.php b/functions.php new file mode 100644 index 00000000..e43724f6 --- /dev/null +++ b/functions.php @@ -0,0 +1,839 @@ + 'Topbar', + 'header' => 'Header', + 'footer' => 'Footer', + ) ); + } + +} +add_action( 'after_setup_theme', 'alx_setup' ); + + +/* Register sidebars +/* ------------------------------------ */ +if ( ! function_exists( 'alx_sidebars' ) ) { + + function alx_sidebars() { + register_sidebar(array( 'name' => 'Primary','id' => 'primary','description' => "Normal full width sidebar", 'before_widget' => '
','after_widget' => '
','before_title' => '

','after_title' => '

')); + register_sidebar(array( 'name' => 'Secondary','id' => 'secondary','description' => "Normal full width sidebar", 'before_widget' => '
','after_widget' => '
','before_title' => '

','after_title' => '

')); + if ( ot_get_option('footer-widgets') >= '1' ) { register_sidebar(array( 'name' => 'Footer 1','id' => 'footer-1', 'description' => "Widetized footer", 'before_widget' => '
','after_widget' => '
','before_title' => '

','after_title' => '

')); } + if ( ot_get_option('footer-widgets') >= '2' ) { register_sidebar(array( 'name' => 'Footer 2','id' => 'footer-2', 'description' => "Widetized footer", 'before_widget' => '
','after_widget' => '
','before_title' => '

','after_title' => '

')); } + if ( ot_get_option('footer-widgets') >= '3' ) { register_sidebar(array( 'name' => 'Footer 3','id' => 'footer-3', 'description' => "Widetized footer", 'before_widget' => '
','after_widget' => '
','before_title' => '

','after_title' => '

')); } + if ( ot_get_option('footer-widgets') >= '4' ) { register_sidebar(array( 'name' => 'Footer 4','id' => 'footer-4', 'description' => "Widetized footer", 'before_widget' => '
','after_widget' => '
','before_title' => '

','after_title' => '

')); } + } + +} +add_action( 'widgets_init', 'alx_sidebars' ); + + +/* Enqueue javascript +/* ------------------------------------ */ +if ( ! function_exists( 'alx_scripts' ) ) { + + function alx_scripts() { + wp_enqueue_script( 'flexslider', get_template_directory_uri() . '/js/jquery.flexslider.min.js', array( 'jquery' ),'', false ); + wp_enqueue_script( 'jplayer', get_template_directory_uri() . '/js/jquery.jplayer.min.js', array( 'jquery' ),'', true ); + wp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/scripts.js', array( 'jquery' ),'', true ); + if ( is_singular() ) { wp_enqueue_script( 'sharrre', get_template_directory_uri() . '/js/jquery.sharrre.min.js', array( 'jquery' ),'', true ); } + if ( is_singular() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } + } + +} +add_action( 'wp_enqueue_scripts', 'alx_scripts' ); + + +/* Enqueue css +/* ------------------------------------ */ +if ( ! function_exists( 'alx_styles' ) ) { + + function alx_styles() { + wp_enqueue_style( 'style', get_stylesheet_uri() ); + if ( !ot_get_option('responsive') ) { wp_enqueue_style( 'responsive', get_template_directory_uri().'/responsive.css' ); } + if ( ot_get_option('custom') ) { wp_enqueue_style( 'custom', get_template_directory_uri().'/custom.css' ); } + wp_enqueue_style( 'font-awesome', get_template_directory_uri().'/fonts/font-awesome.min.css' ); + } + +} +add_action( 'wp_enqueue_scripts', 'alx_styles' ); + + +/* Register custom sidebars +/* ------------------------------------ */ +if ( ! function_exists( 'alx_custom_sidebars' ) ) { + + function alx_custom_sidebars() { + if ( !ot_get_option('sidebar-areas') =='' ) { + + $sidebars = ot_get_option('sidebar-areas', array()); + + if ( !empty( $sidebars ) ) { + foreach( $sidebars as $sidebar ) { + if ( isset($sidebar['title']) && !empty($sidebar['title']) && isset($sidebar['id']) && !empty($sidebar['id']) && ($sidebar['id'] !='sidebar-') ) { + register_sidebar(array('name' => ''.$sidebar['title'].'','id' => ''.strtolower($sidebar['id']).'','before_widget' => '
','after_widget' => '
','before_title' => '

','after_title' => '

')); + } + } + } + } + } + +} +add_action( 'widgets_init', 'alx_custom_sidebars' ); + + +/* ------------------------------------------------------------------------- * + * Template functions +/* ------------------------------------------------------------------------- */ + +/* Layout class +/* ------------------------------------ */ +if ( ! function_exists( 'alx_layout_class' ) ) { + + function alx_layout_class() { + // Default layout + $layout = 'col-3cm'; + $default = 'col-3cm'; + + // Check for page/post specific layout + if ( is_page() || is_single() ) { + // Reset post data + wp_reset_postdata(); + global $post; + // Get meta + $meta = get_post_meta($post->ID,'_layout',true); + // Get if set and not set to inherit + if ( isset($meta) && !empty($meta) && $meta != 'inherit' ) { $layout = $meta; } + // Else check for page-global / single-global + elseif ( is_single() && ( ot_get_option('layout-single') !='inherit' ) ) $layout = ot_get_option('layout-single',''.$default.''); + elseif ( is_page() && ( ot_get_option('layout-page') !='inherit' ) ) $layout = ot_get_option('layout-page',''.$default.''); + // Else get global option + else $layout = ot_get_option('layout-global',''.$default.''); + } + + // Set layout based on page + elseif ( is_home() && ( ot_get_option('layout-home') !='inherit' ) ) $layout = ot_get_option('layout-home',''.$default.''); + elseif ( is_category() && ( ot_get_option('layout-archive-category') !='inherit' ) ) $layout = ot_get_option('layout-archive-category',''.$default.''); + elseif ( is_archive() && ( ot_get_option('layout-archive') !='inherit' ) ) $layout = ot_get_option('layout-archive',''.$default.''); + elseif ( is_search() && ( ot_get_option('layout-search') !='inherit' ) ) $layout = ot_get_option('layout-search',''.$default.''); + elseif ( is_404() && ( ot_get_option('layout-404') !='inherit' ) ) $layout = ot_get_option('layout-404',''.$default.''); + + // Global option + else $layout = ot_get_option('layout-global',''.$default.''); + + // Return layout class + return $layout; + } + +} + + +/* Dynamic sidebar primary +/* ------------------------------------ */ +if ( ! function_exists( 'alx_sidebar_primary' ) ) { + + function alx_sidebar_primary() { + // Default sidebar + $sidebar = 'primary'; + + // Set sidebar based on page + if ( is_home() && ot_get_option('s1-home') ) $sidebar = ot_get_option('s1-home'); + if ( is_single() && ot_get_option('s1-single') ) $sidebar = ot_get_option('s1-single'); + if ( is_archive() && ot_get_option('s1-archive') ) $sidebar = ot_get_option('s1-archive'); + if ( is_category() && ot_get_option('s1-archive-category') ) $sidebar = ot_get_option('s1-archive-category'); + if ( is_search() && ot_get_option('s1-search') ) $sidebar = ot_get_option('s1-search'); + if ( is_404() && ot_get_option('s1-404') ) $sidebar = ot_get_option('s1-404'); + if ( is_page() && ot_get_option('s1-page') ) $sidebar = ot_get_option('s1-page'); + + // Check for page/post specific sidebar + if ( is_page() || is_single() ) { + // Reset post data + wp_reset_postdata(); + global $post; + // Get meta + $meta = get_post_meta($post->ID,'_sidebar_primary',true); + if ( $meta ) { $sidebar = $meta; } + } + + // Return sidebar + return $sidebar; + } + +} + + +/* Dynamic sidebar secondary +/* ------------------------------------ */ +if ( ! function_exists( 'alx_sidebar_secondary' ) ) { + + function alx_sidebar_secondary() { + // Default sidebar + $sidebar = 'secondary'; + + // Set sidebar based on page + if ( is_home() && ot_get_option('s2-home') ) $sidebar = ot_get_option('s2-home'); + if ( is_single() && ot_get_option('s2-single') ) $sidebar = ot_get_option('s2-single'); + if ( is_archive() && ot_get_option('s2-archive') ) $sidebar = ot_get_option('s2-archive'); + if ( is_category() && ot_get_option('s2-archive-category') ) $sidebar = ot_get_option('s2-archive-category'); + if ( is_search() && ot_get_option('s2-search') ) $sidebar = ot_get_option('s2-search'); + if ( is_404() && ot_get_option('s2-404') ) $sidebar = ot_get_option('s2-404'); + if ( is_page() && ot_get_option('s2-page') ) $sidebar = ot_get_option('s2-page'); + + // Check for page/post specific sidebar + if ( is_page() || is_single() ) { + // Reset post data + wp_reset_postdata(); + global $post; + // Get meta + $meta = get_post_meta($post->ID,'_sidebar_secondary',true); + if ( $meta ) { $sidebar = $meta; } + } + + // Return sidebar + return $sidebar; + } + +} + + +/* Social links +/* ------------------------------------ */ +if ( ! function_exists( 'alx_social_links' ) ) { + + function alx_social_links() { + if ( !ot_get_option('social-links') =='' ) { + $links = ot_get_option('social-links', array()); + if ( !empty( $links ) ) { + echo ''; + } + } + } + +} + + +/* Site name/logo +/* ------------------------------------ */ +if ( ! function_exists( 'alx_site_title' ) ) { + + function alx_site_title() { + + // Text or image? + if ( ot_get_option('custom-logo') ) { + $logo = ''.get_bloginfo('name').''; + } else { + $logo = get_bloginfo('name'); + } + + $link = ''.$logo.''; + + if ( is_front_page() || is_home() ) { + $sitename = '

'.$link.'

'."\n"; + } else { + $sitename = '

'.$link.'

'."\n"; + } + + return $sitename; + } + +} + + +/* Page title +/* ------------------------------------ */ +if ( ! function_exists( 'alx_page_title' ) ) { + + function alx_page_title() { + global $post; + + $heading = get_post_meta($post->ID,'_heading',true); + $subheading = get_post_meta($post->ID,'_subheading',true); + $title = $heading?$heading:the_title(); + if($subheading) { + $title = $title.' '.$subheading.''; + } + + return $title; + } + +} + + +/* Blog title +/* ------------------------------------ */ +if ( ! function_exists( 'alx_blog_title' ) ) { + + function alx_blog_title() { + global $post; + $heading = ot_get_option('blog-heading'); + $subheading = ot_get_option('blog-subheading'); + if($heading) { + $title = $heading; + } else { + $title = get_bloginfo('name'); + } + if($subheading) { + $title = $title.' '.$subheading.''; + } + + return $title; + } + +} + + +/* Related posts +/* ------------------------------------ */ +if ( ! function_exists( 'alx_related_posts' ) ) { + + function alx_related_posts() { + wp_reset_postdata(); + global $post; + + // Define shared post arguments + $args = array( + 'no_found_rows' => true, + 'update_post_meta_cache' => false, + 'update_post_term_cache' => false, + 'ignore_sticky_posts' => 1, + 'orderby' => 'rand', + 'post__not_in' => array($post->ID), + 'posts_per_page' => 3 + ); + // Related by categories + if ( ot_get_option('related-posts') == 'categories' ) { + + $cats = get_post_meta($post->ID, 'related-cat', true); + + if ( !$cats ) { + $cats = wp_get_post_categories($post->ID, array('fields'=>'ids')); + $args['category__in'] = $cats; + } else { + $args['cat'] = $cats; + } + } + // Related by tags + if ( ot_get_option('related-posts') == 'tags' ) { + + $tags = get_post_meta($post->ID, 'related-tag', true); + + if ( !$tags ) { + $tags = wp_get_post_tags($post->ID, array('fields'=>'ids')); + $args['tag__in'] = $tags; + } else { + $args['tag_slug__in'] = explode(',', $tags); + } + if ( !$tags ) { $break = true; } + } + + $query = !isset($break)?new WP_Query($args):new WP_Query; + return $query; + } + +} + + +/* Get images attached to post +/* ------------------------------------ */ +if ( ! function_exists( 'alx_post_images' ) ) { + + function alx_post_images( $args=array() ) { + global $post; + + $defaults = array( + 'numberposts' => -1, + 'order' => 'ASC', + 'orderby' => 'menu_order', + 'post_mime_type' => 'image', + 'post_parent' => $post->ID, + 'post_type' => 'attachment', + ); + + $args = wp_parse_args( $args, $defaults ); + + return get_posts( $args ); + } + +} + + +/* Get featured post ids +/* ------------------------------------ */ +if ( ! function_exists( 'alx_get_featured_post_ids' ) ) { + + function alx_get_featured_post_ids() { + $args = array( + 'category' => ot_get_option('featured-category'), + 'numberposts' => ot_get_option('featured-posts-count') + ); + $posts = get_posts($args); + if ( !$posts ) return false; + foreach ( $posts as $post ) + $ids[] = $post->ID; + return $ids; + } + +} + + +/* ------------------------------------------------------------------------- * + * Admin panel functions +/* ------------------------------------------------------------------------- */ + +/* Post formats script +/* ------------------------------------ */ +if ( ! function_exists( 'alx_post_formats_script' ) ) { + + function alx_post_formats_script( $hook ) { + // Only load on posts, pages + if ( !in_array($hook, array('post.php','post-new.php')) ) + return; + wp_enqueue_script('post-formats', get_template_directory_uri() . '/functions/js/post-formats.js', array( 'jquery' )); + } + +} +add_action( 'admin_enqueue_scripts', 'alx_post_formats_script'); + + +/* ------------------------------------------------------------------------- * + * Filters +/* ------------------------------------------------------------------------- */ + +/* Body class +/* ------------------------------------ */ +if ( ! function_exists( 'alx_body_class' ) ) { + + function alx_body_class( $classes ) { + $classes[] = alx_layout_class(); + if ( !ot_get_option( 'boxed' ) ) { $classes[] = 'full-width'; } + if ( ot_get_option( 'boxed' ) ) { $classes[] = 'boxed'; } + if ( has_nav_menu('topbar') ) { $classes[] = 'topbar-enabled'; } + if ( ot_get_option( 'mobile-sidebar-hide' ) == 's1' ) { $classes[] = 'mobile-sidebar-hide-s1'; } + if ( ot_get_option( 'mobile-sidebar-hide' ) == 's2' ) { $classes[] = 'mobile-sidebar-hide-s2'; } + if ( ot_get_option( 'mobile-sidebar-hide' ) == 's1-s2' ) { $classes[] = 'mobile-sidebar-hide'; } + return $classes; + } + +} +add_filter( 'body_class', 'alx_body_class' ); + + +/* Site title +/* ------------------------------------ */ +if ( ! function_exists( 'alx_wp_title' ) ) { + + function alx_wp_title( $title ) { + // Do not filter for RSS feed / if SEO plugin installed + if ( is_feed() || class_exists('All_in_One_SEO_Pack') || class_exists('HeadSpace_Plugin') || class_exists('Platinum_SEO_Pack') || class_exists('wpSEO') || defined('WPSEO_VERSION') ) + return $title; + if ( is_front_page() ) { + $title = bloginfo('name'); echo ' - '; bloginfo('description'); + } + if ( !is_front_page() ) { + $title.= ''.' - '.''.get_bloginfo('name'); + } + return $title; + } + +} +add_filter( 'wp_title', 'alx_wp_title' ); + + +/* Custom rss feed +/* ------------------------------------ */ +if ( ! function_exists( 'alx_feed_link' ) ) { + + function alx_feed_link( $output, $feed ) { + // Do not redirect comments feed + if ( strpos( $output, 'comments' ) ) + return $output; + // Return feed url + return ot_get_option('rss-feed',$output); + } + +} +add_filter( 'feed_link', 'alx_feed_link', 10, 2 ); + + +/* Custom favicon +/* ------------------------------------ */ +if ( ! function_exists( 'alx_favicon' ) ) { + + function alx_favicon() { + if ( ot_get_option('favicon') ) { + echo ''."\n"; + } + } + +} +add_filter( 'wp_head', 'alx_favicon' ); + + +/* Tracking code +/* ------------------------------------ */ +if ( ! function_exists( 'alx_tracking_code' ) ) { + + function alx_tracking_code() { + if ( ot_get_option('tracking-code') ) { + echo ''.ot_get_option('tracking-code').''."\n"; + } + } + +} +add_filter( 'wp_footer', 'alx_tracking_code' ); + + +/* Excerpt ending +/* ------------------------------------ */ +if ( ! function_exists( 'alx_excerpt_more' ) ) { + + function alx_excerpt_more( $more ) { + return '...'; + } + +} +add_filter( 'excerpt_more', 'alx_excerpt_more' ); + + +/* Excerpt length +/* ------------------------------------ */ +if ( ! function_exists( 'alx_excerpt_length' ) ) { + + function alx_excerpt_length( $length ) { + return ot_get_option('excerpt-length',$length); + } + +} +add_filter( 'excerpt_length', 'alx_excerpt_length', 999 ); + + +/* Add wmode transparent to media embeds +/* ------------------------------------ */ +if ( ! function_exists( 'alx_embed_wmode_transparent' ) ) { + + function alx_embed_wmode_transparent( $html, $url, $attr ) { + if ( strpos( $html, "' . $html . ''; + } + +} +add_filter( 'embed_oembed_html', 'alx_embed_html', 10, 3 ); +add_filter( 'video_embed_html', 'alx_embed_html' ); // Jetpack + + +/* Upscale cropped thumbnails +/* ------------------------------------ */ +if ( ! function_exists( 'alx_thumbnail_upscale' ) ) { + + function alx_thumbnail_upscale( $default, $orig_w, $orig_h, $new_w, $new_h, $crop ){ + if ( !$crop ) return null; // let the wordpress default function handle this + + $aspect_ratio = $orig_w / $orig_h; + $size_ratio = max($new_w / $orig_w, $new_h / $orig_h); + + $crop_w = round($new_w / $size_ratio); + $crop_h = round($new_h / $size_ratio); + + $s_x = floor( ($orig_w - $crop_w) / 2 ); + $s_y = floor( ($orig_h - $crop_h) / 2 ); + + return array( 0, 0, (int) $s_x, (int) $s_y, (int) $new_w, (int) $new_h, (int) $crop_w, (int) $crop_h ); + } + +} +add_filter( 'image_resize_dimensions', 'alx_thumbnail_upscale', 10, 6 ); + + +/* Add shortcode support to text widget +/* ------------------------------------ */ +add_filter( 'widget_text', 'do_shortcode' ); + + +/* Browser detection body_class() output +/* ------------------------------------ */ +if ( ! function_exists( 'alx_browser_body_class' ) ) { + + function alx_browser_body_class( $classes ) { + global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone; + + if($is_lynx) $classes[] = 'lynx'; + elseif($is_gecko) $classes[] = 'gecko'; + elseif($is_opera) $classes[] = 'opera'; + elseif($is_NS4) $classes[] = 'ns4'; + elseif($is_safari) $classes[] = 'safari'; + elseif($is_chrome) $classes[] = 'chrome'; + elseif($is_IE) { + $browser = $_SERVER['HTTP_USER_AGENT']; + $browser = substr( "$browser", 25, 8); + if ($browser == "MSIE 7.0" ) { + $classes[] = 'ie7'; + $classes[] = 'ie'; + } elseif ($browser == "MSIE 6.0" ) { + $classes[] = 'ie6'; + $classes[] = 'ie'; + } elseif ($browser == "MSIE 8.0" ) { + $classes[] = 'ie8'; + $classes[] = 'ie'; + } elseif ($browser == "MSIE 9.0" ) { + $classes[] = 'ie9'; + $classes[] = 'ie'; + } else { + $classes[] = 'ie'; + } + } + else $classes[] = 'unknown'; + + if( $is_iphone ) $classes[] = 'iphone'; + + return $classes; + } + +} +add_filter( 'body_class', 'alx_browser_body_class' ); + + +/* ------------------------------------------------------------------------- * + * Actions +/* ------------------------------------------------------------------------- */ + +/* Include or exclude featured articles in loop +/* ------------------------------------ */ +if ( ! function_exists( 'alx_pre_get_posts' ) ) { + + function alx_pre_get_posts( $query ) { + // Are we on main query ? + if ( !$query->is_main_query() ) return; + if ( $query->is_home() ) { + + // Featured posts enabled + if ( ot_get_option('featured-posts-count') != '0' ) { + // Get featured post ids + $featured_post_ids = alx_get_featured_post_ids(); + // Exclude posts + if ( $featured_post_ids && !ot_get_option('featured-posts-include') ) + $query->set('post__not_in', $featured_post_ids); + } + } + } + +} +add_action( 'pre_get_posts', 'alx_pre_get_posts' ); + + +/* Script for no-js / js class +/* ------------------------------------ */ +if ( ! function_exists( 'alx_html_js_class' ) ) { + + function alx_html_js_class () { + echo ''. "\n"; + } + +} +add_action( 'wp_head', 'alx_html_js_class', 1 ); + + +/* IE js header +/* ------------------------------------ */ +if ( ! function_exists( 'alx_ie_js_header' ) ) { + + function alx_ie_js_header () { + echo ''. "\n"; + } + +} +add_action( 'wp_head', 'alx_ie_js_header' ); + + +/* IE js footer +/* ------------------------------------ */ +if ( ! function_exists( 'alx_ie_js_footer' ) ) { + + function alx_ie_js_footer () { + echo ''. "\n"; + } + +} +add_action( 'wp_footer', 'alx_ie_js_footer', 20 ); + + +/* TGM plugin activation +/* ------------------------------------ */ +if ( ! function_exists( 'alx_plugins' ) ) { + + function alx_plugins() { + + // Add the following plugins + $plugins = array( + array( + 'name' => 'Regenerate Thumbnails', + 'slug' => 'regenerate-thumbnails', + 'required' => false, + 'force_activation' => false, + 'force_deactivation'=> false, + ), + array( + 'name' => 'WP-PageNavi', + 'slug' => 'wp-pagenavi', + 'required' => false, + 'force_activation' => false, + 'force_deactivation'=> false, + ), + array( + 'name' => 'Responsive Lightbox', + 'slug' => 'light', + 'source' => get_template_directory() . '/functions/plugins/light.zip', + 'required' => false, + 'force_activation' => false, + 'force_deactivation'=> false, + ), + array( + 'name' => 'Contact Form 7', + 'slug' => 'contact-form-7', + 'required' => false, + 'force_activation' => false, + 'force_deactivation'=> false, + ) + ); + tgmpa( $plugins ); + } + +} +add_action( 'tgmpa_register', 'alx_plugins' ); + + +/* WooCommerce basic support +/* ------------------------------------ */ +function alx_wc_wrapper_start() { + echo '
'; + echo '
'; +} +function alx_wc_wrapper_end() { + echo '
'; + echo '
'; +} +remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10); +remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10); +add_action('woocommerce_before_main_content', 'alx_wc_wrapper_start', 10); +add_action('woocommerce_after_main_content', 'alx_wc_wrapper_end', 10); diff --git a/functions/class-tgm-plugin-activation.php b/functions/class-tgm-plugin-activation.php new file mode 100644 index 00000000..8412b4bf --- /dev/null +++ b/functions/class-tgm-plugin-activation.php @@ -0,0 +1,2086 @@ + + * @author Gary Jones + * @copyright Copyright (c) 2012, Thomas Griffin + * @license http://opensource.org/licenses/gpl-2.0.php GPL v2 or later + * @link https://github.com/thomasgriffin/TGM-Plugin-Activation + */ + +/* + Copyright 2012 Thomas Griffin (email : thomas@thomasgriffinmedia.com) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License, version 3, as + published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +if ( ! class_exists( 'TGM_Plugin_Activation' ) ) { + /** + * Automatic plugin installation and activation library. + * + * Creates a way to automatically install and activate plugins from within themes. + * The plugins can be either pre-packaged, downloaded from the WordPress + * Plugin Repository or downloaded from a private repository. + * + * @since 1.0.0 + * + * @package TGM-Plugin-Activation + * @author Thomas Griffin + * @author Gary Jones + */ + class TGM_Plugin_Activation { + + /** + * Holds a copy of itself, so it can be referenced by the class name. + * + * @since 1.0.0 + * + * @var TGM_Plugin_Activation + */ + static $instance; + + /** + * Holds arrays of plugin details. + * + * @since 1.0.0 + * + * @var array + */ + public $plugins = array(); + + /** + * Parent menu slug for plugins page. + * + * @since 2.2.0 + * + * @var string Parent menu slug. Defaults to 'themes.php'. + */ + public $parent_menu_slug = 'themes.php'; + + /** + * Parent URL slug for URL references. + * + * This is useful if you want to place the custom plugins page as a + * submenu item under a custom parent menu. + * + * @since 2.2.0 + * + * @var string Parent URL slug. Defaults to 'themes.php'. + */ + public $parent_url_slug = 'themes.php'; + + /** + * Name of the querystring argument for the admin page. + * + * @since 1.0.0 + * + * @var string + */ + public $menu = 'install-required-plugins'; + + /** + * Default absolute path to folder containing pre-packaged plugin zip files. + * + * @since 2.0.0 + * + * @var string Absolute path prefix to packaged zip file location. Default is empty string. + */ + public $default_path = ''; + + /** + * Flag to show admin notices or not. + * + * @since 2.1.0 + * + * @var boolean + */ + public $has_notices = true; + + /** + * Flag to set automatic activation of plugins. Off by default. + * + * @since 2.2.0 + * + * @var boolean + */ + public $is_automatic = false; + + /** + * Optional message to display before the plugins table. + * + * @since 2.2.0 + * + * @var string Message filtered by wp_kses_post(). Default is empty string. + */ + public $message = ''; + + /** + * Holds configurable array of strings. + * + * Default values are added in the constructor. + * + * @since 2.0.0 + * + * @var array + */ + public $strings = array(); + + /** + * Adds a reference of this object to $instance, populates default strings, + * does the tgmpa_init action hook, and hooks in the interactions to init. + * + * @since 1.0.0 + * + * @see TGM_Plugin_Activation::init() + */ + public function __construct() { + + self::$instance =& $this; + + $this->strings = array( + 'page_title' => __( 'Install Required Plugins', 'tgmpa' ), + 'menu_title' => __( 'Install Plugins', 'tgmpa' ), + 'installing' => __( 'Installing Plugin: %s', 'tgmpa' ), + 'oops' => __( 'Something went wrong.', 'tgmpa' ), + 'notice_can_install_required' => _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.' ), + 'notice_can_install_recommended' => _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.' ), + 'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' ), + 'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' ), + 'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' ), + 'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' ), + 'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.' ), + 'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' ), + 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins' ), + 'activate_link' => _n_noop( 'Activate installed plugin', 'Activate installed plugins' ), + 'return' => __( 'Return to Required Plugins Installer', 'tgmpa' ), + 'dashboard' => __( 'Return to the dashboard', 'tgmpa' ), + 'plugin_activated' => __( 'Plugin activated successfully.', 'tgmpa' ), + 'activated_successfully' => __( 'The following plugin was activated successfully:', 'tgmpa' ), + 'complete' => __( 'All plugins installed and activated successfully. %1$s', 'tgmpa' ), + 'dismiss' => __( 'Dismiss this notice', 'tgmpa' ), + ); + + /** Announce that the class is ready, and pass the object (for advanced use) */ + do_action_ref_array( 'tgmpa_init', array( &$this ) ); + + /** When the rest of WP has loaded, kick-start the rest of the class */ + add_action( 'init', array( &$this, 'init' ) ); + + } + + /** + * Initialise the interactions between this class and WordPress. + * + * Hooks in three new methods for the class: admin_menu, notices and styles. + * + * @since 2.0.0 + * + * @see TGM_Plugin_Activation::admin_menu() + * @see TGM_Plugin_Activation::notices() + * @see TGM_Plugin_Activation::styles() + */ + public function init() { + + do_action( 'tgmpa_register' ); + /** After this point, the plugins should be registered and the configuration set */ + + /** Proceed only if we have plugins to handle */ + if ( $this->plugins ) { + $sorted = array(); // Prepare variable for sorting + + foreach ( $this->plugins as $plugin ) + $sorted[] = $plugin['name']; + + array_multisort( $sorted, SORT_ASC, $this->plugins ); // Sort plugins alphabetically by name + + add_action( 'admin_menu', array( &$this, 'admin_menu' ) ); + add_action( 'admin_head', array( &$this, 'dismiss' ) ); + add_filter( 'install_plugin_complete_actions', array( &$this, 'actions' ) ); + + /** Load admin bar in the header to remove flash when installing plugins */ + if ( $this->is_tgmpa_page() ) { + remove_action( 'wp_footer', 'wp_admin_bar_render', 1000 ); + remove_action( 'admin_footer', 'wp_admin_bar_render', 1000 ); + add_action( 'wp_head', 'wp_admin_bar_render', 1000 ); + add_action( 'admin_head', 'wp_admin_bar_render', 1000 ); + } + + if ( $this->has_notices ) { + add_action( 'admin_notices', array( &$this, 'notices' ) ); + add_action( 'admin_init', array( &$this, 'admin_init' ), 1 ); + add_action( 'admin_enqueue_scripts', array( &$this, 'thickbox' ) ); + add_action( 'switch_theme', array( &$this, 'update_dismiss' ) ); + } + + /** Setup the force activation hook */ + foreach ( $this->plugins as $plugin ) { + if ( isset( $plugin['force_activation'] ) && true === $plugin['force_activation'] ) { + add_action( 'admin_init', array( &$this, 'force_activation' ) ); + break; + } + } + + /** Setup the force deactivation hook */ + foreach ( $this->plugins as $plugin ) { + if ( isset( $plugin['force_deactivation'] ) && true === $plugin['force_deactivation'] ) { + add_action( 'switch_theme', array( &$this, 'force_deactivation' ) ); + break; + } + } + } + + } + + /** + * Handles calls to show plugin information via links in the notices. + * + * We get the links in the admin notices to point to the TGMPA page, rather + * than the typical plugin-install.php file, so we can prepare everything + * beforehand. + * + * WP doesn't make it easy to show the plugin information in the thickbox - + * here we have to require a file that includes a function that does the + * main work of displaying it, enqueue some styles, set up some globals and + * finally call that function before exiting. + * + * Down right easy once you know how... + * + * @since 2.1.0 + * + * @global string $tab Used as iframe div class names, helps with styling + * @global string $body_id Used as the iframe body ID, helps with styling + * @return null Returns early if not the TGMPA page. + */ + public function admin_init() { + + if ( ! $this->is_tgmpa_page() ) + return; + + if ( isset( $_REQUEST['tab'] ) && 'plugin-information' == $_REQUEST['tab'] ) { + require_once ABSPATH . 'wp-admin/includes/plugin-install.php'; // Need for install_plugin_information() + + wp_enqueue_style( 'plugin-install' ); + + global $tab, $body_id; + $body_id = $tab = 'plugin-information'; + + install_plugin_information(); + + exit; + } + + } + + /** + * Enqueues thickbox scripts/styles for plugin info. + * + * Thickbox is not automatically included on all admin pages, so we must + * manually enqueue it for those pages. + * + * Thickbox is only loaded if the user has not dismissed the admin + * notice or if there are any plugins left to install and activate. + * + * @since 2.1.0 + */ + public function thickbox() { + + if ( ! get_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice', true ) ) + add_thickbox(); + + } + + /** + * Adds submenu page under 'Appearance' tab. + * + * This method adds the submenu page letting users know that a required + * plugin needs to be installed. + * + * This page disappears once the plugin has been installed and activated. + * + * @since 1.0.0 + * + * @see TGM_Plugin_Activation::init() + * @see TGM_Plugin_Activation::install_plugins_page() + */ + public function admin_menu() { + + // Make sure privileges are correct to see the page + if ( ! current_user_can( 'install_plugins' ) ) + return; + + $this->populate_file_path(); + + foreach ( $this->plugins as $plugin ) { + if ( ! is_plugin_active( $plugin['file_path'] ) ) { + add_theme_page( + // $this->parent_menu_slug, // Parent menu slug + $this->strings['page_title'], // Page title + $this->strings['menu_title'], // Menu title + 'edit_theme_options', // Capability + $this->menu, // Menu slug + array( &$this, 'install_plugins_page' ) // Callback + ); + break; + } + } + + } + + /** + * Echoes plugin installation form. + * + * This method is the callback for the admin_menu method function. + * This displays the admin page and form area where the user can select to install and activate the plugin. + * + * @since 1.0.0 + * + * @return null Aborts early if we're processing a plugin installation action + */ + public function install_plugins_page() { + + /** Store new instance of plugin table in object */ + $plugin_table = new TGMPA_List_Table; + + /** Return early if processing a plugin installation action */ + if ( isset( $_POST[sanitize_key( 'action' )] ) && 'tgmpa-bulk-install' == $_POST[sanitize_key( 'action' )] && $plugin_table->process_bulk_actions() || $this->do_plugin_install() ) + return; + + ?> +
+ + +

+ prepare_items(); ?> + + message ) ) _e( wp_kses_post( $this->message ), 'tgmpa' ); ?> + +
+ + display(); ?> +
+ +
+ $this->menu, + 'plugin' => $plugin['slug'], + 'plugin_name' => $plugin['name'], + 'plugin_source' => $plugin['source'], + 'tgmpa-install' => 'install-plugin', + ), + admin_url( $this->parent_url_slug ) + ), + 'tgmpa-install' + ); + $method = ''; // Leave blank so WP_Filesystem can populate it as necessary + $fields = array( sanitize_key( 'tgmpa-install' ) ); // Extra fields to pass to WP_Filesystem + + if ( false === ( $creds = request_filesystem_credentials( $url, $method, false, false, $fields ) ) ) + return true; + + if ( ! WP_Filesystem( $creds ) ) { + request_filesystem_credentials( $url, $method, true, false, $fields ); // Setup WP_Filesystem + return true; + } + + require_once ABSPATH . 'wp-admin/includes/plugin-install.php'; // Need for plugins_api + require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; // Need for upgrade classes + + /** Set plugin source to WordPress API link if available */ + if ( isset( $plugin['source'] ) && 'repo' == $plugin['source'] ) { + $api = plugins_api( 'plugin_information', array( 'slug' => $plugin['slug'], 'fields' => array( 'sections' => false ) ) ); + + if ( is_wp_error( $api ) ) + wp_die( $this->strings['oops'] . var_dump( $api ) ); + + if ( isset( $api->download_link ) ) + $plugin['source'] = $api->download_link; + } + + /** Set type, based on whether the source starts with http:// or https:// */ + $type = preg_match( '|^http(s)?://|', $plugin['source'] ) ? 'web' : 'upload'; + + /** Prep variables for Plugin_Installer_Skin class */ + $title = sprintf( $this->strings['installing'], $plugin['name'] ); + $url = add_query_arg( array( 'action' => 'install-plugin', 'plugin' => $plugin['slug'] ), 'update.php' ); + if ( isset( $_GET['from'] ) ) + $url .= add_query_arg( 'from', urlencode( stripslashes( $_GET['from'] ) ), $url ); + + $nonce = 'install-plugin_' . $plugin['slug']; + + /** Prefix a default path to pre-packaged plugins */ + $source = ( 'upload' == $type ) ? $this->default_path . $plugin['source'] : $plugin['source']; + + /** Create a new instance of Plugin_Upgrader */ + $upgrader = new Plugin_Upgrader( $skin = new Plugin_Installer_Skin( compact( 'type', 'title', 'url', 'nonce', 'plugin', 'api' ) ) ); + + /** Perform the action and install the plugin from the $source urldecode() */ + $upgrader->install( $source ); + + /** Flush plugins cache so we can make sure that the installed plugins list is always up to date */ + wp_cache_flush(); + + /** Only activate plugins if the config option is set to true */ + if ( $this->is_automatic ) { + $plugin_activate = $upgrader->plugin_info(); // Grab the plugin info from the Plugin_Upgrader method + $activate = activate_plugin( $plugin_activate ); // Activate the plugin + $this->populate_file_path(); // Re-populate the file path now that the plugin has been installed and activated + + if ( is_wp_error( $activate ) ) { + echo '

' . $activate->get_error_message() . '

'; + echo '

' . $this->strings['return'] . '

'; + return true; // End it here if there is an error with automatic activation + } + else { + echo '

' . $this->strings['plugin_activated'] . '

'; + } + } + + /** Display message based on if all plugins are now active or not */ + $complete = array(); + foreach ( $this->plugins as $plugin ) { + if ( ! is_plugin_active( $plugin['file_path'] ) ) { + echo '

' . $this->strings['return'] . '

'; + $complete[] = $plugin; + break; + } + /** Nothing to store */ + else { + $complete[] = ''; + } + } + + /** Filter out any empty entries */ + $complete = array_filter( $complete ); + + /** All plugins are active, so we display the complete string and hide the plugin menu */ + if ( empty( $complete ) ) { + echo '

' . sprintf( $this->strings['complete'], '' . $this->strings['domain'] . '' ) . '

'; + echo ''; + } + + return true; + } + /** Checks for actions from hover links to process the activation */ + elseif ( isset( $_GET[sanitize_key( 'plugin' )] ) && ( isset( $_GET[sanitize_key( 'tgmpa-activate' )] ) && 'activate-plugin' == $_GET[sanitize_key( 'tgmpa-activate' )] ) ) { + check_admin_referer( 'tgmpa-activate', 'tgmpa-activate-nonce' ); + + /** Populate $plugin array with necessary information */ + $plugin['name'] = $_GET[sanitize_key( 'plugin_name' )]; + $plugin['slug'] = $_GET[sanitize_key( 'plugin' )]; + $plugin['source'] = $_GET[sanitize_key( 'plugin_source' )]; + + $plugin_data = get_plugins( '/' . $plugin['slug'] ); // Retrieve all plugins + $plugin_file = array_keys( $plugin_data ); // Retrieve all plugin files from installed plugins + $plugin_to_activate = $plugin['slug'] . '/' . $plugin_file[0]; // Match plugin slug with appropriate plugin file + $activate = activate_plugin( $plugin_to_activate ); // Activate the plugin + + if ( is_wp_error( $activate ) ) { + echo '

' . $activate->get_error_message() . '

'; + echo '

' . $this->strings['return'] . '

'; + return true; // End it here if there is an error with activation + } + else { + /** Make sure message doesn't display again if bulk activation is performed immediately after a single activation */ + if ( ! isset( $_POST[sanitize_key( 'action' )] ) ) { + $msg = $this->strings['activated_successfully'] . ' ' . $plugin['name'] . ''; + echo '

' . $msg . '

'; + } + } + } + + return false; + + } + + /** + * Echoes required plugin notice. + * + * Outputs a message telling users that a specific plugin is required for + * their theme. If appropriate, it includes a link to the form page where + * users can install and activate the plugin. + * + * @since 1.0.0 + * + * @global object $current_screen + * @return null Returns early if we're on the Install page + */ + public function notices() { + + global $current_screen; + + /** Remove nag on the install page */ + if ( $this->is_tgmpa_page() ) + return; + + $installed_plugins = get_plugins(); // Retrieve a list of all the plugins + $this->populate_file_path(); + + $message = array(); // Store the messages in an array to be outputted after plugins have looped through + $install_link = false; // Set to false, change to true in loop if conditions exist, used for action link 'install' + $install_link_count = 0; // Used to determine plurality of install action link text + $activate_link = false; // Set to false, change to true in loop if conditions exist, used for action link 'activate' + $activate_link_count = 0; // Used to determine plurality of activate action link text + + foreach ( $this->plugins as $plugin ) { + /** If the plugin is installed and active, check for minimum version argument before moving forward */ + if ( is_plugin_active( $plugin['file_path'] ) ) { + /** A minimum version has been specified */ + if ( isset( $plugin['version'] ) ) { + if ( isset( $installed_plugins[$plugin['file_path']]['Version'] ) ) { + /** If the current version is less than the minimum required version, we display a message */ + if ( version_compare( $installed_plugins[$plugin['file_path']]['Version'], $plugin['version'], '<' ) ) { + if ( current_user_can( 'install_plugins' ) ) + $message['notice_ask_to_update'][] = $plugin['name']; + else + $message['notice_cannot_update'][] = $plugin['name']; + } + } + /** Can't find the plugin, so iterate to the next condition */ + else { + continue; + } + } + /** No minimum version specified, so iterate over the plugin */ + else { + continue; + } + } + + /** Not installed */ + if ( ! isset( $installed_plugins[$plugin['file_path']] ) ) { + $install_link = true; // We need to display the 'install' action link + $install_link_count++; // Increment the install link count + if ( current_user_can( 'install_plugins' ) ) { + if ( $plugin['required'] ) + $message['notice_can_install_required'][] = $plugin['name']; + /** This plugin is only recommended */ + else + $message['notice_can_install_recommended'][] = $plugin['name']; + } + /** Need higher privileges to install the plugin */ + else { + $message['notice_cannot_install'][] = $plugin['name']; + } + } + /** Installed but not active */ + elseif ( is_plugin_inactive( $plugin['file_path'] ) ) { + $activate_link = true; // We need to display the 'activate' action link + $activate_link_count++; // Increment the activate link count + if ( current_user_can( 'activate_plugins' ) ) { + if ( ( isset( $plugin['required'] ) ) && ( $plugin['required'] ) ) + $message['notice_can_activate_required'][] = $plugin['name']; + /** This plugin is only recommended */ + else { + $message['notice_can_activate_recommended'][] = $plugin['name']; + } + } + /** Need higher privileges to activate the plugin */ + else { + $message['notice_cannot_activate'][] = $plugin['name']; + } + } + } + + /** Only process the nag messages if the user has not dismissed them already */ + if ( ! get_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice', true ) ) { + /** If we have notices to display, we move forward */ + if ( ! empty( $message ) ) { + krsort( $message ); // Sort messages + $rendered = ''; // Display all nag messages as strings + + /** Grab all plugin names */ + foreach ( $message as $type => $plugin_groups ) { + $linked_plugin_groups = array(); + + /** Count number of plugins in each message group to calculate singular/plural message */ + $count = count( $plugin_groups ); + + /** Loop through the plugin names to make the ones pulled from the .org repo linked */ + foreach ( $plugin_groups as $plugin_group_single_name ) { + $external_url = $this->_get_plugin_data_from_name( $plugin_group_single_name, 'external_url' ); + $source = $this->_get_plugin_data_from_name( $plugin_group_single_name, 'source' ); + + if ( $external_url && preg_match( '|^http(s)?://|', $external_url ) ) { + $linked_plugin_groups[] = '' . $plugin_group_single_name . ''; + } + elseif ( ! $source || preg_match( '|^http://wordpress.org/extend/plugins/|', $source ) ) { + $url = add_query_arg( + array( + 'tab' => 'plugin-information', + 'plugin' => $this->_get_plugin_data_from_name( $plugin_group_single_name ), + 'TB_iframe' => 'true', + 'width' => '640', + 'height' => '500', + ), + admin_url( 'plugin-install.php' ) + ); + + $linked_plugin_groups[] = '' . $plugin_group_single_name . ''; + } + else { + $linked_plugin_groups[] = $plugin_group_single_name; // No hyperlink + } + + if ( isset( $linked_plugin_groups ) && (array) $linked_plugin_groups ) + $plugin_groups = $linked_plugin_groups; + } + + $last_plugin = array_pop( $plugin_groups ); // Pop off last name to prep for readability + $imploded = empty( $plugin_groups ) ? '' . $last_plugin . '' : '' . ( implode( ', ', $plugin_groups ) . ' and ' . $last_plugin . '' ); + + $rendered .= '

' . sprintf( translate_nooped_plural( $this->strings[$type], $count, 'tgmpa' ), $imploded, $count ) . '

'; // All messages now stored + } + + /** Setup variables to determine if action links are needed */ + $show_install_link = $install_link ? '' . translate_nooped_plural( $this->strings['install_link'], $install_link_count, 'tgmpa' ) . '' : ''; + $show_activate_link = $activate_link ? '' . translate_nooped_plural( $this->strings['activate_link'], $activate_link_count, 'tgmpa' ) . '' : ''; + + /** Define all of the action links */ + $action_links = apply_filters( + 'tgmpa_notice_action_links', + array( + 'install' => ( current_user_can( 'install_plugins' ) ) ? $show_install_link : '', + 'activate' => ( current_user_can( 'activate_plugins' ) ) ? $show_activate_link : '', + 'dismiss' => '' . $this->strings['dismiss'] . '', + ) + ); + + $action_links = array_filter( $action_links ); // Remove any empty array items + if ( $action_links ) + $rendered .= '

' . implode( ' | ', $action_links ) . '

'; + + /** Register the nag messages and prepare them to be processed */ + if ( isset( $this->strings['nag_type'] ) ) + add_settings_error( 'tgmpa', 'tgmpa', $rendered, sanitize_html_class( strtolower( $this->strings['nag_type'] ), 'updated' ) ); + else + add_settings_error( 'tgmpa', 'tgmpa', $rendered, 'updated' ); + } + } + + /** Admin options pages already output settings_errors, so this is to avoid duplication */ + if ( 'options-general' !== $current_screen->parent_base ) + settings_errors( 'tgmpa' ); + + } + + /** + * Add dismissable admin notices. + * + * Appends a link to the admin nag messages. If clicked, the admin notice disappears and no longer is visible to users. + * + * @since 2.1.0 + */ + public function dismiss() { + + if ( isset( $_GET[sanitize_key( 'tgmpa-dismiss' )] ) ) + update_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice', 1 ); + + } + + /** + * Add individual plugin to our collection of plugins. + * + * If the required keys are not set, the plugin is not added. + * + * @since 2.0.0 + * + * @param array $plugin Array of plugin arguments. + */ + public function register( $plugin ) { + + if ( ! isset( $plugin['slug'] ) || ! isset( $plugin['name'] ) ) + return; + + $this->plugins[] = $plugin; + + } + + /** + * Amend default configuration settings. + * + * @since 2.0.0 + * + * @param array $config + */ + public function config( $config ) { + + $keys = array( 'default_path', 'parent_menu_slug', 'parent_url_slug', 'domain', 'has_notices', 'menu', 'is_automatic', 'message', 'strings' ); + + foreach ( $keys as $key ) { + if ( isset( $config[$key] ) ) { + if ( is_array( $config[$key] ) ) { + foreach ( $config[$key] as $subkey => $value ) + $this->{$key}[$subkey] = $value; + } else { + $this->$key = $config[$key]; + } + } + } + + } + + /** + * Amend action link after plugin installation. + * + * @since 2.0.0 + * + * @param array $install_actions Existing array of actions + * @return array Amended array of actions + */ + public function actions( $install_actions ) { + + /** Remove action links on the TGMPA install page */ + if ( $this->is_tgmpa_page() ) + return false; + + return $install_actions; + + } + + /** + * Set file_path key for each installed plugin. + * + * @since 2.1.0 + */ + public function populate_file_path() { + + /** Add file_path key for all plugins */ + foreach ( $this->plugins as $plugin => $values ) + $this->plugins[$plugin]['file_path'] = $this->_get_plugin_basename_from_slug( $values['slug'] ); + + } + + /** + * Helper function to extract the file path of the plugin file from the + * plugin slug, if the plugin is installed. + * + * @since 2.0.0 + * + * @param string $slug Plugin slug (typically folder name) as provided by the developer + * @return string Either file path for plugin if installed, or just the plugin slug + */ + protected function _get_plugin_basename_from_slug( $slug ) { + + $keys = array_keys( get_plugins() ); + + foreach ( $keys as $key ) { + if ( preg_match( '|^' . $slug .'|', $key ) ) + return $key; + } + + return $slug; + + } + + /** + * Retrieve plugin data, given the plugin name. + * + * Loops through the registered plugins looking for $name. If it finds it, + * it returns the $data from that plugin. Otherwise, returns false. + * + * @since 2.1.0 + * + * @param string $name Name of the plugin, as it was registered + * @param string $data Optional. Array key of plugin data to return. Default is slug + * @return string|boolean Plugin slug if found, false otherwise. + */ + protected function _get_plugin_data_from_name( $name, $data = 'slug' ) { + + foreach ( $this->plugins as $plugin => $values ) { + if ( $name == $values['name'] && isset( $values[$data] ) ) + return $values[$data]; + } + + return false; + + } + + /** + * Determine if we're on the TGMPA Install page. + * + * We use $current_screen when it is available, and a slightly less ideal + * conditional when it isn't (like when displaying the plugin information + * thickbox). + * + * @since 2.1.0 + * + * @global object $current_screen + * @return boolean True when on the TGMPA page, false otherwise. + */ + protected function is_tgmpa_page() { + + global $current_screen; + + if ( ! is_null( $current_screen ) && $this->parent_menu_slug == $current_screen->parent_file && isset( $_GET['page'] ) && $this->menu === $_GET['page'] ) + return true; + + if ( isset( $_GET['page'] ) && $this->menu === $_GET['page'] ) + return true; + + return false; + + } + + /** + * Delete dismissable nag option when theme is switched. + * + * This ensures that the user is again reminded via nag of required + * and/or recommended plugins if they re-activate the theme. + * + * @since 2.1.1 + */ + public function update_dismiss() { + + delete_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice' ); + + } + + /** + * Forces plugin activation if the parameter 'force_activation' is + * set to true. + * + * This allows theme authors to specify certain plugins that must be + * active at all times while using the current theme. + * + * Please take special care when using this parameter as it has the + * potential to be harmful if not used correctly. Setting this parameter + * to true will not allow the specified plugin to be deactivated unless + * the user switches themes. + * + * @since 2.2.0 + */ + public function force_activation() { + + /** Set file_path parameter for any installed plugins */ + $this->populate_file_path(); + + $installed_plugins = get_plugins(); + + foreach ( $this->plugins as $plugin ) { + /** Oops, plugin isn't there so iterate to next condition */ + if ( isset( $plugin['force_activation'] ) && $plugin['force_activation'] && ! isset( $installed_plugins[$plugin['file_path']] ) ) + continue; + /** There we go, activate the plugin */ + elseif ( isset( $plugin['force_activation'] ) && $plugin['force_activation'] && is_plugin_inactive( $plugin['file_path'] ) ) + activate_plugin( $plugin['file_path'] ); + } + + } + + /** + * Forces plugin deactivation if the parameter 'force_deactivation' + * is set to true. + * + * This allows theme authors to specify certain plugins that must be + * deactived upon switching from the current theme to another. + * + * Please take special care when using this parameter as it has the + * potential to be harmful if not used correctly. + * + * @since 2.2.0 + */ + public function force_deactivation() { + + /** Set file_path parameter for any installed plugins */ + $this->populate_file_path(); + + foreach ( $this->plugins as $plugin ) { + /** Only proceed forward if the paramter is set to true and plugin is active */ + if ( isset( $plugin['force_deactivation'] ) && $plugin['force_deactivation'] && is_plugin_active( $plugin['file_path'] ) ) + deactivate_plugins( $plugin['file_path'] ); + } + + } + + } +} + +/** Create a new instance of the class */ +new TGM_Plugin_Activation; + +if ( ! function_exists( 'tgmpa' ) ) { + /** + * Helper function to register a collection of required plugins. + * + * @since 2.0.0 + * @api + * + * @param array $plugins An array of plugin arrays + * @param array $config Optional. An array of configuration values + */ + function tgmpa( $plugins, $config = array() ) { + + foreach ( $plugins as $plugin ) + TGM_Plugin_Activation::$instance->register( $plugin ); + + if ( $config ) + TGM_Plugin_Activation::$instance->config( $config ); + + } +} + +/** + * WP_List_Table isn't always available. If it isn't available, + * we load it here. + * + * @since 2.2.0 + */ +if ( ! class_exists( 'WP_List_Table' ) ) + require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' ); + +if ( ! class_exists( 'TGMPA_List_Table' ) ) { + /** + * List table class for handling plugins. + * + * Extends the WP_List_Table class to provide a future-compatible + * way of listing out all required/recommended plugins. + * + * Gives users an interface similar to the Plugin Administration + * area with similar (albeit stripped down) capabilities. + * + * This class also allows for the bulk install of plugins. + * + * @since 2.2.0 + * + * @package TGM-Plugin-Activation + * @author Thomas Griffin + * @author Gary Jones + */ + class TGMPA_List_Table extends WP_List_Table { + + /** + * References parent constructor and sets defaults for class. + * + * The constructor also grabs a copy of $instance from the TGMPA class + * and stores it in the global object TGM_Plugin_Activation::$instance. + * + * @since 2.2.0 + * + * @global unknown $status + * @global string $page + */ + public function __construct() { + + global $status, $page; + + parent::__construct( + array( + 'singular' => 'plugin', + 'plural' => 'plugins', + 'ajax' => false, + ) + ); + + } + + /** + * Gathers and renames all of our plugin information to be used by + * WP_List_Table to create our table. + * + * @since 2.2.0 + * + * @return array $table_data Information for use in table + */ + protected function _gather_plugin_data() { + + /** Load thickbox for plugin links */ + TGM_Plugin_Activation::$instance->admin_init(); + TGM_Plugin_Activation::$instance->thickbox(); + + /** Prep variables for use and grab list of all installed plugins */ + $table_data = array(); + $i = 0; + $installed_plugins = get_plugins(); + + foreach ( TGM_Plugin_Activation::$instance->plugins as $plugin ) { + if ( is_plugin_active( $plugin['file_path'] ) ) + continue; // No need to display plugins if they are installed and activated + + $table_data[$i]['sanitized_plugin'] = $plugin['name']; + $table_data[$i]['slug'] = $this->_get_plugin_data_from_name( $plugin['name'] ); + + $external_url = $this->_get_plugin_data_from_name( $plugin['name'], 'external_url' ); + $source = $this->_get_plugin_data_from_name( $plugin['name'], 'source' ); + + if ( $external_url && preg_match( '|^http(s)?://|', $external_url ) ) { + $table_data[$i]['plugin'] = '' . $plugin['name'] . ''; + } + elseif ( ! $source || preg_match( '|^http://wordpress.org/extend/plugins/|', $source ) ) { + $url = add_query_arg( + array( + 'tab' => 'plugin-information', + 'plugin' => $this->_get_plugin_data_from_name( $plugin['name'] ), + 'TB_iframe' => 'true', + 'width' => '640', + 'height' => '500', + ), + admin_url( 'plugin-install.php' ) + ); + + $table_data[$i]['plugin'] = '' . $plugin['name'] . ''; + } + else { + $table_data[$i]['plugin'] = '' . $plugin['name'] . ''; // No hyperlink + } + + if ( isset( $table_data[$i]['plugin'] ) && (array) $table_data[$i]['plugin'] ) + $plugin['name'] = $table_data[$i]['plugin']; + + if ( isset( $plugin['external_url'] ) ) { + /** The plugin is linked to an external source */ + $table_data[$i]['source'] = __( 'External Link', 'tgmpa' ); + } + elseif ( isset( $plugin['source'] ) ) { + /** The plugin must be from a private repository */ + if ( preg_match( '|^http(s)?://|', $plugin['source'] ) ) + $table_data[$i]['source'] = __( 'Private Repository', 'tgmpa' ); + /** The plugin is pre-packaged with the theme */ + else + $table_data[$i]['source'] = __( 'Pre-Packaged', 'tgmpa' ); + } + /** The plugin is from the WordPress repository */ + else { + $table_data[$i]['source'] = __( 'WordPress Repository', 'tgmpa' ); + } + + $table_data[$i]['type'] = $plugin['required'] ? __( 'Required', 'tgmpa' ) : __( 'Recommended', 'tgmpa' ); + + if ( ! isset( $installed_plugins[$plugin['file_path']] ) ) + $table_data[$i]['status'] = sprintf( '%1$s', __( 'Not Installed', 'tgmpa' ) ); + elseif ( is_plugin_inactive( $plugin['file_path'] ) ) + $table_data[$i]['status'] = sprintf( '%1$s', __( 'Installed But Not Activated', 'tgmpa' ) ); + + $table_data[$i]['file_path'] = $plugin['file_path']; + $table_data[$i]['url'] = isset( $plugin['source'] ) ? $plugin['source'] : 'repo'; + + $i++; + } + + /** Sort plugins by Required/Recommended type and by alphabetical listing within each type */ + $resort = array(); + $req = array(); + $rec = array(); + + /** Grab all the plugin types */ + foreach ( $table_data as $plugin ) + $resort[] = $plugin['type']; + + /** Sort each plugin by type */ + foreach ( $resort as $type ) + if ( 'Required' == $type ) + $req[] = $type; + else + $rec[] = $type; + + /** Sort alphabetically each plugin type array, merge them and then sort in reverse (lists Required plugins first) */ + sort( $req ); + sort( $rec ); + array_merge( $resort, $req, $rec ); + array_multisort( $resort, SORT_DESC, $table_data ); + + return $table_data; + + } + + /** + * Retrieve plugin data, given the plugin name. Taken from the + * TGM_Plugin_Activation class. + * + * Loops through the registered plugins looking for $name. If it finds it, + * it returns the $data from that plugin. Otherwise, returns false. + * + * @since 2.2.0 + * + * @param string $name Name of the plugin, as it was registered + * @param string $data Optional. Array key of plugin data to return. Default is slug + * @return string|boolean Plugin slug if found, false otherwise + */ + protected function _get_plugin_data_from_name( $name, $data = 'slug' ) { + + foreach ( TGM_Plugin_Activation::$instance->plugins as $plugin => $values ) { + if ( $name == $values['name'] && isset( $values[$data] ) ) + return $values[$data]; + } + + return false; + + } + + /** + * Create default columns to display important plugin information + * like type, action and status. + * + * @since 2.2.0 + * + * @param array $item + * @param string $column_name + */ + public function column_default( $item, $column_name ) { + + switch ( $column_name ) { + case 'source': + case 'type': + case 'status': + return $item[$column_name]; + } + + } + + /** + * Create default title column along with action links of 'Install' + * and 'Activate'. + * + * @since 2.2.0 + * + * @param array $item + * @return string The action hover links + */ + public function column_plugin( $item ) { + + $installed_plugins = get_plugins(); + + /** No need to display any hover links */ + if ( is_plugin_active( $item['file_path'] ) ) + $actions = array(); + + /** We need to display the 'Install' hover link */ + if ( ! isset( $installed_plugins[$item['file_path']] ) ) { + $actions = array( + 'install' => sprintf( + 'Install', + wp_nonce_url( + add_query_arg( + array( + 'page' => TGM_Plugin_Activation::$instance->menu, + 'plugin' => $item['slug'], + 'plugin_name' => $item['sanitized_plugin'], + 'plugin_source' => $item['url'], + 'tgmpa-install' => 'install-plugin', + ), + admin_url( TGM_Plugin_Activation::$instance->parent_url_slug ) + ), + 'tgmpa-install' + ), + $item['sanitized_plugin'] + ), + ); + } + /** We need to display the 'Activate' hover link */ + elseif ( is_plugin_inactive( $item['file_path'] ) ) { + $actions = array( + 'activate' => sprintf( + 'Activate', + add_query_arg( + array( + 'page' => TGM_Plugin_Activation::$instance->menu, + 'plugin' => $item['slug'], + 'plugin_name' => $item['sanitized_plugin'], + 'plugin_source' => $item['url'], + 'tgmpa-activate' => 'activate-plugin', + 'tgmpa-activate-nonce' => wp_create_nonce( 'tgmpa-activate' ), + ), + admin_url( TGM_Plugin_Activation::$instance->parent_url_slug ) + ), + $item['sanitized_plugin'] + ), + ); + } + + return sprintf( '%1$s %2$s', $item['plugin'], $this->row_actions( $actions ) ); + + } + + /** + * Required for bulk installing. + * + * Adds a checkbox for each plugin. + * + * @since 2.2.0 + * + * @param array $item + * @return string The input checkbox with all necessary info + */ + public function column_cb( $item ) { + + $value = $item['file_path'] . ',' . $item['url'] . ',' . $item['sanitized_plugin']; + return sprintf( '', $this->_args['singular'], $value, $item['sanitized_plugin'] ); + + } + + /** + * Sets default message within the plugins table if no plugins + * are left for interaction. + * + * Hides the menu item to prevent the user from clicking and + * getting a permissions error. + * + * @since 2.2.0 + */ + public function no_items() { + + printf( __( 'No plugins to install or activate. Return to the Dashboard', 'tgmpa' ), admin_url() ); + echo ''; + + } + + /** + * Output all the column information within the table. + * + * @since 2.2.0 + * + * @return array $columns The column names + */ + public function get_columns() { + + $columns = array( + 'cb' => '', + 'plugin' => __( 'Plugin', 'tgmpa' ), + 'source' => __( 'Source', 'tgmpa' ), + 'type' => __( 'Type', 'tgmpa' ), + 'status' => __( 'Status', 'tgmpa' ) + ); + + return $columns; + + } + + /** + * Defines all types of bulk actions for handling + * registered plugins. + * + * @since 2.2.0 + * + * @return array $actions The bulk actions for the plugin install table + */ + public function get_bulk_actions() { + + $actions = array( + 'tgmpa-bulk-install' => __( 'Install', 'tgmpa' ), + 'tgmpa-bulk-activate' => __( 'Activate', 'tgmpa' ), + ); + + return $actions; + + } + + /** + * Processes bulk installation and activation actions. + * + * The bulk installation process looks either for the $_POST + * information or for the plugin info within the $_GET variable if + * a user has to use WP_Filesystem to enter their credentials. + * + * @since 2.2.0 + */ + public function process_bulk_actions() { + + /** Bulk installation process */ + if ( 'tgmpa-bulk-install' === $this->current_action() ) { + check_admin_referer( 'bulk-' . $this->_args['plural'] ); + + /** Prep variables to be populated */ + $plugins_to_install = array(); + $plugin_installs = array(); + $plugin_path = array(); + $plugin_name = array(); + + /** Look first to see if information has been passed via WP_Filesystem */ + if ( isset( $_GET[sanitize_key( 'plugins' )] ) ) + $plugins = explode( ',', stripslashes( $_GET[sanitize_key( 'plugins' )] ) ); + /** Looks like the user can use the direct method, take from $_POST */ + elseif ( isset( $_POST[sanitize_key( 'plugin' )] ) ) + $plugins = (array) $_POST[sanitize_key( 'plugin' )]; + /** Nothing has been submitted */ + else + $plugins = array(); + + $a = 0; // Incremental variable + + /** Grab information from $_POST if available */ + if ( isset( $_POST[sanitize_key( 'plugin' )] ) ) { + foreach ( $plugins as $plugin_data ) + $plugins_to_install[] = explode( ',', $plugin_data ); + + foreach ( $plugins_to_install as $plugin_data ) { + $plugin_installs[] = $plugin_data[0]; + $plugin_path[] = $plugin_data[1]; + $plugin_name[] = $plugin_data[2]; + } + } + /** Information has been passed via $_GET */ + else { + foreach ( $plugins as $key => $value ) { + /** Grab plugin slug for each plugin */ + if ( 0 == $key % 3 || 0 == $key ) { + $plugins_to_install[] = $value; + $plugin_installs[] = $value; + } + $a++; + } + } + + /** Look first to see if information has been passed via WP_Filesystem */ + if ( isset( $_GET[sanitize_key( 'plugin_paths' )] ) ) + $plugin_paths = explode( ',', stripslashes( $_GET[sanitize_key( 'plugin_paths' )] ) ); + /** Looks like the user doesn't need to enter his FTP creds */ + elseif ( isset( $_POST[sanitize_key( 'plugin' )] ) ) + $plugin_paths = (array) $plugin_path; + /** Nothing has been submitted */ + else + $plugin_paths = array(); + + /** Look first to see if information has been passed via WP_Filesystem */ + if ( isset( $_GET[sanitize_key( 'plugin_names' )] ) ) + $plugin_names = explode( ',', stripslashes( $_GET[sanitize_key( 'plugin_names' )] ) ); + /** Looks like the user doesn't need to enter his FTP creds */ + elseif ( isset( $_POST[sanitize_key( 'plugin' )] ) ) + $plugin_names = (array) $plugin_name; + /** Nothing has been submitted */ + else + $plugin_names = array(); + + $b = 0; // Incremental variable + + /** Loop through plugin slugs and remove already installed plugins from the list */ + foreach ( $plugin_installs as $key => $plugin ) { + if ( preg_match( '|.php$|', $plugin ) ) { + unset( $plugin_installs[$key] ); + + /** If the plugin path isn't in the $_GET variable, we can unset the corresponding path */ + if ( ! isset( $_GET[sanitize_key( 'plugin_paths' )] ) ) + unset( $plugin_paths[$b] ); + + /** If the plugin name isn't in the $_GET variable, we can unset the corresponding name */ + if ( ! isset( $_GET[sanitize_key( 'plugin_names' )] ) ) + unset( $plugin_names[$b] ); + } + $b++; + } + + /** No need to proceed further if we have no plugins to install */ + if ( empty( $plugin_installs ) ) + return false; + + /** Reset array indexes in case we removed already installed plugins */ + $plugin_installs = array_values( $plugin_installs ); + $plugin_paths = array_values( $plugin_paths ); + $plugin_names = array_values( $plugin_names ); + + /** If we grabbed our plugin info from $_GET, we need to decode it for use */ + $plugin_installs = array_map( 'urldecode', $plugin_installs ); + $plugin_paths = array_map( 'urldecode', $plugin_paths ); + $plugin_names = array_map( 'urldecode', $plugin_names ); + + /** Pass all necessary information via URL if WP_Filesystem is needed */ + $url = wp_nonce_url( + add_query_arg( + array( + 'page' => TGM_Plugin_Activation::$instance->menu, + 'tgmpa-action' => 'install-selected', + 'plugins' => urlencode( implode( ',', $plugins ) ), + 'plugin_paths' => urlencode( implode( ',', $plugin_paths ) ), + 'plugin_names' => urlencode( implode( ',', $plugin_names ) ), + ), + admin_url( TGM_Plugin_Activation::$instance->parent_url_slug ) + ), + 'bulk-plugins' + ); + $method = ''; // Leave blank so WP_Filesystem can populate it as necessary + $fields = array( sanitize_key( 'action' ), sanitize_key( '_wp_http_referer' ), sanitize_key( '_wpnonce' ) ); // Extra fields to pass to WP_Filesystem + + if ( false === ( $creds = request_filesystem_credentials( $url, $method, false, false, $fields ) ) ) + return true; + + if ( ! WP_Filesystem( $creds ) ) { + request_filesystem_credentials( $url, $method, true, false, $fields ); // Setup WP_Filesystem + return true; + } + + require_once ABSPATH . 'wp-admin/includes/plugin-install.php'; // Need for plugins_api + require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; // Need for upgrade classes + + /** Store all information in arrays since we are processing a bulk installation */ + $api = array(); + $sources = array(); + $install_path = array(); + + $c = 0; // Incremental variable + + /** Loop through each plugin to install and try to grab information from WordPress API, if not create 'tgmpa-empty' scalar */ + foreach ( $plugin_installs as $plugin ) { + $api[$c] = plugins_api( 'plugin_information', array( 'slug' => $plugin, 'fields' => array( 'sections' => false ) ) ) ? plugins_api( 'plugin_information', array( 'slug' => $plugin, 'fields' => array( 'sections' => false ) ) ) : (object) $api[$c] = 'tgmpa-empty'; + $c++; + } + + if ( is_wp_error( $api ) ) + wp_die( TGM_Plugin_Activation::$instance->strings['oops'] . var_dump( $api ) ); + + $d = 0; // Incremental variable + + /** Capture download links from $api or set install link to pre-packaged/private repo */ + foreach ( $api as $object ) { + $sources[$d] = isset( $object->download_link ) && 'repo' == $plugin_paths[$d] ? $object->download_link : $plugin_paths[$d]; + $d++; + } + + /** Finally, all the data is prepared to be sent to the installer */ + $url = add_query_arg( array( 'page' => TGM_Plugin_Activation::$instance->menu ), admin_url( TGM_Plugin_Activation::$instance->parent_url_slug ) ); + $nonce = 'bulk-plugins'; + $names = $plugin_names; + + /** Create a new instance of TGM_Bulk_Installer */ + $installer = new TGM_Bulk_Installer( $skin = new TGM_Bulk_Installer_Skin( compact( 'url', 'nonce', 'names' ) ) ); + + /** Wrap the install process with the appropriate HTML */ + echo '
'; + screen_icon( apply_filters( 'tgmpa_default_screen_icon', 'themes' ) ); + echo '

' . esc_html( get_admin_page_title() ) . '

'; + /** Process the bulk installation submissions */ + $installer->bulk_install( $sources ); + echo '
'; + + return true; + } + + /** Bulk activation process */ + if ( 'tgmpa-bulk-activate' === $this->current_action() ) { + check_admin_referer( 'bulk-' . $this->_args['plural'] ); + + /** Grab plugin data from $_POST */ + $plugins = isset( $_POST[sanitize_key( 'plugin' )] ) ? (array) $_POST[sanitize_key( 'plugin' )] : array(); + $plugins_to_activate = array(); + + /** Split plugin value into array with plugin file path, plugin source and plugin name */ + foreach ( $plugins as $i => $plugin ) + $plugins_to_activate[] = explode( ',', $plugin ); + + foreach ( $plugins_to_activate as $i => $array ) { + if ( ! preg_match( '|.php$|', $array[0] ) ) // Plugins that haven't been installed yet won't have the correct file path + unset( $plugins_to_activate[$i] ); + } + + /** Return early if there are no plugins to activate */ + if ( empty( $plugins_to_activate ) ) + return; + + $plugins = array(); + $plugin_names = array(); + + foreach ( $plugins_to_activate as $plugin_string ) { + $plugins[] = $plugin_string[0]; + $plugin_names[] = $plugin_string[2]; + } + + $count = count( $plugin_names ); // Count so we can use _n function + $last_plugin = array_pop( $plugin_names ); // Pop off last name to prep for readability + $imploded = empty( $plugin_names ) ? '' . $last_plugin . '' : '' . ( implode( ', ', $plugin_names ) . ' and ' . $last_plugin . '.' ); + + /** Now we are good to go - let's start activating plugins */ + $activate = activate_plugins( $plugins ); + + if ( is_wp_error( $activate ) ) + echo '

' . $activate->get_error_message() . '

'; + else + printf( '

%1$s %2$s

', _n( 'The following plugin was activated successfully:', 'The following plugins were activated successfully:', $count, 'tgmpa' ), $imploded ); + + /** Update recently activated plugins option */ + $recent = (array) get_option( 'recently_activated' ); + + foreach ( $plugins as $plugin => $time ) + if ( isset( $recent[$plugin] ) ) + unset( $recent[$plugin] ); + + update_option( 'recently_activated', $recent ); + + unset( $_POST ); // Reset the $_POST variable in case user wants to perform one action after another + } + } + + /** + * Prepares all of our information to be outputted into a usable table. + * + * @since 2.2.0 + */ + public function prepare_items() { + + $per_page = 100; // Set it high so we shouldn't have to worry about pagination + $columns = $this->get_columns(); // Get all necessary column information + $hidden = array(); // No columns to hide, but we must set as an array + $sortable = array(); // No reason to make sortable columns + $this->_column_headers = array( $columns, $hidden, $sortable ); // Get all necessary column headers + + /** Process our bulk actions here */ + $this->process_bulk_actions(); + + /** Store all of our plugin data into $items array so WP_List_Table can use it */ + $this->items = $this->_gather_plugin_data(); + + } + + } +} + +/** + * The WP_Upgrader file isn't always available. If it isn't available, + * we load it here. + * + * We check to make sure no action or activation keys are set so that WordPress + * doesn't try to re-include the class when processing upgrades or installs outside + * of the class. + * + * @since 2.2.0 + */ +if ( ! class_exists( 'WP_Upgrader' ) && ( isset( $_GET[sanitize_key( 'page' )] ) && TGM_Plugin_Activation::$instance->menu === $_GET[sanitize_key( 'page' )] ) ) { + require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; + + if ( ! class_exists( 'TGM_Bulk_Installer' ) ) { + /** + * Installer class to handle bulk plugin installations. + * + * Extends WP_Upgrader and customizes to suit the installation of multiple + * plugins. + * + * @since 2.2.0 + * + * @package TGM-Plugin-Activation + * @author Thomas Griffin + * @author Gary Jones + */ + class TGM_Bulk_Installer extends WP_Upgrader { + + /** + * Holds result of bulk plugin installation. + * + * @since 2.2.0 + * + * @var string + */ + public $result; + + /** + * Flag to check if bulk installation is occurring or not. + * + * @since 2.2.0 + * + * @var boolean + */ + public $bulk = false; + + /** + * Processes the bulk installation of plugins. + * + * @since 2.2.0 + * + * @param array $packages The plugin sources needed for installation + * @return string|boolean Install confirmation messages on success, false on failure + */ + public function bulk_install( $packages ) { + + /** Pass installer skin object and set bulk property to true */ + $this->init(); + $this->bulk = true; + + /** Set install strings and automatic activation strings (if config option is set to true) */ + $this->install_strings(); + if ( TGM_Plugin_Activation::$instance->is_automatic ) + $this->activate_strings(); + + /** Run the header string to notify user that the process has begun */ + $this->skin->header(); + + /** Connect to the Filesystem */ + $res = $this->fs_connect( array( WP_CONTENT_DIR, WP_PLUGIN_DIR ) ); + if ( ! $res ) { + $this->skin->footer(); + return false; + } + + /** Set the bulk header and prepare results array */ + $this->skin->bulk_header(); + $results = array(); + + /** Get the total number of packages being processed and iterate as each package is successfully installed */ + $this->update_count = count( $packages ); + $this->update_current = 0; + + /** Loop through each plugin and process the installation */ + foreach ( $packages as $plugin ) { + $this->update_current++; // Increment counter + + /** Do the plugin install */ + $result = $this->run( + array( + 'package' => $plugin, // The plugin source + 'destination' => WP_PLUGIN_DIR, // The destination dir + 'clear_destination' => false, // Do we want to clear the destination or not? + 'clear_working' => true, // Remove original install file + 'is_multi' => true, // Are we processing multiple installs? + 'hook_extra' => array( 'plugin' => $plugin, ), // Pass plugin source as extra data + ) + ); + + /** Store installation results in result property */ + $results[$plugin] = $this->result; + + /** Prevent credentials auth screen from displaying multiple times */ + if ( false === $result ) + break; + } + + /** Pass footer skin strings */ + $this->skin->bulk_footer(); + $this->skin->footer(); + + /** Return our results */ + return $results; + + } + + /** + * Performs the actual installation of each plugin. + * + * This method also activates the plugin in the automatic flag has been + * set to true for the TGMPA class. + * + * @since 2.2.0 + * + * @param array $options The installation cofig options + * @return null/array Return early if error, array of installation data on success + */ + public function run( $options ) { + + /** Default config options */ + $defaults = array( + 'package' => '', + 'destination' => '', + 'clear_destination' => false, + 'clear_working' => true, + 'is_multi' => false, + 'hook_extra' => array(), + ); + + /** Parse default options with config options from $this->bulk_upgrade and extract them */ + $options = wp_parse_args( $options, $defaults ); + extract( $options ); + + /** Connect to the Filesystem */ + $res = $this->fs_connect( array( WP_CONTENT_DIR, $destination ) ); + if ( ! $res ) + return false; + + /** Return early if there is an error connecting to the Filesystem */ + if ( is_wp_error( $res ) ) { + $this->skin->error( $res ); + return $res; + } + + /** Call $this->header separately if running multiple times */ + if ( ! $is_multi ) + $this->skin->header(); + + /** Set strings before the package is installed */ + $this->skin->before(); + + /** Download the package (this just returns the filename of the file if the package is a local file) */ + $download = $this->download_package( $package ); + if ( is_wp_error( $download ) ) { + $this->skin->error( $download ); + $this->skin->after(); + return $download; + } + + /** Don't accidentally delete a local file */ + $delete_package = ( $download != $package ); + + /** Unzip file into a temporary working directory */ + $working_dir = $this->unpack_package( $download, $delete_package ); + if ( is_wp_error( $working_dir ) ) { + $this->skin->error( $working_dir ); + $this->skin->after(); + return $working_dir; + } + + /** Install the package into the working directory with all passed config options */ + $result = $this->install_package( + array( + 'source' => $working_dir, + 'destination' => $destination, + 'clear_destination' => $clear_destination, + 'clear_working' => $clear_working, + 'hook_extra' => $hook_extra, + ) + ); + + /** Pass the result of the installation */ + $this->skin->set_result( $result ); + + /** Set correct strings based on results */ + if ( is_wp_error( $result ) ) { + $this->skin->error( $result ); + $this->skin->feedback( 'process_failed' ); + } + /** The plugin install is successful */ + else { + $this->skin->feedback( 'process_success' ); + } + + /** Only process the activation of installed plugins if the automatic flag is set to true */ + if ( TGM_Plugin_Activation::$instance->is_automatic ) { + /** Flush plugins cache so we can make sure that the installed plugins list is always up to date */ + wp_cache_flush(); + + /** Get the installed plugin file and activate it */ + $plugin_info = $this->plugin_info( $package ); + $activate = activate_plugin( $plugin_info ); + + /** Re-populate the file path now that the plugin has been installed and activated */ + TGM_Plugin_Activation::$instance->populate_file_path(); + + /** Set correct strings based on results */ + if ( is_wp_error( $activate ) ) { + $this->skin->error( $activate ); + $this->skin->feedback( 'activation_failed' ); + } + /** The plugin activation is successful */ + else { + $this->skin->feedback( 'activation_success' ); + } + } + + /** Flush plugins cache so we can make sure that the installed plugins list is always up to date */ + wp_cache_flush(); + + /** Set install footer strings */ + $this->skin->after(); + if ( ! $is_multi ) + $this->skin->footer(); + + return $result; + + } + + /** + * Sets the correct install strings for the installer skin to use. + * + * @since 2.2.0 + */ + public function install_strings() { + + $this->strings['no_package'] = __( 'Install package not available.', 'tgmpa' ); + $this->strings['downloading_package'] = __( 'Downloading install package from %s…', 'tgmpa' ); + $this->strings['unpack_package'] = __( 'Unpacking the package…', 'tgmpa' ); + $this->strings['installing_package'] = __( 'Installing the plugin…', 'tgmpa' ); + $this->strings['process_failed'] = __( 'Plugin install failed.', 'tgmpa' ); + $this->strings['process_success'] = __( 'Plugin installed successfully.', 'tgmpa' ); + + } + + /** + * Sets the correct activation strings for the installer skin to use. + * + * @since 2.2.0 + */ + public function activate_strings() { + + $this->strings['activation_failed'] = __( 'Plugin activation failed.', 'tgmpa' ); + $this->strings['activation_success'] = __( 'Plugin activated successfully.', 'tgmpa' ); + + } + + /** + * Grabs the plugin file from an installed plugin. + * + * @since 2.2.0 + * + * @return string|boolean Return plugin file on success, false on failure + */ + public function plugin_info() { + + /** Return false if installation result isn't an array or the destination name isn't set */ + if ( ! is_array( $this->result ) ) + return false; + if ( empty( $this->result['destination_name'] ) ) + return false; + + /** Get the installed plugin file or return false if it isn't set */ + $plugin = get_plugins( '/' . $this->result['destination_name'] ); + if ( empty( $plugin ) ) + return false; + + /** Assume the requested plugin is the first in the list */ + $pluginfiles = array_keys( $plugin ); + + return $this->result['destination_name'] . '/' . $pluginfiles[0]; + + } + + } + } + + if ( ! class_exists( 'TGM_Bulk_Installer_Skin' ) ) { + /** + * Installer skin to set strings for the bulk plugin installations.. + * + * Extends Bulk_Upgrader_Skin and customizes to suit the installation of multiple + * plugins. + * + * @since 2.2.0 + * + * @package TGM-Plugin-Activation + * @author Thomas Griffin + * @author Gary Jones + */ + class TGM_Bulk_Installer_Skin extends Bulk_Upgrader_Skin { + + /** + * Holds plugin info for each individual plugin installation. + * + * @since 2.2.0 + * + * @var array + */ + public $plugin_info = array(); + + /** + * Holds names of plugins that are undergoing bulk installations. + * + * @since 2.2.0 + * + * @var array + */ + public $plugin_names = array(); + + /** + * Integer to use for iteration through each plugin installation. + * + * @since 2.2.0 + * + * @var integer + */ + public $i = 0; + + /** + * Constructor. Parses default args with new ones and extracts them for use. + * + * @since 2.2.0 + * + * @param array $args Arguments to pass for use within the class + */ + public function __construct( $args = array() ) { + + /** Parse default and new args */ + $defaults = array( 'url' => '', 'nonce' => '', 'names' => array() ); + $args = wp_parse_args( $args, $defaults ); + + /** Set plugin names to $this->plugin_names property */ + $this->plugin_names = $args['names']; + + /** Extract the new args */ + parent::__construct( $args ); + + } + + /** + * Sets install skin strings for each individual plugin. + * + * Checks to see if the automatic activation flag is set and uses the + * the proper strings accordingly. + * + * @since 2.2.0 + */ + public function add_strings() { + + /** Automatic activation strings */ + if ( TGM_Plugin_Activation::$instance->is_automatic ) { + $this->upgrader->strings['skin_upgrade_start'] = __( 'The installation and activation process is starting. This process may take a while on some hosts, so please be patient.', 'tgmpa' ); + $this->upgrader->strings['skin_update_successful'] = __( '%1$s installed and activated successfully.', 'tgmpa' ) . ' ' . __( 'Show Details', 'tgmpa' ) . '.'; + $this->upgrader->strings['skin_upgrade_end'] = __( 'All installations and activations have been completed.', 'tgmpa' ); + $this->upgrader->strings['skin_before_update_header'] = __( 'Installing and Activating Plugin %1$s (%2$d/%3$d)', 'tgmpa' ); + } + /** Default installation strings */ + else { + $this->upgrader->strings['skin_upgrade_start'] = __( 'The installation process is starting. This process may take a while on some hosts, so please be patient.', 'tgmpa' ); + $this->upgrader->strings['skin_update_failed_error'] = __( 'An error occurred while installing %1$s: %2$s.', 'tgmpa' ); + $this->upgrader->strings['skin_update_failed'] = __( 'The installation of %1$s failed.', 'tgmpa' ); + $this->upgrader->strings['skin_update_successful'] = __( '%1$s installed successfully.', 'tgmpa' ) . ' ' . __( 'Show Details', 'tgmpa' ) . '.'; + $this->upgrader->strings['skin_upgrade_end'] = __( 'All installations have been completed.', 'tgmpa' ); + $this->upgrader->strings['skin_before_update_header'] = __( 'Installing Plugin %1$s (%2$d/%3$d)', 'tgmpa' ); + } + + } + + /** + * Outputs the header strings and necessary JS before each plugin installation. + * + * @since 2.2.0 + */ + public function before( $title='' ) { + + /** We are currently in the plugin installation loop, so set to true */ + $this->in_loop = true; + + printf( '

' . $this->upgrader->strings['skin_before_update_header'] . '

', $this->plugin_names[$this->i], $this->upgrader->update_current, $this->upgrader->update_count ); + echo ''; + echo '

'; + + /** Flush header output buffer */ + $this->before_flush_output(); + + } + + /** + * Outputs the footer strings and necessary JS after each plugin installation. + * + * Checks for any errors and outputs them if they exist, else output + * success strings. + * + * @since 2.2.0 + */ + public function after( $title='' ) { + + /** Close install strings */ + echo '

'; + + /** Output error strings if an error has occurred */ + if ( $this->error || ! $this->result ) { + if ( $this->error ) + echo '

' . sprintf( $this->upgrader->strings['skin_update_failed_error'], $this->plugin_names[$this->i], $this->error ) . '

'; + else + echo '

' . sprintf( $this->upgrader->strings['skin_update_failed'], $this->plugin_names[$this->i] ) . '

'; + + echo ''; + } + + /** If the result is set and there are no errors, success! */ + if ( ! empty( $this->result ) && ! is_wp_error( $this->result ) ) { + echo '

' . sprintf( $this->upgrader->strings['skin_update_successful'], $this->plugin_names[$this->i], 'jQuery(\'#progress-' . esc_js( $this->upgrader->update_current ) . '\').toggle();jQuery(\'span\', this).toggle(); return false;' ) . '

'; + echo ''; + } + + /** Set in_loop and error to false and flush footer output buffer */ + $this->reset(); + $this->after_flush_output(); + + } + + /** + * Outputs links after bulk plugin installation is complete. + * + * @since 2.2.0 + */ + public function bulk_footer() { + + /** Serve up the string to say installations (and possibly activations) are complete */ + parent::bulk_footer(); + + /** Flush plugins cache so we can make sure that the installed plugins list is always up to date */ + wp_cache_flush(); + + /** Display message based on if all plugins are now active or not */ + $complete = array(); + foreach ( TGM_Plugin_Activation::$instance->plugins as $plugin ) { + if ( ! is_plugin_active( $plugin['file_path'] ) ) { + echo '

' . TGM_Plugin_Activation::$instance->strings['return'] . '

'; + $complete[] = $plugin; + break; + } + /** Nothing to store */ + else { + $complete[] = ''; + } + } + + /** Filter out any empty entries */ + $complete = array_filter( $complete ); + + /** All plugins are active, so we display the complete string and hide the menu to protect users */ + if ( empty( $complete ) ) { + echo '

' . sprintf( TGM_Plugin_Activation::$instance->strings['complete'], '' . __( 'Return to the Dashboard', 'tgmpa' ) . '' ) . '

'; + echo ''; + } + + } + + /** + * Flush header output buffer. + * + * @since 2.2.0 + */ + public function before_flush_output() { + + wp_ob_end_flush_all(); + flush(); + + } + + /** + * Flush footer output buffer and iterate $this->i to make sure the + * installation strings reference the correct plugin. + * + * @since 2.2.0 + */ + public function after_flush_output() { + + wp_ob_end_flush_all(); + flush(); + $this->i++; + + } + + } + } +} diff --git a/functions/dynamic-styles.php b/functions/dynamic-styles.php new file mode 100644 index 00000000..07bbdc5e --- /dev/null +++ b/functions/dynamic-styles.php @@ -0,0 +1,229 @@ +'. "\n"; } + if ( ot_get_option( 'font' ) == 'droid-serif' ) { echo ''. "\n"; } + if ( ot_get_option( 'font' ) == 'source-sans-pro' ) { echo ''. "\n"; } + if ( ot_get_option( 'font' ) == 'lato' ) { echo ''. "\n"; } + if ( ot_get_option( 'font' ) == 'ubuntu' ) { echo ''. "\n"; } + if ( ot_get_option( 'font' ) == 'roboto-condensed' ) { echo ''. "\n"; } + if ( ot_get_option( 'font' ) == 'roboto-condensed-cyr' ) { echo ''. "\n"; } + if ( ot_get_option( 'font' ) == 'open-sans' ) { echo ''. "\n"; } + if ( ot_get_option( 'font' ) == 'open-sans-cyr' ) { echo ''. "\n"; } + } + } + +} +add_action( 'wp_head', 'alx_google_fonts', 2 ); + + +/* Dynamic css output +/* ------------------------------------ */ +if ( ! function_exists( 'alx_dynamic_css' ) ) { + + function alx_dynamic_css() { + if ( ot_get_option('dynamic-styles') ) { + + // rgb values + $color_1 = ot_get_option('color-1'); + $color_1_rgb = alx_hex2rgb($color_1); + + // start output + $styles = ''."\n"; + // end output + + echo $styles; + } + } + +} +add_action( 'wp_head', 'alx_dynamic_css', 100 ); diff --git a/functions/images/col-1c.png b/functions/images/col-1c.png new file mode 100644 index 00000000..6bbb1c31 Binary files /dev/null and b/functions/images/col-1c.png differ diff --git a/functions/images/col-2cl.png b/functions/images/col-2cl.png new file mode 100644 index 00000000..fb1db09c Binary files /dev/null and b/functions/images/col-2cl.png differ diff --git a/functions/images/col-2cr.png b/functions/images/col-2cr.png new file mode 100644 index 00000000..a832f28f Binary files /dev/null and b/functions/images/col-2cr.png differ diff --git a/functions/images/col-3cl.png b/functions/images/col-3cl.png new file mode 100644 index 00000000..212851df Binary files /dev/null and b/functions/images/col-3cl.png differ diff --git a/functions/images/col-3cm.png b/functions/images/col-3cm.png new file mode 100644 index 00000000..bad52c3e Binary files /dev/null and b/functions/images/col-3cm.png differ diff --git a/functions/images/col-3cr.png b/functions/images/col-3cr.png new file mode 100644 index 00000000..fabfd66a Binary files /dev/null and b/functions/images/col-3cr.png differ diff --git a/functions/images/footer-widgets-0.png b/functions/images/footer-widgets-0.png new file mode 100644 index 00000000..6bbb1c31 Binary files /dev/null and b/functions/images/footer-widgets-0.png differ diff --git a/functions/images/footer-widgets-1.png b/functions/images/footer-widgets-1.png new file mode 100644 index 00000000..b8a5c29c Binary files /dev/null and b/functions/images/footer-widgets-1.png differ diff --git a/functions/images/footer-widgets-2.png b/functions/images/footer-widgets-2.png new file mode 100644 index 00000000..a63d3bea Binary files /dev/null and b/functions/images/footer-widgets-2.png differ diff --git a/functions/images/footer-widgets-3.png b/functions/images/footer-widgets-3.png new file mode 100644 index 00000000..30536982 Binary files /dev/null and b/functions/images/footer-widgets-3.png differ diff --git a/functions/images/footer-widgets-4.png b/functions/images/footer-widgets-4.png new file mode 100644 index 00000000..dbecf9bf Binary files /dev/null and b/functions/images/footer-widgets-4.png differ diff --git a/functions/images/layout-off.png b/functions/images/layout-off.png new file mode 100644 index 00000000..6f1417d9 Binary files /dev/null and b/functions/images/layout-off.png differ diff --git a/functions/js/post-formats.js b/functions/js/post-formats.js new file mode 100644 index 00000000..6f7b953a --- /dev/null +++ b/functions/js/post-formats.js @@ -0,0 +1,44 @@ +/* + post-formats.js + + License: GNU General Public License v3.0 + License URI: http://www.gnu.org/licenses/gpl-3.0.html + + Copyright: (c) 2013 Jermaine Maree, http://jermainemaree.com +*/ + +jQuery(document).ready(function($) { + + // Hide post format sections + function hide_statuses() { + $('#format-audio,#format-aside,#format-chat,#format-gallery,#format-image,#format-link,#format-quote,#format-status,#format-video').hide(); + } + + // Post Formats + if($("#post-formats-select").length) { + // Hide post format sections + hide_statuses(); + + // Supported post formats + var post_formats = ['audio','aside','chat','gallery','image','link','quote','status','video']; + + // Get selected post format + var selected_post_format = $("input[name='post_format']:checked").val(); + + // Show post format meta box + if(jQuery.inArray(selected_post_format,post_formats) != '-1') { + $('#format-'+selected_post_format).show(); + } + + // Hide/show post format meta box when option changed + $("input[name='post_format']:radio").change(function() { + // Hide post format sections + hide_statuses(); + // Shoe selected section + if(jQuery.inArray($(this).val(),post_formats) != '-1') { + $('#format-'+$(this).val()).show(); + } + }); + } + +}); \ No newline at end of file diff --git a/functions/meta-boxes.php b/functions/meta-boxes.php new file mode 100644 index 00000000..7d8222cd --- /dev/null +++ b/functions/meta-boxes.php @@ -0,0 +1,277 @@ + 'page-options', + 'title' => 'Page Options', + 'desc' => '', + 'pages' => array( 'page' ), + 'context' => 'normal', + 'priority' => 'high', + 'fields' => array( + array( + 'label' => 'Heading', + 'id' => '_heading', + 'type' => 'text' + ), + array( + 'label' => 'Subheading', + 'id' => '_subheading', + 'type' => 'text' + ), + array( + 'label' => 'Primary Sidebar', + 'id' => '_sidebar_primary', + 'type' => 'sidebar-select', + 'desc' => 'Overrides default' + ), + array( + 'label' => 'Secondary Sidebar', + 'id' => '_sidebar_secondary', + 'type' => 'sidebar-select', + 'desc' => 'Overrides default' + ), + array( + 'label' => 'Layout', + 'id' => '_layout', + 'type' => 'radio-image', + 'desc' => 'Overrides the default layout option', + 'std' => 'inherit', + 'choices' => array( + array( + 'value' => 'inherit', + 'label' => 'Inherit Layout', + 'src' => get_template_directory_uri() . '/functions/images/layout-off.png' + ), + array( + 'value' => 'col-1c', + 'label' => '1 Column', + 'src' => get_template_directory_uri() . '/functions/images/col-1c.png' + ), + array( + 'value' => 'col-2cl', + 'label' => '2 Column Left', + 'src' => get_template_directory_uri() . '/functions/images/col-2cl.png' + ), + array( + 'value' => 'col-2cr', + 'label' => '2 Column Right', + 'src' => get_template_directory_uri() . '/functions/images/col-2cr.png' + ), + array( + 'value' => 'col-3cm', + 'label' => '3 Column Middle', + 'src' => get_template_directory_uri() . '/functions/images/col-3cm.png' + ), + array( + 'value' => 'col-3cl', + 'label' => '3 Column Left', + 'src' => get_template_directory_uri() . '/functions/images/col-3cl.png' + ), + array( + 'value' => 'col-3cr', + 'label' => '3 Column Right', + 'src' => get_template_directory_uri() . '/functions/images/col-3cr.png' + ) + ) + ) + ) +); + +$post_options = array( + 'id' => 'post-options', + 'title' => 'Post Options', + 'desc' => '', + 'pages' => array( 'post' ), + 'context' => 'normal', + 'priority' => 'high', + 'fields' => array( + array( + 'label' => 'Primary Sidebar', + 'id' => '_sidebar_primary', + 'type' => 'sidebar-select', + 'desc' => 'Overrides default' + ), + array( + 'label' => 'Secondary Sidebar', + 'id' => '_sidebar_secondary', + 'type' => 'sidebar-select', + 'desc' => 'Overrides default' + ), + array( + 'label' => 'Layout', + 'id' => '_layout', + 'type' => 'radio-image', + 'desc' => 'Overrides the default layout option', + 'std' => 'inherit', + 'choices' => array( + array( + 'value' => 'inherit', + 'label' => 'Inherit Layout', + 'src' => get_template_directory_uri() . '/functions/images/layout-off.png' + ), + array( + 'value' => 'col-1c', + 'label' => '1 Column', + 'src' => get_template_directory_uri() . '/functions/images/col-1c.png' + ), + array( + 'value' => 'col-2cl', + 'label' => '2 Column Left', + 'src' => get_template_directory_uri() . '/functions/images/col-2cl.png' + ), + array( + 'value' => 'col-2cr', + 'label' => '2 Column Right', + 'src' => get_template_directory_uri() . '/functions/images/col-2cr.png' + ), + array( + 'value' => 'col-3cm', + 'label' => '3 Column Middle', + 'src' => get_template_directory_uri() . '/functions/images/col-3cm.png' + ), + array( + 'value' => 'col-3cl', + 'label' => '3 Column Left', + 'src' => get_template_directory_uri() . '/functions/images/col-3cl.png' + ), + array( + 'value' => 'col-3cr', + 'label' => '3 Column Right', + 'src' => get_template_directory_uri() . '/functions/images/col-3cr.png' + ) + ) + ) + ) +); + +$post_format_audio = array( + 'id' => 'format-audio', + 'title' => 'Format: Audio', + 'desc' => 'These settings enable you to embed audio into your posts. You must provide both .mp3 and .ogg/.oga file formats in order for self hosted audio to function accross all browsers.', + 'pages' => array( 'post' ), + 'context' => 'normal', + 'priority' => 'high', + 'fields' => array( + array( + 'label' => 'MP3 File URL', + 'id' => '_audio_mp3_url', + 'type' => 'upload', + 'desc' => 'The URL to the .mp3 or .m4a audio file' + ), + array( + 'label' => 'OGA File URL', + 'id' => '_audio_ogg_url', + 'type' => 'upload', + 'desc' => 'The URL to the .oga, .ogg audio file' + ) + ) +); +$post_format_gallery = array( + 'id' => 'format-gallery', + 'title' => 'Format: Gallery', + 'desc' => 'Add Media

+ To create a gallery, upload your images and then select "Uploaded to this post" from the dropdown (in the media popup) to see images attached to this post. You can drag to re-order or delete them there.

Note: Do not click the "Insert into post" button. Only use the "Insert Media" section of the upload popup, not "Create Gallery" which is for standard post galleries.', + 'pages' => array( 'post' ), + 'context' => 'normal', + 'priority' => 'high', + 'fields' => array() +); +$post_format_chat = array( + 'id' => 'format-chat', + 'title' => 'Format: Chat', + 'desc' => 'Input chat dialogue.', + 'pages' => array( 'post' ), + 'context' => 'normal', + 'priority' => 'high', + 'fields' => array( + array( + 'label' => 'Chat Text', + 'id' => '_chat', + 'type' => 'textarea', + 'rows' => '2' + ) + ) +); +$post_format_link = array( + 'id' => 'format-link', + 'title' => 'Format: Link', + 'desc' => 'Input your link.', + 'pages' => array( 'post' ), + 'context' => 'normal', + 'priority' => 'high', + 'fields' => array( + array( + 'label' => 'Link Title', + 'id' => '_link_title', + 'type' => 'text' + ), + array( + 'label' => 'Link URL', + 'id' => '_link_url', + 'type' => 'text' + ) + ) +); +$post_format_quote = array( + 'id' => 'format-quote', + 'title' => 'Format: Quote', + 'desc' => 'Input your quote.', + 'pages' => array( 'post' ), + 'context' => 'normal', + 'priority' => 'high', + 'fields' => array( + array( + 'label' => 'Quote', + 'id' => '_quote', + 'type' => 'textarea', + 'rows' => '2' + ), + array( + 'label' => 'Quote Author', + 'id' => '_quote_author', + 'type' => 'text' + ) + ) +); +$post_format_video = array( + 'id' => 'format-video', + 'title' => 'Format: Video', + 'desc' => 'These settings enable you to embed videos into your posts.', + 'pages' => array( 'post' ), + 'context' => 'normal', + 'priority' => 'high', + 'fields' => array( + array( + 'label' => 'Video URL', + 'id' => '_video_url', + 'type' => 'text', + 'desc' => 'Recommended to use.' + ), + array( + 'label' => 'Video Embed Code', + 'id' => '_video_embed_code', + 'type' => 'textarea', + 'rows' => '2' + ) + ) +); + +/* Register meta boxes +/* ------------------------------------ */ + ot_register_meta_box( $page_options ); + ot_register_meta_box( $post_format_audio ); + ot_register_meta_box( $post_format_chat ); + ot_register_meta_box( $post_format_gallery ); + ot_register_meta_box( $post_format_link ); + ot_register_meta_box( $post_format_quote ); + ot_register_meta_box( $post_format_video ); + ot_register_meta_box( $post_options ); +} \ No newline at end of file diff --git a/functions/plugins/light.zip b/functions/plugins/light.zip new file mode 100644 index 00000000..0613a736 Binary files /dev/null and b/functions/plugins/light.zip differ diff --git a/functions/shortcodes.php b/functions/shortcodes.php new file mode 100644 index 00000000..2cf475f7 --- /dev/null +++ b/functions/shortcodes.php @@ -0,0 +1,60 @@ + 'one-third', + 'last' => false + ), $atts) ); + + $lastclass=$last?' last':''; + $output='
'.do_shortcode($content).'
'; + if($last) + $output.='
'; + return $output; + } + add_shortcode('column','alx_column_shortcode'); + +/* Hr +/* ------------------------------------ */ + function alx_hr_shortcode($atts,$content=NULL) { + $output = '
'; + return $output; + } + add_shortcode('hr','alx_hr_shortcode'); + +/* Highlight +/* ------------------------------------ */ + function alx_highlight_shortcode($atts,$content=NULL) { + $output = ''.strip_tags($content).''; + return $output; + } + add_shortcode('highlight','alx_highlight_shortcode'); + +/* Dropcap +/* ------------------------------------ */ + function alx_dropcap_shortcode($atts,$content=NULL) { + $output = ''.strip_tags($content).''; + return $output; + } + add_shortcode('dropcap','alx_dropcap_shortcode'); + +/* Pullquote Left +/* ------------------------------------ */ + function alx_pullquote_left_shortcode($atts,$content=NULL) { + $output = ''.strip_tags($content).''; + return $output; + } + add_shortcode('pullquote-left','alx_pullquote_left_shortcode'); + +/* Pullquote Right +/* ------------------------------------ */ + function alx_pullquote_right_shortcode($atts,$content=NULL) { + $output = ''.strip_tags($content).''; + return $output; + } + add_shortcode('pullquote-right','alx_pullquote_right_shortcode'); \ No newline at end of file diff --git a/functions/theme-options.php b/functions/theme-options.php new file mode 100644 index 00000000..773f17fa --- /dev/null +++ b/functions/theme-options.php @@ -0,0 +1,1178 @@ + array( + 'content' => array( + array( + 'id' => 'general_help', + 'title' => 'Documentation', + 'content' => ' +

Hueman

+

Thanks for using this theme! First, a friendly warning: Please remember that the "Reset Options" button resets ALL options. That means, if you reset your styling options, all your custom sidebars and other settings will be reset as well.

+

Frequently Asked Questions

+

Q: Why are social sharing buttons missing Google Plus? — A: You need to enable urlCurl on your server for G+ to work. Ask your webhost to do so. If you are unable to, you can disable the buttons and use any other plugin instead.

+

Q: My old thumbnails have different sizes, why? — A: Thumbnails uploaded before changing theme will not be automatically re-cropped. To fix this, you need to run the Regenerate Thumbnails plugin once.

+

Q: I did not use featured images before and have many posts, what do I do? — A: Use the Easy Add Thumbnail plugin to automatically make the first image uploaded to each post a featured image.

+

Q: Why is my featured image not appearing on the single post page? — A: You need to use the "Image" format option for it to show up, as not everyone wants to show the featured image at the top for the "Standard" post format.

+

Q: My gallery format post shows images twice, why? — A: This is because you insert a standard gallery into the post itself. This is not needed, as the gallery format post will auto-display attached images in the slider above.

+

Q: My slider gallery includes images I only want to show in the content below — A: The gallery format will always show all attached images. For it to not show up, go to Media > Add New and upload it there. Then go back to the post and add it.

+

Q: How do I make the homepage slider auto-progress? — A: In /inc/featured.php change slideshow: false to true.

+

Dynamic Styles

+

The dynamic styles will be added directly to the head of your theme. This is according to WordPress best practices, but if you do not want it printed out there, simply inspect the code of your page with the styling options set. Copy the CSS from head into your child theme\'s style.css file or this theme\'s custom.css (which you need to enable), and disable dynamic styling.

+

Theme Customization

+

When modifiying the theme you should always use a child theme, otherwise your customized files will be removed/overwritten when you update the theme. Download the sample child theme below and upload it via admin. Then activate your child theme and start customizing it!

+
    +
  • Read more how to use a child theme here.
  • +
  • Download the Hueman sample child theme here.
  • +
+

If you are not using a child theme, you must do this before each theme update:

+
    +
  1. Backup your custom.css file if you have used it, it will be overwritten and needs to be re-added after the update.
  2. +
  3. Backup your additional language files if you have created/modified any, they will be removed and need to be re-added after the update.
  4. +
  5. Backup any other custom code.
  6. +
+ ' + ) + ) + ), + +/* Admin panel sections +/* ------------------------------------ */ + 'sections' => array( + array( + 'id' => 'general', + 'title' => 'General' + ), + array( + 'id' => 'blog', + 'title' => 'Blog' + ), + array( + 'id' => 'header', + 'title' => 'Header' + ), + array( + 'id' => 'footer', + 'title' => 'Footer' + ), + array( + 'id' => 'layout', + 'title' => 'Layout' + ), + array( + 'id' => 'sidebars', + 'title' => 'Sidebars' + ), + array( + 'id' => 'social-links', + 'title' => 'Social Links' + ), + array( + 'id' => 'styling', + 'title' => 'Styling' + ), + ), + +/* Theme options +/* ------------------------------------ */ + 'settings' => array( + + // General: Custom CSS + array( + 'id' => 'custom', + 'label' => 'Custom Stylesheet', + 'desc' => 'Load your custom styles [ custom.css ]
Note: You must backup this file before a theme update. Consider using a child theme instead. A sample child theme is available in the help dropdown.', + 'type' => 'checkbox', + 'section' => 'general', + 'choices' => array( + array( + 'value' => '1', + 'label' => 'Enable' + ) + ) + ), + // General: Responsive Layout + array( + 'id' => 'responsive', + 'label' => 'Responsive Layout', + 'desc' => 'Disable mobile and tablet optimizations [ responsive.css ]', + 'type' => 'checkbox', + 'section' => 'general', + 'choices' => array( + array( + 'value' => '1', + 'label' => 'Disable' + ) + ) + ), + // General: Mobile Sidebar + array( + 'id' => 'mobile-sidebar-hide', + 'label' => 'Mobile Sidebar Content', + 'desc' => 'Hide sidebar content on low-resolution mobile devices (320px)', + 'type' => 'radio', + 'std' => '1', + 'section' => 'general', + 'choices' => array( + array( + 'value' => '1', + 'label' => 'Show sidebars' + ), + array( + 'value' => 's1', + 'label' => 'Hide primary sidebar' + ), + array( + 'value' => 's2', + 'label' => 'Hide secondary sidebar' + ), + array( + 'value' => 's1-s2', + 'label' => 'Hide both sidebars' + ) + ) + ), + // General: Favicon + array( + 'id' => 'favicon', + 'label' => 'Favicon', + 'desc' => 'Upload a 16x16px Png/Gif image that will be your favicon', + 'type' => 'upload', + 'section' => 'general' + ), + // General: RSS Feed + array( + 'id' => 'rss-feed', + 'label' => 'FeedBurner URL', + 'desc' => 'Enter your full FeedBurner URL (or any other preferred feed URL) if you wish to use FeedBurner over the standard WordPress feed e.g. http://feeds.feedburner.com/yoururlhere ', + 'type' => 'text', + 'section' => 'general' + ), + // General: Tracking Code + array( + 'id' => 'tracking-code', + 'label' => 'Tracking Code', + 'desc' => 'Paste your Google Analytics (or other) tracking code here. It will be inserted before the closing body tag of your theme.', + 'type' => 'textarea-simple', + 'section' => 'general', + 'rows' => '3' + ), + // General: Comments + array( + 'id' => 'page-comments', + 'label' => 'Comments', + 'desc' => '', + 'type' => 'checkbox', + 'section' => 'general', + 'choices' => array( + array( + 'value' => '1', + 'label' => 'Enable comments on pages', + 'std' => '1' + ) + ) + ), + // Blog: Heading + array( + 'id' => 'blog-heading', + 'label' => 'Heading', + 'desc' => 'Your blog heading', + 'type' => 'text', + 'section' => 'blog' + ), + // Blog: Subheading + array( + 'id' => 'blog-subheading', + 'label' => 'Subheading', + 'desc' => 'Your blog subheading', + 'type' => 'text', + 'section' => 'blog' + ), + // Blog: Excerpt Length + array( + 'id' => 'excerpt-length', + 'label' => 'Excerpt Length', + 'desc' => 'Max number of words', + 'std' => '34', + 'type' => 'numeric-slider', + 'section' => 'blog', + 'min_max_step' => '0,100,1' + ), + // Blog: Featured Posts + array( + 'id' => 'featured-posts-include', + 'label' => 'Featured Posts', + 'desc' => 'To show featured posts in the slider AND the content below
Usually not recommended', + 'type' => 'checkbox', + 'section' => 'blog', + 'choices' => array( + array( + 'value' => '1', + 'label' => 'Include featured posts in content area' + ) + ) + ), + // Blog: Featured Category + array( + 'id' => 'featured-category', + 'label' => 'Featured Category', + 'desc' => 'By not selecting a category, it will show your latest post(s) from all categories', + 'type' => 'category-select', + 'section' => 'blog' + ), + // Blog: Featured Category Count + array( + 'id' => 'featured-posts-count', + 'label' => 'Featured Post Count', + 'desc' => 'Max number of featured posts to display.
Set to 1 and it will show it without any slider script
Set it to 0 to disable', + 'std' => '1', + 'type' => 'numeric-slider', + 'section' => 'blog', + 'min_max_step' => '0,10,1' + ), + // Blog: Comment Count + array( + 'id' => 'comment-count', + 'label' => 'Thumbnail Comment Count', + 'desc' => 'Comment count on thumbnails', + 'type' => 'checkbox', + 'section' => 'blog', + 'choices' => array( + array( + 'value' => '1', + 'label' => 'Disable' + ) + ) + ), + // Blog: Single - Sharrre + array( + 'id' => 'sharrre', + 'label' => 'Single — Share Buttons', + 'desc' => 'Social sharing buttons for each article', + 'type' => 'checkbox', + 'section' => 'blog', + 'choices' => array( + array( + 'value' => '1', + 'label' => 'Disable' + ) + ) + ), + // Blog: Twitter Username + array( + 'id' => 'twitter-username', + 'label' => 'Twitter Username', + 'desc' => 'Your @username will be added to share-tweets of your posts (optional)', + 'type' => 'text', + 'section' => 'blog' + ), + // Blog: Single - Authorbox + array( + 'id' => 'author-bio', + 'label' => 'Single — Author Bio', + 'desc' => 'Shows post author description, if it exists', + 'type' => 'checkbox', + 'section' => 'blog', + 'choices' => array( + array( + 'value' => '1', + 'label' => 'Disable' + ) + ) + ), + // Blog: Single - Related Posts + array( + 'id' => 'related-posts', + 'label' => 'Single — Related Posts', + 'desc' => 'Shows randomized related articles below the post', + 'std' => 'categories', + 'type' => 'radio', + 'section' => 'blog', + 'choices' => array( + array( + 'value' => '1', + 'label' => 'Disable' + ), + array( + 'value' => 'categories', + 'label' => 'Related by categories' + ), + array( + 'value' => 'tags', + 'label' => 'Related by tags' + ) + ) + ), + // Blog: Single - Post Navigation Location + array( + 'id' => 'post-nav', + 'label' => 'Single — Post Navigation', + 'desc' => 'Shows links to the next and previous article', + 'std' => 's1', + 'type' => 'radio', + 'section' => 'blog', + 'choices' => array( + array( + 'value' => '1', + 'label' => 'Disable' + ), + array( + 'value' => 's1', + 'label' => 'Sidebar Primary' + ), + array( + 'value' => 's2', + 'label' => 'Sidebar Secondary' + ), + array( + 'value' => 'content', + 'label' => 'Below content' + ) + ) + ), + // Header: Custom Logo + array( + 'id' => 'custom-logo', + 'label' => 'Custom Logo', + 'desc' => 'Upload your custom logo image. Set logo max-height in styling options.', + 'type' => 'upload', + 'section' => 'header' + ), + // Header: Site Description + array( + 'id' => 'site-description', + 'label' => 'Site Description', + 'desc' => 'The description that appears next to your logo', + 'type' => 'checkbox', + 'section' => 'header', + 'choices' => array( + array( + 'value' => '1', + 'label' => 'Disable' + ) + ) + ), + // Header: Header Image + array( + 'id' => 'header-image', + 'label' => 'Header Image', + 'desc' => 'Upload a header image. This will disable header title/logo and description.', + 'type' => 'upload', + 'section' => 'header' + ), + // Footer: Widget Columns + array( + 'id' => 'footer-widgets', + 'label' => 'Footer Widget Columns', + 'desc' => 'Select columns to enable footer widgets
Recommended number: 3', + 'std' => '0', + 'type' => 'radio-image', + 'section' => 'footer', + 'class' => '', + 'choices' => array( + array( + 'value' => '0', + 'label' => 'Disable', + 'src' => get_template_directory_uri() . '/functions/images/layout-off.png' + ), + array( + 'value' => '1', + 'label' => '1 Column', + 'src' => get_template_directory_uri() . '/functions/images/footer-widgets-1.png' + ), + array( + 'value' => '2', + 'label' => '2 Columns', + 'src' => get_template_directory_uri() . '/functions/images/footer-widgets-2.png' + ), + array( + 'value' => '3', + 'label' => '3 Columns', + 'src' => get_template_directory_uri() . '/functions/images/footer-widgets-3.png' + ), + array( + 'value' => '4', + 'label' => '4 Columns', + 'src' => get_template_directory_uri() . '/functions/images/footer-widgets-4.png' + ) + ) + ), + // Footer: Custom Logo + array( + 'id' => 'footer-logo', + 'label' => 'Footer Logo', + 'desc' => 'Upload your custom logo image', + 'type' => 'upload', + 'section' => 'footer' + ), + // Footer: Copyright + array( + 'id' => 'copyright', + 'label' => 'Footer Copyright', + 'desc' => 'Replace the footer copyright text', + 'type' => 'text', + 'section' => 'footer' + ), + // Footer: Credit + array( + 'id' => 'credit', + 'label' => 'Footer Credit', + 'desc' => 'Disable footer credit text', + 'std' => '', + 'type' => 'checkbox', + 'section' => 'footer', + 'choices' => array( + array( + 'value' => '1', + 'label' => 'Disable' + ) + ) + ), + // Layout : Global + array( + 'id' => 'layout-global', + 'label' => 'Global Layout', + 'desc' => 'Other layouts will override this option if they are set', + 'std' => 'col-3cm', + 'type' => 'radio-image', + 'section' => 'layout', + 'choices' => array( + array( + 'value' => 'col-1c', + 'label' => '1 Column', + 'src' => get_template_directory_uri() . '/functions/images/col-1c.png' + ), + array( + 'value' => 'col-2cl', + 'label' => '2 Column Left', + 'src' => get_template_directory_uri() . '/functions/images/col-2cl.png' + ), + array( + 'value' => 'col-2cr', + 'label' => '2 Column Right', + 'src' => get_template_directory_uri() . '/functions/images/col-2cr.png' + ), + array( + 'value' => 'col-3cm', + 'label' => '3 Column Middle', + 'src' => get_template_directory_uri() . '/functions/images/col-3cm.png' + ), + array( + 'value' => 'col-3cl', + 'label' => '3 Column Left', + 'src' => get_template_directory_uri() . '/functions/images/col-3cl.png' + ), + array( + 'value' => 'col-3cr', + 'label' => '3 Column Right', + 'src' => get_template_directory_uri() . '/functions/images/col-3cr.png' + ) + ) + ), + // Layout : Home + array( + 'id' => 'layout-home', + 'label' => 'Home', + 'desc' => '[ is_home ] Posts homepage layout', + 'std' => 'inherit', + 'type' => 'radio-image', + 'section' => 'layout', + 'choices' => array( + array( + 'value' => 'inherit', + 'label' => 'Inherit Global Layout', + 'src' => get_template_directory_uri() . '/functions/images/layout-off.png' + ), + array( + 'value' => 'col-1c', + 'label' => '1 Column', + 'src' => get_template_directory_uri() . '/functions/images/col-1c.png' + ), + array( + 'value' => 'col-2cl', + 'label' => '2 Column Left', + 'src' => get_template_directory_uri() . '/functions/images/col-2cl.png' + ), + array( + 'value' => 'col-2cr', + 'label' => '2 Column Right', + 'src' => get_template_directory_uri() . '/functions/images/col-2cr.png' + ), + array( + 'value' => 'col-3cm', + 'label' => '3 Column Middle', + 'src' => get_template_directory_uri() . '/functions/images/col-3cm.png' + ), + array( + 'value' => 'col-3cl', + 'label' => '3 Column Left', + 'src' => get_template_directory_uri() . '/functions/images/col-3cl.png' + ), + array( + 'value' => 'col-3cr', + 'label' => '3 Column Right', + 'src' => get_template_directory_uri() . '/functions/images/col-3cr.png' + ) + ) + ), + // Layout : Single + array( + 'id' => 'layout-single', + 'label' => 'Single', + 'desc' => '[ is_single ] Single post layout - If a post has a set layout, it will override this.', + 'std' => 'inherit', + 'type' => 'radio-image', + 'section' => 'layout', + 'choices' => array( + array( + 'value' => 'inherit', + 'label' => 'Inherit Global Layout', + 'src' => get_template_directory_uri() . '/functions/images/layout-off.png' + ), + array( + 'value' => 'col-1c', + 'label' => '1 Column', + 'src' => get_template_directory_uri() . '/functions/images/col-1c.png' + ), + array( + 'value' => 'col-2cl', + 'label' => '2 Column Left', + 'src' => get_template_directory_uri() . '/functions/images/col-2cl.png' + ), + array( + 'value' => 'col-2cr', + 'label' => '2 Column Right', + 'src' => get_template_directory_uri() . '/functions/images/col-2cr.png' + ), + array( + 'value' => 'col-3cm', + 'label' => '3 Column Middle', + 'src' => get_template_directory_uri() . '/functions/images/col-3cm.png' + ), + array( + 'value' => 'col-3cl', + 'label' => '3 Column Left', + 'src' => get_template_directory_uri() . '/functions/images/col-3cl.png' + ), + array( + 'value' => 'col-3cr', + 'label' => '3 Column Right', + 'src' => get_template_directory_uri() . '/functions/images/col-3cr.png' + ) + ) + ), + // Layout : Archive + array( + 'id' => 'layout-archive', + 'label' => 'Archive', + 'desc' => '[ is_archive ] Category, date, tag and author archive layout', + 'std' => 'inherit', + 'type' => 'radio-image', + 'section' => 'layout', + 'choices' => array( + array( + 'value' => 'inherit', + 'label' => 'Inherit Global Layout', + 'src' => get_template_directory_uri() . '/functions/images/layout-off.png' + ), + array( + 'value' => 'col-1c', + 'label' => '1 Column', + 'src' => get_template_directory_uri() . '/functions/images/col-1c.png' + ), + array( + 'value' => 'col-2cl', + 'label' => '2 Column Left', + 'src' => get_template_directory_uri() . '/functions/images/col-2cl.png' + ), + array( + 'value' => 'col-2cr', + 'label' => '2 Column Right', + 'src' => get_template_directory_uri() . '/functions/images/col-2cr.png' + ), + array( + 'value' => 'col-3cm', + 'label' => '3 Column Middle', + 'src' => get_template_directory_uri() . '/functions/images/col-3cm.png' + ), + array( + 'value' => 'col-3cl', + 'label' => '3 Column Left', + 'src' => get_template_directory_uri() . '/functions/images/col-3cl.png' + ), + array( + 'value' => 'col-3cr', + 'label' => '3 Column Right', + 'src' => get_template_directory_uri() . '/functions/images/col-3cr.png' + ) + ) + ), + // Layout : Archive - Category + array( + 'id' => 'layout-archive-category', + 'label' => 'Archive — Category', + 'desc' => '[ is_category ] Category archive layout', + 'std' => 'inherit', + 'type' => 'radio-image', + 'section' => 'layout', + 'choices' => array( + array( + 'value' => 'inherit', + 'label' => 'Inherit Global Layout', + 'src' => get_template_directory_uri() . '/functions/images/layout-off.png' + ), + array( + 'value' => 'col-1c', + 'label' => '1 Column', + 'src' => get_template_directory_uri() . '/functions/images/col-1c.png' + ), + array( + 'value' => 'col-2cl', + 'label' => '2 Column Left', + 'src' => get_template_directory_uri() . '/functions/images/col-2cl.png' + ), + array( + 'value' => 'col-2cr', + 'label' => '2 Column Right', + 'src' => get_template_directory_uri() . '/functions/images/col-2cr.png' + ), + array( + 'value' => 'col-3cm', + 'label' => '3 Column Middle', + 'src' => get_template_directory_uri() . '/functions/images/col-3cm.png' + ), + array( + 'value' => 'col-3cl', + 'label' => '3 Column Left', + 'src' => get_template_directory_uri() . '/functions/images/col-3cl.png' + ), + array( + 'value' => 'col-3cr', + 'label' => '3 Column Right', + 'src' => get_template_directory_uri() . '/functions/images/col-3cr.png' + ) + ) + ), + // Layout : Search + array( + 'id' => 'layout-search', + 'label' => 'Search', + 'desc' => '[ is_search ] Search page layout', + 'std' => 'inherit', + 'type' => 'radio-image', + 'section' => 'layout', + 'choices' => array( + array( + 'value' => 'inherit', + 'label' => 'Inherit Global Layout', + 'src' => get_template_directory_uri() . '/functions/images/layout-off.png' + ), + array( + 'value' => 'col-1c', + 'label' => '1 Column', + 'src' => get_template_directory_uri() . '/functions/images/col-1c.png' + ), + array( + 'value' => 'col-2cl', + 'label' => '2 Column Left', + 'src' => get_template_directory_uri() . '/functions/images/col-2cl.png' + ), + array( + 'value' => 'col-2cr', + 'label' => '2 Column Right', + 'src' => get_template_directory_uri() . '/functions/images/col-2cr.png' + ), + array( + 'value' => 'col-3cm', + 'label' => '3 Column Middle', + 'src' => get_template_directory_uri() . '/functions/images/col-3cm.png' + ), + array( + 'value' => 'col-3cl', + 'label' => '3 Column Left', + 'src' => get_template_directory_uri() . '/functions/images/col-3cl.png' + ), + array( + 'value' => 'col-3cr', + 'label' => '3 Column Right', + 'src' => get_template_directory_uri() . '/functions/images/col-3cr.png' + ) + ) + ), + // Layout : Error 404 + array( + 'id' => 'layout-404', + 'label' => 'Error 404', + 'desc' => '[ is_404 ] Error 404 page layout', + 'std' => 'inherit', + 'type' => 'radio-image', + 'section' => 'layout', + 'choices' => array( + array( + 'value' => 'inherit', + 'label' => 'Inherit Global Layout', + 'src' => get_template_directory_uri() . '/functions/images/layout-off.png' + ), + array( + 'value' => 'col-1c', + 'label' => '1 Column', + 'src' => get_template_directory_uri() . '/functions/images/col-1c.png' + ), + array( + 'value' => 'col-2cl', + 'label' => '2 Column Left', + 'src' => get_template_directory_uri() . '/functions/images/col-2cl.png' + ), + array( + 'value' => 'col-2cr', + 'label' => '2 Column Right', + 'src' => get_template_directory_uri() . '/functions/images/col-2cr.png' + ), + array( + 'value' => 'col-3cm', + 'label' => '3 Column Middle', + 'src' => get_template_directory_uri() . '/functions/images/col-3cm.png' + ), + array( + 'value' => 'col-3cl', + 'label' => '3 Column Left', + 'src' => get_template_directory_uri() . '/functions/images/col-3cl.png' + ), + array( + 'value' => 'col-3cr', + 'label' => '3 Column Right', + 'src' => get_template_directory_uri() . '/functions/images/col-3cr.png' + ) + ) + ), + // Layout : Default Page + array( + 'id' => 'layout-page', + 'label' => 'Default Page', + 'desc' => '[ is_page ] Default page layout - If a page has a set layout, it will override this.', + 'std' => 'inherit', + 'type' => 'radio-image', + 'section' => 'layout', + 'choices' => array( + array( + 'value' => 'inherit', + 'label' => 'Inherit Global Layout', + 'src' => get_template_directory_uri() . '/functions/images/layout-off.png' + ), + array( + 'value' => 'col-1c', + 'label' => '1 Column', + 'src' => get_template_directory_uri() . '/functions/images/col-1c.png' + ), + array( + 'value' => 'col-2cl', + 'label' => '2 Column Left', + 'src' => get_template_directory_uri() . '/functions/images/col-2cl.png' + ), + array( + 'value' => 'col-2cr', + 'label' => '2 Column Right', + 'src' => get_template_directory_uri() . '/functions/images/col-2cr.png' + ), + array( + 'value' => 'col-3cm', + 'label' => '3 Column Middle', + 'src' => get_template_directory_uri() . '/functions/images/col-3cm.png' + ), + array( + 'value' => 'col-3cl', + 'label' => '3 Column Left', + 'src' => get_template_directory_uri() . '/functions/images/col-3cl.png' + ), + array( + 'value' => 'col-3cr', + 'label' => '3 Column Right', + 'src' => get_template_directory_uri() . '/functions/images/col-3cr.png' + ) + ) + ), + // Sidebars: Create Areas + array( + 'id' => 'sidebar-areas', + 'label' => 'Create Sidebars', + 'desc' => 'You must save changes for the new areas to appear below.
Warning: Make sure each area has a unique ID.', + 'type' => 'list-item', + 'section' => 'sidebars', + 'choices' => array(), + 'settings' => array( + array( + 'id' => 'id', + 'label' => 'Sidebar ID', + 'desc' => 'This ID must be unique, for example "sidebar-about"', + 'std' => 'sidebar-', + 'type' => 'text', + 'choices' => array() + ) + ) + ), + // Sidebar 1 & 2 + array( + 'id' => 's1-home', + 'label' => 'Home', + 'desc' => '[ is_home ] Primary', + 'type' => 'sidebar-select', + 'section' => 'sidebars' + ), + array( + 'id' => 's2-home', + 'label' => 'Home', + 'desc' => '[ is_home ] Secondary', + 'type' => 'sidebar-select', + 'section' => 'sidebars' + ), + array( + 'id' => 's1-single', + 'label' => 'Single', + 'desc' => '[ is_single ] Primary - If a single post has a unique sidebar, it will override this.', + 'type' => 'sidebar-select', + 'section' => 'sidebars' + ), + array( + 'id' => 's2-single', + 'label' => 'Single', + 'desc' => '[ is_single ] Secondary - If a single post has a unique sidebar, it will override this.', + 'type' => 'sidebar-select', + 'section' => 'sidebars' + ), + array( + 'id' => 's1-archive', + 'label' => 'Archive', + 'desc' => '[ is_archive ] Primary', + 'type' => 'sidebar-select', + 'section' => 'sidebars' + ), + array( + 'id' => 's2-archive', + 'label' => 'Archive', + 'desc' => '[ is_archive ] Secondary', + 'type' => 'sidebar-select', + 'section' => 'sidebars' + ), + array( + 'id' => 's1-archive-category', + 'label' => 'Archive — Category', + 'desc' => '[ is_category ] Primary', + 'type' => 'sidebar-select', + 'section' => 'sidebars' + ), + array( + 'id' => 's2-archive-category', + 'label' => 'Archive — Category', + 'desc' => '[ is_category ] Secondary', + 'type' => 'sidebar-select', + 'section' => 'sidebars' + ), + array( + 'id' => 's1-search', + 'label' => 'Search', + 'desc' => '[ is_search ] Primary', + 'type' => 'sidebar-select', + 'section' => 'sidebars' + ), + array( + 'id' => 's2-search', + 'label' => 'Search', + 'desc' => '[ is_search ] Secondary', + 'type' => 'sidebar-select', + 'section' => 'sidebars' + ), + array( + 'id' => 's1-404', + 'label' => 'Error 404', + 'desc' => '[ is_404 ] Primary', + 'type' => 'sidebar-select', + 'section' => 'sidebars' + ), + array( + 'id' => 's2-404', + 'label' => 'Error 404', + 'desc' => '[ is_404 ] Secondary', + 'type' => 'sidebar-select', + 'section' => 'sidebars' + ), + array( + 'id' => 's1-page', + 'label' => 'Default Page', + 'desc' => '[ is_page ] Primary - If a page has a unique sidebar, it will override this.', + 'type' => 'sidebar-select', + 'section' => 'sidebars' + ), + array( + 'id' => 's2-page', + 'label' => 'Default Page', + 'desc' => '[ is_page ] Secondary - If a page has a unique sidebar, it will override this.', + 'type' => 'sidebar-select', + 'section' => 'sidebars' + ), + // Social Links : List + array( + 'id' => 'social-links', + 'label' => 'Social Links', + 'desc' => 'Create and organize your social links', + 'type' => 'list-item', + 'section' => 'social-links', + 'choices' => array(), + 'settings' => array( + array( + 'id' => 'social-icon', + 'label' => 'Icon Name', + 'desc' => 'Font Awesome icon names [View all] ', + 'std' => 'fa-', + 'type' => 'text', + 'choices' => array() + ), + array( + 'id' => 'social-link', + 'label' => 'Link', + 'desc' => 'Enter the full url for your icon button', + 'std' => 'http://', + 'type' => 'text', + 'choices' => array() + ), + array( + 'id' => 'social-color', + 'label' => 'Icon Color', + 'desc' => 'Set a unique color for your icon (optional)', + 'std' => '', + 'type' => 'colorpicker', + 'section' => 'styling' + ), + array( + 'id' => 'social-target', + 'label' => 'Link Options', + 'desc' => '', + 'std' => '', + 'type' => 'checkbox', + 'choices' => array( + array( + 'value' => '_blank', + 'label' => 'Open in new window' + ) + ) + ) + ) + ), + // Styling: Enable + array( + 'id' => 'dynamic-styles', + 'label' => 'Dynamic Styles', + 'desc' => 'Turn styling options on / off', + 'type' => 'checkbox', + 'section' => 'styling', + 'choices' => array( + array( + 'value' => '1', + 'label' => 'Enable to use the options below' + ) + ) + ), + // General: Boxed Layout + array( + 'id' => 'boxed', + 'label' => 'Boxed Layout', + 'desc' => 'Use a boxed layout', + 'type' => 'checkbox', + 'section' => 'styling', + 'choices' => array( + array( + 'value' => '1', + 'label' => 'Enable' + ) + ) + ), + // Styling: Font + array( + 'id' => 'font', + 'label' => 'Font', + 'desc' => 'Select font for the theme', + 'type' => 'select', + 'std' => '30', + 'section' => 'styling', + 'choices' => array( + array( + 'value' => 'titillium-web', + 'label' => 'Titillium Web, Latin (Self-hosted)' + ), + array( + 'value' => 'titillium-web-ext', + 'label' => 'Titillium Web, Latin-Ext (Google Fonts)' + ), + array( + 'value' => 'droid-serif', + 'label' => 'Droid Serif, Latin (Google Fonts)' + ), + array( + 'value' => 'source-sans-pro', + 'label' => 'Source Sans Pro, Latin-Ext (Google Fonts)' + ), + array( + 'value' => 'lato', + 'label' => 'Lato, Latin (Google Fonts)' + ), + array( + 'value' => 'ubuntu', + 'label' => 'Ubuntu, Latin-Ext (Google Fonts)' + ), + array( + 'value' => 'roboto-condensed', + 'label' => 'Roboto Condensed, Latin-Ext (Google Fonts)' + ), + array( + 'value' => 'roboto-condensed-cyr', + 'label' => 'Roboto Condensed, Latin / Cyrillic-Ext (Google Fonts)' + ), + array( + 'value' => 'open-sans', + 'label' => 'Open Sans, Latin-Ext (Google Fonts)' + ), + array( + 'value' => 'open-sans-cyr', + 'label' => 'Open Sans, Latin / Cyrillic-Ext (Google Fonts)' + ), + array( + 'value' => 'arial', + 'label' => 'Arial' + ), + array( + 'value' => 'georgia', + 'label' => 'Georgia' + ) + ) + ), + // Styling: Container Width + array( + 'id' => 'container-width', + 'label' => 'Website Max-width', + 'desc' => 'Max-width of the container. If you use 2 sidebars, your container should be at least 1200px.
Note: For 720px content (default) use 1380px for 2 sidebars and 1120px for 1 sidebar. If you use a combination of both, try something inbetween.', + 'std' => '1380', + 'type' => 'numeric-slider', + 'section' => 'styling', + 'min_max_step' => '1024,1600,1' + ), + // Styling: Sidebar Padding + array( + 'id' => 'sidebar-padding', + 'label' => 'Sidebar Width', + 'desc' => 'Change sidebar content padding and width.', + 'type' => 'radio', + 'std' => '30', + 'section' => 'styling', + 'choices' => array( + array( + 'value' => '30', + 'label' => '280px primary, 200px secondary (30px padding)' + ), + array( + 'value' => '20', + 'label' => '300px primary, 220px secondary (20px padding)' + ) + ) + ), + // Styling: Primary Color + array( + 'id' => 'color-1', + 'label' => 'Primary Color', + 'desc' => 'Default: #3b8dbd', + 'std' => '#3b8dbd', + 'type' => 'colorpicker', + 'section' => 'styling', + 'class' => '' + ), + // Styling: Secondary Color + array( + 'id' => 'color-2', + 'label' => 'Secondary Color', + 'desc' => 'Default: #82b965', + 'std' => '#82b965', + 'type' => 'colorpicker', + 'section' => 'styling', + 'class' => '' + ), + // Styling: Topbar Background + array( + 'id' => 'color-topbar', + 'label' => 'Topbar Background', + 'desc' => 'Default: #26272b', + 'std' => '#26272b', + 'type' => 'colorpicker', + 'section' => 'styling', + 'class' => '' + ), + // Styling: Header Background + array( + 'id' => 'color-header', + 'label' => 'Header Background', + 'desc' => 'Default: #33363b', + 'std' => '#33363b', + 'type' => 'colorpicker', + 'section' => 'styling', + 'class' => '' + ), + // Styling: Footer Background + array( + 'id' => 'color-footer', + 'label' => 'Footer Background', + 'desc' => 'Default: #33363b', + 'std' => '#33363b', + 'type' => 'colorpicker', + 'section' => 'styling', + 'class' => '' + ), + // Styling: Header Logo Max-height + array( + 'id' => 'logo-max-height', + 'label' => 'Header Logo Image Max-height', + 'desc' => 'Your logo image should have the double height of this to be high resolution', + 'std' => '60', + 'type' => 'numeric-slider', + 'section' => 'styling', + 'min_max_step' => '40,200,1' + ), + // Styling: Image Border Radius + array( + 'id' => 'image-border-radius', + 'label' => 'Image Border Radius', + 'desc' => 'Give your thumbnails and layout images rounded corners', + 'std' => '0', + 'type' => 'numeric-slider', + 'section' => 'styling', + 'min_max_step' => '0,15,1' + ), + // Styling: Body Background + array( + 'id' => 'body-background', + 'label' => 'Body Background', + 'desc' => 'Set background color and/or upload your own background image', + 'type' => 'background', + 'section' => 'styling' + ) + ) +); + +/* Settings are not the same? Update the DB +/* ------------------------------------ */ + if ( $saved_settings !== $custom_settings ) { + update_option( 'option_tree_settings', $custom_settings ); + } +} diff --git a/functions/widgets/alx-posts.php b/functions/widgets/alx-posts.php new file mode 100644 index 00000000..0e6e341e --- /dev/null +++ b/functions/widgets/alx-posts.php @@ -0,0 +1,196 @@ + 'Display posts from a category', 'classname' => 'widget_alx_posts') );; + } + +/* Widget +/* ------------------------------------ */ + public function widget($args, $instance) { + extract( $args ); + $instance['title']?NULL:$instance['title']=''; + $title = apply_filters('widget_title',$instance['title']); + $output = $before_widget."\n"; + if($title) + $output .= $before_title.$title.$after_title; + ob_start(); + +?> + + array( 'post' ), + 'showposts' => $instance['posts_num'], + 'cat' => $instance['posts_cat_id'], + 'ignore_sticky_posts' => true, + 'orderby' => $instance['posts_orderby'], + 'order' => 'dsc', + 'date_query' => array( + array( + 'after' => $instance['posts_time'], + ), + ), + ) ); + ?> + + + + '', + // Posts + 'posts_thumb' => 1, + 'posts_category' => 1, + 'posts_date' => 1, + 'posts_num' => '4', + 'posts_cat_id' => '0', + 'posts_orderby' => 'date', + 'posts_time' => '0', + ); + $instance = wp_parse_args( (array) $instance, $defaults ); +?> + + + +
+

+ + " /> +

+ +

List Posts

+ +

+ > + +

+

+ + " name="get_field_name("posts_num"); ?>" type="text" value="" size='3' /> +

+

+ + $this->get_field_name("posts_cat_id"), 'selected' => $instance["posts_cat_id"], 'show_option_all' => 'All', 'show_count' => true ) ); ?> +

+

+ + +

+

+ + +

+ +
+

Post Info

+ +

+ > + +

+

+ > + +

+ +
+ +
+ 'List posts, comments, and/or tags with or without tabs.', 'classname' => 'widget_alx_tabs') );; + } + +/* Create tabs-nav +/* ------------------------------------ */ + private function _create_tabs($tabs,$count) { + // Borrowed from Jermaine Maree, thanks mate! + $titles = array( + 'recent' => __('Recent Posts','hueman'), + 'popular' => __('Popular Posts','hueman'), + 'comments' => __('Recent Comments','hueman'), + 'tags' => __('Tags','hueman') + ); + $icons = array( + 'recent' => 'fa fa-clock-o', + 'popular' => 'fa fa-star', + 'comments' => 'fa fa-comments-o', + 'tags' => 'fa fa-tags' + ); + $output = sprintf('
    ', $count); + foreach ( $tabs as $tab ) { + $output .= sprintf('
  • %4$s
  • ',$tab, $tab, $icons[$tab], $titles[$tab]); + } + $output .= '
'; + return $output; + } + +/* Widget +/* ------------------------------------ */ + public function widget($args, $instance) { + extract( $args ); + $instance['title']?NULL:$instance['title']=''; + $title = apply_filters('widget_title',$instance['title']); + $output = $before_widget."\n"; + if($title) + $output .= $before_title.$title.$after_title; + ob_start(); + +/* Set tabs-nav order & output it +/* ------------------------------------ */ + $tabs = array(); + $count = 0; + $order = array( + 'recent' => $instance['order_recent'], + 'popular' => $instance['order_popular'], + 'comments' => $instance['order_comments'], + 'tags' => $instance['order_tags'] + ); + asort($order); + foreach ( $order as $key => $value ) { + if ( $instance[$key.'_enable'] ) { + $tabs[] = $key; + $count++; + } + } + if ( $tabs && ($count > 1) ) { $output .= $this->_create_tabs($tabs,$count); } +?> + +
+ + + + + + query('showposts='.$instance["recent_num"].'&cat='.$instance["recent_cat_id"].'&ignore_sticky_posts=1');?> + + + + + + + + + array( 'post' ), + 'showposts' => $instance['popular_num'], + 'cat' => $instance['popular_cat_id'], + 'ignore_sticky_posts' => true, + 'orderby' => 'comment_count', + 'order' => 'dsc', + 'date_query' => array( + array( + 'after' => $instance['popular_time'], + ), + ), + ) ); + ?> + + + + + + + + $instance["comments_num"],'status'=>'approve','post_status'=>'publish')); ?> + +
    + +
  • + + + + + +
    + comment_ID)); $comment_excerpt=implode(' ',array_slice($str,0,11)); if(count($str) > 11 && substr($comment_excerpt,-1)!='.') $comment_excerpt.='...' ?> +
    comment_author; ?>
    +
    + +
    + +
  • + +
+ + + + + +
    +
  • + +
  • +
+ + +
+ + '', + 'tabs_category' => 1, + 'tabs_date' => 1, + // Recent posts + 'recent_enable' => 1, + 'recent_thumbs' => 1, + 'recent_cat_id' => '0', + 'recent_num' => '5', + // Popular posts + 'popular_enable' => 1, + 'popular_thumbs' => 1, + 'popular_cat_id' => '0', + 'popular_time' => '0', + 'popular_num' => '5', + // Recent comments + 'comments_enable' => 1, + 'comments_avatars' => 1, + 'comments_num' => '5', + // Tags + 'tags_enable' => 1, + // Order + 'order_recent' => '1', + 'order_popular' => '2', + 'order_comments' => '3', + 'order_tags' => '4', + ); + $instance = wp_parse_args( (array) $instance, $defaults ); +?> + + + +
+

+ + " /> +

+ +

Recent Posts

+ +

+ > + +

+

+ > + +

+

+ + " name="get_field_name("recent_num"); ?>" type="text" value="" size='3' /> +

+

+ + $this->get_field_name("recent_cat_id"), 'selected' => $instance["recent_cat_id"], 'show_option_all' => 'All', 'show_count' => true ) ); ?> +

+ +
+

Most Popular

+ +

+ > + +

+

+ > + +

+

+ + " name="get_field_name("popular_num"); ?>" type="text" value="" size='3' /> +

+

+ + $this->get_field_name("popular_cat_id"), 'selected' => $instance["popular_cat_id"], 'show_option_all' => 'All', 'show_count' => true ) ); ?> +

+

+ + +

+ +
+

Recent Comments

+ +

+ > + +

+

+ > + +

+

+ + " name="get_field_name("comments_num"); ?>" type="text" value="" size='3' /> +

+ +
+

Tags

+ +

+ > + +

+ +
+

Tab Order

+ +

+ + " name="get_field_name("order_recent"); ?>" value="" /> +

+

+ + " name="get_field_name("order_popular"); ?>" value="" /> +

+

+ + " name="get_field_name("order_comments"); ?>" value="" /> +

+

+ + " name="get_field_name("order_tags"); ?>" value="" /> +

+ +
+

Tab Info

+ +

+ > + +

+

+ > + +

+ +
+ +
+ 'Display a responsive video by adding a link or embed code.', 'classname' => 'widget_alx_video') );; + } + +/* Widget +/* ------------------------------------ */ + public function widget($args, $instance) { + extract( $args ); + $instance['title']?NULL:$instance['title']=''; + $title = apply_filters('widget_title',$instance['title']); + $output = $before_widget."\n"; + if($title) + $output .= $before_title.$title.$after_title; + ob_start(); + + + // The widget + if ( !empty($instance['video_url']) ) { + // echo '
'; - We have a filter adding this to embed shortcode + global $wp_embed; + $video = $wp_embed->run_shortcode('[embed]'.$instance['video_url'].'[/embed]'); + // echo '
'; + } + elseif ( !empty($instance['video_embed_code']) ) { + echo '
'; + $video = $instance['video_embed_code']; + echo '
'; + } else { + $video = ''; + } + echo $video; + + + $output .= ob_get_clean(); + $output .= $after_widget."\n"; + echo $output; + } + +/* Widget update +/* ------------------------------------ */ + public function update($new,$old) { + $instance = $old; + $instance['title'] = esc_attr($new['title']); + // Video + $instance['video_url'] = esc_url($new['video_url']); + $instance['video_embed_code'] = $new['video_embed_code']; + return $instance; + } + +/* Widget form +/* ------------------------------------ */ + public function form($instance) { + // Default widget settings + $defaults = array( + 'title' => '', + // Video + 'video_url' => '', + 'video_embed_code' => '', + ); + $instance = wp_parse_args( (array) $instance, $defaults ); +?> + + + +
+

+ + " /> +

+ +

Responsive Video

+ +

+ + " name="get_field_name("video_url"); ?>" type="text" value="" /> +

+

+ + +

+
+ +> + + + + + + <?php wp_title(''); ?> + + + + + + +> + +
+ + + +
+
+
+
\ No newline at end of file diff --git a/img/ie/opacity-70.png b/img/ie/opacity-70.png new file mode 100644 index 00000000..404a25ab Binary files /dev/null and b/img/ie/opacity-70.png differ diff --git a/img/ie/opacity-80-light.png b/img/ie/opacity-80-light.png new file mode 100644 index 00000000..8c8a00ad Binary files /dev/null and b/img/ie/opacity-80-light.png differ diff --git a/img/opacity-10.png b/img/opacity-10.png new file mode 100644 index 00000000..c9437b52 Binary files /dev/null and b/img/opacity-10.png differ diff --git a/img/pre.png b/img/pre.png new file mode 100644 index 00000000..d162c648 Binary files /dev/null and b/img/pre.png differ diff --git a/img/sidebar/s-left-dual-full-collapse-40.png b/img/sidebar/s-left-dual-full-collapse-40.png new file mode 100644 index 00000000..7c970118 Binary files /dev/null and b/img/sidebar/s-left-dual-full-collapse-40.png differ diff --git a/img/sidebar/s-left-dual-full-collapse.png b/img/sidebar/s-left-dual-full-collapse.png new file mode 100644 index 00000000..05c64471 Binary files /dev/null and b/img/sidebar/s-left-dual-full-collapse.png differ diff --git a/img/sidebar/s-left-dual-full-expand.png b/img/sidebar/s-left-dual-full-expand.png new file mode 100644 index 00000000..b1d29106 Binary files /dev/null and b/img/sidebar/s-left-dual-full-expand.png differ diff --git a/img/sidebar/s-left-dual-half-collapse.png b/img/sidebar/s-left-dual-half-collapse.png new file mode 100644 index 00000000..37b67c03 Binary files /dev/null and b/img/sidebar/s-left-dual-half-collapse.png differ diff --git a/img/sidebar/s-left-dual-s2.png b/img/sidebar/s-left-dual-s2.png new file mode 100644 index 00000000..82e6f3e0 Binary files /dev/null and b/img/sidebar/s-left-dual-s2.png differ diff --git a/img/sidebar/s-left.png b/img/sidebar/s-left.png new file mode 100644 index 00000000..990e4145 Binary files /dev/null and b/img/sidebar/s-left.png differ diff --git a/img/sidebar/s-right-collapse-40.png b/img/sidebar/s-right-collapse-40.png new file mode 100644 index 00000000..51e5f752 Binary files /dev/null and b/img/sidebar/s-right-collapse-40.png differ diff --git a/img/sidebar/s-right-collapse.png b/img/sidebar/s-right-collapse.png new file mode 100644 index 00000000..e5bb8e09 Binary files /dev/null and b/img/sidebar/s-right-collapse.png differ diff --git a/img/sidebar/s-right-dual-full-collapse-40.png b/img/sidebar/s-right-dual-full-collapse-40.png new file mode 100644 index 00000000..b4a53af5 Binary files /dev/null and b/img/sidebar/s-right-dual-full-collapse-40.png differ diff --git a/img/sidebar/s-right-dual-full-collapse.png b/img/sidebar/s-right-dual-full-collapse.png new file mode 100644 index 00000000..0d54fbd7 Binary files /dev/null and b/img/sidebar/s-right-dual-full-collapse.png differ diff --git a/img/sidebar/s-right-dual-full-expand.png b/img/sidebar/s-right-dual-full-expand.png new file mode 100644 index 00000000..48571f80 Binary files /dev/null and b/img/sidebar/s-right-dual-full-expand.png differ diff --git a/img/sidebar/s-right-dual-half-collapse.png b/img/sidebar/s-right-dual-half-collapse.png new file mode 100644 index 00000000..ab260683 Binary files /dev/null and b/img/sidebar/s-right-dual-half-collapse.png differ diff --git a/img/sidebar/s-right-dual-s2.png b/img/sidebar/s-right-dual-s2.png new file mode 100644 index 00000000..c98f2d03 Binary files /dev/null and b/img/sidebar/s-right-dual-s2.png differ diff --git a/img/sidebar/s-right-s1.png b/img/sidebar/s-right-s1.png new file mode 100644 index 00000000..990e4145 Binary files /dev/null and b/img/sidebar/s-right-s1.png differ diff --git a/img/sidebar/s-right-s2.png b/img/sidebar/s-right-s2.png new file mode 100644 index 00000000..bb48be0c Binary files /dev/null and b/img/sidebar/s-right-s2.png differ diff --git a/img/thumb-medium.png b/img/thumb-medium.png new file mode 100644 index 00000000..4ec0cbfc Binary files /dev/null and b/img/thumb-medium.png differ diff --git a/img/thumb-small.png b/img/thumb-small.png new file mode 100644 index 00000000..556dfdcf Binary files /dev/null and b/img/thumb-small.png differ diff --git a/inc/featured.php b/inc/featured.php new file mode 100644 index 00000000..1b7be859 --- /dev/null +++ b/inc/featured.php @@ -0,0 +1,62 @@ + false, + 'update_post_meta_cache' => false, + 'update_post_term_cache' => false, + 'ignore_sticky_posts' => 1, + 'posts_per_page' => ot_get_option('featured-posts-count'), + 'cat' => ot_get_option('featured-category') + ) +); +?> + + + + + + + + + + + + diff --git a/inc/page-image.php b/inc/page-image.php new file mode 100644 index 00000000..af48a90c --- /dev/null +++ b/inc/page-image.php @@ -0,0 +1,15 @@ + +
+
+ + post_excerpt; + $description = get_post(get_post_thumbnail_id())->post_content; + echo '
'; + if ( isset($caption) && $caption ) echo '
'.$caption.'
'; + if ( isset($description) && $description ) echo '
'.$description.'
'; + echo '
'; + ?> +
+
+ \ No newline at end of file diff --git a/inc/page-title.php b/inc/page-title.php new file mode 100644 index 00000000..31a48abd --- /dev/null +++ b/inc/page-title.php @@ -0,0 +1,48 @@ +
+ + +

+ + +
    +
  • / '); ?>
  • +
  • +
+ + +

+ + +

+ + + have_posts()) : while($search->have_posts()) : $search->the_post(); $search_count++; endwhile; endif; echo $search_count;?>

+ + +

+ + + +

display_name;?>

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + + +
\ No newline at end of file diff --git a/inc/pagination.php b/inc/pagination.php new file mode 100644 index 00000000..b4c918a7 --- /dev/null +++ b/inc/pagination.php @@ -0,0 +1,10 @@ + diff --git a/inc/post-formats.php b/inc/post-formats.php new file mode 100644 index 00000000..18f11df5 --- /dev/null +++ b/inc/post-formats.php @@ -0,0 +1,195 @@ +ID); ?> + + + + + + + + + +
+
+ post_excerpt; + if ( isset($caption) && $caption ) echo '
'.$caption.'
'; + } ?> +
+ + + + + +
+ + + + + +
+ + +
+
+
    + +
  • + ID,'large'); ?> + <?php echo $image->post_title; ?> + + post_excerpt ): ?> +
    post_excerpt; ?>
    + +
  • + +
+
+
+ +
+ + + + + +
+
+ post_excerpt; + if ( isset($caption) && $caption ) echo '
'.$caption.'
'; + } ?> +
+
+ + + + + +
+ run_shortcode('[embed]'.$meta['_video_url'][0].'[/embed]'); + echo $video; + } elseif ( isset($meta['_video_embed_code'][0]) && !empty($meta['_video_embed_code'][0]) ) { + echo '
'; + echo $meta['_video_embed_code'][0]; + echo '
'; + } + ?> +
+ + + + + +
+
+ +
+

+
+
+ + + + + +
+
+ +
+ +
+
+
+ + + + + +
+ +
+ + diff --git a/inc/post-nav.php b/inc/post-nav.php new file mode 100644 index 00000000..18adc4d1 --- /dev/null +++ b/inc/post-nav.php @@ -0,0 +1,6 @@ + +
    + + +
+ \ No newline at end of file diff --git a/inc/related-posts.php b/inc/related-posts.php new file mode 100644 index 00000000..089b463b --- /dev/null +++ b/inc/related-posts.php @@ -0,0 +1,50 @@ + + +have_posts() ): ?> + +

+ +

+ + + + + diff --git a/inc/sharrre.php b/inc/sharrre.php new file mode 100644 index 00000000..b3102bc7 --- /dev/null +++ b/inc/sharrre.php @@ -0,0 +1,68 @@ +
+ +
+
+
+
+
+ + \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 00000000..ce3abb7a --- /dev/null +++ b/index.php @@ -0,0 +1,29 @@ + + +
+ + + +
+ + + + + +
+ '; while ( have_posts() ): the_post(); ?> + +
'; } $i++; endwhile; echo '
'; ?> +
+ + + + + +
+ +
+ + + + \ No newline at end of file diff --git a/js/Jplayer.swf b/js/Jplayer.swf new file mode 100644 index 00000000..85c0ba38 Binary files /dev/null and b/js/Jplayer.swf differ diff --git a/js/ie/html5.js b/js/ie/html5.js new file mode 100644 index 00000000..6168aacd --- /dev/null +++ b/js/ie/html5.js @@ -0,0 +1,8 @@ +/* + HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); +a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; +c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| +"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f); +if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d #mq-test-1 { width: 42px; }';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document); + +/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ +(function(e){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var w=e.document,s=w.documentElement,i=[],k=[],q=[],o={},h=30,f=w.getElementsByTagName("head")[0]||s,g=w.getElementsByTagName("base")[0],b=f.getElementsByTagName("link"),d=[],a=function(){var D=b,y=D.length,B=0,A,z,C,x;for(;B-1,minw:F.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:F.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}j()},l,r,v=function(){var z,A=w.createElement("div"),x=w.body,y=false;A.style.cssText="position:absolute;font-size:1em;width:1em";if(!x){x=y=w.createElement("body");x.style.background="none"}x.appendChild(A);s.insertBefore(x,s.firstChild);z=A.offsetWidth;if(y){s.removeChild(x)}else{x.removeChild(A)}z=p=parseFloat(z);return z},p,j=function(I){var x="clientWidth",B=s[x],H=w.compatMode==="CSS1Compat"&&B||w.body[x]||B,D={},G=b[b.length-1],z=(new Date()).getTime();if(I&&l&&z-l-1?(p||v()):1)}if(!!J){J=parseFloat(J)*(J.indexOf(y)>-1?(p||v()):1)}if(!K.hasquery||(!A||!L)&&(A||H>=C)&&(L||H<=J)){if(!D[K.media]){D[K.media]=[]}D[K.media].push(k[K.rules])}}for(var E in q){if(q[E]&&q[E].parentNode===f){f.removeChild(q[E])}}for(var E in D){var M=w.createElement("style"),F=D[E].join("\n");M.type="text/css";M.media=E;f.insertBefore(M,G.nextSibling);if(M.styleSheet){M.styleSheet.cssText=F}else{M.appendChild(w.createTextNode(F))}q.push(M)}},n=function(x,z){var y=c();if(!y){return}y.open("GET",x,true);y.onreadystatechange=function(){if(y.readyState!=4||y.status!=200&&y.status!=304){return}z(y.responseText)};if(y.readyState==4){return}y.send(null)},c=(function(){var x=false;try{x=new XMLHttpRequest()}catch(y){x=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return x}})();a();respond.update=a;function t(){j(true)}if(e.addEventListener){e.addEventListener("resize",t,false)}else{if(e.attachEvent){e.attachEvent("onresize",t)}}})(this); \ No newline at end of file diff --git a/js/ie/selectivizr.js b/js/ie/selectivizr.js new file mode 100644 index 00000000..e9ede397 --- /dev/null +++ b/js/ie/selectivizr.js @@ -0,0 +1,560 @@ +/* +selectivizr v1.0.3b - (c) Keith Clark, freely distributable under the terms +of the MIT license. + +selectivizr.com +*/ +/* + +Notes about this source +----------------------- + + * The #DEBUG_START and #DEBUG_END comments are used to mark blocks of code + that will be removed prior to building a final release version (using a + pre-compression script) + + +References: +----------- + + * CSS Syntax : http://www.w3.org/TR/2003/WD-css3-syntax-20030813/#style + * Selectors : http://www.w3.org/TR/css3-selectors/#selectors + * IE Compatability : http://msdn.microsoft.com/en-us/library/cc351024(VS.85).aspx + * W3C Selector Tests : http://www.w3.org/Style/CSS/Test/CSS3/Selectors/current/html/tests/ + +*/ + +(function(win) { + + // If browser isn't IE, then stop execution! This handles the script + // being loaded by non IE browsers because the developer didn't use + // conditional comments. + if (/*@cc_on!@*/true) return; + + // =========================== Init Objects ============================ + + var doc = document; + var root = doc.documentElement; + var xhr = getXHRObject(); + var ieVersion = /MSIE (\d+)/.exec(navigator.userAgent)[1]; + + // If were not in standards mode, IE is too old / new or we can't create + // an XMLHttpRequest object then we should get out now. + if (doc.compatMode != 'CSS1Compat' || ieVersion<6 || ieVersion>8 || !xhr) { + return; + } + + + // ========================= Common Objects ============================ + + // Compatiable selector engines in order of CSS3 support. Note: '*' is + // a placholder for the object key name. (basically, crude compression) + var selectorEngines = { + "NW" : "*.Dom.select", + "MooTools" : "$$", + "DOMAssistant" : "*.$", + "Prototype" : "$$", + "YAHOO" : "*.util.Selector.query", + "Sizzle" : "*", + "jQuery" : "*", + "dojo" : "*.query" + }; + + var selectorMethod; + var enabledWatchers = []; // array of :enabled/:disabled elements to poll + var domPatches = []; + var ie6PatchID = 0; // used to solve ie6's multiple class bug + var patchIE6MultipleClasses = true; // if true adds class bloat to ie6 + var namespace = "slvzr"; + + // Stylesheet parsing regexp's + var RE_COMMENT = /(\/\*[^*]*\*+([^\/][^*]*\*+)*\/)\s*?/g; + var RE_IMPORT = /@import\s*(?:(?:(?:url\(\s*(['"]?)(.*)\1)\s*\))|(?:(['"])(.*)\3))\s*([^;]*);/g; + var RE_ASSET_URL = /(behavior\s*?:\s*)?\burl\(\s*(["']?)(?!data:)([^"')]+)\2\s*\)/g; + var RE_PSEUDO_STRUCTURAL = /^:(empty|(first|last|only|nth(-last)?)-(child|of-type))$/; + var RE_PSEUDO_ELEMENTS = /:(:first-(?:line|letter))/g; + var RE_SELECTOR_GROUP = /((?:^|(?:\s*})+)(?:\s*@media[^{]+{)?)\s*([^\{]*?[\[:][^{]+)/g; + var RE_SELECTOR_PARSE = /([ +~>])|(:[a-z-]+(?:\(.*?\)+)?)|(\[.*?\])/g; + var RE_LIBRARY_INCOMPATIBLE_PSEUDOS = /(:not\()?:(hover|enabled|disabled|focus|checked|target|active|visited|first-line|first-letter)\)?/g; + var RE_PATCH_CLASS_NAME_REPLACE = /[^\w-]/g; + + // HTML UI element regexp's + var RE_INPUT_ELEMENTS = /^(INPUT|SELECT|TEXTAREA|BUTTON)$/; + var RE_INPUT_CHECKABLE_TYPES = /^(checkbox|radio)$/; + + // Broken attribute selector implementations (IE7/8 native [^=""], [$=""] and [*=""]) + var BROKEN_ATTR_IMPLEMENTATIONS = ieVersion>6 ? /[\$\^*]=(['"])\1/ : null; + + // Whitespace normalization regexp's + var RE_TIDY_TRAILING_WHITESPACE = /([(\[+~])\s+/g; + var RE_TIDY_LEADING_WHITESPACE = /\s+([)\]+~])/g; + var RE_TIDY_CONSECUTIVE_WHITESPACE = /\s+/g; + var RE_TIDY_TRIM_WHITESPACE = /^\s*((?:[\S\s]*\S)?)\s*$/; + + // String constants + var EMPTY_STRING = ""; + var SPACE_STRING = " "; + var PLACEHOLDER_STRING = "$1"; + + // =========================== Patching ================================ + + // --[ patchStyleSheet() ]---------------------------------------------- + // Scans the passed cssText for selectors that require emulation and + // creates one or more patches for each matched selector. + function patchStyleSheet( cssText ) { + return cssText.replace(RE_PSEUDO_ELEMENTS, PLACEHOLDER_STRING). + replace(RE_SELECTOR_GROUP, function(m, prefix, selectorText) { + var selectorGroups = selectorText.split(","); + for (var c = 0, cs = selectorGroups.length; c < cs; c++) { + var selector = normalizeSelectorWhitespace(selectorGroups[c]) + SPACE_STRING; + var patches = []; + selectorGroups[c] = selector.replace(RE_SELECTOR_PARSE, + function(match, combinator, pseudo, attribute, index) { + if (combinator) { + if (patches.length>0) { + domPatches.push( { selector: selector.substring(0, index), patches: patches } ) + patches = []; + } + return combinator; + } + else { + var patch = (pseudo) ? patchPseudoClass( pseudo ) : patchAttribute( attribute ); + if (patch) { + patches.push(patch); + return "." + patch.className; + } + return match; + } + } + ); + } + return prefix + selectorGroups.join(","); + }); + }; + + // --[ patchAttribute() ]----------------------------------------------- + // returns a patch for an attribute selector. + function patchAttribute( attr ) { + return (!BROKEN_ATTR_IMPLEMENTATIONS || BROKEN_ATTR_IMPLEMENTATIONS.test(attr)) ? + { className: createClassName(attr), applyClass: true } : null; + }; + + // --[ patchPseudoClass() ]--------------------------------------------- + // returns a patch for a pseudo-class + function patchPseudoClass( pseudo ) { + + var applyClass = true; + var className = createClassName(pseudo.slice(1)); + var isNegated = pseudo.substring(0, 5) == ":not("; + var activateEventName; + var deactivateEventName; + + // if negated, remove :not() + if (isNegated) { + pseudo = pseudo.slice(5, -1); + } + + // bracket contents are irrelevant - remove them + var bracketIndex = pseudo.indexOf("(") + if (bracketIndex > -1) { + pseudo = pseudo.substring(0, bracketIndex); + } + + // check we're still dealing with a pseudo-class + if (pseudo.charAt(0) == ":") { + switch (pseudo.slice(1)) { + + case "root": + applyClass = function(e) { + return isNegated ? e != root : e == root; + } + break; + + case "target": + // :target is only supported in IE8 + if (ieVersion == 8) { + applyClass = function(e) { + var handler = function() { + var hash = location.hash; + var hashID = hash.slice(1); + return isNegated ? (hash == EMPTY_STRING || e.id != hashID) : (hash != EMPTY_STRING && e.id == hashID); + }; + addEvent( win, "hashchange", function() { + toggleElementClass(e, className, handler()); + }) + return handler(); + } + break; + } + return false; + + case "checked": + applyClass = function(e) { + if (RE_INPUT_CHECKABLE_TYPES.test(e.type)) { + addEvent( e, "propertychange", function() { + if (event.propertyName == "checked") { + toggleElementClass( e, className, e.checked !== isNegated ); + } + }) + } + return e.checked !== isNegated; + } + break; + + case "disabled": + isNegated = !isNegated; + + case "enabled": + applyClass = function(e) { + if (RE_INPUT_ELEMENTS.test(e.tagName)) { + addEvent( e, "propertychange", function() { + if (event.propertyName == "$disabled") { + toggleElementClass( e, className, e.$disabled === isNegated ); + } + }); + enabledWatchers.push(e); + e.$disabled = e.disabled; + return e.disabled === isNegated; + } + return pseudo == ":enabled" ? isNegated : !isNegated; + } + break; + + case "focus": + activateEventName = "focus"; + deactivateEventName = "blur"; + + case "hover": + if (!activateEventName) { + activateEventName = "mouseenter"; + deactivateEventName = "mouseleave"; + } + applyClass = function(e) { + addEvent( e, isNegated ? deactivateEventName : activateEventName, function() { + toggleElementClass( e, className, true ); + }) + addEvent( e, isNegated ? activateEventName : deactivateEventName, function() { + toggleElementClass( e, className, false ); + }) + return isNegated; + } + break; + + // everything else + default: + // If we don't support this pseudo-class don't create + // a patch for it + if (!RE_PSEUDO_STRUCTURAL.test(pseudo)) { + return false; + } + break; + } + } + return { className: className, applyClass: applyClass }; + }; + + // --[ applyPatches() ]------------------------------------------------- + function applyPatches() { + var elms, selectorText, patches, domSelectorText; + + for (var c=0; c 0) { + setInterval( function() { + for (var c = 0, cl = enabledWatchers.length; c < cl; c++) { + var e = enabledWatchers[c]; + if (e.disabled !== e.$disabled) { + if (e.disabled) { + e.disabled = false; + e.$disabled = true; + e.disabled = true; + } + else { + e.$disabled = e.disabled; + } + } + } + }, 250) + } + }; + + // Determine the baseUrl and download the stylesheets + var baseTags = doc.getElementsByTagName("BASE"); + var baseUrl = (baseTags.length > 0) ? baseTags[0].href : doc.location.href; + getStyleSheets(); + + // Bind selectivizr to the ContentLoaded event. + ContentLoaded(win, function() { + // Determine the "best fit" selector engine + for (var engine in selectorEngines) { + var members, member, context = win; + if (win[engine]) { + members = selectorEngines[engine].replace("*", engine).split("."); + while ((member = members.shift()) && (context = context[member])) {} + if (typeof context == "function") { + selectorMethod = context; + init(); + return; + } + } + } + }); + + + + /*! + * ContentLoaded.js by Diego Perini, modified for IE<9 only (to save space) + * + * Author: Diego Perini (diego.perini at gmail.com) + * Summary: cross-browser wrapper for DOMContentLoaded + * Updated: 20101020 + * License: MIT + * Version: 1.2 + * + * URL: + * http://javascript.nwbox.com/ContentLoaded/ + * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE + * + */ + + // @w window reference + // @f function reference + function ContentLoaded(win, fn) { + + var done = false, top = true, + init = function(e) { + if (e.type == "readystatechange" && doc.readyState != "complete") return; + (e.type == "load" ? win : doc).detachEvent("on" + e.type, init, false); + if (!done && (done = true)) fn.call(win, e.type || e); + }, + poll = function() { + try { root.doScroll("left"); } catch(e) { setTimeout(poll, 50); return; } + init('poll'); + }; + + if (doc.readyState == "complete") fn.call(win, EMPTY_STRING); + else { + if (doc.createEventObject && root.doScroll) { + try { top = !win.frameElement; } catch(e) { } + if (top) poll(); + } + addEvent(doc,"readystatechange", init); + addEvent(win,"load", init); + } + }; +})(this); diff --git a/js/jquery.flexslider.min.js b/js/jquery.flexslider.min.js new file mode 100644 index 00000000..68bc6b1d --- /dev/null +++ b/js/jquery.flexslider.min.js @@ -0,0 +1,5 @@ +/* + * jQuery FlexSlider v2.2.0 + * Copyright 2012 WooThemes + * Contributing Author: Tyler Smith + */(function(e){e.flexslider=function(t,n){var r=e(t);r.vars=e.extend({},e.flexslider.defaults,n);var i=r.vars.namespace,s=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,o=("ontouchstart"in window||s||window.DocumentTouch&&document instanceof DocumentTouch)&&r.vars.touch,u="click touchend MSPointerUp",a="",f,l=r.vars.direction==="vertical",c=r.vars.reverse,h=r.vars.itemWidth>0,p=r.vars.animation==="fade",d=r.vars.asNavFor!=="",v={},m=!0;e.data(t,"flexslider",r);v={init:function(){r.animating=!1;r.currentSlide=parseInt(r.vars.startAt?r.vars.startAt:0);isNaN(r.currentSlide)&&(r.currentSlide=0);r.animatingTo=r.currentSlide;r.atEnd=r.currentSlide===0||r.currentSlide===r.last;r.containerSelector=r.vars.selector.substr(0,r.vars.selector.search(" "));r.slides=e(r.vars.selector,r);r.container=e(r.containerSelector,r);r.count=r.slides.length;r.syncExists=e(r.vars.sync).length>0;r.vars.animation==="slide"&&(r.vars.animation="swing");r.prop=l?"top":"marginLeft";r.args={};r.manualPause=!1;r.stopped=!1;r.started=!1;r.startTimeout=null;r.transitions=!r.vars.video&&!p&&r.vars.useCSS&&function(){var e=document.createElement("div"),t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var n in t)if(e.style[t[n]]!==undefined){r.pfx=t[n].replace("Perspective","").toLowerCase();r.prop="-"+r.pfx+"-transform";return!0}return!1}();r.vars.controlsContainer!==""&&(r.controlsContainer=e(r.vars.controlsContainer).length>0&&e(r.vars.controlsContainer));r.vars.manualControls!==""&&(r.manualControls=e(r.vars.manualControls).length>0&&e(r.vars.manualControls));if(r.vars.randomize){r.slides.sort(function(){return Math.round(Math.random())-.5});r.container.empty().append(r.slides)}r.doMath();r.setup("init");r.vars.controlNav&&v.controlNav.setup();r.vars.directionNav&&v.directionNav.setup();r.vars.keyboard&&(e(r.containerSelector).length===1||r.vars.multipleKeyboard)&&e(document).bind("keyup",function(e){var t=e.keyCode;if(!r.animating&&(t===39||t===37)){var n=t===39?r.getTarget("next"):t===37?r.getTarget("prev"):!1;r.flexAnimate(n,r.vars.pauseOnAction)}});r.vars.mousewheel&&r.bind("mousewheel",function(e,t,n,i){e.preventDefault();var s=t<0?r.getTarget("next"):r.getTarget("prev");r.flexAnimate(s,r.vars.pauseOnAction)});r.vars.pausePlay&&v.pausePlay.setup();r.vars.slideshow&&r.vars.pauseInvisible&&v.pauseInvisible.init();if(r.vars.slideshow){r.vars.pauseOnHover&&r.hover(function(){!r.manualPlay&&!r.manualPause&&r.pause()},function(){!r.manualPause&&!r.manualPlay&&!r.stopped&&r.play()});if(!r.vars.pauseInvisible||!v.pauseInvisible.isHidden())r.vars.initDelay>0?r.startTimeout=setTimeout(r.play,r.vars.initDelay):r.play()}d&&v.asNav.setup();o&&r.vars.touch&&v.touch();(!p||p&&r.vars.smoothHeight)&&e(window).bind("resize orientationchange focus",v.resize);r.find("img").attr("draggable","false");setTimeout(function(){r.vars.start(r)},200)},asNav:{setup:function(){r.asNav=!0;r.animatingTo=Math.floor(r.currentSlide/r.move);r.currentItem=r.currentSlide;r.slides.removeClass(i+"active-slide").eq(r.currentItem).addClass(i+"active-slide");if(!s)r.slides.click(function(t){t.preventDefault();var n=e(this),s=n.index(),o=n.offset().left-e(r).scrollLeft();if(o<=0&&n.hasClass(i+"active-slide"))r.flexAnimate(r.getTarget("prev"),!0);else if(!e(r.vars.asNavFor).data("flexslider").animating&&!n.hasClass(i+"active-slide")){r.direction=r.currentItem');if(r.pagingCount>1)for(var f=0;f':""+n+"";if("thumbnails"===r.vars.controlNav&&!0===r.vars.thumbCaptions){var l=o.attr("data-thumbcaption");""!=l&&undefined!=l&&(s+=''+l+"")}r.controlNavScaffold.append("
  • "+s+"
  • ");n++}r.controlsContainer?e(r.controlsContainer).append(r.controlNavScaffold):r.append(r.controlNavScaffold);v.controlNav.set();v.controlNav.active();r.controlNavScaffold.delegate("a, img",u,function(t){t.preventDefault();if(a===""||a===t.type){var n=e(this),s=r.controlNav.index(n);if(!n.hasClass(i+"active")){r.direction=s>r.currentSlide?"next":"prev";r.flexAnimate(s,r.vars.pauseOnAction)}}a===""&&(a=t.type);v.setToClearWatchedEvent()})},setupManual:function(){r.controlNav=r.manualControls;v.controlNav.active();r.controlNav.bind(u,function(t){t.preventDefault();if(a===""||a===t.type){var n=e(this),s=r.controlNav.index(n);if(!n.hasClass(i+"active")){s>r.currentSlide?r.direction="next":r.direction="prev";r.flexAnimate(s,r.vars.pauseOnAction)}}a===""&&(a=t.type);v.setToClearWatchedEvent()})},set:function(){var t=r.vars.controlNav==="thumbnails"?"img":"a";r.controlNav=e("."+i+"control-nav li "+t,r.controlsContainer?r.controlsContainer:r)},active:function(){r.controlNav.removeClass(i+"active").eq(r.animatingTo).addClass(i+"active")},update:function(t,n){r.pagingCount>1&&t==="add"?r.controlNavScaffold.append(e("
  • "+r.count+"
  • ")):r.pagingCount===1?r.controlNavScaffold.find("li").remove():r.controlNav.eq(n).closest("li").remove();v.controlNav.set();r.pagingCount>1&&r.pagingCount!==r.controlNav.length?r.update(n,t):v.controlNav.active()}},directionNav:{setup:function(){var t=e('");if(r.controlsContainer){e(r.controlsContainer).append(t);r.directionNav=e("."+i+"direction-nav li a",r.controlsContainer)}else{r.append(t);r.directionNav=e("."+i+"direction-nav li a",r)}v.directionNav.update();r.directionNav.bind(u,function(t){t.preventDefault();var n;if(a===""||a===t.type){n=e(this).hasClass(i+"next")?r.getTarget("next"):r.getTarget("prev");r.flexAnimate(n,r.vars.pauseOnAction)}a===""&&(a=t.type);v.setToClearWatchedEvent()})},update:function(){var e=i+"disabled";r.pagingCount===1?r.directionNav.addClass(e).attr("tabindex","-1"):r.vars.animationLoop?r.directionNav.removeClass(e).removeAttr("tabindex"):r.animatingTo===0?r.directionNav.removeClass(e).filter("."+i+"prev").addClass(e).attr("tabindex","-1"):r.animatingTo===r.last?r.directionNav.removeClass(e).filter("."+i+"next").addClass(e).attr("tabindex","-1"):r.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var t=e('
    ');if(r.controlsContainer){r.controlsContainer.append(t);r.pausePlay=e("."+i+"pauseplay a",r.controlsContainer)}else{r.append(t);r.pausePlay=e("."+i+"pauseplay a",r)}v.pausePlay.update(r.vars.slideshow?i+"pause":i+"play");r.pausePlay.bind(u,function(t){t.preventDefault();if(a===""||a===t.type)if(e(this).hasClass(i+"pause")){r.manualPause=!0;r.manualPlay=!1;r.pause()}else{r.manualPause=!1;r.manualPlay=!0;r.play()}a===""&&(a=t.type);v.setToClearWatchedEvent()})},update:function(e){e==="play"?r.pausePlay.removeClass(i+"pause").addClass(i+"play").html(r.vars.playText):r.pausePlay.removeClass(i+"play").addClass(i+"pause").html(r.vars.pauseText)}},touch:function(){var e,n,i,o,u,a,f=!1,d=0,v=0,m=0;if(!s){t.addEventListener("touchstart",g,!1);function g(s){if(r.animating)s.preventDefault();else if(window.navigator.msPointerEnabled||s.touches.length===1){r.pause();o=l?r.h:r.w;a=Number(new Date);d=s.touches[0].pageX;v=s.touches[0].pageY;i=h&&c&&r.animatingTo===r.last?0:h&&c?r.limit-(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo:h&&r.currentSlide===r.last?r.limit:h?(r.itemW+r.vars.itemMargin)*r.move*r.currentSlide:c?(r.last-r.currentSlide+r.cloneOffset)*o:(r.currentSlide+r.cloneOffset)*o;e=l?v:d;n=l?d:v;t.addEventListener("touchmove",y,!1);t.addEventListener("touchend",b,!1)}}function y(t){d=t.touches[0].pageX;v=t.touches[0].pageY;u=l?e-v:e-d;f=l?Math.abs(u)s){t.preventDefault();if(!p&&r.transitions){r.vars.animationLoop||(u/=r.currentSlide===0&&u<0||r.currentSlide===r.last&&u>0?Math.abs(u)/o+2:1);r.setProps(i+u,"setTouch")}}}function b(s){t.removeEventListener("touchmove",y,!1);if(r.animatingTo===r.currentSlide&&!f&&u!==null){var l=c?-u:u,h=l>0?r.getTarget("next"):r.getTarget("prev");r.canAdvance(h)&&(Number(new Date)-a<550&&Math.abs(l)>50||Math.abs(l)>o/2)?r.flexAnimate(h,r.vars.pauseOnAction):p||r.flexAnimate(r.currentSlide,r.vars.pauseOnAction,!0)}t.removeEventListener("touchend",b,!1);e=null;n=null;u=null;i=null}}else{t.style.msTouchAction="none";t._gesture=new MSGesture;t._gesture.target=t;t.addEventListener("MSPointerDown",w,!1);t._slider=r;t.addEventListener("MSGestureChange",E,!1);t.addEventListener("MSGestureEnd",S,!1);function w(e){e.stopPropagation();if(r.animating)e.preventDefault();else{r.pause();t._gesture.addPointer(e.pointerId);m=0;o=l?r.h:r.w;a=Number(new Date);i=h&&c&&r.animatingTo===r.last?0:h&&c?r.limit-(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo:h&&r.currentSlide===r.last?r.limit:h?(r.itemW+r.vars.itemMargin)*r.move*r.currentSlide:c?(r.last-r.currentSlide+r.cloneOffset)*o:(r.currentSlide+r.cloneOffset)*o}}function E(e){e.stopPropagation();var n=e.target._slider;if(!n)return;var r=-e.translationX,s=-e.translationY;m+=l?s:r;u=m;f=l?Math.abs(m)500){e.preventDefault();if(!p&&n.transitions){n.vars.animationLoop||(u=m/(n.currentSlide===0&&m<0||n.currentSlide===n.last&&m>0?Math.abs(m)/o+2:1));n.setProps(i+u,"setTouch")}}}function S(t){t.stopPropagation();var r=t.target._slider;if(!r)return;if(r.animatingTo===r.currentSlide&&!f&&u!==null){var s=c?-u:u,l=s>0?r.getTarget("next"):r.getTarget("prev");r.canAdvance(l)&&(Number(new Date)-a<550&&Math.abs(s)>50||Math.abs(s)>o/2)?r.flexAnimate(l,r.vars.pauseOnAction):p||r.flexAnimate(r.currentSlide,r.vars.pauseOnAction,!0)}e=null;n=null;u=null;i=null;m=0}}},resize:function(){if(!r.animating&&r.is(":visible")){h||r.doMath();if(p)v.smoothHeight();else if(h){r.slides.width(r.computedW);r.update(r.pagingCount);r.setProps()}else if(l){r.viewport.height(r.h);r.setProps(r.h,"setTotal")}else{r.vars.smoothHeight&&v.smoothHeight();r.newSlides.width(r.computedW);r.setProps(r.computedW,"setTotal")}}},smoothHeight:function(e){if(!l||p){var t=p?r:r.viewport;e?t.animate({height:r.slides.eq(r.animatingTo).height()},e):t.height(r.slides.eq(r.animatingTo).height())}},sync:function(t){var n=e(r.vars.sync).data("flexslider"),i=r.animatingTo;switch(t){case"animate":n.flexAnimate(i,r.vars.pauseOnAction,!1,!0);break;case"play":!n.playing&&!n.asNav&&n.play();break;case"pause":n.pause()}},pauseInvisible:{visProp:null,init:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t0?setTimeout(r.play,r.vars.initDelay):r.play()})}},isHidden:function(){return document[v.pauseInvisible.visProp]||!1}},setToClearWatchedEvent:function(){clearTimeout(f);f=setTimeout(function(){a=""},3e3)}};r.flexAnimate=function(t,n,s,u,a){!r.vars.animationLoop&&t!==r.currentSlide&&(r.direction=t>r.currentSlide?"next":"prev");d&&r.pagingCount===1&&(r.direction=r.currentItemr.limit&&r.visible!==1?r.limit:b}else r.currentSlide===0&&t===r.count-1&&r.vars.animationLoop&&r.direction!=="next"?y=c?(r.count+r.cloneOffset)*m:0:r.currentSlide===r.last&&t===0&&r.vars.animationLoop&&r.direction!=="prev"?y=c?0:(r.count+1)*m:y=c?(r.count-1-t+r.cloneOffset)*m:(t+r.cloneOffset)*m;r.setProps(y,"",r.vars.animationSpeed);if(r.transitions){if(!r.vars.animationLoop||!r.atEnd){r.animating=!1;r.currentSlide=r.animatingTo}r.container.unbind("webkitTransitionEnd transitionend");r.container.bind("webkitTransitionEnd transitionend",function(){r.wrapup(m)})}else r.container.animate(r.args,r.vars.animationSpeed,r.vars.easing,function(){r.wrapup(m)})}else if(!o){r.slides.eq(r.currentSlide).css({zIndex:1}).animate({opacity:0},r.vars.animationSpeed,r.vars.easing);r.slides.eq(t).css({zIndex:2}).animate({opacity:1},r.vars.animationSpeed,r.vars.easing,r.wrapup)}else{r.slides.eq(r.currentSlide).css({opacity:0,zIndex:1});r.slides.eq(t).css({opacity:1,zIndex:2});r.wrapup(m)}r.vars.smoothHeight&&v.smoothHeight(r.vars.animationSpeed)}};r.wrapup=function(e){!p&&!h&&(r.currentSlide===0&&r.animatingTo===r.last&&r.vars.animationLoop?r.setProps(e,"jumpEnd"):r.currentSlide===r.last&&r.animatingTo===0&&r.vars.animationLoop&&r.setProps(e,"jumpStart"));r.animating=!1;r.currentSlide=r.animatingTo;r.vars.after(r)};r.animateSlides=function(){!r.animating&&m&&r.flexAnimate(r.getTarget("next"))};r.pause=function(){clearInterval(r.animatedSlides);r.animatedSlides=null;r.playing=!1;r.vars.pausePlay&&v.pausePlay.update("play");r.syncExists&&v.sync("pause")};r.play=function(){r.playing&&clearInterval(r.animatedSlides);r.animatedSlides=r.animatedSlides||setInterval(r.animateSlides,r.vars.slideshowSpeed);r.started=r.playing=!0;r.vars.pausePlay&&v.pausePlay.update("pause");r.syncExists&&v.sync("play")};r.stop=function(){r.pause();r.stopped=!0};r.canAdvance=function(e,t){var n=d?r.pagingCount-1:r.last;return t?!0:d&&r.currentItem===r.count-1&&e===0&&r.direction==="prev"?!0:d&&r.currentItem===0&&e===r.pagingCount-1&&r.direction!=="next"?!1:e===r.currentSlide&&!d?!1:r.vars.animationLoop?!0:r.atEnd&&r.currentSlide===0&&e===n&&r.direction!=="next"?!1:r.atEnd&&r.currentSlide===n&&e===0&&r.direction==="next"?!1:!0};r.getTarget=function(e){r.direction=e;return e==="next"?r.currentSlide===r.last?0:r.currentSlide+1:r.currentSlide===0?r.last:r.currentSlide-1};r.setProps=function(e,t,n){var i=function(){var n=e?e:(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo,i=function(){if(h)return t==="setTouch"?e:c&&r.animatingTo===r.last?0:c?r.limit-(r.itemW+r.vars.itemMargin)*r.move*r.animatingTo:r.animatingTo===r.last?r.limit:n;switch(t){case"setTotal":return c?(r.count-1-r.currentSlide+r.cloneOffset)*e:(r.currentSlide+r.cloneOffset)*e;case"setTouch":return c?e:e;case"jumpEnd":return c?e:r.count*e;case"jumpStart":return c?r.count*e:e;default:return e}}();return i*-1+"px"}();if(r.transitions){i=l?"translate3d(0,"+i+",0)":"translate3d("+i+",0,0)";n=n!==undefined?n/1e3+"s":"0s";r.container.css("-"+r.pfx+"-transition-duration",n)}r.args[r.prop]=i;(r.transitions||n===undefined)&&r.container.css(r.args)};r.setup=function(t){if(!p){var n,s;if(t==="init"){r.viewport=e('
    ').css({overflow:"hidden",position:"relative"}).appendTo(r).append(r.container);r.cloneCount=0;r.cloneOffset=0;if(c){s=e.makeArray(r.slides).reverse();r.slides=e(s);r.container.empty().append(r.slides)}}if(r.vars.animationLoop&&!h){r.cloneCount=2;r.cloneOffset=1;t!=="init"&&r.container.find(".clone").remove();r.container.append(r.slides.first().clone().addClass("clone").attr("aria-hidden","true")).prepend(r.slides.last().clone().addClass("clone").attr("aria-hidden","true"))}r.newSlides=e(r.vars.selector,r);n=c?r.count-1-r.currentSlide+r.cloneOffset:r.currentSlide+r.cloneOffset;if(l&&!h){r.container.height((r.count+r.cloneCount)*200+"%").css("position","absolute").width("100%");setTimeout(function(){r.newSlides.css({display:"block"});r.doMath();r.viewport.height(r.h);r.setProps(n*r.h,"init")},t==="init"?100:0)}else{r.container.width((r.count+r.cloneCount)*200+"%");r.setProps(n*r.computedW,"init");setTimeout(function(){r.doMath();r.newSlides.css({width:r.computedW,"float":"left",display:"block"});r.vars.smoothHeight&&v.smoothHeight()},t==="init"?100:0)}}else{r.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"});t==="init"&&(o?r.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+r.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(r.currentSlide).css({opacity:1,zIndex:2}):r.slides.css({opacity:0,display:"block",zIndex:1}).eq(r.currentSlide).css({zIndex:2}).animate({opacity:1},r.vars.animationSpeed,r.vars.easing));r.vars.smoothHeight&&v.smoothHeight()}h||r.slides.removeClass(i+"active-slide").eq(r.currentSlide).addClass(i+"active-slide")};r.doMath=function(){var e=r.slides.first(),t=r.vars.itemMargin,n=r.vars.minItems,i=r.vars.maxItems;r.w=r.viewport===undefined?r.width():r.viewport.width();r.h=e.height();r.boxPadding=e.outerWidth()-e.width();if(h){r.itemT=r.vars.itemWidth+t;r.minW=n?n*r.itemT:r.w;r.maxW=i?i*r.itemT-t:r.w;r.itemW=r.minW>r.w?(r.w-t*(n-1))/n:r.maxWr.w?r.w:r.vars.itemWidth;r.visible=Math.floor(r.w/r.itemW);r.move=r.vars.move>0&&r.vars.mover.w?r.itemW*(r.count-1)+t*(r.count-1):(r.itemW+t)*r.count-r.w-t}else{r.itemW=r.w;r.pagingCount=r.count;r.last=r.count-1}r.computedW=r.itemW-r.boxPadding};r.update=function(e,t){r.doMath();if(!h){er.controlNav.length)v.controlNav.update("add");else if(t==="remove"&&!h||r.pagingCountr.last){r.currentSlide-=1;r.animatingTo-=1}v.controlNav.update("remove",r.last)}r.vars.directionNav&&v.directionNav.update()};r.addSlide=function(t,n){var i=e(t);r.count+=1;r.last=r.count-1;l&&c?n!==undefined?r.slides.eq(r.count-n).after(i):r.container.prepend(i):n!==undefined?r.slides.eq(n).before(i):r.container.append(i);r.update(n,"add");r.slides=e(r.vars.selector+":not(.clone)",r);r.setup();r.vars.added(r)};r.removeSlide=function(t){var n=isNaN(t)?r.slides.index(e(t)):t;r.count-=1;r.last=r.count-1;isNaN(t)?e(t,r.slides).remove():l&&c?r.slides.eq(r.last).remove():r.slides.eq(t).remove();r.doMath();r.update(n,"remove");r.slides=e(r.vars.selector+":not(.clone)",r);r.setup();r.vars.removed(r)};v.init()};e(window).blur(function(e){focused=!1}).focus(function(e){focused=!0});e.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){}};e.fn.flexslider=function(t){t===undefined&&(t={});if(typeof t=="object")return this.each(function(){var n=e(this),r=t.selector?t.selector:".slides > li",i=n.find(r);if(i.length===1&&t.allowOneSlide===!0||i.length===0){i.fadeIn(400);t.start&&t.start(n)}else n.data("flexslider")===undefined&&new e.flexslider(this,t)});var n=e(this).data("flexslider");switch(t){case"play":n.play();break;case"pause":n.pause();break;case"stop":n.stop();break;case"next":n.flexAnimate(n.getTarget("next"),!0);break;case"prev":case"previous":n.flexAnimate(n.getTarget("prev"),!0);break;default:typeof t=="number"&&n.flexAnimate(t,!0)}}})(jQuery); \ No newline at end of file diff --git a/js/jquery.jplayer.min.js b/js/jquery.jplayer.min.js new file mode 100644 index 00000000..ecd3ab51 --- /dev/null +++ b/js/jquery.jplayer.min.js @@ -0,0 +1,107 @@ +/* + * jPlayer Plugin for jQuery JavaScript Library + * http://www.jplayer.org + * + * Copyright (c) 2009 - 2013 Happyworm Ltd + * Licensed under the MIT license. + * http://opensource.org/licenses/MIT + * + * Author: Mark J Panaghiston + * Version: 2.4.0 + * Date: 5th June 2013 + */ + +(function(b,f){"function"===typeof define&&define.amd?define(["jquery"],f):b.jQuery?f(b.jQuery):f(b.Zepto)})(this,function(b,f){b.fn.jPlayer=function(a){var c="string"===typeof a,d=Array.prototype.slice.call(arguments,1),e=this;a=!c&&d.length?b.extend.apply(null,[!0,a].concat(d)):a;if(c&&"_"===a.charAt(0))return e;c?this.each(function(){var c=b(this).data("jPlayer"),h=c&&b.isFunction(c[a])?c[a].apply(c,d):c;if(h!==c&&h!==f)return e=h,!1}):this.each(function(){var c=b(this).data("jPlayer");c?c.option(a|| +{}):b(this).data("jPlayer",new b.jPlayer(a,this))});return e};b.jPlayer=function(a,c){if(arguments.length){this.element=b(c);this.options=b.extend(!0,{},this.options,a);var d=this;this.element.bind("remove.jPlayer",function(){d.destroy()});this._init()}};"function"!==typeof b.fn.stop&&(b.fn.stop=function(){});b.jPlayer.emulateMethods="load play pause";b.jPlayer.emulateStatus="src readyState networkState currentTime duration paused ended playbackRate";b.jPlayer.emulateOptions="muted volume";b.jPlayer.reservedEvent= +"ready flashreset resize repeat error warning";b.jPlayer.event={};b.each("ready flashreset resize repeat click error warning loadstart progress suspend abort emptied stalled play pause loadedmetadata loadeddata waiting playing canplay canplaythrough seeking seeked timeupdate ended ratechange durationchange volumechange".split(" "),function(){b.jPlayer.event[this]="jPlayer_"+this});b.jPlayer.htmlEvent="loadstart abort emptied stalled loadedmetadata loadeddata canplay canplaythrough ratechange".split(" "); +b.jPlayer.pause=function(){b.each(b.jPlayer.prototype.instances,function(a,c){c.data("jPlayer").status.srcSet&&c.jPlayer("pause")})};b.jPlayer.timeFormat={showHour:!1,showMin:!0,showSec:!0,padHour:!1,padMin:!0,padSec:!0,sepHour:":",sepMin:":",sepSec:""};var l=function(){this.init()};l.prototype={init:function(){this.options={timeFormat:b.jPlayer.timeFormat}},time:function(a){var c=new Date(1E3*(a&&"number"===typeof a?a:0)),b=c.getUTCHours();a=this.options.timeFormat.showHour?c.getUTCMinutes():c.getUTCMinutes()+ +60*b;c=this.options.timeFormat.showMin?c.getUTCSeconds():c.getUTCSeconds()+60*a;b=this.options.timeFormat.padHour&&10>b?"0"+b:b;a=this.options.timeFormat.padMin&&10>a?"0"+a:a;c=this.options.timeFormat.padSec&&10>c?"0"+c:c;b=""+(this.options.timeFormat.showHour?b+this.options.timeFormat.sepHour:"");b+=this.options.timeFormat.showMin?a+this.options.timeFormat.sepMin:"";return b+=this.options.timeFormat.showSec?c+this.options.timeFormat.sepSec:""}};var m=new l;b.jPlayer.convertTime=function(a){return m.time(a)}; +b.jPlayer.uaBrowser=function(a){a=a.toLowerCase();var b=/(opera)(?:.*version)?[ \/]([\w.]+)/,d=/(msie) ([\w.]+)/,e=/(mozilla)(?:.*? rv:([\w.]+))?/;a=/(webkit)[ \/]([\w.]+)/.exec(a)||b.exec(a)||d.exec(a)||0>a.indexOf("compatible")&&e.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}};b.jPlayer.uaPlatform=function(a){var b=a.toLowerCase(),d=/(android)/,e=/(mobile)/;a=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/.exec(b)||[];b=/(ipad|playbook)/.exec(b)||!e.exec(b)&&d.exec(b)|| +[];a[1]&&(a[1]=a[1].replace(/\s/g,"_"));return{platform:a[1]||"",tablet:b[1]||""}};b.jPlayer.browser={};b.jPlayer.platform={};var j=b.jPlayer.uaBrowser(navigator.userAgent);j.browser&&(b.jPlayer.browser[j.browser]=!0,b.jPlayer.browser.version=j.version);j=b.jPlayer.uaPlatform(navigator.userAgent);j.platform&&(b.jPlayer.platform[j.platform]=!0,b.jPlayer.platform.mobile=!j.tablet,b.jPlayer.platform.tablet=!!j.tablet);b.jPlayer.getDocMode=function(){var a;b.jPlayer.browser.msie&&(document.documentMode? +a=document.documentMode:(a=5,document.compatMode&&"CSS1Compat"===document.compatMode&&(a=7)));return a};b.jPlayer.browser.documentMode=b.jPlayer.getDocMode();b.jPlayer.nativeFeatures={init:function(){var a=document,b=a.createElement("video"),d={w3c:"fullscreenEnabled fullscreenElement requestFullscreen exitFullscreen fullscreenchange fullscreenerror".split(" "),moz:"mozFullScreenEnabled mozFullScreenElement mozRequestFullScreen mozCancelFullScreen mozfullscreenchange mozfullscreenerror".split(" "), +webkit:" webkitCurrentFullScreenElement webkitRequestFullScreen webkitCancelFullScreen webkitfullscreenchange ".split(" "),webkitVideo:"webkitSupportsFullscreen webkitDisplayingFullscreen webkitEnterFullscreen webkitExitFullscreen ".split(" ")},e=["w3c","moz","webkit","webkitVideo"],g,h;this.fullscreen=b={support:{w3c:!!a[d.w3c[0]],moz:!!a[d.moz[0]],webkit:"function"===typeof a[d.webkit[3]],webkitVideo:"function"===typeof b[d.webkitVideo[2]]},used:{}};g=0;for(h=e.length;g','','','',''];c=document.createElement(''); +for(var e=0;e=a&&(b=!0);return b},_validString:function(a){return a&&"string"===typeof a},_limitValue:function(a,b,d){return ad?d:a},_urlNotSetError:function(a){this._error({type:b.jPlayer.error.URL_NOT_SET,context:a,message:b.jPlayer.errorMsg.URL_NOT_SET,hint:b.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(a){var c;c=this.internal.ready?"FLASH_DISABLED":"FLASH";this._error({type:b.jPlayer.error[c],context:this.internal.flash.swf, +message:b.jPlayer.errorMsg[c]+a.message,hint:b.jPlayer.errorHint[c]});this.internal.flash.jq.css({width:"1px",height:"1px"})},_error:function(a){this._trigger(b.jPlayer.event.error,a);this.options.errorAlerts&&this._alert("Error!"+(a.message?"\n\n"+a.message:"")+(a.hint?"\n\n"+a.hint:"")+"\n\nContext: "+a.context)},_warning:function(a){this._trigger(b.jPlayer.event.warning,f,a);this.options.warningAlerts&&this._alert("Warning!"+(a.message?"\n\n"+a.message:"")+(a.hint?"\n\n"+a.hint:"")+"\n\nContext: "+ +a.context)},_alert:function(a){alert("jPlayer "+this.version.script+" : id='"+this.internal.self.id+"' : "+a)},_emulateHtmlBridge:function(){var a=this;b.each(b.jPlayer.emulateMethods.split(/\s+/g),function(b,d){a.internal.domNode[d]=function(b){a[d](b)}});b.each(b.jPlayer.event,function(c,d){var e=!0;b.each(b.jPlayer.reservedEvent.split(/\s+/g),function(a,b){if(b===c)return e=!1});e&&a.element.bind(d+".jPlayer.jPlayerHtml",function(){a._emulateHtmlUpdate();var b=document.createEvent("Event");b.initEvent(c, +!1,!0);a.internal.domNode.dispatchEvent(b)})})},_emulateHtmlUpdate:function(){var a=this;b.each(b.jPlayer.emulateStatus.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.status[d]});b.each(b.jPlayer.emulateOptions.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.options[d]})},_destroyHtmlBridge:function(){var a=this;this.element.unbind(".jPlayerHtml");b.each((b.jPlayer.emulateMethods+" "+b.jPlayer.emulateStatus+" "+b.jPlayer.emulateOptions).split(/\s+/g),function(b,d){delete a.internal.domNode[d]})}}; +b.jPlayer.error={FLASH:"e_flash",FLASH_DISABLED:"e_flash_disabled",NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"};b.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",FLASH_DISABLED:"jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ",NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.", +NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayer "+b.jPlayer.prototype.version.script+" needs Jplayer.swf version "+b.jPlayer.prototype.version.needFlash+" but found "};b.jPlayer.errorHint={FLASH:"Check your swfPath option and that Jplayer.swf is there.",FLASH_DISABLED:"Check that you have not display:none; the jPlayer entity or any ancestor.", +NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."};b.jPlayer.warning={CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method",CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"};b.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of css selectors found did not equal one: ", +CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",OPTION_KEY:"The option requested in jPlayer('option') is undefined."};b.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.",CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}}); \ No newline at end of file diff --git a/js/jquery.sharrre.min.js b/js/jquery.sharrre.min.js new file mode 100644 index 00000000..4669e71f --- /dev/null +++ b/js/jquery.sharrre.min.js @@ -0,0 +1,7 @@ +/*! + * Sharrre.com - Make your sharing widget! + * Version: beta 1.3.5 + * Author: Julien Hany + * License: MIT http://en.wikipedia.org/wiki/MIT_License or GPLv2 http://en.wikipedia.org/wiki/GNU_General_Public_License + */ +;(function(g,i,j,b){var h="sharrre",f={className:"sharrre",share:{googlePlus:false,facebook:false,twitter:false,digg:false,delicious:false,stumbleupon:false,linkedin:false,pinterest:false},shareTotal:0,template:"",title:"",url:j.location.href,text:j.title,urlCurl:"sharrre.php",count:{},total:0,shorterTotal:true,enableHover:true,enableCounter:true,enableTracking:false,hover:function(){},hide:function(){},click:function(){},render:function(){},buttons:{googlePlus:{url:"",urlCount:false,size:"medium",lang:"en-US",annotation:""},facebook:{url:"",urlCount:false,action:"like",layout:"button_count",width:"",send:"false",faces:"false",colorscheme:"",font:"",lang:"en_US"},twitter:{url:"",urlCount:false,count:"horizontal",hashtags:"",via:"",related:"",lang:"en"},digg:{url:"",urlCount:false,type:"DiggCompact"},delicious:{url:"",urlCount:false,size:"medium"},stumbleupon:{url:"",urlCount:false,layout:"1"},linkedin:{url:"",urlCount:false,counter:""},pinterest:{url:"",media:"",description:"",layout:"horizontal"}}},c={googlePlus:"",facebook:"https://graph.facebook.com/fql?q=SELECT%20url,%20normalized_url,%20share_count,%20like_count,%20comment_count,%20total_count,commentsbox_count,%20comments_fbid,%20click_count%20FROM%20link_stat%20WHERE%20url=%27{url}%27&callback=?",twitter:"http://cdn.api.twitter.com/1/urls/count.json?url={url}&callback=?",digg:"http://services.digg.com/2.0/story.getInfo?links={url}&type=javascript&callback=?",delicious:"http://feeds.delicious.com/v2/json/urlinfo/data?url={url}&callback=?",stumbleupon:"",linkedin:"http://www.linkedin.com/countserv/count/share?format=jsonp&url={url}&callback=?",pinterest:"http://api.pinterest.com/v1/urls/count.json?url={url}&callback=?"},l={googlePlus:function(m){var n=m.options.buttons.googlePlus;g(m.element).find(".buttons").append('
    ');i.___gcfg={lang:m.options.buttons.googlePlus.lang};var o=0;if(typeof gapi==="undefined"&&o==0){o=1;(function(){var p=j.createElement("script");p.type="text/javascript";p.async=true;p.src="//apis.google.com/js/plusone.js";var q=j.getElementsByTagName("script")[0];q.parentNode.insertBefore(p,q)})()}else{gapi.plusone.go()}},facebook:function(m){var n=m.options.buttons.facebook;g(m.element).find(".buttons").append('');var o=0;if(typeof FB==="undefined"&&o==0){o=1;(function(t,p,u){var r,q=t.getElementsByTagName(p)[0];if(t.getElementById(u)){return}r=t.createElement(p);r.id=u;r.src="//connect.facebook.net/"+n.lang+"/all.js#xfbml=1";q.parentNode.insertBefore(r,q)}(j,"script","facebook-jssdk"))}else{FB.XFBML.parse()}},twitter:function(m){var n=m.options.buttons.twitter;g(m.element).find(".buttons").append('');var o=0;if(typeof twttr==="undefined"&&o==0){o=1;(function(){var q=j.createElement("script");q.type="text/javascript";q.async=true;q.src="//platform.twitter.com/widgets.js";var p=j.getElementsByTagName("script")[0];p.parentNode.insertBefore(q,p)})()}else{g.ajax({url:"//platform.twitter.com/widgets.js",dataType:"script",cache:true})}},digg:function(m){var n=m.options.buttons.digg;g(m.element).find(".buttons").append('
    ');var o=0;if(typeof __DBW==="undefined"&&o==0){o=1;(function(){var q=j.createElement("SCRIPT"),p=j.getElementsByTagName("SCRIPT")[0];q.type="text/javascript";q.async=true;q.src="//widgets.digg.com/buttons.js";p.parentNode.insertBefore(q,p)})()}},delicious:function(o){if(o.options.buttons.delicious.size=="tall"){var p="width:50px;",n="height:35px;width:50px;font-size:15px;line-height:35px;",m="height:18px;line-height:18px;margin-top:3px;"}else{var p="width:93px;",n="float:right;padding:0 3px;height:20px;width:26px;line-height:20px;",m="float:left;height:20px;line-height:20px;"}var q=o.shorterTotal(o.options.count.delicious);if(typeof q==="undefined"){q=0}g(o.element).find(".buttons").append('
    '+q+'
    Delicious Add
    ');g(o.element).find(".delicious").on("click",function(){o.openPopup("delicious")})},stumbleupon:function(m){var n=m.options.buttons.stumbleupon;g(m.element).find(".buttons").append('
    ');var o=0;if(typeof STMBLPN==="undefined"&&o==0){o=1;(function(){var p=j.createElement("script");p.type="text/javascript";p.async=true;p.src="//platform.stumbleupon.com/1/widgets.js";var q=j.getElementsByTagName("script")[0];q.parentNode.insertBefore(p,q)})();s=i.setTimeout(function(){if(typeof STMBLPN!=="undefined"){STMBLPN.processWidgets();clearInterval(s)}},500)}else{STMBLPN.processWidgets()}},linkedin:function(m){var n=m.options.buttons.linkedin;g(m.element).find(".buttons").append('
    '; + + /* set background color */ + $background_color = isset( $field_value['background-color'] ) ? esc_attr( $field_value['background-color'] ) : ''; + + /* set border color */ + $border_color = in_array( $background_color, array( '#FFFFFF', '#FFF', '#ffffff', '#fff' ) ) ? '#ccc' : $background_color; + + /* input */ + echo ''; + + echo '
    '; + + echo '
    '; + + echo '
    '; + + /* build background repeat */ + $background_repeat = isset( $field_value['background-repeat'] ) ? esc_attr( $field_value['background-repeat'] ) : ''; + echo ''; + + /* build background attachment */ + $background_attachment = isset( $field_value['background-attachment'] ) ? esc_attr( $field_value['background-attachment'] ) : ''; + echo ''; + + /* build background position */ + $background_position = isset( $field_value['background-position'] ) ? esc_attr( $field_value['background-position'] ) : ''; + echo ''; + + echo '
    '; + + /* build background image */ + echo '
    '; + + /* input */ + echo ''; + + /* add media button */ + echo '' . __( 'Add Media', 'option-tree' ) . ''; + + echo '
    '; + + /* media */ + if ( isset( $field_value['background-image'] ) && $field_value['background-image'] !== '' ) { + + echo '
    '; + + if ( preg_match( '/\.(?:jpe?g|png|gif|ico)$/i', $field_value['background-image'] ) ) + echo '
    '; + + echo '' . __( 'Remove Media', 'option-tree' ) . ''; + + echo '
    '; + + } + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Category Checkbox option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_category_checkbox' ) ) { + + function ot_type_category_checkbox( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* get category array */ + $categories = get_categories( array( 'hide_empty' => false ) ); + + /* build categories */ + if ( ! empty( $categories ) ) { + foreach ( $categories as $category ) { + echo '

    '; + echo 'term_id] ) ? checked( $field_value[$category->term_id], $category->term_id, false ) : '' ) . ' class="option-tree-ui-checkbox ' . esc_attr( $field_class ) . '" />'; + echo ''; + echo '

    '; + } + } else { + echo '

    ' . __( 'No Categories Found', 'option-tree' ) . '

    '; + } + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Category Select option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_category_select' ) ) { + + function ot_type_category_select( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* build category */ + echo ''; + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Checkbox option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_checkbox' ) ) { + + function ot_type_checkbox( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* build checkbox */ + foreach ( (array) $field_choices as $key => $choice ) { + if ( isset( $choice['value'] ) && isset( $choice['label'] ) ) { + echo '

    '; + echo ''; + echo ''; + echo '

    '; + } + } + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Colorpicker option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_colorpicker' ) ) { + + function ot_type_colorpicker( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* build colorpicker */ + echo '
    '; + + /* colorpicker JS */ + echo ''; + + /* input */ + echo ''; + + /* set border color */ + $border_color = in_array( $field_value, array( '#FFFFFF', '#FFF', '#ffffff', '#fff' ) ) ? '#ccc' : esc_attr( $field_value ); + + echo '
    '; + + echo '
    '; + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * CSS option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_css' ) ) { + + function ot_type_css( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* build textarea for CSS */ + echo ''; + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Custom Post Type Checkbox option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_custom_post_type_checkbox' ) ) { + + function ot_type_custom_post_type_checkbox( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* setup the post types */ + $post_type = isset( $field_post_type ) ? explode( ',', $field_post_type ) : array( 'post' ); + + /* query posts array */ + $my_posts = get_posts( apply_filters( 'ot_type_custom_post_type_checkbox_query', array( 'post_type' => $post_type, 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ), $field_id ) ); + + /* has posts */ + if ( is_array( $my_posts ) && ! empty( $my_posts ) ) { + foreach( $my_posts as $my_post ){ + echo '

    '; + echo 'ID] ) ? checked( $field_value[$my_post->ID], $my_post->ID, false ) : '' ) . ' class="option-tree-ui-checkbox ' . esc_attr( $field_class ) . '" />'; + echo ''; + echo '

    '; + } + } else { + echo '

    ' . __( 'No Posts Found', 'option-tree' ) . '

    '; + } + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Custom Post Type Select option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_custom_post_type_select' ) ) { + + function ot_type_custom_post_type_select( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* build category */ + echo ''; + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * List Item option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_list_item' ) ) { + + function ot_type_list_item( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* pass the settings array arround */ + echo ''; + + /** + * settings pages have array wrappers like 'option_tree'. + * So we need that value to create a proper array to save to. + * This is only for NON metaboxes settings. + */ + if ( ! isset( $get_option ) ) + $get_option = ''; + + /* build list items */ + echo '
      '; + + if ( is_array( $field_value ) && ! empty( $field_value ) ) { + + foreach( $field_value as $key => $list_item ) { + + echo '
    • '; + ot_list_item_view( $field_id, $key, $list_item, $post_id, $get_option, $field_settings, $type ); + echo '
    • '; + + } + + } + + echo '
    '; + + /* button */ + echo '' . __( 'Add New', 'option-tree' ) . ''; + + /* description */ + echo '
    ' . apply_filters( 'ot_list_item_description', __( 'You can re-order with drag & drop, the order will update after saving.', 'option-tree' ), $field_id ) . '
    '; + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Measurement option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_measurement' ) ) { + + function ot_type_measurement( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + echo '
    '; + + echo ''; + + echo '
    '; + + /* build measurement */ + echo ''; + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Numeric Slider option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.1 + */ +if( ! function_exists( 'ot_type_numeric_slider' ) ) { + + function ot_type_numeric_slider( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + $_options = explode( ',', $field_min_max_step ); + $min = isset( $_options[0] ) ? $_options[0] : 0; + $max = isset( $_options[1] ) ? $_options[1] : 100; + $step = isset( $_options[2] ) ? $_options[2] : 1; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + echo '
    '; + + echo ''; + + echo ''; + + echo '
    '; + + echo '
    '; + + echo '
    '; + + echo '
    '; + } + +} + +/** + * Page Checkbox option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_page_checkbox' ) ) { + + function ot_type_page_checkbox( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* query pages array */ + $my_posts = get_posts( apply_filters( 'ot_type_page_checkbox_query', array( 'post_type' => array( 'page' ), 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ), $field_id ) ); + + /* has pages */ + if ( is_array( $my_posts ) && ! empty( $my_posts ) ) { + foreach( $my_posts as $my_post ){ + echo '

    '; + echo 'ID] ) ? checked( $field_value[$my_post->ID], $my_post->ID, false ) : '' ) . ' class="option-tree-ui-checkbox ' . esc_attr( $field_class ) . '" />'; + echo ''; + echo '

    '; + } + } else { + echo '

    ' . __( 'No Pages Found', 'option-tree' ) . '

    '; + } + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Page Select option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_page_select' ) ) { + + function ot_type_page_select( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* build page select */ + echo ''; + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * List Item option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_slider' ) ) { + + function ot_type_slider( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* pass the settings array arround */ + echo ''; + + /** + * settings pages have array wrappers like 'option_tree'. + * So we need that value to create a proper array to save to. + * This is only for NON metaboxes settings. + */ + if ( ! isset( $get_option ) ) + $get_option = ''; + + /* build list items */ + echo '
      '; + + if ( is_array( $field_value ) && ! empty( $field_value ) ) { + + foreach( $field_value as $key => $list_item ) { + + echo '
    • '; + ot_list_item_view( $field_id, $key, $list_item, $post_id, $get_option, $field_settings, $type ); + echo '
    • '; + + } + + } + + echo '
    '; + + /* button */ + echo '' . __( 'Add New', 'option-tree' ) . ''; + + /* description */ + echo '
    ' . __( 'You can re-order with drag & drop, the order will update after saving.', 'option-tree' ) . '
    '; + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Post Checkbox option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_post_checkbox' ) ) { + + function ot_type_post_checkbox( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* query posts array */ + $my_posts = get_posts( apply_filters( 'ot_type_post_checkbox_query', array( 'post_type' => array( 'post' ), 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_status' => 'any' ), $field_id ) ); + + /* has posts */ + if ( is_array( $my_posts ) && ! empty( $my_posts ) ) { + foreach( $my_posts as $my_post ){ + echo '

    '; + echo 'ID] ) ? checked( $field_value[$my_post->ID], $my_post->ID, false ) : '' ) . ' class="option-tree-ui-checkbox ' . esc_attr( $field_class ) . '" />'; + echo ''; + echo '

    '; + } + } else { + echo '

    ' . __( 'No Posts Found', 'option-tree' ) . '

    '; + } + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Post Select option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_post_select' ) ) { + + function ot_type_post_select( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* build page select */ + echo ''; + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Radio option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_radio' ) ) { + + function ot_type_radio( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* build radio */ + foreach ( (array) $field_choices as $key => $choice ) { + echo '

    '; + } + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Radio Images option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_radio_image' ) ) { + + function ot_type_radio_image( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /** + * load the default filterable images if nothing + * has been set in the choices array. + */ + if ( empty( $field_choices ) ) + $field_choices = ot_radio_images( $field_id ); + + /* build radio image */ + foreach ( (array) $field_choices as $key => $choice ) { + + $src = str_replace( 'OT_URL', OT_URL, $choice['src'] ); + $src = str_replace( 'OT_THEME_URL', OT_THEME_URL, $src ); + + echo '
    '; + echo '

    '; + echo '' . esc_attr( $choice['label'] ) .''; + echo '
    '; + } + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Select option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_select' ) ) { + + function ot_type_select( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* build select */ + echo ''; + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Sidebar Select option type. + * + * This option type makes it possible for users to select a WordPress registered sidebar + * to use on a specific area. By using the two provided filters, 'ot_recognized_sidebars', + * and 'ot_recognized_sidebars_{$field_id}' we can be selective about which sidebars are + * available on a specific content area. + * + * For example, if we create a WordPress theme that provides the ability to change the + * Blog Sidebar and we don't want to have the footer sidebars available on this area, + * we can unset those sidebars either manually or by using a regular expression if we + * have a common name like footer-sidebar-$i. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.1 + */ +if ( ! function_exists( 'ot_type_sidebar_select' ) ) { + + function ot_type_sidebar_select( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* build page select */ + echo ''; + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Tag Checkbox option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_tag_checkbox' ) ) { + + function ot_type_tag_checkbox( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* get tags */ + $tags = get_tags( array( 'hide_empty' => false ) ); + + /* has tags */ + if ( $tags ) { + foreach( $tags as $tag ) { + echo '

    '; + echo 'term_id] ) ? checked( $field_value[$tag->term_id], $tag->term_id, false ) : '' ) . ' class="option-tree-ui-checkbox ' . esc_attr( $field_class ) . '" />'; + echo ''; + echo '

    '; + } + } else { + echo '

    ' . __( 'No Tags Found', 'option-tree' ) . '

    '; + } + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Tag Select option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_tag_select' ) ) { + + function ot_type_tag_select( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* build tag select */ + echo ''; + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Taxonomy Checkbox option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_taxonomy_checkbox' ) ) { + + function ot_type_taxonomy_checkbox( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* setup the taxonomy */ + $taxonomy = isset( $field_taxonomy ) ? explode( ',', $field_taxonomy ) : array( 'category' ); + + /* get taxonomies */ + $taxonomies = get_categories( array( 'hide_empty' => false, 'taxonomy' => $taxonomy ) ); + + /* has tags */ + if ( $taxonomies ) { + foreach( $taxonomies as $taxonomy ) { + echo '

    '; + echo 'term_id] ) ? checked( $field_value[$taxonomy->term_id], $taxonomy->term_id, false ) : '' ) . ' class="option-tree-ui-checkbox ' . esc_attr( $field_class ) . '" />'; + echo ''; + echo '

    '; + } + } else { + echo '

    ' . __( 'No Taxonomies Found', 'option-tree' ) . '

    '; + } + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Taxonomy Select option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_taxonomy_select' ) ) { + + function ot_type_taxonomy_select( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* build tag select */ + echo ''; + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Text option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_text' ) ) { + + function ot_type_text( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* build text input */ + echo ''; + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Textarea option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_textarea' ) ) { + + function ot_type_textarea( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* build textarea */ + wp_editor( + $field_value, + esc_attr( $field_id ), + array( + 'editor_class' => esc_attr( $field_class ), + 'wpautop' => apply_filters( 'ot_wpautop', false, $field_id ), + 'media_buttons' => apply_filters( 'ot_media_buttons', true, $field_id ), + 'textarea_name' => esc_attr( $field_name ), + 'textarea_rows' => esc_attr( $field_rows ), + 'tinymce' => apply_filters( 'ot_tinymce', true, $field_id ), + 'quicktags' => apply_filters( 'ot_quicktags', array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close' ), $field_id ) + ) + ); + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Textarea Simple option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_textarea_simple' ) ) { + + function ot_type_textarea_simple( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* filter to allow wpautop */ + $wpautop = apply_filters( 'ot_wpautop', false, $field_id ); + + /* wpautop $field_value */ + if ( $wpautop == true ) + $field_value = wpautop( $field_value ); + + /* build textarea simple */ + echo ''; + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Textblock option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_textblock' ) ) { + + function ot_type_textblock( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo '
    ' . htmlspecialchars_decode( $field_desc ) . '
    '; + + echo '
    '; + + } + +} + +/** + * Textblock Titled option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_textblock_titled' ) ) { + + function ot_type_textblock_titled( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo '
    ' . htmlspecialchars_decode( $field_desc ) . '
    '; + + echo '
    '; + + } + +} + +/** + * Typography option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_typography' ) ) { + + function ot_type_typography( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* allow fields to be filtered */ + $ot_recognized_typography_fields = apply_filters( 'ot_recognized_typography_fields', array( + 'font-color', + 'font-family', + 'font-size', + 'font-style', + 'font-variant', + 'font-weight', + 'letter-spacing', + 'line-height', + 'text-decoration', + 'text-transform' + ), $field_id ); + + /* build background colorpicker */ + if ( in_array( 'font-color', $ot_recognized_typography_fields ) ) { + + echo '
    '; + + /* colorpicker JS */ + echo ''; + + /* set background color */ + $background_color = isset( $field_value['font-color'] ) ? esc_attr( $field_value['font-color'] ) : ''; + + /* set border color */ + $border_color = in_array( $background_color, array( '#FFFFFF', '#FFF', '#ffffff', '#fff' ) ) ? '#ccc' : $background_color; + + /* input */ + echo ''; + + echo '
    '; + + echo '
    '; + + } + + /* build font family */ + if ( in_array( 'font-family', $ot_recognized_typography_fields ) ) { + $font_family = isset( $field_value['font-family'] ) ? $field_value['font-family'] : ''; + echo ''; + } + + /* build font size */ + if ( in_array( 'font-size', $ot_recognized_typography_fields ) ) { + $font_size = isset( $field_value['font-size'] ) ? esc_attr( $field_value['font-size'] ) : ''; + echo ''; + } + + /* build font style */ + if ( in_array( 'font-style', $ot_recognized_typography_fields ) ) { + $font_style = isset( $field_value['font-style'] ) ? esc_attr( $field_value['font-style'] ) : ''; + echo ''; + } + + /* build font variant */ + if ( in_array( 'font-variant', $ot_recognized_typography_fields ) ) { + $font_variant = isset( $field_value['font-variant'] ) ? esc_attr( $field_value['font-variant'] ) : ''; + echo ''; + } + + /* build font weight */ + if ( in_array( 'font-weight', $ot_recognized_typography_fields ) ) { + $font_weight = isset( $field_value['font-weight'] ) ? esc_attr( $field_value['font-weight'] ) : ''; + echo ''; + } + + /* build letter spacing */ + if ( in_array( 'letter-spacing', $ot_recognized_typography_fields ) ) { + $letter_spacing = isset( $field_value['letter-spacing'] ) ? esc_attr( $field_value['letter-spacing'] ) : ''; + echo ''; + } + + /* build line height */ + if ( in_array( 'line-height', $ot_recognized_typography_fields ) ) { + $line_height = isset( $field_value['line-height'] ) ? esc_attr( $field_value['line-height'] ) : ''; + echo ''; + } + + /* build text decoration */ + if ( in_array( 'text-decoration', $ot_recognized_typography_fields ) ) { + $text_decoration = isset( $field_value['text-decoration'] ) ? esc_attr( $field_value['text-decoration'] ) : ''; + echo ''; + } + + /* build text transform */ + if ( in_array( 'text-transform', $ot_recognized_typography_fields ) ) { + $text_transform = isset( $field_value['text-transform'] ) ? esc_attr( $field_value['text-transform'] ) : ''; + echo ''; + } + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Upload option type. + * + * See @ot_display_by_type to see the full list of available arguments. + * + * @param array An array of arguments. + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_upload' ) ) { + + function ot_type_upload( $args = array() ) { + + /* turns arguments array into variables */ + extract( $args ); + + /* verify a description */ + $has_desc = $field_desc ? true : false; + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo $has_desc ? '
    ' . htmlspecialchars_decode( $field_desc ) . '
    ' : ''; + + /* format setting inner wrapper */ + echo '
    '; + + /* build upload */ + echo '
    '; + + /* input */ + echo ''; + + /* add media button */ + echo '' . __( 'Add Media', 'option-tree' ) . ''; + + echo '
    '; + + /* media */ + if ( $field_value ) { + + echo '
    '; + + if ( preg_match( '/\.(?:jpe?g|png|gif|ico)$/i', $field_value ) ) + echo '
    '; + + echo '' . __( 'Remove Media', 'option-tree' ) . ''; + + echo '
    '; + + } + + echo '
    '; + + echo '
    '; + + } + +} + +/* End of file ot-functions-option-types.php */ +/* Location: ./includes/ot-functions-option-types.php */ \ No newline at end of file diff --git a/option-tree/includes/ot-functions-settings-page.php b/option-tree/includes/ot-functions-settings-page.php new file mode 100644 index 00000000..01d64846 --- /dev/null +++ b/option-tree/includes/ot-functions-settings-page.php @@ -0,0 +1,570 @@ + + * @copyright Copyright (c) 2013, Derek Herman + * @since 2.0 + */ + +/** + * Create option type. + * + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_theme_options_ui' ) ) { + + function ot_type_theme_options_ui() { + global $blog_id; + + echo '
    '; + + /* form nonce */ + wp_nonce_field( 'option_tree_settings_form', 'option_tree_settings_nonce' ); + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo '
    '; + + echo '

    '. __( 'Warning!', 'option-tree' ) . '

    '; + echo '

    ' . sprintf( __( 'Go to the %s page if you want to save data, this page is for adding settings.', 'option-tree' ), 'Appearance->Theme Options' ) . '

    '; + echo '

    ' . sprintf( __( 'If you\'re unsure or not completely positive that you should be editing these settings, you should read the %s first.', 'option-tree' ), 'OptionTree->Documentation' ) . '

    '; + echo '

    '. __( 'Things could break or be improperly displayed to the end-user if you do one of the following:', 'option-tree' ) . '

    '; + echo '

    ' . __( 'Give two sections the same ID, give two settings the same ID, give two contextual help content areas the same ID, don\'t create any settings, or have a section at the end of the settings list.', 'option-tree' ) . '

    '; + echo '

    ' . __( 'You can create as many settings as your project requires and use them how you see fit. When you add a setting here, it will be available on the Theme Options page for use in your theme. To separate your settings into sections, click the "Add Section" button, fill in the input fields, and a new navigation menu item will be created.', 'option-tree' ) . '

    '; + echo '

    ' . __( 'All of the settings can be sorted and rearranged to your liking with Drag & Drop. Don\'t worry about the order in which you create your settings, you can always reorder them.', 'option-tree' ) . '

    '; + + echo '
    '; + + /* get the saved settings */ + $settings = get_option( 'option_tree_settings' ); + + /* wrap settings array */ + echo '
    '; + + /* set count to zero */ + $count = 0; + + /* loop through each section and its settings */ + echo '
      '; + + if ( isset( $settings['sections'] ) ) { + + foreach( $settings['sections'] as $section ) { + + /* section */ + echo '
    • ' . ot_sections_view( 'option_tree_settings[sections]', $count, $section ) . '
    • '; + + /* increment item count */ + $count++; + + /* settings in this section */ + if ( isset( $settings['settings'] ) ) { + + foreach( $settings['settings'] as $setting ) { + + if ( isset( $setting['section'] ) && $setting['section'] == $section['id'] ) { + + echo '
    • ' . ot_settings_view( 'option_tree_settings[settings]', $count, $setting ) . '
    • '; + + /* increment item count */ + $count++; + + } + + } + + } + + } + + } + + echo '
    '; + + /* buttons */ + echo '' . __( 'Add Section', 'option-tree' ) . ''; + echo '' . __( 'Add Setting', 'option-tree' ) . ''; + echo ''; + + /* sidebar textarea */ + echo ' +
    +

    ' . __( 'Contextual Help', 'option-tree' ) . '

    +
    +
    +
    +
    ' . __( 'Contextual Help Sidebar', 'option-tree' ) . ': ' . __( 'If you decide to add contextual help to the Theme Option page, enter the optional "Sidebar" HTML here. This would be an extremely useful place to add links to your themes documentation or support forum. Only after you\'ve added some content below will this display to the user.', 'option-tree' ) . '
    +
    + +
    +
    +
    '; + + /* set count to zero */ + $count = 0; + + /* loop through each contextual_help content section */ + echo '
      '; + + if ( isset( $settings['contextual_help']['content'] ) ) { + + foreach( $settings['contextual_help']['content'] as $content ) { + + /* content */ + echo '
    • ' . ot_contextual_help_view( 'option_tree_settings[contextual_help][content]', $count, $content ) . '
    • '; + + /* increment content count */ + $count++; + + } + + } + + echo '
    '; + + echo '' . __( 'Add Contextual Help Content', 'option-tree' ) . ''; + echo ''; + + echo '
    '; + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Import XML option type. + * + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_import_xml' ) ) { + + function ot_type_import_xml() { + + echo '
    '; + + /* form nonce */ + wp_nonce_field( 'import_xml_form', 'import_xml_nonce' ); + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo '
    '; + + echo '

    ' . __( 'This import method has been deprecated. That means it has been replaced by a new method and is no longer supported, and may be removed from future versions. All themes that use this import method should be converted to use its replacement below.', 'option-tree' ) . '

    '; + + echo '

    ' . __( 'If you were given a Theme Options XML file with a premium or free theme, locate it on your hard drive and upload that file by clicking the blue upload button. A popup window will appear, upload the XML file and click "Send to OptionTree". The file URL should be in the upload input, if it is click "Import XML".', 'option-tree' ) . '

    '; + + /* button */ + echo ''; + + echo '
    '; + + echo '
    '; + + /* build upload */ + echo '
    '; + + /* input */ + echo ''; + + /* get media post_id */ + $post_id = ( $id = ot_get_media_post_ID() ) ? (int) $id : 0; + + /* add xml button */ + echo '' . __( 'Add XML', 'option-tree' ) . ''; + + echo '
    '; + + echo '
    '; + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Import Settings option type. + * + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_import_settings' ) ) { + + function ot_type_import_settings() { + + echo '
    '; + + /* form nonce */ + wp_nonce_field( 'import_settings_form', 'import_settings_nonce' ); + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo '
    '; + + echo '

    ' . __( 'To import your Settings copy and paste what appears to be a random string of alpha numeric characters into this textarea and press the "Import Settings" button.', 'option-tree' ) . '

    '; + + /* button */ + echo ''; + + echo '
    '; + + /* textarea */ + echo '
    '; + + echo ''; + + echo '
    '; + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Import Data option type. + * + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_import_data' ) ) { + + function ot_type_import_data() { + + echo '
    '; + + /* form nonce */ + wp_nonce_field( 'import_data_form', 'import_data_nonce' ); + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo '
    '; + + if ( OT_SHOW_SETTINGS_IMPORT ) echo '

    ' . __( 'Only after you\'ve imported the Settings should you try and update your Theme Options.', 'option-tree' ) . '

    '; + + echo '

    ' . __( 'To import your Theme Options copy and paste what appears to be a random string of alpha numeric characters into this textarea and press the "Import Theme Options" button.', 'option-tree' ) . '

    '; + + /* button */ + echo ''; + + echo '
    '; + + /* textarea */ + echo '
    '; + + echo ''; + + echo '
    '; + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Import Layouts option type. + * + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_import_layouts' ) ) { + + function ot_type_import_layouts() { + + echo '
    '; + + /* form nonce */ + wp_nonce_field( 'import_layouts_form', 'import_layouts_nonce' ); + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo '
    '; + + if ( OT_SHOW_SETTINGS_IMPORT ) echo '

    ' . __( 'Only after you\'ve imported the Settings should you try and update your Layouts.', 'option-tree' ) . '

    '; + + echo '

    ' . __( 'To import your Layouts copy and paste what appears to be a random string of alpha numeric characters into this textarea and press the "Import Layouts" button. Keep in mind that when you import your layouts, the active layout\'s saved data will write over the current data set for your Theme Options.', 'option-tree' ) . '

    '; + + /* button */ + echo ''; + + echo '
    '; + + /* textarea */ + echo '
    '; + + echo ''; + + echo '
    '; + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Export Settings File option type. + * + * @return string + * + * @access public + * @since 2.0.8 + */ +if ( ! function_exists( 'ot_type_export_settings_file' ) ) { + + function ot_type_export_settings_file() { + global $blog_id; + + echo '
    '; + + /* form nonce */ + wp_nonce_field( 'export_settings_file_form', 'export_settings_file_nonce' ); + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo '
    '; + + echo '

    ' . sprintf( __( 'Export your Settings into a fully functional theme-options.php file by clicking this button. For more information on how to use this file read the theme mode %s. Remember, you should always check the file for errors before including it in your theme.', 'option-tree' ), 'OptionTree->Documentation' ) . '

    '; + + echo '
    '; + + echo '
    '; + + /* button */ + echo ''; + + echo '
    '; + + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Export Settings option type. + * + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_export_settings' ) ) { + + function ot_type_export_settings() { + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo '
    '; + + echo '

    ' . __( 'Export your Settings by highlighting this text and doing a copy/paste into a blank .txt file. Then save the file for importing into another install of WordPress later. Alternatively, you could just paste it into the OptionTree->Settings->Import Settings textarea on another web site.', 'option-tree' ) . '

    '; + + echo '
    '; + + /* get theme options data */ + $settings = get_option( 'option_tree_settings' ); + $settings = ! empty( $settings ) ? ot_encode( serialize( $settings ) ) : ''; + + echo '
    '; + echo ''; + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Export Data option type. + * + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_export_data' ) ) { + + function ot_type_export_data() { + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo '
    '; + + echo '

    ' . __( 'Export your Theme Options data by highlighting this text and doing a copy/paste into a blank .txt file. Then save the file for importing into another install of WordPress later. Alternatively, you could just paste it into the OptionTree->Settings->Import Theme Options textarea on another web site.', 'option-tree' ) . '

    '; + + echo '
    '; + + /* get theme options data */ + $data = get_option( 'option_tree' ); + $data = ! empty( $data ) ? ot_encode( serialize( $data ) ) : ''; + + echo '
    '; + echo ''; + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Export Layouts option type. + * + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_export_layouts' ) ) { + + function ot_type_export_layouts() { + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo '
    '; + + echo '

    ' . __( 'Export your Layouts by highlighting this text and doing a copy/paste into a blank .txt file. Then save the file for importing into another install of WordPress later. Alternatively, you could just paste it into the OptionTree->Settings->Import Layouts textarea on another web site.', 'option-tree' ) . '

    '; + + + echo '
    '; + + /* get layout data */ + $layouts = get_option( 'option_tree_layouts' ); + $layouts = ! empty( $layouts ) ? ot_encode( serialize( $layouts ) ) : ''; + + echo '
    '; + echo ''; + echo '
    '; + + echo '
    '; + + } + +} + +/** + * Modify Layouts option type. + * + * @return string + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_type_modify_layouts' ) ) { + + function ot_type_modify_layouts() { + + echo '
    '; + + /* form nonce */ + wp_nonce_field( 'option_tree_modify_layouts_form', 'option_tree_modify_layouts_nonce' ); + + /* format setting outer wrapper */ + echo '
    '; + + /* description */ + echo '
    '; + + echo '

    ' . __( 'To add a new layout enter a unique lower case alphanumeric string (dashes allowed) in the text field and click "Save Layouts".', 'option-tree' ) . '

    '; + echo '

    ' . __( 'As well, you can activate, remove, and drag & drop the order; all situations require you to click "Save Layouts" for the changes to be applied.', 'option-tree' ) . '

    '; + echo '

    ' . __( 'When you create a new layout it will become active and any changes made to the Theme Options will be applied to it. If you switch back to a different layout immediately after creating a new layout that new layout will have a snapshot of the current Theme Options data attached to it.', 'option-tree' ) . '

    '; + if ( OT_SHOW_DOCS ) echo '

    ' . __( 'Visit OptionTree->Documentation->Layouts Overview to see a more in-depth description of what layouts are and how to use them.', 'option-tree' ) . '

    '; + + echo '
    '; + + echo '
    '; + + /* get the saved layouts */ + $layouts = get_option( 'option_tree_layouts' ); + + /* set active layout */ + $active_layout = isset( $layouts['active_layout'] ) ? $layouts['active_layout'] : ''; + + echo ''; + + /* add new layout */ + echo ''; + + /* loop through each layout */ + echo '
      '; + + if ( is_array( $layouts ) && ! empty( $layouts ) ) { + + foreach( $layouts as $key => $data ) { + + /* skip active layout array */ + if ( $key == 'active_layout' ) + continue; + + /* content */ + echo '
    • ' . ot_layout_view( $key, $data, $active_layout ) . '
    • '; + + } + + } + + echo '
    '; + + echo ''; + + echo '
    '; + + echo '
    '; + + echo '
    '; + + } + +} + +/* End of file ot-functions-settings-page.php */ +/* Location: ./includes/ot-functions-settings-page.php */ \ No newline at end of file diff --git a/option-tree/includes/ot-functions.php b/option-tree/includes/ot-functions.php new file mode 100644 index 00000000..d1701fe4 --- /dev/null +++ b/option-tree/includes/ot-functions.php @@ -0,0 +1,196 @@ + + * @copyright Copyright (c) 2013, Derek Herman + * @since 2.0 + */ + +/** + * Get Option. + * + * Helper function to return the option value. + * If no value has been saved, it returns $default. + * + * @param string The option ID. + * @param string The default option value. + * @return mixed + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_get_option' ) ) { + + function ot_get_option( $option_id, $default = '' ) { + + /* get the saved options */ + $options = get_option( 'option_tree' ); + + /* look for the saved value */ + if ( isset( $options[$option_id] ) && '' != $options[$option_id] ) { + + return ot_wpml_filter( $options, $option_id ); + + } + + return $default; + + } + +} + +/** + * Filter the return values through WPML + * + * @param array $options The current options + * @param string $option_id The option ID + * @return mixed + * + * @access public + * @since 2.1 + */ +if ( ! function_exists( 'ot_wpml_filter' ) ) { + + function ot_wpml_filter( $options, $option_id ) { + + // Return translated strings using WMPL + if ( function_exists('icl_t') ) { + + $settings = get_option( 'option_tree_settings' ); + + if ( isset( $settings['settings'] ) ) { + + foreach( $settings['settings'] as $setting ) { + + // List Item & Slider + if ( $option_id == $setting['id'] && in_array( $setting['type'], array( 'list-item', 'slider' ) ) ) { + + foreach( $options[$option_id] as $key => $value ) { + + foreach( $value as $ckey => $cvalue ) { + + $id = $option_id . '_' . $ckey . '_' . $key; + $_string = icl_t( 'Theme Options', $id, $cvalue ); + + if ( ! empty( $_string ) ) { + + $options[$option_id][$key][$ckey] = $_string; + + } + + } + + } + + // All other acceptable option types + } else if ( $option_id == $setting['id'] && in_array( $setting['type'], apply_filters( 'ot_wpml_option_types', array( 'text', 'textarea', 'textarea-simple' ) ) ) ) { + + $_string = icl_t( 'Theme Options', $option_id, $options[$option_id] ); + + if ( ! empty( $_string ) ) { + + $options[$option_id] = $_string; + + } + + } + + } + + } + + } + + return $options[$option_id]; + + } + +} + +/** + * Enqueue the dynamic CSS. + * + * @return void + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_load_dynamic_css' ) ) { + + function ot_load_dynamic_css() { + + /* don't load in the admin */ + if ( is_admin() ) + return; + + /* grab a copy of the paths */ + $ot_css_file_paths = get_option( 'ot_css_file_paths', array() ); + + if ( ! empty( $ot_css_file_paths ) ) { + + $last_css = ''; + + /* loop through paths */ + foreach( $ot_css_file_paths as $key => $path ) { + + if ( '' != $path && file_exists( $path ) ) { + + $parts = explode( '/wp-content', $path ); + + if ( isset( $parts[1] ) ) { + + $css = home_url( '/wp-content' . $parts[1] ); + + if ( $last_css !== $css ) { + + /* enqueue filtered file */ + wp_enqueue_style( 'ot-dynamic-' . $key, $css, false, OT_VERSION ); + + $last_css = $css; + + } + + } + + } + + } + + } + + } + +} + +/** + * Registers the Theme Option page link for the admin bar. + * + * @uses ot_register_settings() + * + * @return void + * + * @access public + * @since 2.1 + */ +if ( ! function_exists( 'ot_register_theme_options_admin_bar_menu' ) ) { + + function ot_register_theme_options_admin_bar_menu( $wp_admin_bar ) { + + if ( ! current_user_can( apply_filters( 'ot_theme_options_capability', 'edit_theme_options' ) ) || ! is_admin_bar_showing() ) + return; + + $wp_admin_bar->add_node( array( + 'parent' => 'appearance', + 'id' => apply_filters( 'ot_theme_options_menu_slug', 'ot-theme-options' ), + 'title' => apply_filters( 'ot_theme_options_page_title', __( 'Theme Options', 'option-tree' ) ), + 'href' => admin_url( apply_filters( 'ot_theme_options_parent_slug', 'themes.php' ) . '?page=' . apply_filters( 'ot_theme_options_menu_slug', 'ot-theme-options' ) ) + ) ); + + } + +} + +/* End of file ot-functions.php */ +/* Location: ./includes/ot-functions.php */ \ No newline at end of file diff --git a/option-tree/includes/ot-meta-box-api.php b/option-tree/includes/ot-meta-box-api.php new file mode 100644 index 00000000..d26f94fd --- /dev/null +++ b/option-tree/includes/ot-meta-box-api.php @@ -0,0 +1,290 @@ + + * @copyright Copyright (c) 2013, Derek Herman + */ +if ( ! class_exists( 'OT_Meta_Box' ) ) { + + class OT_Meta_Box { + + /* variable to store the meta box array */ + private $meta_box; + + /** + * PHP5 constructor method. + * + * This method adds other methods of the class to specific hooks within WordPress. + * + * @uses add_action() + * + * @return void + * + * @access public + * @since 1.0 + */ + function __construct( $meta_box ) { + if ( ! is_admin() ) + return; + + $this->meta_box = $meta_box; + + add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) ); + + add_action( 'save_post', array( $this, 'save_meta_box' ), 1, 2 ); + + } + + /** + * Adds meta box to any post type + * + * @uses add_meta_box() + * + * @return void + * + * @access public + * @since 1.0 + */ + function add_meta_boxes() { + foreach ( (array) $this->meta_box['pages'] as $page ) { + add_meta_box( $this->meta_box['id'], $this->meta_box['title'], array( $this, 'build_meta_box' ), $page, $this->meta_box['context'], $this->meta_box['priority'], $this->meta_box['fields'] ); + } + } + + /** + * Meta box view + * + * @return string + * + * @access public + * @since 1.0 + */ + function build_meta_box( $post, $metabox ) { + + echo '
    '; + + /* Use nonce for verification */ + echo ''; + + /* meta box description */ + echo isset( $this->meta_box['desc'] ) && ! empty( $this->meta_box['desc'] ) ? '
    ' . htmlspecialchars_decode( $this->meta_box['desc'] ) . '
    ' : ''; + + /* loop through meta box fields */ + foreach ( $this->meta_box['fields'] as $field ) { + + /* get current post meta data */ + $field_value = get_post_meta( $post->ID, $field['id'], true ); + + /* set standard value */ + if ( isset( $field['std'] ) ) { + $field_value = ot_filter_std_value( $field_value, $field['std'] ); + } + + /* build the arguments array */ + $_args = array( + 'type' => $field['type'], + 'field_id' => $field['id'], + 'field_name' => $field['id'], + 'field_value' => $field_value, + 'field_desc' => isset( $field['desc'] ) ? $field['desc'] : '', + 'field_std' => isset( $field['std'] ) ? $field['std'] : '', + 'field_rows' => isset( $field['rows'] ) && ! empty( $field['rows'] ) ? $field['rows'] : 10, + 'field_post_type' => isset( $field['post_type'] ) && ! empty( $field['post_type'] ) ? $field['post_type'] : 'post', + 'field_taxonomy' => isset( $field['taxonomy'] ) && ! empty( $field['taxonomy'] ) ? $field['taxonomy'] : 'category', + 'field_min_max_step'=> isset( $field['min_max_step'] ) && ! empty( $field['min_max_step'] ) ? $field['min_max_step'] : '0,100,1', + 'field_class' => isset( $field['class'] ) ? $field['class'] : '', + 'field_choices' => isset( $field['choices'] ) ? $field['choices'] : array(), + 'field_settings' => isset( $field['settings'] ) && ! empty( $field['settings'] ) ? $field['settings'] : array(), + 'post_id' => $post->ID, + 'meta' => true + ); + + /* only allow simple textarea due to DOM issues with wp_editor() */ + if ( $_args['type'] == 'textarea' ) + $_args['type'] = 'textarea-simple'; + + /* option label */ + echo '
    '; + + /* don't show title with textblocks */ + if ( $_args['type'] != 'textblock' && ! empty( $field['label'] ) ) { + echo '
    '; + echo ''; + echo '
    '; + } + + /* get the option HTML */ + echo ot_display_by_type( $_args ); + + echo '
    '; + + } + + echo '
    '; + + } + + /** + * Saves the meta box values + * + * @return void + * + * @access public + * @since 1.0 + */ + function save_meta_box( $post_id, $post_object ) { + global $pagenow; + + /* don't save if $_POST is empty */ + if ( empty( $_POST ) ) + return $post_id; + + /* don't save during quick edit */ + if ( $pagenow == 'admin-ajax.php' ) + return $post_id; + + /* don't save during autosave */ + if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) + return $post_id; + + /* don't save if viewing a revision */ + if ( $post_object->post_type == 'revision' || $pagenow == 'revision.php' ) + return $post_id; + + /* verify nonce */ + if ( isset( $_POST[ $this->meta_box['id'] . '_nonce'] ) && ! wp_verify_nonce( $_POST[ $this->meta_box['id'] . '_nonce'], $this->meta_box['id'] ) ) + return $post_id; + + /* check permissions */ + if ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) { + if ( ! current_user_can( 'edit_page', $post_id ) ) + return $post_id; + } else { + if ( ! current_user_can( 'edit_post', $post_id ) ) + return $post_id; + } + + foreach ( $this->meta_box['fields'] as $field ) { + + $old = get_post_meta( $post_id, $field['id'], true ); + $new = ''; + + /* there is data to validate */ + if ( isset( $_POST[$field['id']] ) ) { + + /* slider and list item */ + if ( in_array( $field['type'], array( 'list-item', 'slider' ) ) ) { + + /* required title setting */ + $required_setting = array( + array( + 'id' => 'title', + 'label' => __( 'Title', 'option-tree' ), + 'desc' => '', + 'std' => '', + 'type' => 'text', + 'rows' => '', + 'class' => 'option-tree-setting-title', + 'post_type' => '', + 'choices' => array() + ) + ); + + /* get the settings array */ + $settings = isset( $_POST[$field['id'] . '_settings_array'] ) ? unserialize( ot_decode( $_POST[$field['id'] . '_settings_array'] ) ) : array(); + + /* settings are empty for some odd ass reason get the defaults */ + if ( empty( $settings ) ) { + $settings = 'slider' == $field['type'] ? + ot_slider_settings( $field['id'] ) : + ot_list_item_settings( $field['id'] ); + } + + /* merge the two settings array */ + $settings = array_merge( $required_setting, $settings ); + + foreach( $_POST[$field['id']] as $k => $setting_array ) { + + foreach( $settings as $sub_setting ) { + + /* verify sub setting has a type & value */ + if ( isset( $sub_setting['type'] ) && isset( $_POST[$field['id']][$k][$sub_setting['id']] ) ) { + + $_POST[$field['id']][$k][$sub_setting['id']] = ot_validate_setting( $_POST[$field['id']][$k][$sub_setting['id']], $sub_setting['type'], $sub_setting['id'] ); + + } + + } + + } + + /* set up new data with validated data */ + $new = $_POST[$field['id']]; + + } else { + + /* run through validattion */ + $new = ot_validate_setting( $_POST[$field['id']], $field['type'], $field['id'] ); + + } + + /* insert CSS */ + if ( $field['type'] == 'css' ) { + + /* insert CSS into dynamic.css */ + if ( '' !== $new ) { + + ot_insert_css_with_markers( $field['id'], $new, true ); + + /* remove old CSS from dynamic.css */ + } else { + + ot_remove_old_css( $field['id'] ); + + } + + } + + } + + if ( $new && $new !== $old ) { + update_post_meta( $post_id, $field['id'], $new ); + } else if ( '' == $new && $old ) { + delete_post_meta( $post_id, $field['id'], $old ); + } + } + + } + + } + +} + +/** + * This method instantiates the meta box class & builds the UI. + * + * @uses OT_Meta_Box() + * + * @param array Array of arguments to create a meta box + * @return void + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_register_meta_box' ) ) { + + function ot_register_meta_box( $args ) { + if ( ! $args ) + return; + + $ot_meta_box = new OT_Meta_Box( $args ); + } + +} + +/* End of file ot-meta-box-api.php */ +/* Location: ./includes/ot-meta-box-api.php */ \ No newline at end of file diff --git a/option-tree/includes/ot-settings-api.php b/option-tree/includes/ot-settings-api.php new file mode 100644 index 00000000..7af6069c --- /dev/null +++ b/option-tree/includes/ot-settings-api.php @@ -0,0 +1,912 @@ + + * @copyright Copyright (c) 2013, Derek Herman + */ +if ( ! class_exists( 'OT_Settings' ) ) { + + class OT_Settings { + + /* the options array */ + private $options; + + /* hooks for targeting admin pages */ + private $page_hook; + + /** + * Constructor + * + * @param array An array of options + * @return void + * + * @access public + * @since 2.0 + */ + public function __construct( $args ) { + + $this->options = $args; + + /* return early if not viewing an admin page or no options */ + if ( ! is_admin() || ! is_array( $this->options ) ) + return false; + + /* load everything */ + $this->hooks(); + + } + + /** + * Execute the WordPress Hooks + * + * @return void + * + * @access public + * @since 2.0 + */ + public function hooks() { + + /* add pages & menu items */ + add_action( 'admin_menu', array( $this, 'add_page' ) ); + + /* register sections */ + add_action( 'admin_init', array( $this, 'add_sections' ) ); + + /* register settings */ + add_action( 'admin_init', array( $this, 'add_settings' ) ); + + /* reset options */ + add_action( 'admin_init', array( $this, 'reset_options' ), 10 ); + + /* initialize settings */ + add_action( 'admin_init', array( $this, 'initialize_settings' ), 11 ); + + } + + /** + * Loads each admin page + * + * @return void + * + * @access public + * @since 2.0 + */ + public function add_page() { + + /* loop through options */ + foreach( (array) $this->options as $option ) { + + /* loop through pages */ + foreach( (array) $this->get_pages( $option ) as $page ) { + + /** + * Theme Check... stop nagging me about this kind of stuff. + * The damn admin pages are required for OT to function, duh! + */ + $theme_check_bs = 'add_menu_page'; + $theme_check_bs2 = 'add_submenu_page'; + + /* load page in WP top level menu */ + if ( ! isset( $page['parent_slug'] ) || empty( $page['parent_slug'] ) ) { + $page_hook = $theme_check_bs( + $page['page_title'], + $page['menu_title'], + $page['capability'], + $page['menu_slug'], + array( $this, 'display_page' ), + $page['icon_url'], + $page['position'] + ); + /* load page in WP sub menu */ + } else { + $page_hook = $theme_check_bs2( + $page['parent_slug'], + $page['page_title'], + $page['menu_title'], + $page['capability'], + $page['menu_slug'], + array( $this, 'display_page' ) + ); + } + + /* only load if not a hidden page */ + if ( ! isset( $page['hidden_page'] ) ) { + + /* associate $page_hook with page id */ + $this->page_hook[$page['id']] = $page_hook; + + /* add scripts */ + add_action( 'admin_print_scripts-' . $page_hook, array( $this, 'scripts' ) ); + + /* add styles */ + add_action( 'admin_print_styles-' . $page_hook, array( $this, 'styles' ) ); + + /* add contextual help */ + add_action( 'load-' . $page_hook, array( $this, 'help' ) ); + + } + + } + + } + + return false; + } + + /** + * Loads the scripts + * + * @return void + * + * @access public + * @since 2.0 + */ + public function scripts() { + ot_admin_scripts(); + } + + /** + * Loads the styles + * + * @return void + * + * @access public + * @since 2.0 + */ + public function styles() { + ot_admin_styles(); + } + + /** + * Loads the contextual help for each page + * + * @return void + * + * @access public + * @since 2.0 + */ + public function help() { + $screen = get_current_screen(); + + /* loop through options */ + foreach( (array) $this->options as $option ) { + + /* loop through pages */ + foreach( (array) $this->get_pages( $option ) as $page ) { + + /* verify page */ + if ( ! isset( $page['hidden_page'] ) && $screen->id == $this->page_hook[$page['id']] ) { + + /* set up the help tabs */ + if ( ! empty( $page['contextual_help']['content'] ) ) { + foreach( $page['contextual_help']['content'] as $contextual_help ) { + $screen->add_help_tab( + array( + 'id' => esc_attr( $contextual_help['id'] ), + 'title' => esc_attr( $contextual_help['title'] ), + 'content' => htmlspecialchars_decode( $contextual_help['content'] ), + ) + ); + } + } + + /* set up the help sidebar */ + if ( ! empty( $page['contextual_help']['sidebar'] ) ) { + $screen->set_help_sidebar( htmlspecialchars_decode( $page['contextual_help']['sidebar'] ) ); + } + + } + + } + + } + + return false; + } + + /** + * Loads the content for each page + * + * @return string + * + * @access public + * @since 2.0 + */ + public function display_page() { + $screen = get_current_screen(); + + /* loop through settings */ + foreach( (array) $this->options as $option ) { + + /* loop through pages */ + foreach( (array) $this->get_pages( $option ) as $page ) { + + /* verify page */ + if ( ! isset( $page['hidden_page'] ) && $screen->id == $this->page_hook[$page['id']] ) { + + $show_buttons = isset( $page['show_buttons'] ) && $page['show_buttons'] == false ? false : true; + + /* update active layout content */ + if ( isset( $_REQUEST['settings-updated'] ) && $_REQUEST['settings-updated'] == 'true' ) { + + $layouts = get_option( 'option_tree_layouts' ); + + /* has active layout */ + if ( isset( $layouts['active_layout'] ) ) { + $option_tree = get_option( $option['id'] ); + $layouts[$layouts['active_layout']] = ot_encode( serialize( $option_tree ) ); + update_option( 'option_tree_layouts', $layouts ); + } + + } + + echo '
    '; + + screen_icon( ( isset( $page['screen_icon'] ) ? $page['screen_icon'] : 'options-general' ) ); + echo '

    ' . $page['page_title'] . '

    '; + + echo ot_alert_message( $page ); + + settings_errors( 'option-tree' ); + + /* Header */ + echo '
    '; + + echo '
      '; + + echo ''; + + echo '
    • Version ' . OT_VERSION . '
    • '; + + echo '
    '; + + /* layouts form */ + if ( $page['id'] == 'ot_theme_options' && OT_SHOW_NEW_LAYOUT == true ) + ot_theme_options_layouts_form(); + + echo '
    '; + + /* remove forms on the custom settings pages */ + if ( $show_buttons ) { + + echo '
    '; + + settings_fields( $option['id'] ); + + } else { + + echo '
    '; + + } + + /* Sub Header */ + echo '
    '; + + if ( $show_buttons ) + echo ''; + + echo '
    '; + + /* Navigation */ + echo '
    '; + + /* check for sections */ + if ( isset( $page['sections'] ) && count( $page['sections'] ) > 0 ) { + + echo '
      '; + + /* loop through page sections */ + foreach( (array) $page['sections'] as $section ) { + echo '
    • ' . $section['title'] . '
    • '; + } + + echo '
    '; + + } + + /* sections */ + echo '
    '; + + echo '
    '; + + echo '
    '; + + $this->do_settings_sections( $_GET['page'] ); + + echo '
    '; + + echo '
    '; + + echo '
    '; + + echo '
    '; + + echo '
    '; + + /* buttons */ + if ( $show_buttons ) { + + echo '
    '; + + echo ''; + + echo '
    '; + + } + + echo $show_buttons ? '' : '
    '; + + /* reset button */ + if ( $show_buttons ) { + + echo '
    '; + + /* form nonce */ + wp_nonce_field( 'option_tree_reset_form', 'option_tree_reset_nonce' ); + + echo ''; + + echo ''; + + echo '
    '; + + } + + echo '
    '; + + } + + } + + } + + return false; + } + + /** + * Adds sections to the page + * + * @return void + * + * @access public + * @since 2.0 + */ + public function add_sections() { + + /* loop through options */ + foreach( (array) $this->options as $option ) { + + /* loop through pages */ + foreach( (array) $this->get_pages( $option ) as $page ) { + + /* loop through page sections */ + foreach( (array) $this->get_sections( $page ) as $section ) { + + /* add each section */ + add_settings_section( + $section['id'], + $section['title'], + array( $this, 'display_section' ), + $page['menu_slug'] + ); + + } + + } + + } + + return false; + } + + /** + * Callback for add_settings_section() + * + * @return string + * + * @access public + * @since 2.0 + */ + public function display_section() { + /* currently pointless */ + } + + /** + * Add settings the the page + * + * @return void + * + * @access public + * @since 2.0 + */ + public function add_settings() { + + /* loop through options */ + foreach( (array) $this->options as $option ) { + + register_setting( $option['id'], $option['id'], array ( $this, 'sanitize_callback' ) ); + + /* loop through pages */ + foreach( (array) $this->get_pages( $option ) as $page ) { + + /* loop through page settings */ + foreach( (array) $this->get_the_settings( $page ) as $setting ) { + + /* skip if no setting ID */ + if ( ! isset( $setting['id'] ) ) + continue; + + /* add get_option param to the array */ + $setting['get_option'] = $option['id']; + + /* add each setting */ + add_settings_field( + $setting['id'], + $setting['label'], + array( $this, 'display_setting' ), + $page['menu_slug'], + $setting['section'], + $setting + ); + + } + + } + + } + + return false; + } + + /** + * Callback for add_settings_field() to build each setting by type + * + * @param array Setting object array + * @return string + * + * @access public + * @since 2.0 + */ + public function display_setting( $args = array() ) { + extract( $args ); + + /* get current saved data */ + $options = get_option( $get_option, false ); + + // Set field value + $field_value = isset( $options[$id] ) ? $options[$id] : ''; + + /* set standard value */ + if ( isset( $std ) ) { + $field_value = ot_filter_std_value( $field_value, $std ); + } + + /* build the arguments array */ + $_args = array( + 'type' => $type, + 'field_id' => $id, + 'field_name' => $get_option . '[' . $id . ']', + 'field_value' => $field_value, + 'field_desc' => isset( $desc ) ? $desc : '', + 'field_std' => isset( $std ) ? $std : '', + 'field_rows' => isset( $rows ) && ! empty( $rows ) ? $rows : 15, + 'field_post_type' => isset( $post_type ) && ! empty( $post_type ) ? $post_type : 'post', + 'field_taxonomy' => isset( $taxonomy ) && ! empty( $taxonomy ) ? $taxonomy : 'category', + 'field_min_max_step'=> isset( $min_max_step ) && ! empty( $min_max_step ) ? $min_max_step : '0,100,1', + 'field_class' => isset( $class ) ? $class : '', + 'field_choices' => isset( $choices ) && ! empty( $choices ) ? $choices : array(), + 'field_settings' => isset( $settings ) && ! empty( $settings ) ? $settings : array(), + 'post_id' => ot_get_media_post_ID(), + 'get_option' => $get_option, + ); + + /* get the option HTML */ + echo ot_display_by_type( $_args ); + } + + /** + * Sets the option standards if nothing yet exists. + * + * @return void + * + * @access public + * @since 2.0 + */ + public function initialize_settings() { + + /* loop through options */ + foreach( (array) $this->options as $option ) { + + /* skip if option is already set */ + if ( isset( $option['id'] ) && get_option( $option['id'], false ) ) { + return false; + } + + $defaults = array(); + + /* loop through pages */ + foreach( (array) $this->get_pages( $option ) as $page ) { + + /* loop through page settings */ + foreach( (array) $this->get_the_settings( $page ) as $setting ) { + + if ( isset( $setting['std'] ) ) { + + $defaults[$setting['id']] = ot_validate_setting( $setting['std'], $setting['type'], $setting['id'] ); + + } + + } + + } + + update_option( $option['id'], $defaults ); + + } + + return false; + } + + /** + * Sanitize callback for register_setting() + * + * @return string + * + * @access public + * @since 2.0 + */ + public function sanitize_callback( $input ) { + + /* loop through options */ + foreach( (array) $this->options as $option ) { + + /* loop through pages */ + foreach( (array) $this->get_pages( $option ) as $page ) { + + /* loop through page settings */ + foreach( (array) $this->get_the_settings( $page ) as $setting ) { + + /* verify setting has a type & value */ + if ( isset( $setting['type'] ) && isset( $input[$setting['id']] ) ) { + + /* get the defaults */ + $current_settings = get_option( 'option_tree_settings' ); + $current_options = get_option( $option['id'] ); + + /* validate setting */ + if ( is_array( $input[$setting['id']] ) && in_array( $setting['type'], array( 'list-item', 'slider' ) ) ) { + + /* required title setting */ + $required_setting = array( + array( + 'id' => 'title', + 'label' => __( 'Title', 'option-tree' ), + 'desc' => '', + 'std' => '', + 'type' => 'text', + 'rows' => '', + 'class' => 'option-tree-setting-title', + 'post_type' => '', + 'choices' => array() + ) + ); + + /* get the settings array */ + $settings = isset( $_POST[$setting['id'] . '_settings_array'] ) ? unserialize( ot_decode( $_POST[$setting['id'] . '_settings_array'] ) ) : array(); + + /* settings are empty for some odd ass reason get the defaults */ + if ( empty( $settings ) ) { + $settings = 'slider' == $setting['type'] ? + ot_slider_settings( $setting['id'] ) : + ot_list_item_settings( $setting['id'] ); + } + + /* merge the two settings array */ + $settings = array_merge( $required_setting, $settings ); + + /* create an empty WPML id array */ + $wpml_ids = array(); + + foreach( $input[$setting['id']] as $k => $setting_array ) { + + foreach( $settings as $sub_setting ) { + + /* setup the WPML ID */ + $wpml_id = $setting['id'] . '_' . $sub_setting['id'] . '_' . $k; + + /* add id to array */ + $wpml_ids[] = $wpml_id; + + /* verify sub setting has a type & value */ + if ( isset( $sub_setting['type'] ) && isset( $input[$setting['id']][$k][$sub_setting['id']] ) ) { + + /* validate setting */ + $input[$setting['id']][$k][$sub_setting['id']] = ot_validate_setting( $input[$setting['id']][$k][$sub_setting['id']], $sub_setting['type'], $sub_setting['id'], $wpml_id ); + + } + + } + + } + + } else { + + $input[$setting['id']] = ot_validate_setting( $input[$setting['id']], $setting['type'], $setting['id'], $setting['id'] ); + + } + + } + + /* unregister WPML strings that were deleted from lists and sliders */ + if ( isset( $current_settings['settings'] ) && isset( $setting['type'] ) && in_array( $setting['type'], array( 'list-item', 'slider' ) ) ) { + + if ( ! isset( $wpml_ids ) ) + $wpml_ids = array(); + + foreach( $current_settings['settings'] as $check_setting ) { + + if ( $setting['id'] == $check_setting['id'] && ! empty( $current_options[$setting['id']] ) ) { + + foreach( $current_options[$setting['id']] as $key => $value ) { + + foreach( $value as $ckey => $cvalue ) { + + $id = $setting['id'] . '_' . $ckey . '_' . $key; + + if ( ! in_array( $id, $wpml_ids ) ) { + + ot_wpml_unregister_string( $id ); + + } + + } + + } + + } + + } + + } + + } + + } + + } + + return $input; + + } + + /** + * Helper function to get the pages array for an option + * + * @param array Option array + * @return mixed + * + * @access public + * @since 2.0 + */ + public function get_pages( $option = array() ) { + + if ( empty( $option ) ) + return false; + + /* check for pages */ + if ( isset( $option['pages'] ) && ! empty( $option['pages'] ) ) { + + /* return pages array */ + return $option['pages']; + + } + + return false; + } + + /** + * Helper function to get the sections array for a page + * + * @param array Page array + * @return mixed + * + * @access public + * @since 2.0 + */ + public function get_sections( $page = array() ) { + + if ( empty( $page ) ) + return false; + + /* check for sections */ + if ( isset( $page['sections'] ) && ! empty( $page['sections'] ) ) { + + /* return sections array */ + return $page['sections']; + + } + + return false; + } + + /** + * Helper function to get the settings array for a page + * + * @param array Page array + * @return mixed + * + * @access public + * @since 2.0 + */ + public function get_the_settings( $page = array() ) { + + if ( empty( $page ) ) + return false; + + /* check for settings */ + if ( isset( $page['settings'] ) && ! empty( $page['settings'] ) ) { + + /* return settings array */ + return $page['settings']; + + } + + return false; + } + + /** + * Prints out all settings sections added to a particular settings page + * + * @global $wp_settings_sections Storage array of all settings sections added to admin pages + * @global $wp_settings_fields Storage array of settings fields and info about their pages/sections + * + * @param string The slug name of the page whos settings sections you want to output + * @return string + * + * @access public + * @since 2.0 + */ + public function do_settings_sections( $page ) { + global $wp_settings_sections, $wp_settings_fields; + + if ( ! isset( $wp_settings_sections ) || ! isset( $wp_settings_sections[$page] ) ) { + return false; + } + + foreach ( (array) $wp_settings_sections[$page] as $section ) { + + if ( ! isset( $section['id'] ) ) + continue; + + echo '
    '; + + call_user_func( $section['callback'], $section ); + + if ( ! isset( $wp_settings_fields ) || ! isset( $wp_settings_fields[$page] ) || ! isset( $wp_settings_fields[$page][$section['id']] ) ) + continue; + + echo '
    '; + + $this->do_settings_fields( $page, $section['id'] ); + + echo '
    '; + + echo '
    '; + + } + + } + + /** + * Print out the settings fields for a particular settings section + * + * @global $wp_settings_fields Storage array of settings fields and their pages/sections + * + * @param string $page Slug title of the admin page who's settings fields you want to show. + * @param string $section Slug title of the settings section who's fields you want to show. + * @return string + * + * @access public + * @since 2.0 + */ + public function do_settings_fields( $page, $section ) { + global $wp_settings_fields; + + if ( !isset($wp_settings_fields) || !isset($wp_settings_fields[$page]) || !isset($wp_settings_fields[$page][$section]) ) + return; + + foreach ( (array) $wp_settings_fields[$page][$section] as $field ) { + + echo '
    '; + + echo '
    '; + + if ( $field['args']['type'] != 'textblock' && ! empty( $field['title'] ) ) { + + echo '
    '; + + echo '

    ' . $field['title'] . '

    '; + + echo '
    '; + + } + + call_user_func( $field['callback'], $field['args'] ); + + echo '
    '; + + echo '
    '; + + } + + } + + /** + * Resets page options before the screen is displayed + * + * @return void + * + * @access public + * @since 2.0 + */ + public function reset_options() { + + /* check for reset action */ + if ( isset( $_POST['option_tree_reset_nonce'] ) && wp_verify_nonce( $_POST['option_tree_reset_nonce'], 'option_tree_reset_form' ) ) { + + /* loop through options */ + foreach( (array) $this->options as $option ) { + + /* loop through pages */ + foreach( (array) $this->get_pages( $option ) as $page ) { + + /* verify page */ + if ( isset( $_GET['page'] ) && $_GET['page'] == $page['menu_slug'] ) { + + /* reset options */ + delete_option( $option['id'] ); + + } + + } + + } + + } + + return false; + + } + + } + +} + +/** + * This method instantiates the settings class & builds the UI. + * + * @uses OT_Settings() + * + * @param array Array of arguments to create settings + * @return void + * + * @access public + * @since 2.0 + */ +if ( ! function_exists( 'ot_register_settings' ) ) { + + function ot_register_settings( $args ) { + if ( ! $args ) + return; + + $ot_settings = new OT_Settings( $args ); + } + +} + +/* End of file ot-settings-api.php */ +/* Location: ./includes/ot-settings-api.php */ \ No newline at end of file diff --git a/option-tree/languages/option-tree.pot b/option-tree/languages/option-tree.pot new file mode 100644 index 00000000..cfc5a6da --- /dev/null +++ b/option-tree/languages/option-tree.pot @@ -0,0 +1,1753 @@ +# Copyright (C) 2013 +# This file is distributed under the same license as the package. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: http://wordpress.org/tag/option-tree\n" +"POT-Creation-Date: 2013-09-09 11:09:05+00:00\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" + +#: includes/ot-functions-admin.php:50 includes/ot-functions-admin.php:51 +#: includes/ot-functions-admin.php:157 includes/ot-functions-admin.php:181 +#: includes/ot-functions.php:187 +msgid "Theme Options" +msgstr "" + +#: includes/ot-functions-admin.php:56 includes/ot-functions-admin.php:113 +#: includes/ot-functions-admin.php:208 +msgid "Theme Options updated." +msgstr "" + +#: includes/ot-functions-admin.php:57 includes/ot-functions-admin.php:114 +#: includes/ot-functions-admin.php:209 +msgid "Theme Options reset." +msgstr "" + +#: includes/ot-functions-admin.php:58 +#: includes/ot-functions-settings-page.php:94 +#: includes/ot-functions-settings-page.php:133 +msgid "Save Changes" +msgstr "" + +#: includes/ot-functions-admin.php:96 includes/ot-functions-admin.php:97 +msgid "OptionTree" +msgstr "" + +#: includes/ot-functions-admin.php:107 includes/ot-functions-admin.php:108 +#: includes/ot-functions-admin.php:151 includes/ot-functions-admin.php:175 +#: includes/ot-functions-docs-page.php:49 +msgid "Settings" +msgstr "" + +#: includes/ot-functions-admin.php:115 includes/ot-functions-admin.php:210 +msgid "Save Settings" +msgstr "" + +#: includes/ot-functions-admin.php:121 +msgid "Theme Options UI" +msgstr "" + +#: includes/ot-functions-admin.php:125 +msgid "Import" +msgstr "" + +#: includes/ot-functions-admin.php:129 +msgid "Export" +msgstr "" + +#: includes/ot-functions-admin.php:133 includes/ot-functions-admin.php:163 +#: includes/ot-functions-admin.php:187 +msgid "Layouts" +msgstr "" + +#: includes/ot-functions-admin.php:139 +msgid "Theme Options UI Builder" +msgstr "" + +#: includes/ot-functions-admin.php:145 +msgid "Settings XML" +msgstr "" + +#: includes/ot-functions-admin.php:169 +msgid "Settings PHP File" +msgstr "" + +#: includes/ot-functions-admin.php:193 +msgid "Layout Management" +msgstr "" + +#: includes/ot-functions-admin.php:202 includes/ot-functions-admin.php:203 +msgid "Documentation" +msgstr "" + +#: includes/ot-functions-admin.php:216 +msgid "Creating Options" +msgstr "" + +#: includes/ot-functions-admin.php:220 +msgid "Option Types" +msgstr "" + +#: includes/ot-functions-admin.php:224 +msgid "Function References" +msgstr "" + +#: includes/ot-functions-admin.php:228 includes/ot-functions-admin.php:270 +msgid "Theme Mode" +msgstr "" + +#: includes/ot-functions-admin.php:232 includes/ot-functions-admin.php:276 +msgid "Meta Boxes" +msgstr "" + +#: includes/ot-functions-admin.php:236 +msgid "Code Examples" +msgstr "" + +#: includes/ot-functions-admin.php:240 +msgid "Layouts Overview" +msgstr "" + +#: includes/ot-functions-admin.php:246 +msgid "Overview of available Theme Option fields." +msgstr "" + +#: includes/ot-functions-admin.php:252 +msgid "Option types in alphabetical order & hooks to filter them." +msgstr "" + +#: includes/ot-functions-admin.php:258 +msgid "Function Reference:ot_get_option()" +msgstr "" + +#: includes/ot-functions-admin.php:264 +msgid "Function Reference:get_option_tree()" +msgstr "" + +#: includes/ot-functions-admin.php:282 +msgid "Code examples for front-end development." +msgstr "" + +#: includes/ot-functions-admin.php:288 +msgid "What's a layout anyhow?" +msgstr "" + +#: includes/ot-functions-admin.php:476 +msgid "The Colorpicker only allows valid hexadecimal values." +msgstr "" + +#: includes/ot-functions-admin.php:564 +msgid "Send to OptionTree" +msgstr "" + +#: includes/ot-functions-admin.php:565 +#: includes/ot-functions-option-types.php:152 +#: includes/ot-functions-option-types.php:1872 +msgid "Remove Media" +msgstr "" + +#: includes/ot-functions-admin.php:566 +msgid "Are you sure you want to reset back to the defaults?" +msgstr "" + +#: includes/ot-functions-admin.php:567 +msgid "You can't remove this! But you can edit the values." +msgstr "" + +#: includes/ot-functions-admin.php:568 +msgid "Are you sure you want to remove this?" +msgstr "" + +#: includes/ot-functions-admin.php:569 +msgid "Are you sure you want to activate this layout?" +msgstr "" + +#: includes/ot-functions-admin.php:570 +msgid "Sorry, you can't have settings three levels deep." +msgstr "" + +#: includes/ot-functions-admin.php:616 +msgid "Option Tree" +msgstr "" + +#: includes/ot-functions-admin.php:752 +msgid "General" +msgstr "" + +#: includes/ot-functions-admin.php:758 +msgid "Sample Text Field Label" +msgstr "" + +#: includes/ot-functions-admin.php:759 +msgid "Description for the sample text field." +msgstr "" + +#: includes/ot-functions-admin.php:1957 +msgid "Settings updated." +msgstr "" + +#: includes/ot-functions-admin.php:1961 +msgid "Settings could not be saved." +msgstr "" + +#: includes/ot-functions-admin.php:1969 +msgid "Settings Imported." +msgstr "" + +#: includes/ot-functions-admin.php:1973 +msgid "Settings could not be imported." +msgstr "" + +#: includes/ot-functions-admin.php:1980 +msgid "Data Imported." +msgstr "" + +#: includes/ot-functions-admin.php:1984 +msgid "Data could not be imported." +msgstr "" + +#: includes/ot-functions-admin.php:1992 +msgid "Layouts Imported." +msgstr "" + +#: includes/ot-functions-admin.php:1996 +msgid "Layouts could not be imported." +msgstr "" + +#: includes/ot-functions-admin.php:2004 +msgid "Layouts Updated." +msgstr "" + +#: includes/ot-functions-admin.php:2008 +msgid "Layouts could not be updated." +msgstr "" + +#: includes/ot-functions-admin.php:2012 +msgid "Layouts have been deleted." +msgstr "" + +#: includes/ot-functions-admin.php:2018 +msgid "Layout activated." +msgstr "" + +#: includes/ot-functions-admin.php:2580 +msgid "Left Sidebar" +msgstr "" + +#: includes/ot-functions-admin.php:2585 +msgid "Right Sidebar" +msgstr "" + +#: includes/ot-functions-admin.php:2590 +msgid "Full Width (no sidebar)" +msgstr "" + +#: includes/ot-functions-admin.php:2595 +msgid "Dual Sidebar" +msgstr "" + +#: includes/ot-functions-admin.php:2600 +msgid "Left Dual Sidebar" +msgstr "" + +#: includes/ot-functions-admin.php:2605 +msgid "Right Dual Sidebar" +msgstr "" + +#: includes/ot-functions-admin.php:2635 includes/ot-functions-admin.php:2696 +msgid "Image" +msgstr "" + +#: includes/ot-functions-admin.php:2646 includes/ot-functions-admin.php:2702 +msgid "Link" +msgstr "" + +#: includes/ot-functions-admin.php:2657 includes/ot-functions-admin.php:2708 +#: includes/ot-functions-docs-page.php:43 +#: includes/ot-functions-docs-page.php:380 +#: includes/ot-functions-docs-page.php:430 +msgid "Description" +msgstr "" + +#: includes/ot-functions-admin.php:3180 +msgid "edit" +msgstr "" + +#: includes/ot-functions-admin.php:3181 includes/ot-functions-admin.php:3248 +#: includes/ot-functions-admin.php:3249 includes/ot-functions-admin.php:3392 +#: includes/ot-functions-admin.php:3393 includes/ot-functions-admin.php:3458 +#: includes/ot-functions-admin.php:3459 includes/ot-functions-admin.php:3586 +#: includes/ot-functions-admin.php:3587 +msgid "Edit" +msgstr "" + +#: includes/ot-functions-admin.php:3183 includes/ot-functions-admin.php:3184 +#: includes/ot-functions-admin.php:3251 includes/ot-functions-admin.php:3252 +#: includes/ot-functions-admin.php:3395 includes/ot-functions-admin.php:3396 +#: includes/ot-functions-admin.php:3461 includes/ot-functions-admin.php:3462 +#: includes/ot-functions-admin.php:3520 includes/ot-functions-admin.php:3521 +#: includes/ot-functions-admin.php:3589 includes/ot-functions-admin.php:3590 +msgid "Delete" +msgstr "" + +#: includes/ot-functions-admin.php:3190 +msgid "" +"Section Title: Displayed as a menu item on the Theme " +"Options page." +msgstr "" + +#: includes/ot-functions-admin.php:3198 +msgid "" +"Section ID: A unique lower case alphanumeric string, " +"underscores allowed." +msgstr "" + +#: includes/ot-functions-admin.php:3258 +msgid "" +"Label: Displayed as the label of a form element on the " +"Theme Options page." +msgstr "" + +#: includes/ot-functions-admin.php:3266 includes/ot-functions-admin.php:3476 +msgid "" +"ID: A unique lower case alphanumeric string, underscores " +"allowed." +msgstr "" + +#: includes/ot-functions-admin.php:3274 +msgid "" +"Type: Choose one of the available option types from the " +"dropdown." +msgstr "" + +#: includes/ot-functions-admin.php:3285 +msgid "" +"Description: Enter a detailed description for the users to " +"read on the Theme Options page, HTML is allowed. This is also where you " +"enter content for both the Textblock & Textblock Titled option types." +msgstr "" + +#: includes/ot-functions-admin.php:3293 +msgid "" +"Choices: This will only affect the following option types: " +"Checkbox, Radio, Select & Select Image." +msgstr "" + +#: includes/ot-functions-admin.php:3298 +msgid "Add Choice" +msgstr "" + +#: includes/ot-functions-admin.php:3304 +msgid "" +"Settings: This will only affect the List Item option type." +msgstr "" + +#: includes/ot-functions-admin.php:3309 +#: includes/ot-functions-settings-page.php:93 +msgid "Add Setting" +msgstr "" + +#: includes/ot-functions-admin.php:3315 +msgid "" +"Standard: Setting the standard value for your option only " +"works for some option types. Read the OptionTree->Documentation " +"for more information on which ones." +msgstr "" + +#: includes/ot-functions-admin.php:3323 +msgid "" +"Rows: Enter a numeric value for the number of rows in your " +"textarea. This will only affect the following option types: CSS, Textarea, & " +"Textarea Simple." +msgstr "" + +#: includes/ot-functions-admin.php:3331 +msgid "" +"Post Type: Add a comma separated list of post type like " +"'post,page'. This will only affect the following option types: Custom Post " +"Type Checkbox, & Custom Post Type Select." +msgstr "" + +#: includes/ot-functions-admin.php:3339 +msgid "" +"Taxonomy: Add a comma separated list of any registered " +"taxonomy like 'category,post_tag'. This will only affect the following " +"option types: Taxonomy Checkbox, & Taxonomy Select." +msgstr "" + +#: includes/ot-functions-admin.php:3347 +msgid "" +"Min, Max, & Step: Add a comma separated list of options in " +"the following format 0,100,1 (slide from 0-100 in " +"intervals of 1). The three values represent the minimum, " +"maximum, and step options and will only affect the Numeric Slider option " +"type." +msgstr "" + +#: includes/ot-functions-admin.php:3355 +msgid "CSS Class: Add and optional class to this option type." +msgstr "" + +#: includes/ot-functions-admin.php:3402 includes/ot-functions-docs-page.php:29 +msgid "Label" +msgstr "" + +#: includes/ot-functions-admin.php:3412 +msgid "Value" +msgstr "" + +#: includes/ot-functions-admin.php:3422 +msgid "Image Source (Radio Image only)" +msgstr "" + +#: includes/ot-functions-admin.php:3468 +msgid "" +"Title: Displayed as a contextual help menu item on the " +"Theme Options page." +msgstr "" + +#: includes/ot-functions-admin.php:3484 +msgid "" +"Content: Enter the HTML content about this contextual help " +"item displayed on the Theme Option page for end users to read." +msgstr "" + +#: includes/ot-functions-admin.php:3515 +msgid "Layout" +msgstr "" + +#: includes/ot-functions-admin.php:3517 includes/ot-functions-admin.php:3518 +msgid "Activate" +msgstr "" + +#: includes/ot-functions-admin.php:3554 includes/ot-meta-box-api.php:186 +#: includes/ot-settings-api.php:587 +msgid "Title" +msgstr "" + +#: includes/ot-functions-admin.php:3720 +msgid "New Layout" +msgstr "" + +#: includes/ot-functions-docs-page.php:30 +msgid "" +"The Label field should be a short but descriptive block of text 100 " +"characters or less with no HTML." +msgstr "" + +#: includes/ot-functions-docs-page.php:32 +msgid "ID" +msgstr "" + +#: includes/ot-functions-docs-page.php:33 +msgid "" +"The ID field is a unique alphanumeric key used to differentiate each theme " +"option (underscores are acceptable). Also, the plugin will change all text " +"you write in this field to lowercase and replace spaces and special " +"characters with an underscore automatically." +msgstr "" + +#: includes/ot-functions-docs-page.php:35 +msgid "Type" +msgstr "" + +#: includes/ot-functions-docs-page.php:36 +msgid "" +"You are required to choose one of the supported option types when creating a " +"new option. Here is a list of the available option types. For more " +"information about each type click the Option Types tab to the " +"left." +msgstr "" + +#: includes/ot-functions-docs-page.php:44 +msgid "" +"Enter a detailed description for the users to read on the Theme Options " +"page, HTML is allowed. This is also where you enter content for both the " +"Textblock & Textblock Titled option types." +msgstr "" + +#: includes/ot-functions-docs-page.php:46 +msgid "Choices" +msgstr "" + +#: includes/ot-functions-docs-page.php:47 +msgid "" +"Click the \"Add Choice\" button to add an item to the choices array. This " +"will only affect the following option types: Checkbox, Radio, Select & " +"Select Image." +msgstr "" + +#: includes/ot-functions-docs-page.php:50 +msgid "" +"Click the \"Add Setting\" button found inside a newly created setting to add " +"an item to the settings array. This will only affect the List Item type." +msgstr "" + +#: includes/ot-functions-docs-page.php:52 +msgid "Standard" +msgstr "" + +#: includes/ot-functions-docs-page.php:53 +msgid "" +"Setting the standard value for your option only works for some option types. " +"Those types are one that have a single string value saved to them and not an " +"array of values." +msgstr "" + +#: includes/ot-functions-docs-page.php:55 +msgid "Rows" +msgstr "" + +#: includes/ot-functions-docs-page.php:56 +msgid "" +"Enter a numeric value for the number of rows in your textarea. This will " +"only affect the following option types: CSS, Textarea, & Textarea Simple." +msgstr "" + +#: includes/ot-functions-docs-page.php:58 +msgid "Post Type" +msgstr "" + +#: includes/ot-functions-docs-page.php:59 +msgid "" +"Add a comma separated list of post type like post,page. This " +"will only affect the following option types: Custom Post Type Checkbox, & " +"Custom Post Type Select. Below are the default post types available with " +"WordPress and that are also compatible with OptionTree. You can also add " +"your own custom post_type. At this time any does " +"not seem to return results properly and is something I plan on looking into." +msgstr "" + +#: includes/ot-functions-docs-page.php:67 +msgid "Taxonomy" +msgstr "" + +#: includes/ot-functions-docs-page.php:68 +msgid "" +"Add a comma separated list of any registered taxonomy like category," +"post_tag. This will only affect the following option types: Taxonomy " +"Checkbox, & Taxonomy Select." +msgstr "" + +#: includes/ot-functions-docs-page.php:70 +msgid "Min, Max, & Step" +msgstr "" + +#: includes/ot-functions-docs-page.php:71 +msgid "" +"Add a comma separated list of options in the following format 0,100,1 (slide from 0-100 in intervals of 1). The " +"three values represent the minimum, maximum, and step options and will only " +"affect the Numeric Slider option type." +msgstr "" + +#: includes/ot-functions-docs-page.php:73 +msgid "CSS Class" +msgstr "" + +#: includes/ot-functions-docs-page.php:74 +msgid "Add and optional class to any option type." +msgstr "" + +#: includes/ot-functions-docs-page.php:104 +msgid "Background" +msgstr "" + +#: includes/ot-functions-docs-page.php:105 +msgid "" +"The Background option type is for adding background styles to your theme " +"either dynamically via the CSS option type below or manually with " +"ot_get_option(). Background has filters that allow you to " +"change the defaults. For example, you can filter on " +"ot_recognized_background_repeat, " +"ot_recognized_background_attachment, and " +"ot_recognized_background_position. These filters allow you to " +"fine tune the select lists for your specific CSS needs." +msgstr "" + +#: includes/ot-functions-docs-page.php:107 +msgid "Category Select" +msgstr "" + +#: includes/ot-functions-docs-page.php:108 +msgid "" +"The Category Select option type displays a list of category IDs. It allows " +"the user to select only one category ID and will return that value for use " +"in a custom function or loop." +msgstr "" + +#: includes/ot-functions-docs-page.php:110 +msgid "Category Checkbox" +msgstr "" + +#: includes/ot-functions-docs-page.php:111 +msgid "" +"The Category Checkbox option type displays a list of category IDs. It allows " +"the user to check multiple category IDs and will return that value as an " +"array for use in a custom function or loop." +msgstr "" + +#: includes/ot-functions-docs-page.php:113 +msgid "Checkbox" +msgstr "" + +#: includes/ot-functions-docs-page.php:114 +msgid "" +"The Checkbox option type is fairly self explanatory. Typically used to ask " +"questions. For example, \"Do you want to activate asynchronous Google " +"analytics?\" would be a single checkbox with a value of yes. You could have " +"more complex usages but the idea is that you can easily grab the value of " +"the checkbox and use it in you theme. In this situation you would test if " +"the checkbox has a value and execute a block of code if it does and do " +"nothing if it doesn't." +msgstr "" + +#: includes/ot-functions-docs-page.php:116 +msgid "Colorpicker" +msgstr "" + +#: includes/ot-functions-docs-page.php:117 +msgid "" +"The Colorpicker option type saves a hexadecimal color code for use in CSS. " +"Use it to modify the color of something in your theme." +msgstr "" + +#: includes/ot-functions-docs-page.php:119 +msgid "CSS" +msgstr "" + +#: includes/ot-functions-docs-page.php:120 +msgid "" +"The CSS option type is a textarea that when used properly can add dynamic " +"CSS to your theme from within OptionTree. Unfortunately, due server " +"limitations you will need to create a file named dynamic.css at " +"the root level of your theme and change permissions using chmod so the " +"server can write to the file. I have had the most success setting this " +"single file to 0777 but feel free to play around with permissions until " +"everything is working. A good starting point is 0666. When the server can " +"save to the file CSS will automatically be updated each time you save your " +"theme options." +msgstr "" + +#: includes/ot-functions-docs-page.php:122 +msgid "" +"An example of the CSS option type: This assumes you have an option with the " +"ID of custom_background_css which will display the saved values " +"for that option." +msgstr "" + +#: includes/ot-functions-docs-page.php:124 +msgid "Input" +msgstr "" + +#: includes/ot-functions-docs-page.php:130 +msgid "Output" +msgstr "" + +#: includes/ot-functions-docs-page.php:138 +msgid "Custom Post Type Select" +msgstr "" + +#: includes/ot-functions-docs-page.php:139 +msgid "" +"The Custom Post Type Select option type displays a list of IDs from any " +"available WordPress post type or custom post type. It will return a single " +"post ID for use in a custom function or loop. Requires at least one valid " +"post_type when created in the settings. For some reason " +"any does not work correctly and will looked into in future " +"version." +msgstr "" + +#: includes/ot-functions-docs-page.php:141 +msgid "Custom Post Type Checkbox" +msgstr "" + +#: includes/ot-functions-docs-page.php:142 +msgid "" +"The Custom Post Type Select option type displays a list of IDs from any " +"available WordPress post type or custom post type. It allows the user to " +"check multiple post IDs for use in a custom function or loop. Requires at " +"least one valid post_type when created in the settings. For " +"some reason any does not work correctly and will looked into in " +"future version." +msgstr "" + +#: includes/ot-functions-docs-page.php:144 +msgid "List Item" +msgstr "" + +#: includes/ot-functions-docs-page.php:145 +msgid "" +"The list Item replaced the old Slider option type. It allows for a great " +"deal of customization. You can add settings to the List Item and those " +"settings will be displayed to the user when they add a new List Item. " +"Typical use is for creating sliding content or blocks of code for custom " +"layouts." +msgstr "" + +#: includes/ot-functions-docs-page.php:147 +msgid "Measurement" +msgstr "" + +#: includes/ot-functions-docs-page.php:148 +msgid "" +"The Measurement option type is a mix of input and select fields. The text " +"input excepts a value and the select lets you choose the unit of measurement " +"to add to that value. Currently the default units are px, " +"%, em, pt. However, you can change them " +"with the ot_measurement_unit_types filter." +msgstr "" + +#: includes/ot-functions-docs-page.php:150 +msgid "" +"Example filter to add new units to the Measurement option type. Added to " +"functions.php." +msgstr "" + +#: includes/ot-functions-docs-page.php:163 +msgid "" +"Example filter to completely change the units in the Measurement option " +"type. Added to functions.php." +msgstr "" + +#: includes/ot-functions-docs-page.php:178 +msgid "Numeric Slider" +msgstr "" + +#: includes/ot-functions-docs-page.php:179 +msgid "" +"The Numeric Slider option type displays a jQuery UI slider. It will return a " +"single numerical value for use in a custom function or loop." +msgstr "" + +#: includes/ot-functions-docs-page.php:181 +msgid "Page Select" +msgstr "" + +#: includes/ot-functions-docs-page.php:182 +msgid "" +"The Page Select option type displays a list of page IDs. It will return a " +"single page ID for use in a custom function or loop." +msgstr "" + +#: includes/ot-functions-docs-page.php:184 +msgid "Page Checkbox" +msgstr "" + +#: includes/ot-functions-docs-page.php:185 +msgid "" +"The Page Select option type displays a list of page IDs. It allows the user " +"to check multiple page IDs for use in a custom function or loop." +msgstr "" + +#: includes/ot-functions-docs-page.php:187 +msgid "Post Select" +msgstr "" + +#: includes/ot-functions-docs-page.php:188 +msgid "" +"The Post Select option type displays a list of post IDs. It will return a " +"single post ID for use in a custom function or loop." +msgstr "" + +#: includes/ot-functions-docs-page.php:190 +msgid "Post Checkbox" +msgstr "" + +#: includes/ot-functions-docs-page.php:191 +msgid "" +"The Post Select option type displays a list of post IDs. It allows the user " +"to check multiple post IDs for use in a custom function or loop." +msgstr "" + +#: includes/ot-functions-docs-page.php:193 +msgid "Radio" +msgstr "" + +#: includes/ot-functions-docs-page.php:194 +msgid "" +"The Radio option type could ask a question. For example, \"Do you want to " +"activate the custom navigation?\" could require a yes or no answer with a " +"radio option. In this situation you would test if the radio has a value of " +"'yes' and execute a block of code, or if it's 'no' execute a different block " +"of code." +msgstr "" + +#: includes/ot-functions-docs-page.php:196 +msgid "Radio Image" +msgstr "" + +#: includes/ot-functions-docs-page.php:197 +msgid "" +"the Radio Images option type is primarily used for layouts. However, you can " +"filter the image list using ot_radio_images. As well, you can " +"add your own custom images using the choices array." +msgstr "" + +#: includes/ot-functions-docs-page.php:199 +msgid "" +"This example executes the ot_radio_images filter on layout " +"images attached to the my_radio_images field. Added to " +"functions.php." +msgstr "" + +#: includes/ot-functions-docs-page.php:223 +msgid "Select" +msgstr "" + +#: includes/ot-functions-docs-page.php:224 +msgid "" +"The Select option type is used to list anything you want that would be " +"chosen from a select list." +msgstr "" + +#: includes/ot-functions-docs-page.php:226 +msgid "Sidebar Select" +msgstr "" + +#: includes/ot-functions-docs-page.php:227 +msgid "" +"This option type makes it possible for users to select a WordPress " +"registered sidebar to use on a specific area. By using the two provided " +"filters, ot_recognized_sidebars, and " +"ot_recognized_sidebars_{$field_id} we can be selective about " +"which sidebars are available on a specific content area." +msgstr "" + +#: includes/ot-functions-docs-page.php:228 +msgid "" +"For example, if we create a WordPress theme that provides the ability to " +"change the Blog Sidebar and we don't want to have the footer sidebars " +"available on this area, we can unset those sidebars either manually or by " +"using a regular expression if we have a common name like footer-" +"sidebar-$i." +msgstr "" + +#: includes/ot-functions-docs-page.php:230 +msgid "Slider" +msgstr "" + +#: includes/ot-functions-docs-page.php:231 +msgid "" +"The Slider option type is technically deprecated. Use the List Item option " +"type instead, as it's infinitely more customizable. Typical use is for " +"creating sliding image content." +msgstr "" + +#: includes/ot-functions-docs-page.php:233 +msgid "Tag Checkbox" +msgstr "" + +#: includes/ot-functions-docs-page.php:234 +msgid "" +"The Tag Checkbox option type displays a list of tag IDs. It allows the user " +"to check multiple tag IDs and will return that value as an array for use in " +"a custom function or loop." +msgstr "" + +#: includes/ot-functions-docs-page.php:236 +msgid "Tag Select" +msgstr "" + +#: includes/ot-functions-docs-page.php:237 +msgid "" +"The Tag Select option type displays a list of tag IDs. It allows the user to " +"select only one tag ID and will return that value for use in a custom " +"function or loop." +msgstr "" + +#: includes/ot-functions-docs-page.php:239 +msgid "Taxonomy Checkbox" +msgstr "" + +#: includes/ot-functions-docs-page.php:240 +msgid "" +"The Taxonomy Checkbox option type displays a list of taxonomy IDs. It allows " +"the user to check multiple taxonomy IDs and will return that value as an " +"array for use in a custom function or loop." +msgstr "" + +#: includes/ot-functions-docs-page.php:242 +msgid "Taxonomy Select" +msgstr "" + +#: includes/ot-functions-docs-page.php:243 +msgid "" +"The Taxonomy Select option type displays a list of taxonomy IDs. It allows " +"the user to select only one taxonomy ID and will return that value for use " +"in a custom function or loop." +msgstr "" + +#: includes/ot-functions-docs-page.php:245 +msgid "Text (Input)" +msgstr "" + +#: includes/ot-functions-docs-page.php:246 +msgid "" +"The Text option type would be used to save a string value. For example, a " +"link to feedburner, your Twitter username, or Google Analytics ID are all " +"good candidates. Any optional or required text that is of reasonably short " +"character length." +msgstr "" + +#: includes/ot-functions-docs-page.php:248 +msgid "Textarea" +msgstr "" + +#: includes/ot-functions-docs-page.php:249 +msgid "" +"The Textarea option type is a large string value used for custom code or " +"text in the theme. The new Textarea has a WYSIWYG editor that can be " +"filtered to change the buttons shown. For example, you can filter on " +"wpautop, media_buttons, tinymce, and " +"quicktags." +msgstr "" + +#: includes/ot-functions-docs-page.php:251 +msgid "" +"Example filters to alter the Textarea option type. Added to functions." +"php." +msgstr "" + +#: includes/ot-functions-docs-page.php:253 +msgid "" +"This example keeps WordPress from executing the wpautop filter " +"on the line breaks. The default is true which means it wraps " +"line breaks with an HTML p tag." +msgstr "" + +#: includes/ot-functions-docs-page.php:266 +msgid "" +"This example keeps WordPress from executing the media_buttons " +"filter on the textarea WYSIWYG. The default is true which means " +"show the buttons." +msgstr "" + +#: includes/ot-functions-docs-page.php:279 +msgid "" +"This example keeps WordPress from executing the tinymce filter " +"on the textarea WYSIWYG. The default is true which means show " +"the tinymce." +msgstr "" + +#: includes/ot-functions-docs-page.php:292 +msgid "" +"This example alters the quicktags filter on the textarea " +"WYSIWYG. The default is array( 'buttons' => 'strong,em,link,block,del," +"ins,img,ul,ol,li,code,spell,close' ) which means show those " +"quicktags. It also means you can filter in your own custom quicktags." +msgstr "" + +#: includes/ot-functions-docs-page.php:307 +msgid "Textarea Simple" +msgstr "" + +#: includes/ot-functions-docs-page.php:308 +msgid "" +"The Textarea Simple option type is a large string value used for custom code " +"or text in the theme. The new Textarea Simple does not have a WYSIWYG " +"editor. But you can still filter on wpautop." +msgstr "" + +#: includes/ot-functions-docs-page.php:310 +msgid "" +"This example tells WordPress to execute the wpautop filter on " +"the line breaks. The default is false which means it does not " +"wraps line breaks with an HTML p tag. Added to functions." +"php." +msgstr "" + +#: includes/ot-functions-docs-page.php:323 +msgid "Textblock" +msgstr "" + +#: includes/ot-functions-docs-page.php:324 +msgid "" +"The Textblock option type is used only on the Theme Option page. It will " +"allow you to create & display HTML on your Theme Options page but has no " +"title above the text block. You can then use the Textblock to add a more " +"detailed set of instruction on how the options are used in your theme. You " +"would NEVER use this in your themes template files as it does not save a " +"value." +msgstr "" + +#: includes/ot-functions-docs-page.php:326 +msgid "Textblock Titled" +msgstr "" + +#: includes/ot-functions-docs-page.php:327 +msgid "" +"The Textblock Titled option type is used only on the Theme Option page. It " +"will allow you to create & display HTML on your Theme Options page and has a " +"title above the text block. You can then use the Textblock Titled to add a " +"more detailed set of instruction on how the options are used in your theme. " +"You would NEVER use this in your themes template files as it does not save a " +"value." +msgstr "" + +#: includes/ot-functions-docs-page.php:329 +msgid "Typography" +msgstr "" + +#: includes/ot-functions-docs-page.php:330 +msgid "" +"The Typography option type is for adding typographic styles to your theme " +"either dynamically via the CSS option type below or manually with " +"ot_get_option(). Typography has filters that allow you to " +"change the defaults. For example, you can filter on " +"ot_recognized_font_styles, ot_recognized_font_weights, ot_recognized_font_variants, and " +"ot_recognized_font_families. These filters allow you to fine " +"tune the select lists for your specific CSS needs. The most important one " +"though is ot_recognized_font_families as you can add your " +"Google Fonts to create custom font stacks." +msgstr "" + +#: includes/ot-functions-docs-page.php:332 +msgid "" +"This example would filter ot_recognized_font_families to build " +"your own font stack. Added to functions.php." +msgstr "" + +#: includes/ot-functions-docs-page.php:349 +msgid "Upload" +msgstr "" + +#: includes/ot-functions-docs-page.php:350 +msgid "" +"The Upload option type is used to upload any WordPress supported media. " +"After uploading, users are required to press the \"Send to OptionTree\" " +"button in order to populate the input with the URI of that media. There is " +"one caveat of this feature. If you import the theme options and have " +"uploaded media on one site the old URI will not reflect the URI of your new " +"site. You'll have to re-upload or FTP any media to your new server and " +"change the URIs if necessary." +msgstr "" + +#: includes/ot-functions-docs-page.php:382 +msgid "" +"This function returns a value from the \"option_tree\" array of saved values " +"or the default value supplied. The returned value would be mixed. Meaning it " +"could be a string, integer, boolean, or array." +msgstr "" + +#: includes/ot-functions-docs-page.php:384 +#: includes/ot-functions-docs-page.php:434 +msgid "Usage" +msgstr "" + +#: includes/ot-functions-docs-page.php:388 +#: includes/ot-functions-docs-page.php:438 +msgid "Parameters" +msgstr "" + +#: includes/ot-functions-docs-page.php:392 +#: includes/ot-functions-docs-page.php:396 +#: includes/ot-functions-docs-page.php:442 +msgid "string" +msgstr "" + +#: includes/ot-functions-docs-page.php:392 +#: includes/ot-functions-docs-page.php:442 +msgid "required" +msgstr "" + +#: includes/ot-functions-docs-page.php:392 +msgid "Enter the options unique identifier." +msgstr "" + +#: includes/ot-functions-docs-page.php:392 +#: includes/ot-functions-docs-page.php:442 +msgid "Default:" +msgstr "" + +#: includes/ot-functions-docs-page.php:392 +#: includes/ot-functions-docs-page.php:396 +#: includes/ot-functions-docs-page.php:442 +#: includes/ot-functions-docs-page.php:446 +msgid "None" +msgstr "" + +#: includes/ot-functions-docs-page.php:396 +#: includes/ot-functions-docs-page.php:446 +#: includes/ot-functions-docs-page.php:450 +#: includes/ot-functions-docs-page.php:454 +#: includes/ot-functions-docs-page.php:458 +msgid "optional" +msgstr "" + +#: includes/ot-functions-docs-page.php:396 +msgid "" +"Enter a default return value. This is just incase the request returns null." +msgstr "" + +#: includes/ot-functions-docs-page.php:396 +#: includes/ot-functions-docs-page.php:446 +#: includes/ot-functions-docs-page.php:450 +#: includes/ot-functions-docs-page.php:454 +#: includes/ot-functions-docs-page.php:458 +msgid "Default" +msgstr "" + +#: includes/ot-functions-docs-page.php:426 +msgid "" +"This function has been deprecated. That means it has been replaced by a new " +"function or is no longer supported, and may be removed from future versions. " +"All code that uses this function should be converted to use its replacement." +msgstr "" + +#: includes/ot-functions-docs-page.php:428 +msgid "Use" +msgstr "" + +#: includes/ot-functions-docs-page.php:428 +msgid "instead" +msgstr "" + +#: includes/ot-functions-docs-page.php:432 +msgid "" +"This function returns, or echos if asked, a value from the \"option_tree\" " +"array of saved values." +msgstr "" + +#: includes/ot-functions-docs-page.php:442 +msgid "Enter a unique Option Key to get a returned value or array." +msgstr "" + +#: includes/ot-functions-docs-page.php:446 +msgid "array" +msgstr "" + +#: includes/ot-functions-docs-page.php:446 +msgid "Used to cut down on database queries in template files." +msgstr "" + +#: includes/ot-functions-docs-page.php:450 +#: includes/ot-functions-docs-page.php:454 +msgid "boolean" +msgstr "" + +#: includes/ot-functions-docs-page.php:450 +msgid "Echo the output." +msgstr "" + +#: includes/ot-functions-docs-page.php:454 +msgid "Used to indicate the $item_id is an array of values." +msgstr "" + +#: includes/ot-functions-docs-page.php:458 +msgid "integer" +msgstr "" + +#: includes/ot-functions-docs-page.php:458 +msgid "" +"Numeric offset key for the $item_id array, -1 will return all values (an " +"array starts at 0)." +msgstr "" + +#: includes/ot-functions-docs-page.php:486 +msgid "" +"If you're using the plugin version of OptionTree it is highly recommended to " +"include a function_exists check in your code, as described in " +"the examples below. If you've integrated OptionTree directly into your " +"themes root directory, you will not need to wrap your code " +"with function_exists, as you're guaranteed to have the " +"ot_get_option() function available." +msgstr "" + +#: includes/ot-functions-docs-page.php:488 +msgid "String Examples" +msgstr "" + +#: includes/ot-functions-docs-page.php:490 +msgid "Returns the value of test_input." +msgstr "" + +#: includes/ot-functions-docs-page.php:496 +msgid "" +"Returns the value of test_input, but also has a default value " +"if it returns empty." +msgstr "" + +#: includes/ot-functions-docs-page.php:502 +msgid "Array Examples" +msgstr "" + +#: includes/ot-functions-docs-page.php:504 +msgid "" +"Assigns the value of navigation_ids to the variable $ids. It then echos an unordered list of links (navigation) using " +"wp_list_pages()." +msgstr "" + +#: includes/ot-functions-docs-page.php:524 +msgid "" +"The next two examples demonstrate how to use the Measurement option type. The Measurement option type is an array with two key/" +"value pairs. The first is the value of measurement and the second is the " +"unit of measurement." +msgstr "" + +#: includes/ot-functions-docs-page.php:550 +msgid "This example displays a very basic slider loop." +msgstr "" + +#: includes/ot-functions-docs-page.php:595 +msgid "It's Super Simple" +msgstr "" + +#: includes/ot-functions-docs-page.php:597 +msgid "" +"Layouts make your theme awesome! With theme options data that you can save/" +"import/export you can package themes with different color variations, or " +"make it easy to do A/B testing on text and so much more. Basically, you save " +"a snapshot of your data as a layout." +msgstr "" + +#: includes/ot-functions-docs-page.php:599 +msgid "" +"Once you have created all your different layouts, or theme variations, you " +"can save them to a separate text file for repackaging with your theme. " +"Alternatively, you could just make different variations for yourself and " +"change your theme with the click of a button, all without deleting your " +"previous options data." +msgstr "" + +#: includes/ot-functions-docs-page.php:601 +msgid "" +" Adding a layout is ridiculously easy, follow these steps and you'll be on " +"your way to having a WordPress super theme." +msgstr "" + +#: includes/ot-functions-docs-page.php:603 +msgid "For Developers" +msgstr "" + +#: includes/ot-functions-docs-page.php:606 +#: includes/ot-functions-docs-page.php:636 +msgid "Creating a Layout" +msgstr "" + +#: includes/ot-functions-docs-page.php:608 +#: includes/ot-functions-docs-page.php:615 +#: includes/ot-functions-docs-page.php:621 +msgid "Go to the OptionTre->Settings->Layouts tab." +msgstr "" + +#: includes/ot-functions-docs-page.php:609 +msgid "" +"Enter a name for your layout in the text field and hit \"Save Layouts\", " +"you've created your first layout." +msgstr "" + +#: includes/ot-functions-docs-page.php:610 +#: includes/ot-functions-docs-page.php:640 +msgid "Adding a new layout is as easy as repeating the steps above." +msgstr "" + +#: includes/ot-functions-docs-page.php:613 +#: includes/ot-functions-docs-page.php:643 +msgid "Activating a Layout" +msgstr "" + +#: includes/ot-functions-docs-page.php:616 +msgid "Click on the activate layout button in the actions list." +msgstr "" + +#: includes/ot-functions-docs-page.php:619 +#: includes/ot-functions-docs-page.php:649 +msgid "Deleting a Layout" +msgstr "" + +#: includes/ot-functions-docs-page.php:622 +msgid "Click on the delete layout button in the actions list." +msgstr "" + +#: includes/ot-functions-docs-page.php:625 +#: includes/ot-functions-docs-page.php:654 +msgid "Edit Layout Data" +msgstr "" + +#: includes/ot-functions-docs-page.php:627 +#: includes/ot-functions-docs-page.php:638 +#: includes/ot-functions-docs-page.php:645 +msgid "Go to the Appearance->Theme Options page." +msgstr "" + +#: includes/ot-functions-docs-page.php:628 +#: includes/ot-functions-docs-page.php:657 +msgid "" +"Modify and save your theme options and the layout will be updated " +"automatically." +msgstr "" + +#: includes/ot-functions-docs-page.php:629 +#: includes/ot-functions-docs-page.php:658 +msgid "" +"Saving theme options data will update the currently active layout, so before " +"you start saving make sure you want to modify the current layout." +msgstr "" + +#: includes/ot-functions-docs-page.php:630 +msgid "" +"If you want to edit a new layout, first create it then save your theme " +"options." +msgstr "" + +#: includes/ot-functions-docs-page.php:633 +msgid "End-Users Mode" +msgstr "" + +#: includes/ot-functions-docs-page.php:639 +msgid "" +"Enter a name for your layout in the text field and hit \"New Layout\", " +"you've created your first layout." +msgstr "" + +#: includes/ot-functions-docs-page.php:646 +msgid "" +"Choose a layout from the select list and click the \"Activate Layout\" " +"button." +msgstr "" + +#: includes/ot-functions-docs-page.php:651 +msgid "End-Users mode does not allow deleting layouts." +msgstr "" + +#: includes/ot-functions-docs-page.php:656 +msgid "Go to the Appearance->Theme Options tab." +msgstr "" + +#: includes/ot-functions-docs-page.php:687 +#: includes/ot-functions-docs-page.php:769 +msgid "How-to-guide" +msgstr "" + +#: includes/ot-functions-docs-page.php:689 +msgid "" +"There are a few simple steps you need to take in order to use OptionTree's " +"built in Meta Box API. In the code below I'll show you a basic demo of how " +"to create your very own custom meta box using any number of the option types " +"you have at your disposal. If you would like to see some demo code, there is " +"a directory named theme-mode inside the assets " +"directory that contains a file named demo-meta-boxes.php you " +"can reference." +msgstr "" + +#: includes/ot-functions-docs-page.php:691 +msgid "" +"It's important to note that Meta Boxes do not support WYSIWYG editors at " +"this time and if you set one of your options to Textarea it will " +"automatically revert to a Textarea Simple until a valid solution is found. " +"WordPress released this statement regarding the wp_editor() function:" +msgstr "" + +#: includes/ot-functions-docs-page.php:693 +msgid "" +"Once instantiated, the WYSIWYG editor cannot be moved around in the DOM. " +"What this means in practical terms, is that you cannot put it in meta-boxes " +"that can be dragged and placed elsewhere on the page." +msgstr "" + +#: includes/ot-functions-docs-page.php:695 +msgid "Create and include your custom meta boxes file." +msgstr "" + +#: includes/ot-functions-docs-page.php:697 +msgid "" +"Create a file and name it anything you want, maybe meta-boxes.php." +msgstr "" + +#: includes/ot-functions-docs-page.php:698 +msgid "" +"As well, you'll probably want to create a directory named includes to put your meta-boxes.php into which will help keep you " +"file structure nice and tidy." +msgstr "" + +#: includes/ot-functions-docs-page.php:699 +#: includes/ot-functions-docs-page.php:810 +msgid "Add the following code to your functions.php." +msgstr "" + +#: includes/ot-functions-docs-page.php:709 +msgid "" +"Add a variation of the following code to your meta-boxes.php. " +"You'll obviously need to fill it in with all your custom array values. It's " +"important to note here that we use the admin_init filter " +"because if you were to call the ot_register_meta_box function " +"before OptionTree was loaded the sky would fall on your head." +msgstr "" + +#: includes/ot-functions-docs-page.php:771 +msgid "" +"There are a few simple steps you need to take in order to use OptionTree as " +"a theme included module. In the code below I'll show you a basic demo of how " +"to include the entire plugin as a module, which will allow you to have the " +"most up-to-date version of OptionTree without ever needing to hack the core " +"of the plugin. If you would like to see some demo code, there is a directory " +"named theme-mode inside the assets directory that " +"contains a file named demo-theme-options.php you can reference." +msgstr "" + +#: includes/ot-functions-docs-page.php:773 +msgid "Step 1: Include the plugin & turn on theme mode." +msgstr "" + +#: includes/ot-functions-docs-page.php:775 +msgid "" +"Download the latest version of OptionTree." +msgstr "" + +#: includes/ot-functions-docs-page.php:776 +msgid "Unpack the ZIP archive." +msgstr "" + +#: includes/ot-functions-docs-page.php:777 +msgid "" +"Put the option-tree directory in the root of your theme. For " +"example, the server path would be /wp-content/themes/theme-name/option-" +"tree/." +msgstr "" + +#: includes/ot-functions-docs-page.php:778 +msgid "" +"Add the following code to the beginning of your functions.php." +msgstr "" + +#: includes/ot-functions-docs-page.php:804 +msgid "" +"It's that simple! You now have OptionTree built into your theme and anytime " +"there's an update to the plugin you just replace the old version and you're " +"good to go.." +msgstr "" + +#: includes/ot-functions-docs-page.php:806 +msgid "Step 2: Create Theme Options without using the UI Builder." +msgstr "" + +#: includes/ot-functions-docs-page.php:808 +msgid "" +"Create a file and name it anything you want, maybe theme-options.php, or use the built in file export to create it for you. Remember, you " +"should always check the file for errors before including it in your theme." +msgstr "" + +#: includes/ot-functions-docs-page.php:809 +msgid "" +"As well, you'll probably want to create a directory named includes to put your theme-options.php into which will help keep " +"you file structure nice and tidy." +msgstr "" + +#: includes/ot-functions-docs-page.php:820 +msgid "" +"Add a variation of the following code to your theme-options.php. You'll obviously need to fill it in with all your custom array values " +"for contextual help (optional), sections (required), and settings (required)." +msgstr "" + +#: includes/ot-functions-docs-page.php:823 +msgid "" +"The code below is a boilerplate to get your started. For a full list of the " +"available option types click the \"Option Types\" tab above. Also a quick " +"note, you don't need to put OptionTree in theme mode to manually create " +"options but you will want to hide the docs and settings as each time you " +"load the admin area the settings be written over with the code below if " +"they've changed in any way. However, this ensures your settings do not get " +"tampered with by the end-user." +msgstr "" + +#: includes/ot-functions-option-types.php:46 +msgid "Sorry, this function does not exist" +msgstr "" + +#: includes/ot-functions-option-types.php:107 +msgid "background-repeat" +msgstr "" + +#: includes/ot-functions-option-types.php:116 +msgid "background-attachment" +msgstr "" + +#: includes/ot-functions-option-types.php:125 +msgid "background-position" +msgstr "" + +#: includes/ot-functions-option-types.php:140 +#: includes/ot-functions-option-types.php:1860 +msgid "Add Media" +msgstr "" + +#: includes/ot-functions-option-types.php:208 +#: includes/ot-functions-option-types.php:262 +msgid "No Categories Found" +msgstr "" + +#: includes/ot-functions-option-types.php:257 +#: includes/ot-functions-option-types.php:515 +#: includes/ot-functions-option-types.php:803 +#: includes/ot-functions-option-types.php:984 +#: includes/ot-functions-option-types.php:1314 +#: includes/ot-functions-option-types.php:1429 +msgid "Choose One" +msgstr "" + +#: includes/ot-functions-option-types.php:463 +#: includes/ot-functions-option-types.php:520 +#: includes/ot-functions-option-types.php:935 +#: includes/ot-functions-option-types.php:989 +msgid "No Posts Found" +msgstr "" + +#: includes/ot-functions-option-types.php:592 +#: includes/ot-functions-option-types.php:880 +msgid "Add New" +msgstr "" + +#: includes/ot-functions-option-types.php:595 +#: includes/ot-functions-option-types.php:883 +msgid "You can re-order with drag & drop, the order will update after saving." +msgstr "" + +#: includes/ot-functions-option-types.php:754 +#: includes/ot-functions-option-types.php:808 +msgid "No Pages Found" +msgstr "" + +#: includes/ot-functions-option-types.php:1205 +msgid "Choose Sidebar" +msgstr "" + +#: includes/ot-functions-option-types.php:1210 +msgid "No Sidebars" +msgstr "" + +#: includes/ot-functions-option-types.php:1265 +#: includes/ot-functions-option-types.php:1319 +msgid "No Tags Found" +msgstr "" + +#: includes/ot-functions-option-types.php:1377 +#: includes/ot-functions-option-types.php:1434 +msgid "No Taxonomies Found" +msgstr "" + +#: includes/ot-functions-settings-page.php:35 +msgid "Warning!" +msgstr "" + +#: includes/ot-functions-settings-page.php:36 +msgid "" +"Go to the %s page if you want to save data, this page is for adding settings." +msgstr "" + +#: includes/ot-functions-settings-page.php:37 +msgid "" +"If you're unsure or not completely positive that you should be editing these " +"settings, you should read the %s first." +msgstr "" + +#: includes/ot-functions-settings-page.php:38 +msgid "" +"Things could break or be improperly displayed to the end-user if you do one " +"of the following:" +msgstr "" + +#: includes/ot-functions-settings-page.php:39 +msgid "" +"Give two sections the same ID, give two settings the same ID, give two " +"contextual help content areas the same ID, don't create any settings, or " +"have a section at the end of the settings list." +msgstr "" + +#: includes/ot-functions-settings-page.php:40 +msgid "" +"You can create as many settings as your project requires and use them how " +"you see fit. When you add a setting here, it will be available on the Theme " +"Options page for use in your theme. To separate your settings into sections, " +"click the \"Add Section\" button, fill in the input fields, and a new " +"navigation menu item will be created." +msgstr "" + +#: includes/ot-functions-settings-page.php:41 +msgid "" +"All of the settings can be sorted and rearranged to your liking with Drag & " +"Drop. Don't worry about the order in which you create your settings, you can " +"always reorder them." +msgstr "" + +#: includes/ot-functions-settings-page.php:92 +msgid "Add Section" +msgstr "" + +#: includes/ot-functions-settings-page.php:99 +msgid "Contextual Help" +msgstr "" + +#: includes/ot-functions-settings-page.php:103 +msgid "Contextual Help Sidebar" +msgstr "" + +#: includes/ot-functions-settings-page.php:103 +msgid "" +"If you decide to add contextual help to the Theme Option page, enter the " +"optional \"Sidebar\" HTML here. This would be an extremely useful place to " +"add links to your themes documentation or support forum. Only after you've " +"added some content below will this display to the user." +msgstr "" + +#: includes/ot-functions-settings-page.php:132 +msgid "Add Contextual Help Content" +msgstr "" + +#: includes/ot-functions-settings-page.php:168 +msgid "" +"This import method has been deprecated. That means it has been replaced by a " +"new method and is no longer supported, and may be removed from future " +"versions. All themes that use this import method should be converted to use " +"its replacement below." +msgstr "" + +#: includes/ot-functions-settings-page.php:170 +msgid "" +"If you were given a Theme Options XML file with a premium or free theme, " +"locate it on your hard drive and upload that file by clicking the blue " +"upload button. A popup window will appear, upload the XML file and click " +"\"Send to OptionTree\". The file URL should be in the upload input, if it is " +"click \"Import XML\"." +msgstr "" + +#: includes/ot-functions-settings-page.php:173 +msgid "Import XML" +msgstr "" + +#: includes/ot-functions-settings-page.php:189 +msgid "Add XML" +msgstr "" + +#: includes/ot-functions-settings-page.php:226 +msgid "" +"To import your Settings copy and paste what appears to be a random string of " +"alpha numeric characters into this textarea and press the \"Import Settings" +"\" button." +msgstr "" + +#: includes/ot-functions-settings-page.php:229 +msgid "Import Settings" +msgstr "" + +#: includes/ot-functions-settings-page.php:271 +msgid "" +"Only after you've imported the Settings should you try and update your Theme " +"Options." +msgstr "" + +#: includes/ot-functions-settings-page.php:273 +msgid "" +"To import your Theme Options copy and paste what appears to be a random " +"string of alpha numeric characters into this textarea and press the \"Import " +"Theme Options\" button." +msgstr "" + +#: includes/ot-functions-settings-page.php:276 +msgid "Import Theme Options" +msgstr "" + +#: includes/ot-functions-settings-page.php:318 +msgid "" +"Only after you've imported the Settings should you try and update your " +"Layouts." +msgstr "" + +#: includes/ot-functions-settings-page.php:320 +msgid "" +"To import your Layouts copy and paste what appears to be a random string of " +"alpha numeric characters into this textarea and press the \"Import Layouts\" " +"button. Keep in mind that when you import your layouts, the active layout's " +"saved data will write over the current data set for your Theme Options." +msgstr "" + +#: includes/ot-functions-settings-page.php:323 +msgid "Import Layouts" +msgstr "" + +#: includes/ot-functions-settings-page.php:366 +msgid "" +"Export your Settings into a fully functional theme-options.php " +"file by clicking this button. For more information on how to use this file " +"read the theme mode %s. Remember, you should always check the file for " +"errors before including it in your theme." +msgstr "" + +#: includes/ot-functions-settings-page.php:373 +msgid "Export Settings File" +msgstr "" + +#: includes/ot-functions-settings-page.php:403 +msgid "" +"Export your Settings by highlighting this text and doing a copy/paste into a " +"blank .txt file. Then save the file for importing into another install of " +"WordPress later. Alternatively, you could just paste it into the " +"OptionTree->Settings->Import Settings textarea " +"on another web site." +msgstr "" + +#: includes/ot-functions-settings-page.php:439 +msgid "" +"Export your Theme Options data by highlighting this text and doing a copy/" +"paste into a blank .txt file. Then save the file for importing into another " +"install of WordPress later. Alternatively, you could just paste it into the " +"OptionTree->Settings->Import Theme Options " +"textarea on another web site." +msgstr "" + +#: includes/ot-functions-settings-page.php:475 +msgid "" +"Export your Layouts by highlighting this text and doing a copy/paste into a " +"blank .txt file. Then save the file for importing into another install of " +"WordPress later. Alternatively, you could just paste it into the " +"OptionTree->Settings->Import Layouts textarea " +"on another web site." +msgstr "" + +#: includes/ot-functions-settings-page.php:517 +msgid "" +"To add a new layout enter a unique lower case alphanumeric string (dashes " +"allowed) in the text field and click \"Save Layouts\"." +msgstr "" + +#: includes/ot-functions-settings-page.php:518 +msgid "" +"As well, you can activate, remove, and drag & drop the order; all situations " +"require you to click \"Save Layouts\" for the changes to be applied." +msgstr "" + +#: includes/ot-functions-settings-page.php:519 +msgid "" +"When you create a new layout it will become active and any changes made to " +"the Theme Options will be applied to it. If you switch back to a different " +"layout immediately after creating a new layout that new layout will have a " +"snapshot of the current Theme Options data attached to it." +msgstr "" + +#: includes/ot-functions-settings-page.php:520 +msgid "" +"Visit OptionTree->Documentation->Layouts Overview to see a more " +"in-depth description of what layouts are and how to use them." +msgstr "" + +#: includes/ot-functions-settings-page.php:557 +msgid "Save Layouts" +msgstr "" + +#: includes/ot-settings-api.php:353 +msgid "Reset Options" +msgstr "" diff --git a/option-tree/license.txt b/option-tree/license.txt new file mode 100644 index 00000000..20d40b6b --- /dev/null +++ b/option-tree/license.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. \ No newline at end of file diff --git a/option-tree/ot-loader.php b/option-tree/ot-loader.php new file mode 100644 index 00000000..7829bcae --- /dev/null +++ b/option-tree/ot-loader.php @@ -0,0 +1,573 @@ + + * @copyright Copyright (c) 2013, Derek Herman + */ +if ( ! class_exists( 'OT_Loader' ) ) { + + class OT_Loader { + + /** + * PHP5 constructor method. + * + * This method loads other methods of the class. + * + * @return void + * + * @access public + * @since 2.0 + */ + public function __construct() { + + /* load languages */ + $this->load_languages(); + + /* load OptionTree */ + add_action( 'after_setup_theme', array( $this, 'load_option_tree' ), 1 ); + + } + + /** + * Load the languages before everything else. + * + * @return void + * + * @access private + * @since 2.1.3 + */ + private function load_languages() { + + /** + * A quick check to see if we're in plugin mode. + * + * @since 2.1.3 + */ + define( 'OT_PLUGIN_MODE', strpos( dirname( __FILE__ ), 'plugins/' . basename( dirname( __FILE__ ) ) ) !== false ? true : false ); + + /** + * Path to the languages directory. + * + * This path will be relative in plugin mode and absolute in theme mode. + * + * @since 2.0.10 + */ + define( 'OT_LANG_DIR', dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); + + /* load the text domain */ + if ( OT_PLUGIN_MODE ) { + + add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) ); + + } else { + + add_action( 'after_setup_theme', array( $this, 'load_textdomain' ) ); + + } + + } + + /** + * Load the text domain. + * + * @return void + * + * @access private + * @since 2.0 + */ + public function load_textdomain() { + + if ( OT_PLUGIN_MODE ) { + + load_plugin_textdomain( 'option-tree', false, OT_LANG_DIR ); + + } else { + + load_theme_textdomain( 'option-tree', OT_LANG_DIR . 'theme-mode' ); + + } + + } + + /** + * Load OptionTree on the 'after_setup_theme' action. Then filters will + * be availble to the theme, and not only when in Theme Mode. + * + * @return void + * + * @access public + * @since 2.1.2 + */ + public function load_option_tree() { + + /* setup the constants */ + $this->constants(); + + /* include the required admin files */ + $this->admin_includes(); + + /* include the required files */ + $this->includes(); + + /* hook into WordPress */ + $this->hooks(); + + } + + /** + * Constants + * + * Defines the constants for use within OptionTree. Constants + * are prefixed with 'OT_' to avoid any naming collisions. + * + * @return void + * + * @access private + * @since 2.0 + */ + private function constants() { + + /** + * Current Version number. + */ + define( 'OT_VERSION', '2.1.4' ); + + /** + * For developers: Allow Unfiltered HTML in all the textareas. + * + * Run a filter and set to true if you want all the + * users to be able to post anything in the textareas. + * WARNING: This opens a security hole for low level users + * to be able to post malicious scripts, you've been warned. + * + * @since 2.0 + */ + define( 'OT_ALLOW_UNFILTERED_HTML', apply_filters( 'ot_allow_unfiltered_html', false ) ); + + /** + * For developers: Theme mode. + * + * Run a filter and set to true to enable OptionTree theme mode. + * You must have this files parent directory inside of + * your themes root directory. As well, you must include + * a reference to this file in your themes functions.php. + * + * @since 2.0 + */ + define( 'OT_THEME_MODE', apply_filters( 'ot_theme_mode', false ) ); + + /** + * For developers: Child Theme mode. TODO document + * + * Run a filter and set to true to enable OptionTree child theme mode. + * You must have this files parent directory inside of + * your themes root directory. As well, you must include + * a reference to this file in your themes functions.php. + * + * @since 2.0.15 + */ + define( 'OT_CHILD_THEME_MODE', apply_filters( 'ot_child_theme_mode', false ) ); + + /** + * For developers: Show Pages. + * + * Run a filter and set to false if you don't want to load the + * settings & documentation pages in the admin area of WordPress. + * + * @since 2.0 + */ + define( 'OT_SHOW_PAGES', apply_filters( 'ot_show_pages', true ) ); + + /** + * For developers: Show Theme Options UI Builder + * + * Run a filter and set to false if you want to hide the + * Theme Options UI page in the admin area of WordPress. + * + * @since 2.1 + */ + define( 'OT_SHOW_OPTIONS_UI', apply_filters( 'ot_show_options_ui', true ) ); + + /** + * For developers: Hide Settings Import + * + * Run a filter and set to false if you want to hide the + * Settings Import options on the Import page. + * + * @since 2.1 + */ + define( 'OT_SHOW_SETTINGS_IMPORT', apply_filters( 'ot_show_settings_import', true ) ); + + /** + * For developers: Hide Settings Export + * + * Run a filter and set to false if you want to hide the + * Settings Import options on the Import page. + * + * @since 2.1 + */ + define( 'OT_SHOW_SETTINGS_EXPORT', apply_filters( 'ot_show_settings_export', true ) ); + + /** + * For developers: Show New Layout. + * + * Run a filter and set to false if you don't want to show the + * "New Layout" section at the top of the theme options page. + * + * @since 2.0.10 + */ + define( 'OT_SHOW_NEW_LAYOUT', apply_filters( 'ot_show_new_layout', true ) ); + + /** + * For developers: Show Documentation + * + * Run a filter and set to false if you want to hide the Documentation. + * + * @since 2.1 + */ + define( 'OT_SHOW_DOCS', apply_filters( 'ot_show_docs', true ) ); + + /** + * For developers: Custom Theme Option page + * + * Run a filter and set to false if you want to hide the OptionTree + * Theme Option page and build your own. + * + * @since 2.1 + */ + define( 'OT_USE_THEME_OPTIONS', apply_filters( 'ot_use_theme_options', true ) ); + + /** + * For developers: Meta Boxes. + * + * Run a filter and set to false to keep OptionTree from + * loading the meta box resources. + * + * @since 2.0 + */ + define( 'OT_META_BOXES', apply_filters( 'ot_meta_boxes', true ) ); + + /** + * Check if in theme mode. + * + * If OT_THEME_MODE and OT_CHILD_THEME_MODE is false, set the + * directory path & URL like any other plugin. Otherwise, use + * the parent or child themes root directory. + * + * @since 2.0 + */ + if ( false == OT_THEME_MODE && false == OT_CHILD_THEME_MODE ) { + define( 'OT_DIR', plugin_dir_path( __FILE__ ) ); + define( 'OT_URL', plugin_dir_url( __FILE__ ) ); + } else { + if ( true == OT_CHILD_THEME_MODE ) { + define( 'OT_DIR', trailingslashit( get_stylesheet_directory() ) . trailingslashit( basename( dirname( __FILE__ ) ) ) ); + define( 'OT_URL', trailingslashit( get_stylesheet_directory_uri() ) . trailingslashit( basename( dirname( __FILE__ ) ) ) ); + } else { + define( 'OT_DIR', trailingslashit( get_template_directory() ) . trailingslashit( basename( dirname( __FILE__ ) ) ) ); + define( 'OT_URL', trailingslashit( get_template_directory_uri() ) . trailingslashit( basename( dirname( __FILE__ ) ) ) ); + } + } + + /** + * Template directory URI for the current theme. + * + * @since 2.1 + */ + if ( true == OT_CHILD_THEME_MODE ) { + define( 'OT_THEME_URL', get_stylesheet_directory_uri() ); + } else { + define( 'OT_THEME_URL', get_template_directory_uri() ); + } + + } + + /** + * Include admin files + * + * These functions are included on admin pages only. + * + * @return void + * + * @access private + * @since 2.0 + */ + private function admin_includes() { + + /* exit early if we're not on an admin page */ + if ( ! is_admin() ) + return false; + + /* global include files */ + $files = array( + 'ot-functions-admin', + 'ot-functions-option-types', + 'ot-functions-compat', + 'ot-settings-api' + ); + + /* include the meta box api */ + if ( OT_META_BOXES == true ) { + $files[] = 'ot-meta-box-api'; + } + + /* include the settings & docs pages */ + if ( OT_SHOW_PAGES == true ) { + $files[] = 'ot-functions-settings-page'; + $files[] = 'ot-functions-docs-page'; + } + + /* require the files */ + foreach ( $files as $file ) { + $this->load_file( OT_DIR . "includes/{$file}.php" ); + } + + /* Registers the Theme Option page */ + add_action( 'init', 'ot_register_theme_options_page' ); + + /* Registers the Settings page */ + if ( OT_SHOW_PAGES == true ) { + add_action( 'init', 'ot_register_settings_page' ); + } + + } + + /** + * Include front-end files + * + * These functions are included on every page load + * incase other plugins need to access them. + * + * @return void + * + * @access private + * @since 2.0 + */ + private function includes() { + + $files = array( + 'ot-functions', + 'ot-functions-deprecated' + ); + + /* require the files */ + foreach ( $files as $file ) { + $this->load_file( OT_DIR . "includes/{$file}.php" ); + } + + } + + /** + * Execute the WordPress Hooks + * + * @return void + * + * @access public + * @since 2.0 + */ + private function hooks() { + + /* load the Meta Box assets */ + if ( OT_META_BOXES == true ) { + + /* add scripts for metaboxes to post-new.php & post.php */ + add_action( 'admin_print_scripts-post-new.php', 'ot_admin_scripts', 11 ); + add_action( 'admin_print_scripts-post.php', 'ot_admin_scripts', 11 ); + + /* add styles for metaboxes to post-new.php & post.php */ + add_action( 'admin_print_styles-post-new.php', 'ot_admin_styles', 11 ); + add_action( 'admin_print_styles-post.php', 'ot_admin_styles', 11 ); + + } + + /* Adds the Theme Option page to the admin bar */ + add_action( 'admin_bar_menu', 'ot_register_theme_options_admin_bar_menu', 999 ); + + /* prepares the after save do_action */ + add_action( 'admin_init', 'ot_after_theme_options_save', 1 ); + + /* default settings */ + add_action( 'admin_init', 'ot_default_settings', 2 ); + + /* add xml to upload filetypes array */ + add_action( 'admin_init', 'ot_add_xml_to_upload_filetypes', 3 ); + + /* import */ + add_action( 'admin_init', 'ot_import', 4 ); + + /* export */ + add_action( 'admin_init', 'ot_export', 5 ); + + /* save settings */ + add_action( 'admin_init', 'ot_save_settings', 6 ); + + /* save layouts */ + add_action( 'admin_init', 'ot_modify_layouts', 7 ); + + /* create media post */ + add_action( 'admin_init', 'ot_create_media_post', 8 ); + + /* global CSS */ + add_action( 'admin_head', array( $this, 'global_admin_css' ) ); + + /* dynamic front-end CSS */ + add_action( 'wp_enqueue_scripts', 'ot_load_dynamic_css', 999 ); + + /* insert theme CSS dynamically */ + add_action( 'ot_after_theme_options_save', 'ot_save_css' ); + + /* AJAX call to create a new section */ + add_action( 'wp_ajax_add_section', array( $this, 'add_section' ) ); + + /* AJAX call to create a new setting */ + add_action( 'wp_ajax_add_setting', array( $this, 'add_setting' ) ); + + /* AJAX call to create a new contextual help */ + add_action( 'wp_ajax_add_the_contextual_help', array( $this, 'add_the_contextual_help' ) ); + + /* AJAX call to create a new choice */ + add_action( 'wp_ajax_add_choice', array( $this, 'add_choice' ) ); + + /* AJAX call to create a new list item setting */ + add_action( 'wp_ajax_add_list_item_setting', array( $this, 'add_list_item_setting' ) ); + + /* AJAX call to create a new layout */ + add_action( 'wp_ajax_add_layout', array( $this, 'add_layout' ) ); + + /* AJAX call to create a new list item */ + add_action( 'wp_ajax_add_list_item', array( $this, 'add_list_item' ) ); + + /* Modify the media uploader button */ + add_filter( 'gettext', array( $this, 'change_image_button' ), 10, 3 ); + + } + + /** + * Load a file + * + * @return void + * + * @access private + * @since 2.0.15 + */ + private function load_file( $file ){ + + include_once( $file ); + + } + + /** + * Adds the global CSS to fix the menu icon. + */ + public function global_admin_css() { + echo ' + + '; + } + + /** + * AJAX utility function for adding a new section. + */ + public function add_section() { + echo ot_sections_view( 'option_tree_settings[sections]', $_REQUEST['count'] ); + die(); + } + + /** + * AJAX utility function for adding a new setting. + */ + public function add_setting() { + echo ot_settings_view( $_REQUEST['name'], $_REQUEST['count'] ); + die(); + } + + /** + * AJAX utility function for adding a new list item setting. + */ + public function add_list_item_setting() { + echo ot_settings_view( $_REQUEST['name'] . '[settings]', $_REQUEST['count'] ); + die(); + } + + /** + * AJAX utility function for adding new contextual help content. + */ + public function add_the_contextual_help() { + echo ot_contextual_help_view( $_REQUEST['name'], $_REQUEST['count'] ); + die(); + } + + /** + * AJAX utility function for adding a new choice. + */ + public function add_choice() { + echo ot_choices_view( $_REQUEST['name'], $_REQUEST['count'] ); + die(); + } + + /** + * AJAX utility function for adding a new layout. + */ + public function add_layout() { + echo ot_layout_view( $_REQUEST['count'] ); + die(); + } + + /** + * AJAX utility function for adding a new list item. + */ + public function add_list_item() { + ot_list_item_view( $_REQUEST['name'], $_REQUEST['count'], array(), $_REQUEST['post_id'], $_REQUEST['get_option'], unserialize( ot_decode( $_REQUEST['settings'] ) ), $_REQUEST['type'] ); + die(); + } + + /** + * Filters the media uploader button. + * + * @return string + * + * @access public + * @since 2.1 + */ + public function change_image_button( $translation, $text, $domain ) { + global $pagenow; + + if ( $pagenow == 'themes.php' && 'default' == $domain && 'Insert into post' == $text ) { + + // Once is enough. + remove_filter( 'gettext', array( $this, 'ot_change_image_button' ) ); + return 'Send to OptionTree'; + + } + + return $translation; + + } + + } + + /** + * Instantiate the OptionTree loader class. + * + * @since 2.0 + */ + $ot_loader = new OT_Loader(); + +} + +/* End of file ot-loader.php */ +/* Location: ./ot-loader.php */ \ No newline at end of file diff --git a/option-tree/readme.txt b/option-tree/readme.txt new file mode 100644 index 00000000..3fb820b6 --- /dev/null +++ b/option-tree/readme.txt @@ -0,0 +1,315 @@ +=== OptionTree === +Contributors: valendesigns +Donate link: http://bit.ly/NuXI3T +Tags: admin, theme options, meta boxes, options, admin interface, ajax +Requires at least: 3.5 +Tested up to: 3.6 +Stable tag: 2.1.4 +License: GPLv3 + +Theme Options UI Builder for WordPress. A simple way to create & save Theme Options and Meta Boxes for free or premium themes. + +== Description == + +Theme Options are what make a WordPress Theme truly custom. OptionTree attempts to bridge the gap between developers, designers and end-users by solving the admin User Interface issues that arise when creating a custom theme. Designers shouldn't have to be limited to what they can create visually because their programming skills aren't as developed as they would like. Also, programmers shouldn't have to recreate the wheel for every new project, so in walks OptionTree. + +With OptionTree you can create as many Theme Options as your project requires and use them how you see fit. When you add a option to the Settings page, it will be available on the Theme Options page for use in your theme. + +Included is the ability to Import/Export all the theme options and data for packaging with custom themes or local development. With the Import/Export feature you can get a theme set up on a live server in minutes. Theme authors can now create different version of their themes and include them with the download. It makes setting up different theme styles & options easier than ever because a theme user installs the plugin and theme and either adds their own settings or imports your defaults. + +A new feature in OptionTree 2.0 is the ability to include the plugin directly in your themes root directory. Not only does that mean your theme is guaranteed to have the plugin installed you also get the ability to interact directly with OptionTree through settings and meta box arrays. You can now tell OptionTree what settings you want and know that nobody will break your theme by changing settings through the UI Builder. It's just a better plugin now! + +OptionTree is a project sponsored by ThemeForest, the largest WordPress theme marketplace on the web, and was originally conceived to help ThemeForest authors quickly power up their themes. But it's here for the benefit of one and all, so option up folks! + +== Installation == + +1. Upload `option-tree` to the `/wp-content/plugins/` directory +1. Activate the plugin through the 'Plugins' menu in WordPress +1. Click the `OptionTree->Documentation` link in the WordPress admin sidebar menu for further setup assistance. + +== Frequently Asked Questions == + += Is this plugin PHP5 only? = + +Yes. OptionTree & WordPress both require PHP5. + +== Screenshots == + +1. Theme Options +2. Settings +3. Documentation + +== Changelog == + += 2.1.4 = +* Hotfix - Fixed the Numeric Slider not work inside of a newly added List item. +* Hotfix - Fixed the numeric slider fallback value being set to 0, it now becomes the minimum value if no standard is set. +* Hotfix - Allow single quotes in std and choice value when exporting theme-options.php. Contributors via github @maimairel. +* Hotfix - Additional Themecheck bypass for required functions. Contributors via github @maimairel. +* Hotfix - Fixed post meta information being lost when loading revisions. Contributors via github @live-mesh. +* Hotfix - Removed template queries in option types. Contributors via github @live-mesh. + += 2.1.3 = +* Hotfix - Loading OptionTree on the 'init' action proved to be wrong, it now loads on 'after_setup_theme'. +* Hotfix - Layouts were not being imported properly due to using the wrong path variable. + += 2.1.2 = +* Hotfix - Fixed a JS mistake that caused upload in list items and sliders to not open the media uploader until saved first. +* Hotfix - Load OptionTree on the 'init' action, which allows the UI filters to properly function when not in theme mode. + += 2.1.1 = +* Hotfix - The OT_SHOW_SETTINGS_EXPORT constant was incorrectly set to false as the default. + += 2.1 = +* Added support for WordPress 3.6. +* UI got a small but needed update, and is now more inline with WordPress. +* Added WPML support for the Text, Textarea, and Textarea Simple option types, and within list items; even after drag & drop. +* Upload now uses the media uploader introduced in WordPress 3.5. Contributors via github @htvu, @maimairel, and @valendesigns. +* Added a horizontal Numeric Slider option type. Contributors via github @maimairel and @valendesigns. +* Added a Sidebar Select option type. Contributors via github @maimairel. +* Removed additional deprecated assigning of return value in PHP. +* Fix missing "Send to OptionTree" button in CPT. Contributors via github @jomaddim. +* Fix option types that use $count instead of an array key to select the option value. +* Created functions to register the Theme Options & Settings pages, and with better filtering. +* Added relative path support for Radio Image choices. +* Added dynamic replacement of 'OT_URL' & 'OT_THEME_URL' in the Radio Image source path. +* Make '0' possible as a field value. Validate for empty strings instead of empty(). Contributors via github @maimairel. +* The 'ot_theme_options_capability' filter is now working for different capabilities like editor. +* The 'ot_display_by_type' filter is now being assigned to a value. +* Added filter 'ot_show_options_ui' which allows you to hide the Theme Options UI Builder. +* Added filter 'ot_show_settings_import' which allows you to hide the Settings Import options on the Import page. +* Added filter 'ot_show_settings_export' which allows you to hide the Settings Export options on the Export page. +* Added filter 'ot_show_docs' which allows you to hide the Documentation. +* Added filter 'ot_use_theme_options' which allows you to hide the OptionTree Theme Option page (not recommended for beginners). +* Added filter 'ot_list_item_description' which allows you to change the default list item description text. +* Added filter 'ot_type_custom_post_type_checkbox_query' which allows you to filter the get_posts() args for Custom Post Type Checkbox. +* Added filter 'ot_type_custom_post_type_select_query' which allows you to filter the get_posts() args for Custom Post Type Select. +* Added filter 'ot_type_page_checkbox_query' which allows you to filter the get_posts() args for Page Checkbox. +* Added filter 'ot_type_page_select_query' which allows you to filter the get_posts() args for Page Select. +* Added filter 'ot_type_post_checkbox_query' which allows you to filter the get_posts() args for Post Checkbox. +* Added filter 'ot_type_post_select_query' which allows you to filter the get_posts() args for Post Select. + += 2.0.16 = +* Fixed an urgent JS regression bug that caused the upload option type to break. Code contributed by @anonumus via github. +* Added 'font-color' to the typography filter. + += 2.0.15 = +* Added support for Child Theme mode. +* Improved handling of standard values when settings are written manually. +* Add filter for CSS insertion value. +* Added 'ot_before_theme_options_save' action hook. +* Fix 'indexOf' JS error when upload is closed without uploading. +* Add textarea std value when option type is 'textarea', 'textarea-simple', or 'css'. +* Remove load_template and revert back to include_once. +* Fixed dynamic.css regression from 2.0.13 that caused the file to not save. + += 2.0.14 = +* Removed deprecated assigning of return value in PHP. +* Patch to fix PHP notice regression with the use of load_template in a plugin after Theme Check update. +* Fixed missing required arguments in OT_Loader::add_layout. +* Removed esc_attr() on font-family check. +* Added a 'ot_theme_options_parent_slug' filter in ot-ui-theme-options.php +* Fixed WP_Error from the use of wp_get_remote() instead of file_get_contents(). + += 2.0.13 = +* Removed almost all of the Theme Check nag messages when in 'ot_theme_mode'. +* Fix an issue where Media Upload stopped working on some servers. + += 2.0.12 = +* Added additional filters to the array that builds the Theme Option UI. +* Made option-tree post type private. +* Revert capabilities back to manage_options in ot-ui-admin.php. +* Upload now sends the URL of the selected image size to OptionTree. +* Added new range interval filter to font-size, letter-spacing, & line-height. +* Allow Typography fields to be filtered out of the UI. + += 2.0.11 = +* Added filters to the array that builds the Theme Option UI. +* Added .format-setting-wrap div to allow for complex CSS layouts. +* Added better namespacing for the Colorpicker option type. +* Fixed theme-options.php export where it was adding an extra comma. + += 2.0.10 = +* Fixed a bug where the Textarea row count wasn't working for List Items. +* Added an apply_filter to the exported theme-options.php file. +* Added CSS id's to tabs and settings. +* Allow "New Layout" section to be hidden on the theme options page via a filter. +* Fixed a bug where the Colorpicker was not closing in List Items. +* Change capabilities from manage_options to edit_theme_options. +* Remove Textblock title in List Items & Metaboxes. +* Fixed a List Item bug that incorrectly added ID's based on counting objects - submitted by Spark +* Fixed incorrect text domain paths for both plugin and theme mode. +* Fixed a bug with UI Sortable not properly calculating the container height. +* Fixed Select dropdown selector bug - submitted by Manfred Haltner +* Fixed Radio Image remove class bug - submitted by designst +* Added new typography fields - submitted by darknailblue +* Added dynamic CSS support for new typography fields. +* Added new filters to typography fields, including low/high range & unit types. + += 2.0.9 = +* Fixed the issue where the Textarea Simple and CSS option types were mysteriously being ran through wpautop. +* Added missing class setting to Textarea, Textarea Simple, & CSS option types. +* Fixed theme-options.php exported array where label values were not correct. +* Change GET to POST for all AJAX calls to fix a bug where some servers would not allow long strings to be passed in GET variables. +* Added the 'ot_after_validate_setting' filter to the validation function. +* Added $field_id to the ot_validate_setting() for more precise filtering. +* Added the ot_reverse_wpautop() function that you can run input through just incase you need it. +* Updated the docs to include information on why WYSIWYG editors are not allowed in meta boxes and that they revert to a Textarea Simple. +* Update option-tree.pot file. + += 2.0.8 = +* Add auto import for backwards compatibility of old 1.x files. +* Added the ability to export settings into a fully functional theme-options.php. +* Fix typo in docs regarding the filter demo code. +* Removed slashes in the section and contextual help titles. +* Made colorpicker input field alignment more cross browser compatible. + += 2.0.7 = +* Fixed the load order to be compatible with 1.x version themes that think the get_option_tree() function doesn't exist yet. +* Tested and compatible with Cudazi themes, but the nag message is still visible. + += 2.0.6 = +* Run the 'option_tree' array through validation when importing data and layouts. +* Fix a bug where list items and sliders were not allowing the user to select the input field. +* Add a filter that allows you to not load resources for meta boxes if you're not going to use them. +* Update option-tree.pot file. + += 2.0.5 = +* Change the way the 'option_tree_settings' array validates. Strip out those damn slashes! + += 2.0.4 = +* Run the 'option_tree' array through validation when upgrading from the 1.0 branch to the 2.0 branch for the first time. +* Fix a typo in the slider array where textarea's were not saving the first time due to an incorrect array key. + += 2.0.3 = +* Had an incorrect conditional statement causing an issue where the plugin was attempting to create the 'option-tree' image attachment page, even though it was already created. +* The above also fixed a conflict with 'The Events Calendar' plugin. + += 2.0.2 = +* Added I18n support, let the translations begin. The option-tree.pot file is inside the languages directory. +* Trim whitespace on imported choices array. +* Fixed the CSS insert function not having a value to save. + += 2.0.1 = +* Import from table was not mapping settings correctly. It is now. + += 2.0 = +* Complete rewrite form the ground up. +* Better Theme Options UI Builder. +* New in-plugin documentation. +* Brand new responsive UI. +* Add new option types, most notable the List Item which should eventually replace the Slider. +* Added the simpler ot_get_option() function to eventually replace get_option_tree(). +* Added support for Meta Boxes. +* Added Theme Mode where you can now include the plugin directly in your theme. +* Better validation on saved data. +* Simplified the import process. +* Added support for contextual help. +* Permanently move the Theme Option to the Appearance tab. +* Added a ton of filters. +* Made huge improvements to the code base and tested rigorously. + += 1.1.8.1 = +* Removed get_option_tree() in the WordPress admin area due to theme conflicts. +* Removed demo files in the assets folder at the request of WordPress + += 1.1.8 = +* Fixed scrolling issue on extra tall pages +* Added ability to show/hide settings & documentation via the User Profile page. +* Added Background option type. +* Added Typography option type. +* Added CSS option type. +* Better looking selects with 1=Yes,2=No where '1' is the value and 'Yes' is the text in the select. +* Made the AJAX message CSS more prominent. +* functions.load.php will now only load option type functions if viewing an OT admin page. +* Deregistered the custom jQuery UI in the 'Cispm Mail Contact' plugin when viewing an OptionTree page. +* Can now save layouts from the Theme Options page. +* You can now change the slider fields by targeting a specific "Option Key" +* Modified upload for situations where you manually enter a relative path +* Allow get_option_tree() function to be used in WP admin +* Changed permissions to edit_theme_options + += 1.1.7.1 = +* Revert functions.load.php, will fix and update in next version + += 1.1.7 = +* Added layout (theme variation) support with save/delete/activate/import/export capabilities. Contributions form Brian of flauntbooks.com +* Allow layout change on Theme Options page. +* Full Multisite compatibility by manually adding xml mime type for import options. +* Replaced eregi() with preg_match() for 5.3+ compatibility. +* Changed test data in the assets directory for new layout option. +* Made it so when the slider & upload image changes it's reflected on blur. +* Gave the slider image an upload button. +* Added do_action('option_tree_import_data') to option_tree_import_data() function before exit. +* Added do_action('option_tree_array_save') to option_tree_array_save() function before exit. +* Added do_action('option_tree_save_layout') to option_tree_save_layout() function before exit. +* Added do_action('option_tree_delete_layout') to option_tree_delete_layout() function before exit. +* Added do_action('option_tree_activate_layout') to option_tree_activate_layout() function before exit. +* Added do_action('option_tree_import_layout') to option_tree_import_layout() function before redirect. +* Added do_action('option_tree_admin_header') hook before all admin pages. +* Fixed bug where users could add a color without a hash. +* Only load option type function on Theme Options page +* Loading resources with absolute paths, no longer relative. +* Fixed a bug with uploader creating extra option-tree draft pages. +* Fixed slider toggle bug, now the sliders close when you open another or create new slide. + += 1.1.6 = +* Theme Integration added. +* Made the upload XML file openbase_dir compliant. + += 1.1.5 = +* Fixed multiple sliders issue + += 1.1.4 = +* Patch for get_option_tree() $is_array being false and still returning an array + += 1.1.3 = +* Added Slider option type with filter for changing the optional fields +* Fixed the text displayed for Measurement option type after options are reset +* Added filter to measurement units +* Code cleanup in the option_tree_array_save() function +* Fixed double quotes on front-end display + += 1.1.2 = +* Fixed double quotes in Textarea option type +* Added Measurement option type for CSS values +* Fixed Post option type only returning 5 items +* Added a scrolling window for checkboxes > 10 + += 1.1.1 = +* Fixed the 'remove' icon from showing when nothing's uploaded + += 1.1 = +* Fixed the Undefined index: notices when WP_DEBUG is set to true + += 1.0.0 = +* Initial version + +== Upgrade Notice == + += 2.1.4 = +If you're not the developer of this theme, please ask them to test compatibility with version 2.1 before upgrading. If you are the developer, I urge you to do the same in a controlled environment. + += 2.0.16 = +There was an issue with the upload option type's JavaScript not allowing anything other than images to be sent to the editor. This urgent issue is now fixed and why this version is light on changes. + += 2.0.12 = +The plugin has undertaken a complete rebuild! If you are not the theme developer, I urge you to contact that person before you upgrade and ask them to test the themes compatibility. + += 1.1.8.1 = +Removed get_option_tree() in the WordPress admin area due to theme conflicts. + += 1.1.8 = +Added Typography, Background, & CSS option types. Lots of way to extend them, as well. + += 1.1.7 = +Lots of additions, none critical just fun. Added layouts & upload to slider. As well, started including action hooks for extending and integrating with other plugins. + += 1.1.6 = +Added theme integration for developers. It's now possible to have a default XML file included in your theme to populate the theme options and hide the settings and docs pages. Read more about this in the plugins built in documentation. + += 1.1.5 = +Having multiple sliders caused a naming collision in the JavaScript and is now fixed. Upgrade ASAP to have multiple sliders available in the UI. + += 1.1.4 = +Fixed the returned value of the get_option_tree() function when $is_array is set to false. If you have created any slider or measurement option types please read the updated documentation for examples on how to use them in your theme. diff --git a/option-tree/screenshot-1.png b/option-tree/screenshot-1.png new file mode 100644 index 00000000..937cf778 Binary files /dev/null and b/option-tree/screenshot-1.png differ diff --git a/option-tree/screenshot-2.png b/option-tree/screenshot-2.png new file mode 100644 index 00000000..78a3a8c0 Binary files /dev/null and b/option-tree/screenshot-2.png differ diff --git a/option-tree/screenshot-3.png b/option-tree/screenshot-3.png new file mode 100644 index 00000000..1673b550 Binary files /dev/null and b/option-tree/screenshot-3.png differ diff --git a/page-templates/child-menu.php b/page-templates/child-menu.php new file mode 100644 index 00000000..0f3bdf51 --- /dev/null +++ b/page-templates/child-menu.php @@ -0,0 +1,37 @@ + + + +
    + + + +
    + + + +
    > + + + +
    + +
    +
    + +
    + + + + + +
    + +
    + + + + \ No newline at end of file diff --git a/page.php b/page.php new file mode 100644 index 00000000..1f5795ca --- /dev/null +++ b/page.php @@ -0,0 +1,32 @@ + + +
    + + + +
    + + + +
    > + + + +
    + +
    +
    + +
    + + + + + +
    + +
    + + + + \ No newline at end of file diff --git a/readme.txt b/readme.txt new file mode 100644 index 00000000..8f7382f3 --- /dev/null +++ b/readme.txt @@ -0,0 +1,74 @@ +If you like this theme, feel free to check out my other ones at http://alxmedia.se/themes/ :-) + + +/* Theme License +/* ------------------------------------ */ + +The theme itself is nothing but 100% GPLv3. See headers of files for further details. + + +/* Font Awesome License +/* ------------------------------------ */ + +Font License - http://fontawesome.io +License: SIL OFL 1.1 +License URI: http://scripts.sil.org/OFL +Copyright: Dave Gandy, http://fontawesome.io + +Code License - http://fontawesome.io +License: MIT License +License URI: http://opensource.org/licenses/mit-license.html +Copyright: Dave Gandy, http://fontawesome.io + +Brand Icons +All brand icons are trademarks of their respective owners. +The use of these trademarks does not indicate endorsement of the trademark holder by Font Awesome, nor vice versa. + + +/* Titillium License +/* ------------------------------------ */ + +Titillium Font - http://www.campivisivi.net/titillium/ +License: SIL OFL 1.1 +License URI: http://scripts.sil.org/OFL +Copyright: Accademia di Belle Arti di Urbino, http://campivisivi.net + + +/* Theme screenshot images +/* ------------------------------------ */ + +CC0-licensed (GPL-compatible) images from http://pixabay.com/ and http://unsplash.com/ + +Left sidebar, top to bottom: + +1. unsplash - http://bit.ly/18NNxqe +2. pixabay ID 210801 +3. pixabay ID 164985 +4. pixabay ID 181744 +5. pixabay ID 205220 +6. pixabay ID 74570 +7. pixabay ID 122694 +8. pixabay ID 97433 + +Content, top to bottom, left to right: + +1. pixabay ID 74570 +2. unsplash - http://bit.ly/18NNxqe +3. pixabay ID 166705 +4. pixabay ID 68827 +5. pixabay ID 171732 + +Right sidebar, top to bottom: + +1. pixabay ID 9950 +2. pixabay ID 181744 +3. pixabay ID 122705 +4. pixabay ID 195684 +5. pixabay ID 83810 +6. pixabay ID 18279 + + +/* Other Licenses +/* ------------------------------------ */ + +See headers of files for further details. diff --git a/responsive.css b/responsive.css new file mode 100644 index 00000000..8f6ea1e3 --- /dev/null +++ b/responsive.css @@ -0,0 +1,311 @@ +#wrapper, +.container-inner { min-width: 320px; } + +/* ------------------------------------------------------------------------- * + * Toggle Sidebar s2 : 1200px > 480px +/* ------------------------------------------------------------------------- */ +@media only screen and (min-width: 480px) and (max-width: 1200px) { + + .container { padding: 0 10px; } + + /* s2 general */ + .s2 { width: 50px; } + .s2 .sidebar-content { display: none; float: left; width: 100%; } + .s2 .sidebar-toggle { display: block; } + + /* s2 expand/collapse */ + .s2-expand .s2 { background: #f0f0f0; position: absolute; top: 0; bottom: 0; width: 260px; margin: 0!important; z-index: 9; overflow: auto; + -moz-transition: width .2s ease; -webkit-transition: width .2s ease; transition: width .2s ease; } + .s2-expand .s2 .sidebar-content { display: block; min-width: 260px; } + .s2-collapse .s2 .sidebar-content { display: none; } + + /* s2 toggle icon */ + .col-3cm.s2-expand .s2 .icon-sidebar-toggle:before, + .col-3cl.s2-expand .s2 .icon-sidebar-toggle:before { content: "\f101"; } + .col-3cr.s2-expand .s2 .icon-sidebar-toggle:before { content: "\f100"; } + + /* s2 3 column, content middle */ + .col-3cm .main { background: url(img/sidebar/s-right-collapse.png) repeat-y right; } + .col-3cm .main-inner { padding-right: 50px; } + .col-3cm .s2 { margin-right: -50px; } + .col-3cm.s2-expand .s2 { right: 0; } + +} +@media only screen and (min-width: 961px) and (max-width: 1200px) { + + .s2 .sidebar-toggle { height: 60px; } + .s2 .sidebar-toggle i { padding: 10px 0; } + + /* 3 column, content right */ + .col-3cl .main { background-image: none; } + .col-3cl .main-inner { background: url(img/sidebar/s-right-dual-half-collapse.png) repeat-y right; padding-right: 390px; } + .col-3cl .s1 { margin-right: -390px; } + .col-3cl .s2 { margin-right: -50px; } + .col-3cl.s2-expand .s2 { right: 340px; } + + /* 3 column, content left */ + .col-3cr .main { background-image: none; } + .col-3cr .main-inner { background: url(img/sidebar/s-left-dual-half-collapse.png) repeat-y left; padding-left: 390px; } + .col-3cr .s1 { margin-left: -390px; } + .col-3cr .s2 { margin-left: -50px; } + .col-3cr.s2-expand .s2 { left: 340px; } + +} + +/* ------------------------------------------------------------------------- * + * Toggle Sidebar s1 : 960px > 480px +/* ------------------------------------------------------------------------- */ +@media only screen and (min-width: 480px) and (max-width: 960px) { + + /* s1 general */ + .s1 { width: 50px; } + .s1 .sidebar-content { display: none; float: left; width: 100%; } + .s1 .sidebar-toggle { display: block; } + + /* s1 expand/collapse */ + .s1-expand .s1 { background: #f0f0f0; position: absolute; top: 0; bottom: 0; width: 340px; margin: 0!important; z-index: 9; overflow: auto; + -moz-transition: width .2s ease; -webkit-transition: width .2s ease; transition: width .2s ease; } + .s1-expand .s1 .sidebar-content, + .s1-expand .s1 .post-nav { display: block; min-width: 340px; } + .s1-collapse .s1 .sidebar-content, + .s1-collapse .s1 .sidebar .post-nav { display: none; } + + /* s1 toggle icon */ + .col-2cl.s1-expand .s1 .icon-sidebar-toggle:before, + .col-3cl.s1-expand .s1 .icon-sidebar-toggle:before { content: "\f101"; } + .col-2cr.s1-expand .s1 .icon-sidebar-toggle:before, + .col-3cm.s1-expand .s1 .icon-sidebar-toggle:before, + .col-3cr.s1-expand .s1 .icon-sidebar-toggle:before { content: "\f100"; } + + /* 2 column, content right */ + .col-2cr .main-inner { background-position: -290px 0!important; padding-left: 50px; } + .col-2cr .s1 { margin-left: -50px; } + .col-2cr.s1-expand .s1 { left: 0; } + + /* 2 column, content left */ + .col-2cl .main-inner { background-image: url(img/sidebar/s-right-collapse.png); padding-right: 50px; } + .col-2cl .s1 { margin-right: -50px; } + .col-2cl.s1-expand .s1 { right: 0; } + .col-2cl.s1-expand .sidebar-toggle { float: right; } + + /* 3 column, content middle */ + .col-3cm .main-inner { background-position: -290px 0!important; padding-left: 50px; } + .col-3cm .s1 { margin-left: -50px; } + .col-3cm .s2 { margin-right: -50px; } + .col-3cm.s1-expand .s1 { left: 0; } + .col-3cm.s2-expand .s2 { right: 0; } + + /* 3 column, content left */ + .col-3cl .main { background-image: none; } + .col-3cl .main-inner { background: url(img/sidebar/s-right-dual-full-collapse.png) repeat-y right; padding-right: 100px; } + .col-3cl .s1 { margin-right: -100px; } + .col-3cl .s2 { margin-right: -50px; } + .col-3cl.s1-expand .s1 { right: 0; } + .col-3cl.s2-expand .s2 { right: 50px; } + + /* 3 column, content right */ + .col-3cr .main { background-image: none; } + .col-3cr .main-inner { background: url(img/sidebar/s-left-dual-full-collapse.png) repeat-y left; padding-left: 100px; } + .col-3cr .s1 { margin-left: -100px; } + .col-3cr .s2 { margin-left: -50px; } + .col-3cr.s1-expand .s1 { left: 0; } + .col-3cr.s2-expand .s2 { left: 50px; } + +} + +@media only screen and (max-width: 960px) { + /* 60 > 50px spacing */ + #page { margin-top: -50px; } + #header { padding-bottom: 50px; } + .page-title.pad { padding-top: 12px; padding-bottom: 12px; } +} + +/* ------------------------------------------------------------------------- * + * Tablet (Portrait) : 800px > 720px +/* ------------------------------------------------------------------------- */ +@media only screen and (min-width: 720px) and (max-width: 800px) { + + /* layout */ + .grid { margin-right: 2.9%; } + .pad { padding: 25px 25px 15px; } + + .one-half { width: 48.5%; } + .one-third { width: 31.4%; } + .two-third { width: 65.65%; } + .one-fourth { width: 22.8%; } + .three-fourth { width: 74.1%; } + .one-fifth { width: 17.6%; } + .two-fifth { width: 38.5%; } + .three-fifth { width: 59%; } + .four-fifth { width: 79.5%; } + + /* blog */ + #flexslider-featured { margin-top: 5px; } + .format-gallery .post-format .flexslider .slides img { max-height: 300px; } + .format-link .post-format p { margin-bottom: 15px; } + +} + + +/* ------------------------------------------------------------------------- * + * Mobile (Mid Res) : 719px > 0px (480px & 320px) +/* ------------------------------------------------------------------------- */ +@media only screen and (max-width: 719px) { + + /* make collapsed sidebars 40px wide instead of 50px */ + .s1, + .s2 { width: 40px; } + + /* 2 column, content right */ + .col-2cr .main-inner { background-position: -300px 0!important; padding-left: 40px; } + .col-2cr .s1 { margin-left: -40px; } + + /* 2 column, content left */ + .col-2cl .main-inner { background-image: url(img/sidebar/s-right-collapse-40.png); padding-right: 40px; } + .col-2cl .s1 { margin-right: -40px; } + + /* 3 column, content middle */ + .col-3cm .main { background: url(img/sidebar/s-right-collapse-40.png) repeat-y right; } + .col-3cm .main-inner { background-position: -300px 0!important; padding-left: 40px; padding-right: 40px; } + .col-3cm .s1 { margin-left: -40px; } + .col-3cm .s2 { margin-right: -40px; } + + /* 3 column, content left */ + .col-3cl .main-inner { background: url(img/sidebar/s-right-dual-full-collapse-40.png) repeat-y right; padding-right: 80px; } + .col-3cl .s1 { margin-right: -80px; } + .col-3cl .s2 { margin-right: -40px; } + .col-3cl.s2-expand .s2 { right: 40px; } + + /* 3 column, content right */ + .col-3cr .main-inner { background: url(img/sidebar/s-left-dual-full-collapse-40.png) repeat-y left; padding-left: 80px; } + .col-3cr .s1 { margin-left: -80px; } + .col-3cr .s2 { margin-left: -40px; } + .col-3cr.s2-expand .s2 { left: 40px; } + + /* layout */ + .container { padding: 0; } + .grid { width: 100%; margin: 0 0 10px; } + + /* hide */ + .site-description, + .image-caption { display: none; } + + /* base */ + .pad { padding: 20px 20px 10px; } + .notebox { margin-bottom: 20px; } + #flexslider-featured { margin-top: 10px; } + .entry { font-size: 15px; } + + /* text */ + .entry h1 { font-size: 30px; letter-spacing: -0.7px; } + .entry h2 { font-size: 26px; letter-spacing: -0.5px; } + .entry h3 { font-size: 24px; letter-spacing: -0.3px; } + .entry h4 { font-size: 22px; letter-spacing: -0.3px; } + .entry h5 { font-size: 18px; } + .entry h6 { font-size: 16px; text-transform: uppercase; } + + /* header */ + #header { padding-bottom: 0; } + .topbar-enabled #header { padding-top: 0; } + #header .pad { padding-top: 0; padding-bottom: 0; } + .site-title { padding: 30px 0; width: 100%; float: none; line-height: 50px; } + .site-title a { text-align: center; } + .toggle-search { right: auto; left: 0; top: 0; + -webkit-box-shadow: 1px 0 0 rgba(255,255,255,0.1); + box-shadow: 1px 0 0 rgba(255,255,255,0.1); } + .search-expand { left: 0; right: auto; top: 50px; width: 320px; } + + /* footer */ + #footer-bottom .pad { padding-top: 50px; padding-bottom: 40px; } + #footer-bottom .one-half.last { margin-bottom: 0; } + #footer-bottom { text-align: center; } + #footer-bottom #footer-logo { margin-left: auto; margin-right: auto; } + #footer-bottom .social-links { float: none; } + #footer-bottom .social-links li { margin-left: 4px; margin-right: 4px; } + + /* comments */ + .comment-tabs { font-size: 13px; } + .comment-tabs i { display: none!important; } + .commentlist li { font-size: 13px; } + .commentlist li ul li { padding-left: 10px; } + + /* page */ + #page { margin-top: 0; padding-bottom: 10px; } + .pagination { margin-bottom: 30px; } + .page-title { font-size: 14px; } + .page-image-text { margin-top: -15px; } + .page-image-text .caption { font-size: 26px; line-height: 30px; } + .page-image-text .description { font-size: 13px; } + + /* blog */ + .post-list { margin-left: 0; margin-right: 0; } + .post-list .post, + .post-list .page { width: 100%; } + .post-list .post-row { margin-left: 0; padding-left: 0; } + .post-list .post-inner { margin-right: 0; } + + .featured .post-title, + .single .post-title { font-size: 22px; line-height: 1.5em; letter-spacing: 0; } + .post-byline { font-size: 13px; } + .post-format { margin-bottom: 20px; } + .format-gallery .post-format .flexslider .slides img { max-height: 240px; } + .format-quote .post-format blockquote, + .format-link .post-format p { font-size: 18px; } + .format-link .post-format p { margin-bottom: 10px; } + .single .format-status .entry { font-size: 20px; line-height: 1.4em; } + .post-format .format-container .fa { font-size: 28px; } + + .entry.share { padding-right: 0; } + .sharrre-container { position: relative; float: left; width: auto; padding: 0; margin: 20px 0 0; } + .sharrre-container span { text-align: left; } + .sharrre-container > div { float: left; margin-right: 10px; } + .author-bio .bio-desc { font-size: 13px; } + + .content .post-nav li { width: 100%; -webkit-box-shadow: none!important; box-shadow: none!important; } + .content .post-nav li a { min-height: 0; } + + .single .related-posts .post-title { font-size: 15px; } + .related-posts li { width: 50%; } + .related-posts li:nth-child(2) article { border-right-color: transparent; } + .related-posts li:nth-child(3), + .related-posts li:nth-child(4) { display: none; } + + /* shortcodes */ + .dropcap { font-size: 80px; } + +} + +/* ------------------------------------------------------------------------- * + * Mobile (Low Res) : 479px > 0 (320px) +/* ------------------------------------------------------------------------- */ +@media only screen and (max-width: 479px) { + + /* layout */ + .content, + .sidebar { width: 100%; float: none; margin-right: 0!important; margin-left: 0!important; } + .sidebar { background: #f0f0f0; width: 100%; display: block; float: none; } + .main, + .main-inner { background-image: none!important; padding: 0!important; } + .s2 { right: 0!important; left: 0!important; } + + /* hide */ + .mobile-sidebar-hide-s1 .s1, + .mobile-sidebar-hide-s2 .s2, + .mobile-sidebar-hide .sidebar { display: none; } + + /* base */ + .pad { padding: 15px 15px 5px; } + .sidebar-top, + .sidebar .widget { padding-left: 15px!important; padding-right: 15px!important; } + .notebox { margin-bottom: 15px; } + #flexslider-featured { margin-top: 15px; } + .gallery-caption { display: none; } + + /* header */ + .site-title { font-size: 32px; } + + /* blog */ + .format-link .post-format p { margin-bottom: 5px; } + +} + diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 00000000..5905a64a Binary files /dev/null and b/screenshot.png differ diff --git a/search.php b/search.php new file mode 100644 index 00000000..ca5a5bec --- /dev/null +++ b/search.php @@ -0,0 +1,37 @@ + + +
    + + + +
    + +
    + "". + + + +
    + +
    +
    + + + +
    + '; while ( have_posts() ): the_post(); ?> + +
    '; } $i++; endwhile; echo '
    '; ?> +
    + + + + + +
    + +
    + + + + \ No newline at end of file diff --git a/searchform.php b/searchform.php new file mode 100644 index 00000000..a112cce7 --- /dev/null +++ b/searchform.php @@ -0,0 +1,5 @@ +
    +
    + +
    +
    \ No newline at end of file diff --git a/sidebar-2.php b/sidebar-2.php new file mode 100644 index 00000000..df718305 --- /dev/null +++ b/sidebar-2.php @@ -0,0 +1,19 @@ + + + \ No newline at end of file diff --git a/sidebar.php b/sidebar.php new file mode 100644 index 00000000..d7f58bc5 --- /dev/null +++ b/sidebar.php @@ -0,0 +1,39 @@ + + + + + + + \ No newline at end of file diff --git a/single.php b/single.php new file mode 100644 index 00000000..315cd084 --- /dev/null +++ b/single.php @@ -0,0 +1,58 @@ + + +
    + + + +
    + + +
    > +
    + +

    + + + + +
    + +
    +
    + + '
    '.__('Pages:','hueman'),'after'=>'
    ')); ?> +
    + +
    +
    + +
    +
    + + +
    + + '.__('Tags:','hueman').' ','','

    '); ?> + + +
    +
    +

    +

    +
    +
    + + + + + + + + +
    + +
    + + + + \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 00000000..4909cf8d --- /dev/null +++ b/style.css @@ -0,0 +1,1557 @@ +/* +Theme Name: Hueman +Theme URI: http://alxmedia.se/themes/hueman/ +Version: 2.0.8 +Description: Hueman is a responsive 100% high resolution theme for blogs and magazines. Unique toggle sidebars give a great browsing and reading experience on both tablet and mobile. The feature list is long: Unlimited topbar, header, footer and accent colors, unlimited widget areas, 0-2 sidebars to the left or right that can be uniquely specified for each page or post, 300px / 220px fixed width sidebars, 0-4 footer widget columns, almost zero layout images, related posts and post nav, featured story or slider, 10 post formats, good SEO, 3 flexible custom widgets, localisation support, social links, logo upload and many more useful admin panel features. +Author: Alexander Agnarson +Author URI: http://alxmedia.se +Tags: light, one-column, two-columns, three-columns, right-sidebar, left-sidebar, fluid-layout, fixed-layout, custom-colors, custom-menu, featured-images, flexible-header, full-width-template, post-formats, sticky-post, theme-options, threaded-comments, translation-ready + + Copyright: (c) 2013 Alexander "Alx" Agnarson + License: GNU General Public License v3.0 + License URI: http://www.gnu.org/licenses/gpl-3.0.html +*/ + +/* +WARNING! DO NOT EDIT THIS FILE! +To make it easy to update your theme, you should not edit the styles in this file. Instead use the custom.css +file or a child theme to add your styles. You can copy a style from this file and paste it in custom.css +or the child theme's style.css and it will override the style in this file. You have been warned! :) +*/ + +/* ------------------------------------------------------------------------- * + * Reset - http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 + * ------------------------------------------------------------------------- */ +html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, +pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, +samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, +canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, +section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } +article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; } +ol, ul { list-style: none; } +blockquote, q { quotes: none; } +blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; } +table { border-collapse: collapse; border-spacing: 0; } + + +/* ------------------------------------------------------------------------- * + * Base Styles +/* ------------------------------------------------------------------------- */ +body { background: #eaeaea; font-size: 16px; line-height: 1.5em; color: #666; font-weight: 300; } +::selection { background: #3b8dbd; color: #fff; } +::-moz-selection { background: #3b8dbd; color: #fff; } +a { color: #3b8dbd; text-decoration: none; outline: 0; } +a:hover { color: #444; } +img { max-width: 100%; height: auto; } +a, +a:before, +a:after { +-webkit-transition-property: background color; -webkit-transition-duration: 0.2s; -webkit-transition-timing-function: ease; +-moz-transition-property: background color; -moz-transition-duration: 0.2s; -moz-transition-timing-function: ease; +-o-transition-property: background color; -o-transition-duration: 0.2s; -o-transition-timing-function: ease; +transition-property: background color; transition-duration: 0.2s; transition-timing-function: ease; } +a img { +-webkit-transition: opacity 0.2s ease; +-moz-transition: opacity 0.2s ease; +-o-transition: opacity 0.2s ease; +transition: opacity 0.2s ease; } +address,cite,em { font-style: italic; } +strong { font-weight: 600; } +.left,.alignleft { float: left; } +.right,.alignright { float: right; } +.aligncenter { margin-left: auto; margin-right: auto; } + +/* base : clear +/* ------------------------------------ */ +.clear { clear: both; display: block; overflow: hidden; visibility: hidden; width: 0; height: 0; } +.group:before, .group:after { content: ""; display: table; } +.group:after { clear: both; } +.group { zoom: 1; } + +/* base : font awesome square size +/* ------------------------------------ */ +.fa { width: 1em; text-align: center; } + +/* base : fonts +/* ------------------------------------ */ +body { font-family: "Titillium", Arial, sans-serif; } + +@font-face { + font-family: 'Titillium'; + src: url('fonts/titillium-light-webfont.eot'); + src: url('fonts/titillium-light-webfont.svg#titillium-light-webfont') format('svg'), + url('fonts/titillium-light-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/titillium-light-webfont.woff') format('woff'), + url('fonts/titillium-light-webfont.ttf') format('truetype'); + font-weight: 300; + font-style: normal; +} +@font-face { + font-family: 'Titillium'; + src: url('fonts/titillium-lightitalic-webfont.eot'); + src: url('fonts/titillium-lightitalic-webfont.svg#titillium-lightitalic-webfont') format('svg'), + url('fonts/titillium-lightitalic-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/titillium-lightitalic-webfont.woff') format('woff'), + url('fonts/titillium-lightitalic-webfont.ttf') format('truetype'); + font-weight: 300; + font-style: italic; +} +@font-face { + font-family: 'Titillium'; + src: url('fonts/titillium-regular-webfont.eot'); + src: url('fonts/titillium-regular-webfont.svg#titillium-regular-webfont') format('svg'), + url('fonts/titillium-regular-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/titillium-regular-webfont.woff') format('woff'), + url('fonts/titillium-regular-webfont.ttf') format('truetype'); + font-weight: 400; + font-style: normal; +} +@font-face { + font-family: 'Titillium'; + src: url('fonts/titillium-regularitalic-webfont.eot'); + src: url('fonts/titillium-regularitalic-webfont.svg#titillium-regular-webfont') format('svg'), + url('fonts/titillium-regularitalic-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/titillium-regularitalic-webfont.woff') format('woff'), + url('fonts/titillium-regularitalic-webfont.ttf') format('truetype'); + font-weight: 400; + font-style: italic; +} +@font-face { + font-family: 'Titillium'; + src: url('fonts/titillium-semibold-webfont.eot'); + src: url('fonts/titillium-semibold-webfont.svg#titillium-semibold-webfont') format('svg'), + url('fonts/titillium-semibold-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/titillium-semibold-webfont.woff') format('woff'), + url('fonts/titillium-semibold-webfont.ttf') format('truetype'); + font-weight: 600; + font-style: normal; +} + +/* base : forms +/* ------------------------------------ */ +input, textarea, button, select, label { font-family: inherit; } +.themeform input, +.themeform textarea, +.themeform button, +.themeform select, +.themeform label { font-size: 14px; } +.themeform input::-moz-focus-inner, +.themeform button::-moz-focus-inner { border: 0; padding: 0; } +.themeform input[type="text"], +.themeform input[type="password"], +.themeform input[type="email"], +.themeform input[type="submit"], +.themeform button, +.themeform textarea { margin: 0; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-border-radius: 0; border-radius: 0; } +.themeform input, +.themeform textarea, +.themeform button { -moz-appearance: none; -webkit-appearance: none; -moz-transition: all .2s ease; -webkit-transition: all .2s ease; transition: all .2s ease; } +.themeform input[type="checkbox"] { -moz-appearance: checkbox; -webkit-appearance: checkbox; } +.themeform input[type="radio"] { -moz-appearance: radio; -webkit-appearance: radio; } +.themeform label { font-weight: 600; color: #444; } +.themeform input[type="text"], +.themeform input[type="password"], +.themeform input[type="email"], +.themeform textarea { background: #fff; border: 2px solid #ddd; color: #777; display: block; max-width: 100%; outline: none; padding: 7px 8px; } +.themeform input[type="text"]:focus, +.themeform input[type="password"]:focus, +.themeform input[type="email"]:focus, +.themeform textarea:focus { border-color: #ccc; color: #444; -webkit-box-shadow: 0 0 3px rgba(0,0,0,0.1); box-shadow: 0 0 3px rgba(0,0,0,0.1); } +.themeform label .required { color: #3b8dbd; } +.themeform input[type="submit"], +.themeform button[type="submit"] { background: #3b8dbd; color: #fff; padding: 8px 14px; font-weight: 600; display: inline-block; border: none; cursor: pointer; -webkit-border-radius: 3px; border-radius: 3px; } +.themeform input[type="submit"]:hover, +.themeform button[type="submit"]:hover { background: #444; } + +.themeform.searchform div { position: relative; } +.themeform.searchform div input { padding-left: 26px; line-height: 20px; } +.themeform.searchform div:after { color: #ccc; line-height: 24px; font-size: 14px; content: "\f002"; position: absolute; left: 10px; top: 6px; font-family: FontAwesome; } + +/* base : entry +/* ------------------------------------ */ +.entry { font-size: 18px; line-height: 1.6em; } +.entry p, +.entry dd { margin-bottom: 1em; } +.entry dt { color: #444; } +.entry ol, +.entry ul { margin: 0 0 15px 30px; } +.entry ol ol, +.entry ol ul, +.entry ul ul, +.entry ul ol { margin-bottom: 0; } +.entry li { margin: 0; } +.entry ul li, +.entry ol ul li { list-style: square; } +.entry ol li, +.entry ol ul ol li { list-style: decimal; } +.entry dt { font-weight: 600;} +.entry address { margin-bottom: 1em; } +.entry blockquote { position: relative; color: #777; font-style: italic; margin: 0 0 20px 0; padding-left: 50px; } +.entry blockquote p { margin-bottom: 0.75em; } +.entry blockquote:before { content: "\f10d"; color: #ccc; font-size: 32px; font-style: normal; font-family: FontAwesome; text-align: center; position: absolute; left: 0; top: 0; } +.entry blockquote.twitter-tweet:before { content: "\f099"; } +.entry code, .entry pre { font-family: Monaco, "Courier New", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace; font-size: 11px; } +.entry pre { background: url(img/pre.png) repeat top; padding: 18px 20px; margin: 30px 0; border: 1px solid #ddd; line-height: 19px; white-space: pre-wrap; word-wrap: break-word; overflow-x: auto; overflow-y: hidden; } +.entry code { background: #eee; padding: 0 3px; } +.entry ins { background: #fff486; } +.entry sub, +.entry sup { font-size: 62.5%; } +.entry sub { vertical-align: sub; } +.entry sup { vertical-align: super; } + +/* image position & caption */ +.entry img.size-auto, +.entry img.size-large, +.entry img.size-medium, +.entry attachment img { max-width: 100%; height: auto; } +.entry img.alignleft { margin: 18px 20px 18px 0; } +.entry img.alignright { margin: 18px 0 18px 20px; } +.entry img.aligncenter { margin: 18px auto; clear: both; display: block; } +.entry img .size-full { width: 100%!important; } +.entry .gallery img, .entry img.wp-smiley { margin: 0; } +.entry .wp-caption { background: #f1f1f1; max-width: 100%; margin-bottom: 14px; padding-top: 5px; text-align: center; } +.entry .wp-caption-text { font-style: italic; } +.entry .wp-caption a { border-bottom: none; } +.entry .wp-caption img { margin: 0; max-width: 100%; height: auto; } +.entry .wp-caption.alignleft { margin-right: 20px; } +.entry .wp-caption.alignright { margin-left: 20px; } +.entry .wp-caption.alignnone { width: 100%!important; overflow: hidden; } +.entry .wp-caption.alignnone img { margin: 0 auto; max-width: 100%!important; } +.entry .wp-caption-text { color: #999; font-size: 13px; padding: 0 0 8px 0; margin: 0; } + +/* table */ +.entry table { font-size: 14px; margin-bottom: 1.5em; width: 100%; text-align: center; } +.entry table tr.alt { background: #f1f1f1; } +.entry table td { border-bottom: 1px solid #f1f1f1; text-align: center; padding: 5px; vertical-align: middle; } +.entry table th { font-weight: 600; text-align: center; border-top: 1px solid #f1f1f1; border-bottom: 1px solid #f1f1f1; padding: 10px 5px; } + +/* default gallery */ +.entry .gallery { clear: both; overflow: hidden; width: 100%; margin: 15px 0!important; } +.entry .gallery img { display: block; width: 100%; height: auto; border-width: 1px 2px!important; border-color: transparent!important; } +.entry .gallery .gallery-item { position: relative; overflow: hidden; border-color: transparent; margin-top: 0!important; } +.entry .gallery .gallery-caption { background: rgba(255,255,255,0.8); color: #333; font-size: 13px; line-height: 1.4em; padding: 10px 0; text-align: left; text-indent: 10px; font-style: normal; margin: 0; bottom: -44px; left: 2px; right: 2px; overflow: hidden; position: absolute; text-overflow: ellipsis; white-space: nowrap; width: 100%; +transition: all .2s ease; +-o-transition: all .2s ease; +-moz-transition: all .2s ease; +-webkit-transition: all .2s ease; } +.entry .gallery .gallery-item:hover .gallery-caption { bottom: 0; } +.entry .gallery-columns-5 .gallery-caption, +.entry .gallery-columns-6 .gallery-caption, +.entry .gallery-columns-7 .gallery-caption, +.entry .gallery-columns-8 .gallery-caption, +.entry .gallery-columns-9 .gallery-caption { display: none!important; } + +/* base : headings +/* ------------------------------------ */ +h1, h2, h3, h4, h5, h6 { color: #444; font-weight: 600; -ms-word-wrap: break-word; word-wrap: break-word; } +.entry h1 span, .entry h2 span, .entry h3 span, .entry h4 span, .entry h5 span, .entry h6 span { color: #bbb; } +.entry h1,.entry h2,.entry h3,.entry h4,.entry h5,.entry h6 { margin-bottom: 14px; font-weight: 400; line-height: 1.3em; } +.entry h1 { font-size: 38px; letter-spacing: -1px; } +.entry h2 { font-size: 34px; letter-spacing: -0.7px; } +.entry h3 { font-size: 28px; letter-spacing: -0.5px; } +.entry h4 { font-size: 24px; letter-spacing: -0.3px; } +.entry h5 { font-size: 20px; font-weight: 600; } +.entry h6 { font-size: 18px; font-weight: 600; text-transform: uppercase; } + +.heading, +#reply-title { font-weight: normal; font-size: 18px; text-transform: uppercase; font-weight: 600; margin-bottom: 1em; } +.heading i { font-size: 22px; margin-right: 6px; } + + +/* ------------------------------------------------------------------------- * + * Base Structure +/* ------------------------------------------------------------------------- */ + +/* base : layout +/* ------------------------------------ */ +#wrapper { min-width: 1024px; height: 100%; } +.container { padding: 0 20px; } +.container-inner { max-width: 1380px; min-width: 1380px; width: 100%; margin: 0 auto; } +.main { background-color: #fff!important; position: relative; } +.main-inner { position: relative; min-height: 600px; /* instead of sticky footer */ } +.content { width: 100%; position: relative; } +.pad { padding: 30px 30px 20px; } + +/* boxed */ +.boxed #wrapper { max-width: 1380px; margin: 0 auto; +-webkit-box-shadow: 6px 0 0 rgba(0,0,0,0.04), -6px 0 0 rgba(0,0,0,0.04); +box-shadow: 6px 0 0 rgba(0,0,0,0.04), -6px 0 0 rgba(0,0,0,0.04); } +.boxed .container { padding: 0; } +.boxed #page { background: #eaeaea; padding-bottom: 1px; } + +/* base : layout columns +/* ------------------------------------ */ + +/* 2 column, content left */ +.col-2cl .main-inner { background: url(img/sidebar/s-right-s1.png) repeat-y right 0; padding-right: 340px; } +.col-2cl .s1 { float: right; margin-right: -340px; } +.col-2cl .content { float: left; } + +/* 2 column, content right */ +.col-2cr .main-inner { background: url(img/sidebar/s-left.png) repeat-y left 0; padding-left: 340px; } +.col-2cr .s1 { float: left; margin-left: -340px; } +.col-2cr .content { float: right; } + +/* 3 column, content middle */ +.col-3cm .main { background: url(img/sidebar/s-right-s2.png) repeat-y right 0; } +.col-3cm .main-inner { background: url(img/sidebar/s-left.png) repeat-y left 0; padding-left: 340px; padding-right: 260px; } +.col-3cm .s1 { float: left; margin-left: -340px; } +.col-3cm .s2 { float: right; margin-right: -260px; /* ingenuity! */ position: relative; right: -100%; } +.col-3cm .content { float: right; } + +/* 3 column, content left */ +.col-3cl .main { background-image: none; } +.col-3cl .main-inner { background: url(img/sidebar/s-right-dual-full-expand.png) repeat-y right 0; padding-right: 600px; } +.col-3cl .s1 { float: right; margin-right: -600px; } +.col-3cl .s2 { float: right; margin-right: -260px; } +.col-3cl .content { float: left; } + +/* 3 column, content right */ +.col-3cr .main { background-image: none; } +.col-3cr .main-inner { background: url(img/sidebar/s-left-dual-full-expand.png) repeat-y left 0; padding-left: 600px; } +.col-3cr .s1 { float: left; margin-left: -600px; } +.col-3cr .s2 { float: left; margin-left: -260px; } +.col-3cr .content { float: right; } + +/* base : sidebar +/* ------------------------------------ */ +.sidebar { padding-bottom: 20px; position: relative; z-index: 2; } +.sidebar .pad { padding-left: 20px; padding-right: 20px; } +.sidebar-top { padding: 15px 30px; } +.sidebar-top p { float: left; color: #fff; color: rgba(255,255,255,0.8); font-size: 16px; font-weight: 600; text-transform: uppercase; line-height: 24px; padding: 3px 0; } +.sidebar-toggle { display: none; text-align: center; cursor: pointer; width: 100%; height: 50px; +-webkit-box-shadow: inset 0 -1px 0 rgba(255,255,255,0.1); +box-shadow: inset 0 -1px 0 rgba(255,255,255,0.1); } +.sidebar-toggle i { font-size: 38px; color: #fff; padding: 5px 0; } +.s1-expand .s1, +.s2-expand .s2 {-moz-transition: width .2s ease; -webkit-transition: width .2s ease; transition: width .2s ease; } + +/* toggle icon */ +.icon-sidebar-toggle:before { font-family: FontAwesome; } +.col-2cl .s1 .icon-sidebar-toggle:before, +.col-3cl .s1 .icon-sidebar-toggle:before, +.col-3cm .s2 .icon-sidebar-toggle:before, +.col-3cl .s2 .icon-sidebar-toggle:before { content: "\f100"; } +.col-2cr .s1 .icon-sidebar-toggle:before, +.col-3cm .s1 .icon-sidebar-toggle:before, +.col-3cr .s1 .icon-sidebar-toggle:before, +.col-3cr .s2 .icon-sidebar-toggle:before { content: "\f101"; } + +/* sidebar primary */ +.s1 { width: 340px; z-index: 2; } +.s1:hover { z-index: 98; /* social icons tooltip above header nav */ } +.s1 .sidebar-top, +.s1 .sidebar-toggle { background: #3b8dbd; } +@media only screen and (min-width: 479px) and (max-width: 960px) { + .s1 .sidebar-top { background: none!important; border-bottom: 1px solid #ddd; } + .s1 .sidebar-top p { color: #666; } + .s1 .sidebar-top .social-links .social-tooltip { color: #666; } +} + +/* sidebar secondary */ +.s2 { width: 260px; z-index: 1; } +.s2 .sidebar-top, +.s2 .sidebar-toggle { background: #82b965; } +@media only screen and (min-width: 479px) and (max-width: 1200px) { + .s2 .sidebar-top { background: none!important; border-bottom: 1px solid #ddd; } + .s2 .sidebar-top p { color: #666; } +} + +/* base : grid +/* ------------------------------------ */ +.grid { margin-right: 3.2%; float: left; display: inline; position: relative; } +.last { clear: right; margin-right: 0!important; } + +.one-full { margin-right: 0; width: 100%; overflow: hidden; } +.one-half { width: 48.4%; } +.one-third { width: 31.2%; } +.two-third { width: 65.6%; } +.one-fourth { width: 22.6%; } +.three-fourth { width: 74.2%; } +.one-fifth { width: 17.4%; } +.two-fifth { width: 38.1%; } +.three-fifth { width: 58.7%; } +.four-fifth { width: 79.4%; } + + +/* ------------------------------------------------------------------------- * + * Common Elements +/* ------------------------------------------------------------------------- */ + +/* common : responsive videos +/* ------------------------------------ */ +.video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; } +.video-container iframe, .video-container object, .video-container embed, .video-container video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + +/* common : responsive image + caption +/* ------------------------------------ */ +.image-container { position: relative; } +.image-container img { display: block; width: 100%; height: auto; } +.image-caption { background: rgba(0,0,0,0.7); color: #fff; font-size: 13px; line-height: 1.3em; font-style: italic; padding: 8px 10px; position: absolute; bottom: 8px; left: 8px; margin-right: 8px; +-webkit-border-radius: 2px; border-radius: 2px; +-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.03); +box-shadow: inset 0 1px 1px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.03); } + +/* common : social links +/* ------------------------------------ */ +.social-links { float: right; position: relative; padding-top: 2px; } +.social-links li { display: inline-block; margin-left: 8px; line-height: 16px; font-size: 0; } +.social-links li a { display: block!important; position: relative; text-align: center; } +.social-links .social-tooltip { color: #fff; color: rgba(255,255,255,0.7); font-size: 24px; display: inline; position: relative; z-index: 98; } +.social-links .social-tooltip:hover { color: #fff; text-decoration: none; } +.social-links .social-tooltip:hover:after { top: -36px; background: #fff; font-size: 14px; color: #666; content: attr(title); display: block; right: 0; padding: 5px 15px; position: absolute; white-space: nowrap; +-webkit-border-radius: 3px; border-radius: 3px; +-webkit-box-shadow: 0 0 2px rgba(0,0,0,0.2); box-shadow: 0 0 2px rgba(0,0,0,0.2); } +.social-links .social-tooltip:hover:before { top: -10px; right: 8px; border: solid; border-color: #fff transparent; border-width: 5px 5px 0 5px; content: ""; display: block; position: absolute; z-index: 1; } + +/* common : page title +/* ------------------------------------ */ +.page-title { background: #fff; position: relative; padding-top: 18px; padding-bottom: 17px; border-bottom: 1px solid #eee; color: #666; font-size: 16px; font-weight: 600; text-transform: uppercase; line-height: 24px; } +.page-title a { color: #aaa; } +.page-title a:hover { color: #444; } +.page-title span { color: #aaa; } +.page-title i { margin-right: 8px; } +.page-title h1, +.page-title h2, +.page-title h4 { color: #666; } +.page-title .meta-single li { float: left; margin-right: 14px; } +.page-title .meta-single li:last-child { float: right; margin-right: 0; } + +/* common : notebox +/* ------------------------------------ */ +.notebox { background: #f0f0f0; position: relative; padding: 12px 15px; color: #888; margin-bottom: 30px; } +.notebox:before { content:''; display: inline-block; border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 8px solid #f1f1f1; position: absolute; top: -8px; left: 13px; } +.notebox:after { content:''; display: inline-block; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #f1f1f1; position: absolute; top: -5px; left: 15px; } +.notebox span { font-weight: 600; } +.notebox .search-again { margin-top: 10px; } +.notebox input[type="text"] { width: 100%; } + +/* common : page image +/* ------------------------------------ */ +.page-image { overflow: hidden; position: relative; margin: 0 0 30px 0; } +.page-image-text { position: absolute; top: 50%; margin-top: -35px; width: 100%; text-align: center; } +.page-image-text .caption { color: #fff; font-size: 44px; line-height: 70px; text-transform: uppercase; font-weight: 600; text-shadow: 0 0 20px rgba(0,0,0,0.3); } +.page-image-text .description { display: block; color: #fff; font-size: 15px; line-height: 36px; font-weight: 300; } +.page-image-text .description i { background: rgba(0,0,0,0.7); opacity: 0.9; font-style: normal; padding: 6px 10px; -webkit-border-radius: 2px; border-radius: 2px; } + +/* common : pagination +/* ------------------------------------ */ +.pagination { margin-bottom: 15px; } +.pagination a { font-size: 18px; font-weight: 600; } + +/* common : thumb icon +/* ------------------------------------ */ +.thumb-icon { background: rgba(0,0,0,0.7); color: #fff; text-align: center; display: block; width: 32px; height: 32px; position: absolute; bottom: 20px; left: 20px; +-webkit-border-radius: 6px; border-radius: 6px; +-moz-transition: all 0.7s ease; -webkit-transition: all 0.7s ease; transition: all 0.7s ease; +-webkit-box-shadow: 0 0 2px rgba(255,255,255,0.4); +box-shadow: 0 0 2px rgba(255,255,255,0.4); +-webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); } +.thumb-icon i { font-size: 18px; padding: 7px 0; +-webkit-transform: rotate(-45deg); + -moz-transform: rotate(-45deg); + -ms-transform: rotate(-45deg); + -o-transform: rotate(-45deg); + transform: rotate(-45deg); } +.thumb-icon .fa-play { margin: -1px 0 0 2px; } +.thumb-icon.small { width: 24px; height: 24px; position: absolute; bottom: 14px; left: 14px; +-webkit-border-radius: 4px; border-radius: 4px; } +.thumb-icon.small .fa { font-size: 14px; line-height: 16px; padding: 5px 0; } +.thumb-icon.small .f-play { margin: -1px 0 0 2px; } + +/* common : nav +/* ------------------------------------ */ +.nav-container { background: #888; z-index: 99; position: relative; } +.nav-toggle { display: none; background: #777; cursor: pointer; float: right; height: 50px; width: 60px; color: #fff; text-align: center; } +.nav-toggle i { font-size: 29px; padding: 10px 0; } +.nav-text { display: none; float: right; font-size: 16px; line-height: 24px; padding: 13px 20px; } +.nav li > a:after, +.nav > li > a:after { font-family: FontAwesome; display: inline-block; } + +@media only screen and (min-width: 720px) { + + .nav-wrap { height: auto!important; } + /* common */ + .nav { font-size: 0; position: relative; } + .nav li a { color: #ccc; display: block; line-height: 20px; } + /* dropdown arrows */ + .nav li > a:after { content: "\f0da"; float: right; opacity: 0.5; } + .nav > li > a:after {content: "\f0d7"; float: none; margin-left: 6px; font-size: 14px; } + .nav li > a:only-child:after {content: ""; margin: 0; } + #footer .nav li > a:after { content: "\f0da"; } + #footer .nav > li > a:after { content: "\f0d8"; } + #footer .nav li > a:only-child:after { content: ""; } + /* level 1 */ + .nav > li { font-size: 16px; border-right: 1px solid #999; display: inline-block; position: relative; } + .nav > li > a { padding: 15px 14px; } + .nav > li > a:hover, + .nav > li:hover > a { background: #777; } + .nav li > a:hover, + .nav li:hover > a, + .nav li.current_page_item > a, + .nav li.current-menu-item > a, + .nav li.current-menu-ancestor > a, + .nav li.current-post-parent > a { color: #fff; } + /* level 2 & 3 */ + .nav li:hover > ul { display: block; } + .nav ul { display: none; background: #777; position: absolute; left: 0; top: 50px; width: 180px; padding: 10px 0; z-index: 2; -webkit-transform: translateZ(0); + -webkit-box-shadow: 0 2px 2px rgba(0,0,0,0.15); + box-shadow: 0 2px 2px rgba(0,0,0,0.15); } + .nav ul li { font-size: 14px; position: relative; display: block; padding: 0; } + .nav ul li a { padding: 10px 20px; } + .nav ul li:last-child { border-bottom: 0!important; } + /* level 3 */ + .nav ul ul { position: absolute; top: -10px; left: 180px; } + +} +@media only screen and (max-width: 719px) { + + .nav { font-weight: 600; } + .nav-container { text-transform: none; } + .nav-toggle, + .nav-text { display: block; } + .nav-wrap { position: relative; float: left; width: 100%; height: 0; overflow: hidden; } + .nav-wrap.transition { + -webkit-transition: height 0.35s ease; + -moz-transition: height 0.35s ease; + -o-transition: height 0.35s ease; + transition: height 0.35s ease; } + .expand .nav-wrap { height: auto; } + /* common */ + .nav { float: left; width: 100%; } + .nav li a { line-height: 20px; display: block; padding: 8px 20px; } + .nav li li a { padding-left: 15px; padding-right: 15px; } + /* dropdown arrows */ + .nav li > a:after { content: '\f0d7'; opacity: 0.5; margin-left: 6px; } + .nav > li > a:after { content: '\f0d7'; font-size: 14px; } + .nav li > a:only-child:after { content: ''; } + /* level 1 */ + .nav > li { font-size: 15px; } + .nav li > a:hover, + .nav li.current_page_item > a, + .nav li.current-menu-item > a, + .nav li.current-post-parent > a { color: #fff; } + /* level 2 & 3 */ + .nav ul { display: block!important; margin-left: 40px; } + .nav ul li { font-size: 13px; font-weight: 300; } + .nav ul li a { padding-top: 6px; padding-bottom: 6px; } + +} + + +/* ------------------------------------------------------------------------- * + * Section: Header +/* ------------------------------------------------------------------------- */ +#header { background: #33363b; position: relative; padding-bottom: 60px; } +#header .pad { padding-top: 28px; padding-bottom: 30px; } +#header .container-inner { position: relative; } + +.site-title { font-size: 42px; font-weight: 600; letter-spacing: -0.5px; float: left; line-height: 60px; padding: 10px 0; } +.site-title a { display: block; color: #fff; max-width: 100%; } +.site-title a img { display: block; max-width: 100%; max-height: 60px; height: auto; padding: 0; margin: 0 auto; -webkit-border-radius: 0; border-radius: 0; } +.site-description { font-size: 16px; font-style: italic; color: #fff; color: rgba(255,255,255,0.5); float: left; margin-left: 20px; line-height: 60px; padding: 10px 0; } +.site-image { display: block; margin: 0 auto; max-height: 400px; } + +/* header : search +/* ------------------------------------ */ +.toggle-search { color: #fff; font-size: 18px; line-height: 24px; cursor: pointer; padding: 13px 20px; display: block; position: absolute; right: 0; top: -50px; +-webkit-box-shadow: -1px 0 0 rgba(255,255,255,0.1); +box-shadow: -1px 0 0 rgba(255,255,255,0.1); } +.toggle-search:hover, +.toggle-search.active { background: rgba(0,0,0,0.15); color: #fff; } +.search-expand { display: none; background: #26272b; position: absolute; top: 0; right: 0; width: 340px; +-webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.1); +box-shadow: 0 1px 0 rgba(255,255,255,0.1); } +.search-expand-inner { background: rgba(0,0,0,0.15); padding: 15px; } +.search-expand .themeform input { width: 100%; border: 2px solid #e2e2e2; border-radius: 0; } +.search-expand .themeform input:focus { } + +/* header : nav topbar +/* ------------------------------------ */ +#nav-topbar.nav-container { background: #26272b; +-webkit-box-shadow: 0 0 5px rgba(0,0,0,0.2),0 1px 0 rgba(255,255,255,0.15); +box-shadow: 0 0 5px rgba(0,0,0,0.2),0 1px 0 rgba(255,255,255,0.15); } +#nav-topbar .nav-toggle { background: transparent; color: #fff; +-webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,0.06); +box-shadow: inset 1px 0 0 rgba(255,255,255,0.06); } +#nav-topbar .nav-text { color: #fff; color: rgba(255,255,255,0.7); } + +@media only screen and (min-width: 1025px) { + /* fixed nav */ + .full-width.topbar-enabled #header { padding-top: 50px; } + .full-width #nav-topbar.nav-container { position: fixed; top: 0; left: 0; right: 0; width: 100%; z-index: 999; } + .full-width.admin-bar #nav-topbar.nav-container { top: 32px; } +} + +@media only screen and (min-width: 720px) { + + /* common */ + #nav-topbar .nav { } + #nav-topbar .nav li a { color: #fff; color: rgba(255,255,255,0.7); } + /* level 1 */ + #nav-topbar .nav > li { border-right: none; } + #nav-topbar .nav > li > a:hover, + #nav-topbar .nav > li:hover > a { background-color: rgba(0,0,0,0.1); } + #nav-topbar .nav li > a:hover, + #nav-topbar .nav li:hover > a, + #nav-topbar .nav li.current_page_item > a, + #nav-topbar .nav li.current-menu-item > a, + #nav-topbar .nav li.current-menu-ancestor > a, + #nav-topbar .nav li.current-post-parent > a { color: #fff; } + /* level 2 & 3 */ + #nav-topbar .nav ul { background: #26272b url(img/opacity-10.png) repeat; } + #nav-topbar .nav ul li { box-shadow: 0 1px 0 rgba(255,255,255,0.06); -webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.06); } + #nav-topbar .nav ul li:last-child { box-shadow: none; -webkit-box-shadow: none; } + +} +@media only screen and (max-width: 719px) { + + /* common */ + #nav-topbar .nav li a { color: #fff; color: rgba(255,255,255,0.8); border-top: 1px solid rgba(255,255,255,0.06); } + /* level 1 */ + #nav-topbar .nav li > a:hover { background: rgba(0,0,0,0.15); color: #fff; } + #nav-topbar .nav li.current_page_item > a, + #nav-topbar .nav li.current-menu-item > a, + #nav-topbar .nav li.current-post-parent > a { background: rgba(0,0,0,0.15); color: #fff; } + +} + +/* header : nav header +/* ------------------------------------ */ +#nav-header.nav-container { background: transparent; z-index: 97; +-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 -1px 0 rgba(0,0,0,0.2), inset 1px 0 0 rgba(0,0,0,0.2), inset -1px 0 0 rgba(0,0,0,0.2); +box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 -1px 0 rgba(0,0,0,0.2), inset 1px 0 0 rgba(0,0,0,0.2), inset -1px 0 0 rgba(0,0,0,0.2); } +#nav-header .container { padding: 0 15px; } +#nav-header .nav-toggle { background: transparent; color: #fff; +-webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,0.05), -1px 0 0 rgba(0,0,0,0.2); +box-shadow: inset 1px 0 0 rgba(255,255,255,0.05), -1px 0 0 rgba(0,0,0,0.2); } +#nav-header .nav-text { color: #fff; color: rgba(255,255,255,0.7); } + +@media only screen and (min-width: 720px) { + + /* common */ + #nav-header .nav { } + #nav-header .nav li a { color: #fff; color: rgba(255,255,255,0.7); } + /* level 1 */ + #nav-header .nav > li { border-right: none; } + #nav-header .nav > li > a:hover, + #nav-header .nav > li:hover > a { background: rgba(0,0,0,0.1); } + #nav-header .nav li > a:hover, + #nav-header .nav li:hover > a, + #nav-header .nav li.current_page_item > a, + #nav-header .nav li.current-menu-item > a, + #nav-header .nav li.current-menu-ancestor > a, + #nav-header .nav li.current-post-parent > a { color: #fff; } + /* level 2 & 3 */ + #nav-header .nav ul { background: #33363b url(img/opacity-10.png) repeat; } + #nav-header .nav ul li { box-shadow: 0 1px 0 rgba(255,255,255,0.06); -webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.06); } + #nav-header .nav ul li:last-child { box-shadow: none; -webkit-box-shadow: none; } + +} +@media only screen and (max-width: 719px) { + + /* common */ + #nav-header.nav-container { border-left: 0; border-right: 0; } + #nav-header .container { padding: 0; } + #nav-header .nav { padding-bottom: 20px; } + #nav-header .nav li a { color: #fff; color: rgba(255,255,255,0.8); border-top: 1px solid rgba(255,255,255,0.06); } + /* level 1 */ + #nav-header .nav li > a:hover { background: rgba(0,0,0,0.15); color: #fff; } + #nav-header .nav li.current_page_item > a, + #nav-header .nav li.current-menu-item > a, + #nav-header .nav li.current-post-parent > a { background: rgba(0,0,0,0.15); color: #fff; } + +} + +/* ------------------------------------------------------------------------- * + * Section: Page +/* ------------------------------------------------------------------------- */ +#page { padding-bottom: 60px; margin-top: -60px; } +#page .container-inner { background: #fff; +-webkit-box-shadow: 0 -1px 0 #fff, 0 1px 1px rgba(0,0,0,0.1); +box-shadow: 0 -1px 0 #fff, 0 1px 1px rgba(0,0,0,0.1); } + + +/* ------------------------------------------------------------------------- * + * Section: Footer +/* ------------------------------------------------------------------------- */ +#footer { background: #fff; color: #777; width: 100%; } +#footer a { color: #777; } +#footer a:hover { color: #ccc; } +#footer .pad { padding-bottom: 30px; } + +#footer-widgets{ padding-top: 20px; } + +#footer-bottom { background: #33363b; } +#footer-bottom .pad { padding-top: 30px; } +#footer-bottom a { color: #fff; color: rgba(255,255,255,0.7); } +#footer-bottom a:hover { color: #fff; } +#footer-bottom #footer-logo { display: block; margin-bottom: 20px; max-height: 50px; -webkit-border-radius: 0; border-radius: 0; } +#footer-bottom #copyright, +#footer-bottom #credit { color: #fff; color: rgba(255,255,255,0.5); font-size: 15px; line-height: 1.5em; } +#footer-bottom #back-to-top { background: #eaeaea; color: #777; overflow: hidden; text-align: center; width: 60px; height: 30px; display: block; margin: 0 auto; margin: 0 auto -30px; +-webkit-border-radius: 0 0 3px 3px; border-radius: 0 0 3px 3px; +-webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.05); +box-shadow: inset 0 1px 0 rgba(0,0,0,0.05); } +#footer-bottom #back-to-top i { font-size: 38px; position: relative; top: -7px; } +#footer-bottom #back-to-top:hover { color: #444; } +#footer-bottom .social-links { padding-top: 10px; } +#footer-bottom .social-links a { color: rgba(255,255,255,0.6); } +#footer-bottom .social-links a:hover { color: #fff; } +#footer-bottom .social-links .social-tooltip { font-size: 28px; } + +/* footer : nav +/* ------------------------------------ */ +#nav-footer.nav-container { background: #fff; border-top: 1px solid #eee; } +#nav-footer .nav-toggle { background: transparent; color: #444; border-left: 1px solid #eee; } + +@media only screen and (min-width: 720px) { + + /* common */ + #nav-footer .nav { text-align: center; } + #nav-footer .nav li a { color: #999; } + /* level 1 */ + #nav-footer .nav > li > a { padding: 12px 18px; } + #nav-footer .nav > li { border-right: 0; } + #nav-footer .nav > li:first-child { border-left: 0; } + #nav-footer .nav > li > a:hover, + #nav-footer .nav > li:hover > a { background: #f0f0f0; } + #nav-footer .nav li > a:hover, + #nav-footer .nav li:hover > a, + #nav-footer .nav li.current_page_item > a, + #nav-footer .nav li.current-menu-item > a, + #nav-footer .nav li.current-menu-ancestor > a, + #nav-footer .nav li.current-post-parent > a { color: #666; } + /* level 2 & 3 */ + #nav-footer .nav ul { background: #f0f0f0; bottom: 44px; top: auto; text-align: left; + -webkit-box-shadow: 0 -2px 2px rgba(0,0,0,0.05); + box-shadow: 0 -2px 2px rgba(0,0,0,0.05); } + #nav-footer .nav ul li { border-bottom: 1px solid #e4e4e4; } + #nav-footer .nav ul ul { top: -10px; } + /* level 3 */ + #nav-footer .nav ul ul { position: absolute; top: auto; bottom: -10px; } + +} +@media only screen and (max-width: 719px) { + + /* common */ + #nav-footer .nav li a { color: #999; color: rgba(0,0,0,0.8); border-top: 1px solid #f2f2f2; } + /* level 1 */ + #nav-footer .nav li > a:hover { background: #f2f2f2; color: #444; } + #nav-footer .nav li.current_page_item > a, + #nav-footer .nav li.current-menu-item > a, + #nav-footer .nav li.current-post-parent > a { background: #f2f2f2; color: #444; } + +} + + +/* ------------------------------------------------------------------------- * + * Post Entry +/* ------------------------------------------------------------------------- */ +.content .post, +.content .page { position: relative; overflow: hidden; } + +.blog .post, +.single .post, +.archive .post, +.search .post, +.search .page { margin-bottom: 40px; } + +.sticky {} + +/* post : search +/* ------------------------------------ */ +.search .page.type-page .post-thumbnail, +.search .page.type-page .post-meta { display: none; } + +/* post : featured +/* ------------------------------------ */ +#flexslider-featured .flex-direction-nav { position: absolute; top: -50px; left: auto; right: 0; } +#flexslider-featured .flex-direction-nav li { float: left; margin-left: 3px; } +#flexslider-featured .flex-direction-nav li:first-child { float: left; } +#flexslider-featured .flex-direction-nav li:last-child { float: right; } +#flexslider-featured .flex-direction-nav a { background: #fff; color: #bbb; font-size: 24px; line-height: 24px; position: relative; width: 34px; height: 36px; margin: 0 0 0; display: block; text-align: center; cursor: pointer; text-indent: -999px; overflow: hidden; opacity: 1; +-webkit-border-radius: 0; border-radius: 0; +-webkit-box-shadow: none; box-shadow: none; +-webkit-transition: all .3s ease; transition: all .3s ease; } +#flexslider-featured .flex-direction-nav a:before { font-family: FontAwesome; line-height: 24px; position: absolute; text-align: center; left: 0; right: 0; top: 8px; text-indent: 0; } +#flexslider-featured .flex-direction-nav .flex-next:before { content:"\f054"; } +#flexslider-featured .flex-direction-nav .flex-prev:before { content: "\f053"; } +#flexslider-featured .flex-direction-nav .flex-next:hover, +#flexslider-featured .flex-direction-nav .flex-prev:hover { opacity: 1; color: #3b8dbd; } + +#flexslider-featured .flex-control-nav { position: absolute; top: -15px; bottom: auto; } +#flexslider-featured .flex-control-nav li { margin: 0; padding: 0; margin-right: 2px; float: left; } +#flexslider-featured .flex-control-nav li a { background: #ddd; width: 20px; height: 2px; text-indent: -999px; overflow: hidden; +-webkit-border-radius: 0; border-radius: 0; +-webkit-box-shadow: none; box-shadow: none; } +#flexslider-featured .flex-control-nav li a:hover { background: #ccc; } +#flexslider-featured .flex-control-nav li a.flex-active { background: #3b8dbd; } + +.featured, +.featured.flexslider { padding-bottom: 30px; margin-bottom: 30px; border-bottom: 1px solid #eee; } +.featured .post { margin-bottom: 0; } +.featured .post-title { font-size: 34px; letter-spacing: -0.7px; line-height: 1.4em; } + +/* post : custom loop +/* ------------------------------------ */ +.post-list { margin-right: -30px; } +.post-list .post-row { margin-left: -30px; padding-left: 30px; float: left; width: 100%; border-bottom: 1px solid #eee; margin-bottom: 30px; position: relative; } +.post-list .post-row:last-child { border: none; margin-bottom: 0; } +.post-list .post, +.post-list .page { width: 50%; float: left; } +.post-list .post-inner { margin-right: 30px; } +.post-hover:hover .post-thumbnail { opacity: 0.75; } +.post-hover:hover .post-title a { color: #3b8dbd; } +.post-hover:hover .thumb-icon { background: #fff; color: #111; } + +.post-thumbnail { width: 100%; -webkit-transition: all 1s ease; -moz-transition: all 1s ease; transition: all 1s ease; } +.post-thumbnail { position: relative; margin-bottom: 1em; } +.post-thumbnail img { display: block; width: 100%; height: auto; } + +.post-comments { background: #82b965; font-size: 12px; line-height: 20px; color: #fff; display: block; position: absolute; top: 10px; right: 0; +-webkit-box-shadow: inset -1px 0 1px rgba(0,0,0,0.2); +box-shadow: inset -1px 0 1px rgba(0,0,0,0.2); } +.post-comments > span { display: block; position: relative; padding: 2px 7px; } +.post-comments > span:before { content:''; display: inline-block; border-left: 7px solid transparent; border-right: 7px solid #82b965; border-top: 7px solid transparent; border-bottom: 7px solid transparent; position: absolute; top: 5px; left: -14px; } +.post-comments i { margin-right: 3px; } +.post-comments:hover { color: #fff!important; padding-right: 4px; } + +.post-meta { text-transform: uppercase; font-size: 14px; font-weight: 400; color: #bbb; margin-bottom: 0.3em; } +.post-meta .post-category { float: left; margin-right: 6px; } +.post-meta .post-date { float: left; } + +.post-title { color: #444; font-weight: normal; margin-bottom: 10px; font-size: 22px; font-weight: 400; line-height: 1.5em; -ms-word-wrap: break-word; word-wrap: break-word; } +.post-title strong { font-weight: 600; } +.post-title i { font-style: italic; } +.post-title a { color: #444; } +.post-title a:hover { color: #3b8dbd; } + +.entry.excerpt { font-size: 16px; color: #aaa; } +.entry.excerpt p { margin-bottom: 0; } + + +/* ------------------------------------------------------------------------- * + * Single +/* ------------------------------------------------------------------------- */ +.single .post-title { font-size: 38px; letter-spacing: -1px; line-height: 1.3em; } +.single .post-inner .post-thumbnail { margin-bottom: 2em; } +.post-byline { font-size: 14px; font-weight: 400; color: #aaa; text-transform: uppercase; margin-bottom: 1em; } + +.entry.share { padding-right: 100px; min-height: 354px; /* share buttons height */ position: relative; } +.entry.share .entry-inner { float: left; width: 100%; } + +/* single : sharrre +/* ------------------------------------ */ +.sharrre-container { float: right; width: 50px; padding: 0 10px; margin-right: -100px; +-webkit-border-radius: 4px; border-radius: 4px; } +.sharrre-container span { color: #aaa; display: block; text-align: center; text-transform: uppercase; font-size: 11px; } +.sharrre { padding: 10px 0 0; } +.sharrre .box { width: 50px; display: block; } +.sharrre .count { background: #eee; color: #333; display: block; font-size: 15px; font-weight: 600; line-height: 30px; position: relative; text-align: center; +-webkit-border-radius: 4px; border-radius: 4px; } +.sharrre .count:after { content:''; display: block; position: absolute; left: 49%; width: 0; height: 0; border: solid 6px transparent; border-top-color: #eee; margin-left: -6px; bottom: -12px; } +.sharrre .share { display: block; font-size: 28px; font-weight: 600; line-height: 32px; margin-top: 12px; padding: 0; text-align: center; text-decoration: none; } +.sharrre .box .share, +.sharrre .box .count { -webkit-transition: all .3s ease; transition: all .3s ease; } +.sharrre .box:hover .share, +.sharrre .box:hover .count { color: #444!important; } +.sharrre#twitter .share, +.sharrre#twitter .box .count { color: #00acee; } +.sharrre#facebook .share, +.sharrre#facebook .box .count { color: #3b5999; } +.sharrre#googleplus .share, +.sharrre#googleplus .box .count { color: #cd483c; } +.sharrre#pinterest .share, +.sharrre#pinterest .box .count { color: #ca2128; } + +/* single : post pages +/* ------------------------------------ */ +.post-pages { font-weight: 600; margin-bottom: 20px; } + +/* single : tags +/* ------------------------------------ */ +.post-tags { margin-bottom: 40px; } +.post-tags span { font-size: 14px; color: #999; display: inline-block; margin: 0 7px 0 0; } +.post-tags a { background: #f2f2f2; display: inline-block; line-height: 16px; white-space: nowrap; font-size: 12px; color: #999; padding: 3px 7px; margin: 0 5px 2px 0; +-webkit-border-radius: 2px; border-radius: 2px; } +.post-tags a:hover { background-color: #3b8dbd; color: #fff; } + +/* single : author bio +/* ------------------------------------ */ +.author-bio { border: 2px solid #eee; position: relative; padding: 15px 15px 10px 95px; color: #888; margin-bottom: 40px; } +.author-bio:before { content:''; display: inline-block; border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 8px solid #eee; position: absolute; top: -8px; left: 13px; } +.author-bio:after { content:''; display: inline-block; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #fff; position: absolute; top: -5px; left: 15px; } +.author-bio .bio-avatar { float: left; margin: 0 0 8px -80px; width: 64px; height: auto; position: relative; } +.author-bio .bio-avatar:after { background: #3b8dbd; position: absolute; right: 0; bottom: 0; padding: 4px 4px; content: "\f040"; color: #fff; font-size: 12px; line-height: 12px; width: 12px; font-style: normal; font-family: FontAwesome; text-align: center; -webkit-border-radius: 3px; border-radius: 3px; } +.author-bio .bio-avatar img { display: block; width: 100%; height: auto; -webkit-border-radius: 3px; border-radius: 3px; } +.author-bio p { margin-bottom: 8px; } +.author-bio .bio-name { color: #444; font-weight: 600; margin-bottom: 4px; } +.author-bio .bio-desc { color: #888; font-size: 15px; line-height: 1.5em; } + +/* single : related posts +/* ------------------------------------ */ +.related-posts { border-bottom: 2px solid #eee; margin-bottom: 40px; } +.related-posts li { width: 33.3%; float: left; display: inline; } +.related-posts .post { border-right: 1px solid transparent; margin-bottom: 0; padding-bottom: 10px; } +.related-posts li:nth-child(4) article { display: none; } +.related-posts li:nth-child(3) article { border-right-color: transparent; } +.related-posts .related-inner { padding: 0 20px 0 0; } +.single .related-posts .post-title { margin-bottom: 10px; font-size: 17px; font-weight: 300; line-height: 1.5em; letter-spacing: 0; display: block; } + +/* single : post-nav +/* ------------------------------------ */ +.post-nav li { width: 100%; display: inline; float: left; text-align: center; } +.post-nav li a { position: relative; min-height: 73px; display: block; padding: 16px 40px 24px; } +.post-nav li i { color: #ccc; font-size: 18px; position: absolute; top: 50%; margin-top: -10px; } +.post-nav li a strong { display: block; font-size: 12px; color: #aaa; letter-spacing: 0.5px; font-weight: normal; text-transform: uppercase; } +.post-nav li a span { font-size: 15px; color: #666; } +.post-nav li a:hover span { color: #444; } +.post-nav li.previous i { left: 10px; } +.post-nav li.next i { right: 10px; } +.post-nav li a span, +.post-nav li a i { +-webkit-transition-property: background color; -webkit-transition-duration: 0.2s; -webkit-transition-timing-function: ease-out; +-moz-transition-property: background color; -moz-transition-duration: 0.2s; -moz-transition-timing-function: ease-out; +-o-transition-property: background color; -o-transition-duration: 0.2s; -o-transition-timing-function: ease-out; +transition-property: background color; transition-duration: 0.2s; transition-timing-function: ease-out; } + +/* sidebar-specific */ +.sidebar .post-nav li a { border-top: 1px solid #eee; border-bottom: 1px solid #ddd; } +.sidebar .post-nav li a:hover { background: #ebebeb; background: rgba(0,0,0,0.02); } +.sidebar .post-nav li.previous a, +.sidebar .post-nav li.next a { border-bottom: 1px solid #ddd; } +.s1 .post-nav li a:hover i { color: #3b8dbd; } +.s2 .post-nav li a:hover i { color: #82b965; } + +/* content-specific */ +.content .post-nav { border-top: 2px solid #eee; border-bottom: 2px solid #eee; margin-bottom: 40px; } +.content .post-nav li { width: 50%; } +.content .post-nav li.next { float: right; -webkit-box-shadow: -1px 0 0 #eee, inset 1px 0 0 #eee; box-shadow: -1px 0 0 #eee, inset 1px 0 0 #eee; } +.content .post-nav li.next a { padding-left: 24px; } +.content .post-nav li.previous { float: left; -webkit-box-shadow: 1px 0 0 #eee, inset -1px 0 0 #eee; box-shadow: 1px 0 0 #eee, inset -1px 0 0 #eee; } +.content .post-nav li.previous a { padding-right: 24px; } +.content .post-nav li a:hover i { color: #3b8dbd; } + + +/* ------------------------------------------------------------------------- * + * Post Formats +/* ------------------------------------------------------------------------- */ + +/* post format : common +/* ------------------------------------ */ +.post-format { position: relative; margin-bottom: 2em; } +.post-format p { margin-bottom: 1em; } +.post-format .format-container { background: #f1f1f1; padding-bottom: 10px; border-left: 3px solid #3b8dbd; } +.post-format .format-container .fa, +.post-format .format-container .fa { color: #ccc; font-size: 36px; float: right; margin: 0 0 20px 20px; } + +/* post format : image +/* ------------------------------------ */ +.format-image { } + +/* post format : video +/* ------------------------------------ */ +.format-video { } + +/* post format : quote +/* ------------------------------------ */ +.format-quote .post-format { } +.format-quote .post-format blockquote { font-size: 22px; font-weight: 400; line-height: 1.4em; font-style: italic; } +.format-quote .post-format .quote-author { font-style: italic; } + +/* post format : link +/* ------------------------------------ */ +.format-link .post-format p { font-size: 22px; font-weight: 400; line-height: 1.4em; font-style: italic; } + +/* post format : chat +/* ------------------------------------ */ +.format-chat .post-format p { font-style: italic; } + +/* post format : status +/* ------------------------------------ */ +.format-status .post-title { display: none; } +.single .format-status .entry { font-size: 24px; line-height: 1.4em; } + +/* post format : aside +/* ------------------------------------ */ +.format-aside .post-title { display: none; } + +/* post format : gallery +/* ------------------------------------ */ +.format-gallery .post-format .flexslider { overflow: visible; padding-bottom: 30px; margin-bottom: -20px; } +.format-gallery .post-format .flexslider .slides { background: #262626; overflow: hidden; position: relative; } +.format-gallery .post-format .flexslider .slides img { max-height: 405px; width: auto; max-width: 100%; -webkit-box-shadow: 0 0 30px rgba(0,0,0,0.6); box-shadow: 0 0 30px rgba(0,0,0,0.6); } +.format-gallery .post-format .flexslider .flex-control-nav { bottom: 1px; } +.format-gallery .post-format .flex-direction-nav a:before { color: #fff; } + +/* post format : audio +/* ------------------------------------ */ +.format-audio .post-format a, +.format-audio .post-format i { font-size: 16px; line-height: 22px; } +#page .format-audio .post-format img { +-webkit-border-bottom-right-radius: 0; -webkit-border-bottom-left-radius: 0; +border-bottom-right-radius: 0; border-bottom-left-radius: 0; } + +/* jplayer */ +.jp-interface { background-color: #444; } +.jp-play-bar, +.jp-volume-bar-value { background-color: #83ad02; } +.jp-progress { background-color: #262626; } +.jp-volume-bar { border: 1px solid #262626; } +.jp-seek-bar, +.jp-volume-bar { background-color: #383838; } +.jp-interface a { color: #bbb; text-shadow: 0 -1px 0 rgba(0,0,0,0.6); } +.jp-interface a:hover { color: #eee; } +.jp-progress-container, +.jp-volume-bar-container { border-left: 1px solid #333; } +.jp-audio, +.jp-interface, +.jp-progress, +.jp-seek-bar { width: 100%; min-width: 100%; } +.jp-interface { position: relative; overflow: hidden; +-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), inset 0 -1px 0 rgba(0,0,0,0.3); +box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), inset 0 -1px 0 rgba(0,0,0,0.3); } +.jp-interface .jp-controls { list-style-type: none; padding: 0; margin: 0; } +.jp-interface .jp-controls li { display: inline; } +.jp-interface .jp-controls a { position: absolute; } +.jp-interface .jp-controls a i { display: block; } +.jp-play, .jp-pause { width: 25px; height: 30px; z-index: 1; outline: none; margin: 12px 0 0 9px;} +.jp-play, .jp-pause { top: 0; left: 0; } +.jp-progress-container { margin-left: 34px; margin-right: 84px; height: 6px; padding: 20px 10px; } +.jp-progress { overflow: hidden; } +.jp-progress { height: 5px; padding: 1px; +-webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.06); +box-shadow: 0 1px 0 rgba(255,255,255,0.06); } +.jp-seek-bar { width: 0px; height: 5px; cursor: pointer; -webkit-border-radius: 1px; border-radius: 1px; } +.jp-play-bar { width: 0px; height: 5px; -webkit-border-radius: 1px; border-radius: 1px; +-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.25); +box-shadow: inset 0 1px 0 rgba(255,255,255,0.25); } +.jp-volume-bar-container { width: 40px; height: 6px; padding: 20px 10px 20px 33px; position: absolute; top: 0; right: 0; } +.jp-volume-bar { position: relative; overflow: hidden; width: 38px; height: 5px; cursor: pointer; -webkit-border-radius: 1px; border-radius: 1px; +-webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.06); +box-shadow: 0 1px 0 rgba(255,255,255,0.06); } +.jp-volume-bar { top: 0; left: 0; } +.jp-volume-bar-value { width: 0px; height: 5px; -webkit-border-radius: 1px; border-radius: 1px; +-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.25); +box-shadow: inset 0 1px 0 rgba(255,255,255,0.25); } +.jp-mute, .jp-unmute { width: 17px; z-index: 1; outline: none; margin-top: 10px; } +.jp-mute, .jp-unmute { top: 2px; right: 58px; } +.jp-unmute { display: none; } +.jp-jplayer { width:0px; height:0px; } + + +/* ------------------------------------------------------------------------- * + * Widgets +/* ------------------------------------------------------------------------- */ +.widget { color: #777; font-size: 15px; overflow: hidden; } +.widget a { color: #777; } +.widget a:hover { color: #444; } +.widget > h3 { font-size: 15px; font-weight: 400; text-transform: uppercase; margin-bottom: 6px; } +.widget > h3 a, +.widget > h3 a:hover { color: #444; } +.widget > h3 a img { display: none; float: left; margin: 3px 7px 0 0; } +.widget select { border: 1px solid #ddd; color: #777; font-size: 15px; padding: 7px; width: 100%; max-width: 100%; } +#footer .widget select { border-color: #eee; } + +.sidebar .widget { padding: 30px 30px 20px; } +#footer .widget { padding-bottom: 30px; } +#footer .widget a:hover { color: #666; } + +/* widgets : icons +/* ------------------------------------ */ +.widget > ul li:before, +.widget > ul li a:before, +.widget > div > ul li a:before, +.widget_calendar caption:before { font-family: FontAwesome; font-size: 12px; margin-right: 6px; color: #ccc; display: inline-block!important; width: 1em; text-align: center; } +.widget > ul li a:hover:before { color: #999; } + +.widget_archive > ul > li a:before { content: "\f073"; } +.widget_categories > ul > li a:before { content: "\f07c"; } +.widget_links > ul > li a:before { content: "\f08e"; } +.widget_meta > ul > li a:before { content: "\f0da"; } +.widget_recent_comments > ul > li:before { content: "\f075"; } +.widget_recent_entries > ul > li a:before { content: "\f017"; } +.widget_calendar caption:before { content: "\f073"; } +.widget_pages ul li a:before, +.widget_nav_menu ul li a:before { content: "\f068"; } + +/* widgets : common +/* ------------------------------------ */ +.widget_search > h3, +.widget_text > h3, +.widget_tag_cloud > h3, +.widget_calendar > h3 { margin-bottom: 1em; } + +.widget_archive ul li, +.widget_categories ul li, +.widget_links ul li, +.widget_meta ul li, +.widget_recent_comments ul li, +.widget_recent_entries ul li, +.widget_rss ul li, +.widget_pages ul li a, +.widget_nav_menu ul li a, +.alx-tab li, +.alx-posts li { padding: 10px 0; border-bottom: 1px solid #e4e4e4; } + +#footer .widget_archive ul li, +#footer .widget_categories ul li, +#footer .widget_links ul li, +#footer .widget_meta ul li, +#footer .widget_recent_comments ul li, +#footer .widget_recent_entries ul li, +#footer .widget_rss ul li, +#footer .widget_pages ul li a, +#footer .widget_nav_menu ul li a, +#footer .alx-tab li, +#footer .alx-posts li, +#footer .widget_calendar th, +#footer .widget_calendar td { border-color: #f2f2f2; } + +.widget_archive ul li, +.widget_categories ul li, +.widget_links ul li { color: #bbb; } + +.widget_recent_comments ul li, +.widget_recent_entries ul li { color: #999; } +.widget_recent_entries .post-date { display: block; } + +/* widget : pages / custom menu +/* ------------------------------------ */ +.widget_pages ul li a, +.widget_nav_menu ul li a { display: block; } +.widget_pages li li a, +.widget_nav_menu li li a { padding-left: 15px; } +.widget_pages li li li a, +.widget_nav_menu li li li a { padding-left: 30px; } +.widget_pages ul ul, +.widget_pages ul ul ul, +.widget_nav_menu ul ul, +.widget_nav_menu ul ul ul { border: 0; } + +/* widget : rss +/* ------------------------------------ */ +.widget_rss ul li a { display: block; } +.widget_rss ul li span.rss-date { color: #444; font-weight: 600; display: block; text-transform: uppercase; font-size: 12px; } +.widget_rss ul li cite { color: #999; } + +.s1 .widget_rss ul li a, +#footer .widget_rss ul li a { color: #3b8dbd; } +.s2 .widget_rss ul li a { color: #82b965; } + +/* widget : search +/* ------------------------------------ */ +.widget_search input.search { color: #999; padding-left: 26px; width: 100%; } +.widget_search .screen-reader-text, +.widget_search #searchsubmit { display: none; } + +/* widget : text +/* ------------------------------------ */ +.widget_text .textwidget p { margin-bottom: 1em; } + +/* widget : calendar +/* ------------------------------------ */ +.widget_calendar a { font-weight: 600; } +.widget_calendar a:hover { color: #444!important; } +.widget_calendar #wp-calendar { width: 100%; } +.widget_calendar caption { color: #fff; padding: 5px 10px; } +.widget_calendar caption:before { color: #fff; color: rgba(255,255,255,0.7); font-size: 15px; } +.widget_calendar thead { background: #e2e2e2; -webkit-box-shadow: 0 1px 0 #ddd; box-shadow: inset 0 -1px 0 #ddd; } +#footer .widget_calendar thead { background: #f2f2f2; } +.widget_calendar th { font-weight: 600; } +.widget_calendar th, +.widget_calendar td { padding: 3px 0; text-align: center; border: 1px solid #e2e2e2; } +.widget_calendar .pad { padding: 0!important; } + +.s1 .widget_calendar a, +#footer .widget_calendar a { color: #3b8dbd; } +.s1 .widget_calendar caption, +#footer .widget_calendar caption{ background: #3b8dbd; } +.s2 .widget_calendar a { color: #82b965; } +.s2 .widget_calendar caption { background: #82b965; } + +/* custom widget : alxtabs / alxposts +/* ------------------------------------ */ +.alx-tabs-nav { border-bottom: 3px solid #ddd; margin-bottom: 10px; text-align: center; } +.alx-tabs-nav.tab-count-1 li { width: 100%; } +.alx-tabs-nav.tab-count-2 li { width: 50%; } +.alx-tabs-nav.tab-count-3 li { width: 33.333%; } +.alx-tabs-nav.tab-count-4 li { width: 25%; } +.alx-tabs-nav li { display: block; float: left; } +.alx-tabs-nav li a { font-size: 18px; display: block; padding: 8px 0; margin-bottom: -3px; border-bottom: 3px solid transparent; } +.alx-tabs-nav li a:hover { border-bottom-color: #ccc; } +.alx-tabs-nav li.active a, +#footer .alx-tabs-nav li.active a { color: #444; /* background: linear-gradient(to bottom, rgba(255,255,255,0.0) 0%, #fff 100%) 0 0 rgba(0,0,0, 0); */ } +.alx-tabs-nav li a span { display: none; } +#footer .alx-tabs-nav { border-bottom-color: #eee; } +#footer .alx-tabs-nav li a:hover { border-bottom-color: #ddd; } + +.s1 .alx-tabs-nav li.active a, +#footer .alx-tabs-nav li.active a { border-bottom-color: #3b8dbd; } +.s2 .alx-tabs-nav li.active a { border-bottom-color: #82b965; } + +.alx-tab li, +.alx-posts li { font-weight: 400; line-height: 1.4em; overflow: hidden; } +.alx-tab a, +.alx-posts a { -webkit-transition: all 0.2s ease; -moz-transition: all 0.2s ease; transition: all 0.2s ease; } +.alx-tab img, +.alx-posts img { display: block; width: 100%; height: auto; } +.alx-tab.thumbs-enabled li{ padding-left: 94px; } +.alx-tab .tab-item-thumbnail { width: 80px; margin-left: -94px; float: left; } +.alx-tab .tab-item-thumbnail, +.alx-posts .post-item-thumbnail { position: relative; -webkit-transition: all 1s ease; -moz-transition: all 1s ease; transition: all 1s ease; } +.alx-tab.avatars-enabled li{ padding-left: 62px; } +.alx-tab .tab-item-avatar { margin-left: -62px; width: 48px; float: left; -webkit-transition: all 1s ease; -moz-transition: all 1s ease; transition: all 1s ease; } +.alx-tab .tab-item-category, +.alx-posts .post-item-category { color: #aaa; text-transform: uppercase; font-size: 13px; } +.alx-tab .tab-item-title a, +.alx-tab .tab-item-comment a, +.alx-posts .post-item-title a { color: #444; } +.alx-tab .tab-item-category a:hover, +.alx-posts .post-item-category a:hover { color: #444!important; } +.alx-tab .tab-item-title, +.alx-tab .tab-item-comment, +.alx-posts .post-item-title { margin: 2px 0; -ms-word-wrap: break-word; word-wrap: break-word; } +.alx-tab .tab-item-date, +.alx-tab .tab-item-name, +.alx-posts .post-item-date { text-transform: uppercase; color: #aaa; font-size: 13px; } +.alx-tab .thumb-icon.small { bottom: 8px; left: 8px; } +.alx-tab li:hover .tab-item-thumbnail, +.alx-tab li:hover .tab-item-avatar, +.alx-posts li:hover .post-item-thumbnail { opacity: 0.75; } +.alx-tab li:hover .thumb-icon, +.alx-posts li:hover .thumb-icon { background: #fff; color: #111; } + +.s1 .alx-tab .tab-item-category a, +.s1 .alx-posts .post-item-category a, +.s1 .alx-tab li:hover .tab-item-title a, +.s1 .alx-tab li:hover .tab-item-comment a, +.s1 .alx-posts li:hover .post-item-title a, +#footer .alx-tab .tab-item-category a, +#footer .alx-posts .post-item-category a, +#footer .alx-tab li:hover .tab-item-title a, +#footer .alx-tab li:hover .tab-item-comment a, +#footer .alx-posts li:hover .post-item-title a { color: #3b8dbd; } +.s2 .alx-tab .tab-item-category a, +.s2 .alx-posts .post-item-category a, +.s2 .alx-tab li:hover .tab-item-title a, +.s2 .alx-tab li:hover .tab-item-comment a, +.s2 .alx-posts li:hover .post-item-title a { color: #82b965; } + +.alx-posts .post-item-thumbnail { margin-bottom: 10px; } +.alx-posts .post-item-title { font-size: 16px; line-height: 1.5em; } + +.s1 .alx-posts .post-item-title, +#footer .alx-posts .post-item-title { font-size: 18px; line-height: 1.4em; font-weight: 300; } +.s1 .alx-posts .post-item-category, +.s1 .alx-posts .post-item-date, +#footer .alx-posts .post-item-category, +#footer .alx-posts .post-item-date { font-size: 14px; } + +/* custom widget : alxvideo +/* ------------------------------------ */ +.widget_alx_video h3 { margin-bottom: 14px; } + + +/* ------------------------------------------------------------------------- * + * Comments +/* ------------------------------------------------------------------------- */ +#comments { margin-top: 20px; } + +.comment-tabs { border-bottom: 2px solid #eee; margin-bottom: 20px; } +.comment-tabs li { float: left; margin-bottom: -2px; } +.comment-tabs li a { font-weight: 600; padding: 0 10px 10px; display: block; color: #aaa; border-bottom: 2px solid #eee; } +.comment-tabs li a:hover { color: #444; border-color: #ccc; } +.comment-tabs li i { margin-right: 6px; } +.comment-tabs li.active a { color: #3b8dbd; border-bottom-color: #3b8dbd; } + +.commentlist, .pinglist { margin-bottom: 20px; } +.commentlist li, .pinglist li { padding-left: 60px; font-size: 14px; line-height: 22px; font-weight: 400; } +.commentlist .comment-body, .pinglist li { clear: both; position: relative; padding-bottom: 15px; } +.commentlist .comment-author, +.commentlist .comment-meta, +.commentlist .comment-awaiting-moderation { font-size: 13px; display: block; float: left; line-height: 20px; } +.commentlist .comment-author { margin-right: 6px; } +.commentlist .fn, .pinglist .ping-link { color: #444; font-size: 13px; font-style: normal; font-weight: 600; } +.commentlist .says { display: none; } +.commentlist .avatar { position: absolute; left: -60px; top: 0; width: 48px; height: 48px; -webkit-border-radius: 3px; border-radius: 3px; } +.commentlist .comment-meta:before, .pinglist .ping-meta:before { color: #ccc; content: "\f017"; font-family: FontAwesome; font-size: 10px; margin-right: 3px; vertical-align: 4%; } +.commentlist .comment-meta a, .pinglist .ping-meta { color: #aaa; } +.commentlist .reply { font-size: 13px; line-height: 16px; } +.commentlist .reply a { color: #aaa; } +.commentlist .reply a:hover { color: #444; } +.comment-awaiting-moderation { color: #3b8dbd; font-style: normal; } + +/* pings */ +.pinglist li { padding-left: 0; } + +/* comment text */ +.commentlist .comment-body p { margin-bottom: 8px; color: #777; clear: both; } +.commentlist .comment-body strong { font-weight: bold; } +.commentlist .comment-body em { font-style: italic; } +.commentlist .comment-body ol li { list-style: decimal; margin-left: 2em; padding: 0; } +.commentlist .comment-body ul li { list-style: square; margin-left: 2em; padding: 0; } + +/* post author & admin comment */ +.commentlist li.bypostauthor > .comment-body:after, +.commentlist li.comment-author-admin > .comment-body:after { background: #3b8dbd; display: block; position: absolute; content: "\f040"; color: #fff; line-height: 12px; width: 12px; font-style: normal; font-family: FontAwesome; text-align: center; } +.commentlist li.comment-author-admin > .comment-body:after { content: "\f005"; /* star for admin */ } +.commentlist li.bypostauthor > .comment-body:after, +.commentlist li.comment-author-admin > .comment-body:after { top: 32px; left: -28px; font-size: 10px; padding: 2px; -webkit-border-radius: 3px; border-radius: 3px; } +.commentlist li li.bypostauthor > .comment-body:after, +.commentlist li li.comment-author-admin > .comment-body:after { top: 22px; left: -26px; font-size: 8px; padding: 1px; -webkit-border-radius: 2px; border-radius: 2px; } + +/* child comment */ +.commentlist li ul { } +.commentlist li li { padding-left: 48px; margin: 0; } +.commentlist li li .avatar { width: 36px; height: 36px; left: -48px; top: 0; } +.commentlist li li .comment-meta { left: 70px; } + +/* comments : nav +/* ------------------------------------ */ +.comments-nav { margin-bottom: 20px; } +.comments-nav a { font-weight: 600; } +.comments-nav .nav-previous { float: left; } +.comments-nav .nav-next { float: right; } + +/* comments : form +/* ------------------------------------ */ +.logged-in-as, +.comment-notes, +.form-allowed-tags { display: none; } +#respond { position: relative; } +#reply-title { margin-bottom: 20px; } +li #reply-title { font-size: 0; margin: 0!important; padding: 0; height: 0; border-top: 0; } +#cancel-comment-reply-link { color: #999; display: block; position: absolute; bottom: 26px; right: 20px; font-size: 12px; } +#cancel-comment-reply-link:hover { color: #777; } +#commentform { background: #f1f1f1; padding: 10px 20px 20px; margin-bottom: 15px; -webkit-border-radius: 2px; border-radius: 2px; } +#commentform p.comment-form-author { width: 48%; float: left; } +#commentform p.comment-form-email { width: 48%; float: right; } +#commentform p.comment-form-url, +#commentform p.comment-form-comment { clear: both; } +#commentform label { padding: 6px 0; font-weight: 600; display: block; } +#commentform input[type="text"], +#commentform textarea { max-width: 100%; width: 100%; } +#commentform textarea { height: 100px; } +#commentform p.form-submit { margin-top: 10px; } +.logged-in #reply-title { margin-bottom: 20px; } +.logged-in #commentform p.comment-form-comment { margin-top: 10px; } +.logged-in #commentform p.comment-form-comment label { display: none; } + + +/* ------------------------------------------------------------------------- * + * Child Menu +/* ------------------------------------------------------------------------- */ +.child-menu { zoom: 1; position: relative; padding: 0 0 20px; } +.child-menu a { color: #777; font-weight: 600; display: block; padding: 0 44px; } +.child-menu a:hover { color: #3b8dbd; } +.child-menu .current_page_item > a { background: #fff; color: #3b8dbd; } + +/* show only current page items */ +.child-menu > li { display: none; } +.child-menu > li.current_page_item, +.child-menu > li.current_page_parent, +.child-menu > li.current_page_ancestor { display: block; } +.child-menu > li.current_page_item > ul ul, +.child-menu > li.current_page_parent > ul ul, +.child-menu > li.current_page_ancestor > ul ul { display: none; } +.child-menu > li ul li.current_page_item ul, +.child-menu > li ul li.current_page_parent ul, +.child-menu > li ul li.current_page_ancestor ul { display: block; } + +/* level 1 */ +.child-menu > li > a { font-size: 20px; display: block; padding: 20px 30px; } + +/* level 2 */ +.child-menu > li > ul { background: #e9e9e9; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; padding: 10px 0 10px 10px; } +.child-menu > li > ul > li > a { font-size: 15px; background: #f0f0f0; border-bottom: 1px solid #ddd; border-left: 1px solid #ddd; padding: 11px 20px; +-webkit-box-shadow: inset 0 1px 0 #f9f9f9; +box-shadow: inset 0 1px 0 #f9f9f9; } +.child-menu > li > ul > li > a:before { font-family: FontAwesome; content: "\f055"; font-weight: normal; font-size: 18px; margin-right: 8px; } + +/* level 3 */ +.child-menu > li ul ul { background: #f0f0f0; border-bottom: 1px solid #ddd; border-top: 3px solid #ebebeb; border-left: 1px solid #ddd; padding: 6px 0; } +.child-menu > li ul ul a { font-size: 15px; font-weight: 300; padding-top: 7px; padding-bottom: 7px; margin-bottom: 1px; } +.child-menu > li ul ul a:hover { background: #e9e9e9; +-webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.04); +box-shadow: inset 0 1px 0 rgba(0,0,0,0.04); } +.child-menu > li ul ul li.current_page_item > a { background: #fff; +-webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.04); +box-shadow: 0 1px 0 rgba(0,0,0,0.04); } + +/* child menu for dual/right fix */ +.col-2cl .child-menu > li > ul, +.col-3cr .child-menu > li > ul { padding-left: 0; padding-right: 10px; } +.col-2cl .child-menu > li > ul > li > a, +.col-3cr .child-menu > li > ul > li > a { border-left: 0; border-right: 1px solid #ddd; } +.col-2cl .child-menu > li ul ul, +.col-3cr .child-menu > li ul ul { border-left: 0; border-right: 1px solid #ddd; } + + +/* ------------------------------------------------------------------------- * + * Plugins +/* ------------------------------------------------------------------------- */ + +/* plugin : wp-pagenavi +/* ------------------------------------ */ +.wp-pagenavi { text-align: right; font-weight: 600; line-height: 20px; float: none; margin-right: -2px; text-align: center; } +.wp-pagenavi a, +.wp-pagenavi span { color: #aaa; font-size: 16px; padding: 7px 8px!important; display: inline; margin: 0 2px!important; } +.wp-pagenavi span.pages { font-size: 17px; font-weight: 300; display: block; margin-bottom: 1em!important; border: none!important; } +.wp-pagenavi span.pages:before { content: "\f15c"; font-family: FontAwesome; margin-right: 6px; } +.wp-pagenavi span.extend { border: none!important; border-bottom: 3px solid transparent!important; border-top: 1px solid transparent!important; } +.wp-pagenavi a:hover, +.wp-pagenavi a:active, +.wp-pagenavi span.current { color: #444!important; } + +.wp-pagenavi a { color: #3b8dbd; border: none!important; border-bottom: 3px solid #ddd!important; border-top: 1px solid #f1f1f1!important; } +.wp-pagenavi a:hover, +.wp-pagenavi a:active, +.wp-pagenavi span.current { background: none; border: none!important; border-bottom: 3px solid #3b8dbd!important; border-top: 1px solid #f1f1f1!important; } + +/* plugin : contact form 7 +/* ------------------------------------ */ +.wpcf7 { } +.wpcf7 p { color: #222; font-weight: 600; margin: 0 0 12px; width: 100%; float: left; position: relative; } +.wpcf7 p span { font-weight: 400; color: #999; } +.wpcf7 label { display: block; float: left; width: 20%; margin: 9px 0 0 12px; text-align: left; } +.wpcf7 input[type="text"], +.wpcf7 input[type="email"] { display: block; float: left; padding: 10px; width: 100%; } +.wpcf7 textarea { display: block; float: left; padding: 10px; width: 100%; } +.wpcf7 input[type="text"], +.wpcf7 input[type="email"], +.wpcf7 textarea { background: #f5f5f5; margin-top: 12px; } +.wpcf7 input[type="submit"] { width: 100%; padding: 10px 0; font-size: 18px; } +.wpcf7 div.wpcf7-validation-errors { border: none; margin: 0; padding: 0; } +.wpcf7 div.wpcf7-mail-sent-ok, +.wpcf7 div.wpcf7-mail-sent-ng { border: none; } +.wpcf7 div.wpcf7-response-output { margin: 0; padding: 0; } +.wpcf7 span.wpcf7-form-control-wrap { display: block; position: relative; } +.wpcf7 span.wpcf7-not-valid-tip { background: #f2dede; border-color: #e3bfbf; color: #b94a48; padding: 4px 14px; font-size: 12px; line-height: 20px; position: absolute; left: 0; top: 12px; width: auto; right: 0; display: block; } + + +/* ------------------------------------------------------------------------- * + * Flexslider +/* ------------------------------------------------------------------------- */ + +/* flexslider : resets +/* ------------------------------------ */ +.flex-container a:active, +.flexslider a:active, +.flex-container a:focus, +.flexslider a:focus { outline: none; } +.slides, +.flex-control-nav, +.flex-direction-nav { margin: 0; padding: 0; list-style: none; } + +/* flexslider : necessary styles +/* ------------------------------------ */ +.flexslider { margin: 0; padding: 0; } +.flexslider .slides > li { display: none; -webkit-backface-visibility: hidden;} /* Hide the slides before the JS is loaded. Avoids image jumping */ +.flexslider .slides img { width: 100%; height: auto; display: block; margin: 0 auto; } +.flex-pauseplay span { text-transform: capitalize; } +.slides:after { content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0; } +html { -webkit-font-smoothing: antialiased; /* safari font rendering issue fix */ } +html[xmlns] .slides { display: block; } +* html .slides { height: 1%;} +.no-js .slides > li:first-child { display: block; } + +/* flexslider : default theme +/* ------------------------------------ */ +.flexslider { margin: 0 0 60px; position: relative; zoom: 1; } +.flex-viewport { max-height: 2000px; -webkit-transition: all 1s ease; -moz-transition: all 1s ease; transition: all 1s ease; } +.loading .flex-viewport { max-height: 300px; } +.flexslider .slides { zoom: 1; } +.flexslider .slides > li { position: relative; } +.carousel li { margin-right: 5px; } + +/* direction nav */ +.flex-direction-nav { *height: 0; position: absolute; top: 10px; right: 10px; z-index: 2; } +.flex-direction-nav li { float: left; margin-left: 4px; } +.flex-direction-nav li:first-child { float: left; } +.flex-direction-nav li:last-child { float: right; } +.flex-direction-nav a { background: rgba(0,0,0,0.7); opacity: 0.6; position: relative; width: 40px; height: 40px; margin: 0 0 0; display: block; cursor: pointer; text-indent: -999px; overflow: hidden; +-webkit-transition: all .3s ease; transition: all .3s ease; +-webkit-border-radius: 3px; border-radius: 3px; } +.flexslider:hover .flex-next, +.flexslider:hover .flex-prev { opacity: 0.8; } +.flexslider:hover .flex-next:hover, .flexslider:hover .flex-prev:hover { opacity: 1; } +.flex-direction-nav .flex-disabled {opacity: .3!important; filter:alpha(opacity=30); cursor: default; } + +/* direction nav arrows */ +.flex-direction-nav a:before { font-family: FontAwesome; font-size: 20px; line-height: 24px; position: absolute; text-align: center; left: 0; right: 0; top: 9px; text-indent: 0; } +.flex-direction-nav .flex-next:before { content:"\f054"; } +.flex-direction-nav .flex-prev:before { content: "\f053"; } + +/* control nav */ +.flex-control-nav { width: 100%; position: absolute; bottom: -30px; text-align: center; } +.flex-control-nav li { margin: 0 3px; display: inline-block; zoom: 1; *display: inline; } +.flex-control-nav li a { background: rgba(0,0,0,0.15); width: 10px; height: 10px; display: block; cursor: pointer; text-indent: -999px; overflow: hidden; +-webkit-border-radius: 100%; border-radius: 100%; } +.flex-control-nav li a:hover { background: rgba(0,0,0,0.15); } +.flex-control-nav li a.flex-active { background: rgba(0,0,0,0.25); cursor: default; } + +.flex-control-thumbs { margin: 5px 0 0; position: static; overflow: hidden; } +.flex-control-thumbs li { width: 25%; float: left; margin: 0; } +.flex-control-thumbs img { width: 100%; display: block; opacity: .7; cursor: pointer; } +.flex-control-thumbs img:hover { opacity: 1; } +.flex-control-thumbs .flex-active { opacity: 1; cursor: default; } + +@media screen and (max-width: 860px) { + .flex-direction-nav .flex-prev { opacity: .7; right: 0; } + .flex-direction-nav .flex-next { opacity: .7; right: 0; } +} + +/* ------------------------------------------------------------------------- * + * Shortcodes +/* ------------------------------------------------------------------------- */ + +/* shortcode : dropcap +/* ------------------------------------ */ +.dropcap { color: #444; display: block; float: left; font-size: 94px; line-height: 0.9em; font-weight: 600; margin: 0 10px 0 0; } + +/* shortcode : pullquotes +/* ------------------------------------ */ +.pullquote-left { color: #444; border-left: 6px solid #eee; float: left; margin: 0.78em 1em 0.78em 0; padding: 0 0 0 20px; font-weight: 600; width: 40%; } +.pullquote-right { color: #444; border-right: 6px solid #eee; float: right; margin: 0.78em 0 0.78em 1em; padding: 0 20px 0 0; font-weight: 600; width: 40%; } + +/* shortcode : highlights +/* ------------------------------------ */ +.highlight { color: #222; border-bottom: 1px dotted #222; } + +/* shortcode : hr +/* ------------------------------------ */ +hr, .hr { border: 0; background: #eee; border-bottom: 2px solid #eee; height: 1px; margin: 30px 0; } + + +/* ------------------------------------------------------------------------- * + * IE Fixes +/* ------------------------------------------------------------------------- */ +body.ie8, +.ie8.single .related-posts .post-title, +.ie8 .s1 .alx-posts .post-item-title, +.ie8 #footer .alx-posts .post-item-title { font-weight: 400; } + +.ie8 .author-bio .bio-avatar:after, +.ie8 .commentlist li.bypostauthor > .comment-body:after { display: none; } + +.ie8 .nav li > a:after { content: ""!important; } +.ie8 .nav > li > a:after { content: ""!important; } +.ie8 #nav-topbar .nav > li > a:hover, +.ie8 #nav-topbar .nav > li:hover > a, +.ie8 #nav-header .nav > li > a:hover, +.ie8 #nav-header .nav > li:hover > a, +.ie8 .toggle-search:hover, +.ie8 .toggle-search.active, +.ie8 .search-expand-inner { background: url(img/opacity-10.png); } +.ie8 .thumb-icon, +.ie8 .image-caption, +.ie8 .page-image-text .description i, +.ie8 .flex-direction-nav a { background: url(img/ie/opacity-70.png); } +.ie8 .entry .gallery .gallery-caption { background: url(img/ie/opacity-80-light.png); }