├── .editorconfig ├── .gitignore ├── 404.php ├── CHANGELOG.md ├── LICENSE ├── README.md ├── archive-download.php ├── archive.php ├── assets ├── css │ ├── admin-style.css │ ├── edd │ │ ├── fonts │ │ │ ├── EDD-Icons.dev.svg │ │ │ ├── EDD-Icons.eot │ │ │ ├── EDD-Icons.json │ │ │ ├── EDD-Icons.svg │ │ │ ├── EDD-Icons.ttf │ │ │ ├── EDD-Icons.woff │ │ │ ├── padlock.eot │ │ │ ├── padlock.svg │ │ │ ├── padlock.ttf │ │ │ └── padlock.woff │ │ └── style.css │ └── socicon.css ├── fonts │ ├── socicon.eot │ ├── socicon.svg │ ├── socicon.ttf │ ├── socicon.woff │ └── socicon.woff2 ├── images │ ├── 1c.png │ ├── 2cl.png │ ├── 2cr.png │ ├── 3cl.png │ ├── 3cm.png │ ├── 3cr.png │ ├── customizer-logo.png │ ├── default-387x239-c-center.png │ ├── default-774x478-c-center.png │ ├── default.png │ ├── default.svg │ └── page-structure.png ├── js │ ├── edd-scripts.js │ ├── fastclick.js │ ├── html5shiv.js │ ├── jquery.cookie.js │ ├── jquery.fittext.js │ ├── jquery.fitvids.js │ ├── modernizr.min.js │ ├── placeholder.js │ ├── respond.min.js │ └── skip-link-focus-fix.js └── vendor │ ├── jquery.cookie.js │ ├── jquery.isotope.min.js │ ├── jquery.isotope.sloppy-masonry.min.js │ └── placeholder.js ├── attachment.php ├── author.php ├── bbpress.php ├── buddypress.php ├── comments.php ├── content.php ├── core-shell ├── assets │ ├── css │ │ └── main.css │ ├── images │ │ ├── default-bg.svg │ │ └── grid-back.png │ └── js │ │ └── vendor │ │ ├── menu.js │ │ └── modernizr.min.js ├── class-Maera_Shell_Core.php └── views │ ├── base.twig │ ├── content-single-entry-header.twig │ ├── header.twig │ ├── macros │ ├── column_classes.html.twig │ └── grid_classes.html.twig │ └── pagination.twig ├── edd_templates ├── widget-cart-checkout.php └── widget-cart-item.php ├── footer.php ├── functions.php ├── header.php ├── includes ├── admin │ └── tabs │ │ ├── docs.php │ │ ├── docs │ │ ├── actions.php │ │ ├── filters.php │ │ ├── general.php │ │ ├── shells.php │ │ ├── templating.php │ │ └── theme-supports.php │ │ ├── general.php │ │ └── settings.php ├── class-jetpack-color.php ├── class-maera-admin.php ├── class-maera-caching.php ├── class-maera-core-customizer.php ├── class-maera-cwa.php ├── class-maera-development.php ├── class-maera-edd-compatibility.php ├── class-maera-edd-customizer.php ├── class-maera-edd-mods.php ├── class-maera-edd-scripts.php ├── class-maera-edd-shortcodes.php ├── class-maera-edd-tonesque.php ├── class-maera-edd.php ├── class-maera-helper.php ├── class-maera-init.php ├── class-maera-required-plugins.php ├── class-maera-shell.php ├── class-maera-styles.php ├── class-maera-template.php ├── class-maera-timber.php ├── class-maera-widget-dropdown-class.php ├── class-maera.php ├── class-tonesque.php ├── required-error.php ├── template-hierarchy.php ├── utils.php ├── widgets.php └── widgets │ ├── extended-posts │ ├── assets │ │ ├── script.js │ │ └── style.css │ ├── class-Maera_Ext_Posts_Widget_Latest_Articles.php │ └── extended-posts.php │ └── logo │ ├── includes │ └── class-Maera_Logo_Widget.php │ └── logo.php ├── index.php ├── languages ├── maera-en_US.mo └── maera-en_US.po ├── page.php ├── readme.txt ├── rtl.css ├── screenshot.png ├── search.php ├── single.php ├── style.css ├── taxonomy-download_category.php ├── taxonomy-download_tag.php ├── views ├── 404.twig ├── archive.twig ├── attachment.twig ├── author.twig ├── base.twig ├── bbp.twig ├── bp.twig ├── comments.twig ├── content-attachment-entry-content.twig ├── content-attachment-entry-download-meta.twig ├── content-attachment-entry-footer.twig ├── content-attachment-entry-header.twig ├── content-attachment-entry-meta.twig ├── content-attachment.twig ├── content-entry-content-protected.twig ├── content-entry-content.twig ├── content-entry-footer.twig ├── content-entry-header.twig ├── content-page.twig ├── content-protected.twig ├── content-single-entry-content.twig ├── content-single-entry-download-meta.twig ├── content-single-entry-footer.twig ├── content-single-entry-header.twig ├── content-single-entry-meta.twig ├── content-single-entry-tag.twig ├── content-single.twig ├── content.twig ├── edd │ ├── archive-download.twig │ ├── content-download-content.twig │ ├── content-download-footer.twig │ ├── content-download-header.twig │ ├── shortcode-content-price.twig │ ├── shortcode-download-content-grid.twig │ ├── shortcode-download-content-list.twig │ ├── shortcode-download-content-zoe.twig │ ├── shortcode-download-image.twig │ ├── tease-download-meta.twig │ └── tease-download-open.twig ├── filter-isotope.twig ├── filter-php.twig ├── footer.twig ├── head.twig ├── header.twig ├── index.twig ├── macros │ ├── alert.html.twig │ ├── button_classes.html.twig │ ├── button_dropdown.html.twig │ ├── button_group_classes.html.twig │ ├── clearfix.html.twig │ ├── column_classes.html.twig │ ├── column_close.html.twig │ ├── column_open.html.twig │ ├── container_close.html.twig │ ├── container_open.html.twig │ ├── float_class.html.twig │ ├── grid_classes.html.twig │ ├── icon.html.twig │ ├── pagination_ul_class.html.twig │ ├── panel_body_close.html.twig │ ├── panel_body_open.html.twig │ ├── panel_close.html.twig │ ├── panel_footer_close.html.twig │ ├── panel_footer_open.html.twig │ ├── panel_heading_close.html.twig │ ├── panel_heading_open.html.twig │ ├── panel_open.html.twig │ ├── row_close.html.twig │ └── row_open.html.twig ├── main.twig ├── page.twig ├── pagination.twig ├── sidebar.twig ├── single.twig ├── site-logo.twig ├── twig-str_replace.twig ├── widget-extended-posts.twig └── woocommerce │ ├── archive-product.twig │ ├── content-single-product.twig │ ├── loop │ └── add-to-cart.twig │ ├── single-product.twig │ └── single-product │ └── add-to-cart │ ├── button-external.twig │ └── button.twig ├── woocommerce.php └── woocommerce ├── archive-product.php ├── loop └── add-to-cart.php ├── single-product.php ├── single-product ├── add-to-cart │ ├── external.php │ ├── grouped.php │ ├── simple.php │ └── variable.php └── up-sells.php ├── taxonomy-product_cat.php └── taxonomy-product_tag.php /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | # WordPress Coding Standards 5 | # http://make.wordpress.org/core/handbook/coding-standards/ 6 | 7 | root = true 8 | 9 | [*] 10 | charset = utf-8 11 | end_of_line = lf 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | indent_style = tab 15 | 16 | [*.json] 17 | indent_style = space 18 | indent_size = 2 19 | 20 | [*.css] 21 | indent_style = space 22 | indent_size = 2 23 | 24 | [*.txt] 25 | end_of_line = crlf 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Include your project-specific ignores in this file 2 | # Read about how to use .gitignore: https://help.github.com/articles/ignoring-files 3 | 4 | lib/timber-library/cache 5 | -------------------------------------------------------------------------------- /404.php: -------------------------------------------------------------------------------- 1 | views->dependencies(); 11 | 12 | Maera()->views->header(); 13 | Maera()->views->render(); 14 | Maera()->views->footer(); 15 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 2.0 2 | 3 | * Fix Multiple DB options 4 | * Fix Template Tag Archive function 5 | * Fix styling of categories when there are 20+ resulting in grouped up categories 6 | * Add post tag display 7 | * Fix Attachment Pages 8 | * Add styling for [audio] and [video] shortcodes 9 | * Fix password protected posts 10 | * Add styling for quote tags 11 | * Fix readability of Byline 12 | * Fix archive page titles 13 | * Add styling for [gallery] shortcode 14 | * Fix multiple responsive issues 15 | * Modify/Fix script registration 16 | * Fix translation and strings 17 | * Fix hardcoding of some scripts 18 | * Add extra sanitzation checks to edd templates and core shell 19 | * Fix missing sanitization for theme Customizer options 20 | * Fix wrong filenames 21 | * Fix multiple issues with translations and textdomains using incorrect functions and missing text domain 22 | * Add support for core WordPress CSS classes 23 | * Fix styling on comments 24 | * Fix styling on widgets 25 | 26 | 27 | ## 1.4 28 | 29 | * Fix searchform.twig causing internal server errors 30 | * Remove search filter breaking external search plugins 31 | * Fix use correct function for locating files 32 | * Fix multiple warnings 33 | * Modification: No Longer require Kirki for the core framework 34 | * Remove admin notice about the add-ons tabs that was removed in prior versions 35 | * Modification: Stop auto-activating plugins 36 | * Remove un-needed jQuery enqueue 37 | * Remove Kirki as an embedded plugin 38 | * Remove Timber as an embedded plugin 39 | 40 | ## 1.3 41 | 42 | * Bug Fixes 43 | 44 | ## 1.2 45 | 46 | * New: Kirki & Timber plugins as well as some Jetpack classes are now embedded. Installing external plugins is no longer required for the core theme. 47 | * New: Easy-Digital-Downloads integration 48 | * New: WooCommerce integration 49 | * Fix: Core shell CSS tweaks 50 | * Fix: Change sr-only class to screen-reader-text 51 | * New: Implemented a class autoloader 52 | * Tweak: Deactivate auto-installer 53 | * Tweak: Use dashicons instead of elusive icons 54 | * Tweak: Keep pagination links as anchors 55 | * Fix: Properly use add_query_arg() 56 | * Tweak: Comments template 57 | * Fix: fix incorrect path URLs 58 | * Tweak: better template-hierarchy.php 59 | * Tweak: WordPress coding standards 60 | * Fix: Other minor bugfixes 61 | * Tweak: Add before_widget & after_widget to the logo widget 62 | * Fix: Align left images on the extended-posts widget 63 | 64 | ## 1.1.1 65 | 66 | * Fix: Added a default license key 67 | * New: More OOP design 68 | * New: Change the Timber cache folder (soon to be supported by Timber core) 69 | * Fix: Undefined index messages on the admin settings screen 70 | * New: Introducing Maera_Widget_Dropdown_Class.php 71 | * Fix: Move core styles to style.css 72 | 73 | ## 1.1.0 74 | 75 | * Fix: Most methods are not non-static. 76 | * New: The theme is now more OOP. 77 | * New: You can now choose a caching method from the admin options. 78 | * Fix: Disabling file caches (there were issues on sites hosted on WPEngine). 79 | * Fix: Updating the Maera_Logo_Widget rendering method. 80 | * Fix: Typo preventing proper template rendering for tag archives. 81 | * Fix: Added check for MAERA_VERSION constant. 82 | * Fix: Code cleanup. 83 | * New: Introducing a Maera_Helper class. 84 | * Fix: Move file requires outside the main Maera object. 85 | * Fix: Moved test_missing method to the Maera_Required_Plugins class. 86 | * Fix: Moved get_search_form method to the Maera_Template class. 87 | * Fix: Moved body_class method to the Maera_Styles class. 88 | * Fix: Renamed the Maera_Template->main method to Maera_Template->render. 89 | * New: Introducing new "screen-reader-text" classes as per https://make.wordpress.org/accessibility/2015/01/27/test-chat-summary-januari-26/ 90 | 91 | ## 1.0.3 92 | 93 | * Fix: Jetpack was being forced to Dev mode some hosts even when dev mode was disabled from the theme options dashboard. 94 | 95 | ## 1.0.2 96 | 97 | * Fix: remote-installer scripts were not loading properly 98 | 99 | ## 1.0.1 100 | 101 | * Fix: typo preventing automatic updates 102 | 103 | ## 1.0.0 104 | 105 | * Initial release 106 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) {{{year}}} {{{fullname}}} 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /archive-download.php: -------------------------------------------------------------------------------- 1 | template->context(); 14 | 15 | $data['title'] = esc_html__( 'Downloads', 'maera' ); 16 | $data['posts'] = Timber::query_posts( false, 'TimberPost' ); 17 | $data['query'] = $wp_query->query_vars; 18 | 19 | // The in-cart class 20 | $data['in_cart'] = ( function_exists( 'edd_item_in_cart' ) && edd_item_in_cart( $post->ID ) && ! edd_has_variable_prices( $post->ID ) ) ? 'in-cart' : ''; 21 | 22 | // The variable-priced class 23 | $data['variable_priced'] = ( function_exists( 'edd_has_variable_prices' ) && edd_has_variable_prices( $post->ID ) ) ? 'variable-priced' : ''; 24 | 25 | // Get a list with categories of each download (Isotope filtering) 26 | $terms = get_the_terms( $post->ID, 'download_category' ); 27 | if ( $terms && ! is_wp_error( $terms ) ) { 28 | foreach ( $terms as $term ) { 29 | $download_categories[] = $term->slug; 30 | } 31 | $data['categories'] = join( ' ', $download_categories ); 32 | } else { 33 | $data['categories'] = ''; 34 | } 35 | 36 | // Get a list with tags of each download (Isotope filtering) 37 | $terms = get_the_terms( $post->ID, 'download_tag' ); 38 | if ( $terms && ! is_wp_error( $terms ) ) { 39 | foreach ( $terms as $term ) { 40 | $download_tags[] = $term->slug; 41 | } 42 | $data['tags'] = join( ' ', $download_tags ); 43 | } else { 44 | $data['tags'] = ''; 45 | } 46 | 47 | Maera()->template->header(); 48 | Maera()->template->main( 'archive-download.twig', $data ); 49 | Maera()->template->footer(); 50 | -------------------------------------------------------------------------------- /archive.php: -------------------------------------------------------------------------------- 1 | views->dependencies(); 12 | 13 | Maera()->views->header(); 14 | Maera()->views->render(); 15 | Maera()->views->footer(); 16 | -------------------------------------------------------------------------------- /assets/css/edd/fonts/EDD-Icons.dev.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | This is a custom SVG font generated by IcoMoon. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /assets/css/edd/fonts/EDD-Icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/assets/css/edd/fonts/EDD-Icons.eot -------------------------------------------------------------------------------- /assets/css/edd/fonts/EDD-Icons.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | This is a custom SVG font generated by IcoMoon. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /assets/css/edd/fonts/EDD-Icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/assets/css/edd/fonts/EDD-Icons.ttf -------------------------------------------------------------------------------- /assets/css/edd/fonts/EDD-Icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/assets/css/edd/fonts/EDD-Icons.woff -------------------------------------------------------------------------------- /assets/css/edd/fonts/padlock.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/assets/css/edd/fonts/padlock.eot -------------------------------------------------------------------------------- /assets/css/edd/fonts/padlock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Created by FontForge 20100429 at Wed Feb 20 19:19:09 2013 6 | By root 7 | Copyright (C) 2012 by original authors @ fontello.com 8 | 9 | 10 | 11 | 24 | 26 | 28 | 30 | 32 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /assets/css/edd/fonts/padlock.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/assets/css/edd/fonts/padlock.ttf -------------------------------------------------------------------------------- /assets/css/edd/fonts/padlock.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/assets/css/edd/fonts/padlock.woff -------------------------------------------------------------------------------- /assets/css/socicon.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'socicon'; 3 | src: url('../fonts/socicon.eot'); 4 | src: url('../fonts/socicon.eot?#iefix') format('embedded-opentype'), 5 | url('../fonts/socicon.woff') format('woff'), 6 | url('../fonts/socicon.woff2') format('woff2'), 7 | url('../fonts/socicon.ttf') format('truetype'), 8 | url('../fonts/socicon.svg#sociconregular') format('svg'); 9 | font-weight: normal; 10 | font-style: normal; 11 | text-transform: initial; 12 | } 13 | .socicon { 14 | position: relative; 15 | top: 1px; 16 | display: inline-block; 17 | font-family: 'socicon' !important; 18 | font-style: normal; 19 | font-weight: normal; 20 | line-height: 1; 21 | -webkit-font-smoothing: antialiased; 22 | } 23 | .socicon:empty{ 24 | width: 1em; 25 | } 26 | .socicon-twitter:before { content: "a"; } 27 | .socicon-facebook:before { content: "b"; } 28 | .socicon-google:before { content: "c"; } 29 | .socicon-pinterest:before { content: "d"; } 30 | .socicon-foursquare:before { content: "e"; } 31 | .socicon-yahoo:before { content: "f"; } 32 | .socicon-skype:before { content: "g"; } 33 | .socicon-yelp:before { content: "h"; } 34 | .socicon-feedburner:before { content: "i"; } 35 | .socicon-linkedin:before { content: "j"; } 36 | .socicon-viadeo:before { content: "k"; } 37 | .socicon-xing:before { content: "l"; } 38 | .socicon-myspace:before { content: "m"; } 39 | .socicon-soundcloud:before { content: "n"; } 40 | .socicon-spotify:before { content: "o"; } 41 | .socicon-grooveshark:before { content: "p"; } 42 | .socicon-lastfm:before { content: "q"; } 43 | .socicon-youtube:before { content: "r"; } 44 | .socicon-vimeo:before { content: "s"; } 45 | .socicon-dailymotion:before { content: "t"; } 46 | .socicon-vine:before { content: "u"; } 47 | .socicon-flickr:before { content: "v"; } 48 | .socicon-500px:before { content: "w"; } 49 | .socicon-instagram:before { content: "x"; } 50 | .socicon-wordpress:before { content: "y"; } 51 | .socicon-tumblr:before { content: "z"; } 52 | .socicon-blogger:before { content: "A"; } 53 | .socicon-technorati:before { content: "B"; } 54 | .socicon-reddit:before { content: "C"; } 55 | .socicon-dribbble:before { content: "D"; } 56 | .socicon-stumbleupon:before { content: "E"; } 57 | .socicon-digg:before { content: "F"; } 58 | .socicon-envato:before { content: "G"; } 59 | .socicon-behance:before { content: "H"; } 60 | .socicon-delicious:before { content: "I"; } 61 | .socicon-deviantart:before { content: "J"; } 62 | .socicon-forrst:before { content: "K"; } 63 | .socicon-playstore:before { content: "L"; } 64 | .socicon-zerply:before { content: "M"; } 65 | .socicon-wikipedia:before { content: "N"; } 66 | .socicon-apple:before { content: "O"; } 67 | .socicon-flattr:before { content: "P"; } 68 | .socicon-github:before { content: "Q"; } 69 | .socicon-chimein:before { content: "R"; } 70 | .socicon-friendfeed:before { content: "S"; } 71 | .socicon-newsvine:before { content: "T"; } 72 | .socicon-identica:before { content: "U"; } 73 | .socicon-bebo:before { content: "V"; } 74 | .socicon-zynga:before { content: "W"; } 75 | .socicon-steam:before { content: "X"; } 76 | .socicon-xbox:before { content: "Y"; } 77 | .socicon-windows:before { content: "Z"; } 78 | .socicon-outlook:before { content: "1"; } 79 | .socicon-coderwall:before { content: "2"; } 80 | .socicon-tripadvisor:before { content: "3"; } 81 | .socicon-appnet:before { content: "4"; } 82 | .socicon-goodreads:before { content: "5"; } 83 | .socicon-tripit:before { content: "6"; } 84 | .socicon-lanyrd:before { content: "7"; } 85 | .socicon-slideshare:before { content: "8"; } 86 | .socicon-buffer:before { content: "9"; } 87 | .socicon-rss:before { content: ","; } 88 | .socicon-vkontakte:before { content: ";"; } 89 | .socicon-disqus:before { content: ":"; } 90 | .socicon-houzz:before { content: "+"; } 91 | .socicon-mail:before { content: "@"; } 92 | .socicon-patreon:before { content: "="; } 93 | .socicon-paypal:before { content: "-"; } 94 | .socicon-playstation:before { content: "^"; } 95 | .socicon-smugmug:before { content: "¨"; } 96 | .socicon-swarm:before { content: "$"; } 97 | .socicon-triplej:before { content: "*"; } 98 | .socicon-yammer:before { content: "&"; } 99 | .socicon-stackoverflow:before { content: "("; } 100 | .socicon-drupal:before { content: "#"; } 101 | .socicon-odnoklassniki:before { content : ".";} 102 | .socicon-android:before { content: "_"; } 103 | .socicon-meetup:before { content: "]"; } 104 | .socicon-persona:before { content: ")"; } 105 | .socicon-amazon:before { content: "£"; } 106 | .socicon-ello:before { content: "'"; } 107 | .socicon-mixcloud:before { content: '"'; } 108 | .socicon-8tracks:before { content: "}"; } 109 | .socicon-twitch:before { content: "{"; } 110 | .socicon-airbnb:before { content: "/"; } 111 | .socicon-airbnb:before { content: "?"; } 112 | -------------------------------------------------------------------------------- /assets/fonts/socicon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/assets/fonts/socicon.eot -------------------------------------------------------------------------------- /assets/fonts/socicon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/assets/fonts/socicon.ttf -------------------------------------------------------------------------------- /assets/fonts/socicon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/assets/fonts/socicon.woff -------------------------------------------------------------------------------- /assets/fonts/socicon.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/assets/fonts/socicon.woff2 -------------------------------------------------------------------------------- /assets/images/1c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/assets/images/1c.png -------------------------------------------------------------------------------- /assets/images/2cl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/assets/images/2cl.png -------------------------------------------------------------------------------- /assets/images/2cr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/assets/images/2cr.png -------------------------------------------------------------------------------- /assets/images/3cl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/assets/images/3cl.png -------------------------------------------------------------------------------- /assets/images/3cm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/assets/images/3cm.png -------------------------------------------------------------------------------- /assets/images/3cr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/assets/images/3cr.png -------------------------------------------------------------------------------- /assets/images/customizer-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/assets/images/customizer-logo.png -------------------------------------------------------------------------------- /assets/images/default-387x239-c-center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/assets/images/default-387x239-c-center.png -------------------------------------------------------------------------------- /assets/images/default-774x478-c-center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/assets/images/default-774x478-c-center.png -------------------------------------------------------------------------------- /assets/images/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/assets/images/default.png -------------------------------------------------------------------------------- /assets/images/default.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 23 | 47 | 49 | 50 | 52 | image/svg+xml 53 | 55 | 56 | 57 | 58 | 59 | 69 | 77 | 78 | -------------------------------------------------------------------------------- /assets/images/page-structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/assets/images/page-structure.png -------------------------------------------------------------------------------- /assets/js/edd-scripts.js: -------------------------------------------------------------------------------- 1 | var $j = jQuery.noConflict(); 2 | 3 | $j(window).load(function(){ 4 | 5 | // isotope container 6 | var $container = $j(".downloads-list.grid"); 7 | 8 | $container.isotope({ 9 | // layout 10 | layoutMode: "sloppyMasonry", 11 | itemSelector: ".type-download", 12 | animationEngine: "best-available", 13 | // sorting data 14 | getSortData: { 15 | title : function ( $elem ) { 16 | return $elem.find(".title").text(); 17 | } 18 | } 19 | }); 20 | 21 | // sort items on button click 22 | $j('#isotope-sort a').click(function() { 23 | $j('#isotope-sort a').removeClass('active'); 24 | $j(this).addClass('active'); 25 | 26 | var sortByValue = $j(this).attr('data-sort-by'); 27 | 28 | if (sortByValue == 'title-asc') { 29 | $container.isotope({ sortBy: 'title', sortAscending: true }); 30 | 31 | } 32 | if (sortByValue == 'title-dsc') { 33 | $container.isotope({ sortBy: 'title', sortAscending: false }); 34 | } 35 | if (sortByValue == 'title-def') { 36 | $container.isotope({ sortBy : "original-order" }); 37 | } 38 | }); 39 | 40 | // filter items when filter link is clicked 41 | $j('#isotope-categories a, #isotope-tags a').click(function(){ 42 | $j('#isotope-categories a, #isotope-tags a').removeClass('active'); 43 | $j(this).addClass('active'); 44 | 45 | var selector = $j(this).attr('data-filter'); 46 | $container.isotope({ filter: selector }); 47 | return false; 48 | }); 49 | 50 | }); -------------------------------------------------------------------------------- /assets/js/html5shiv.js: -------------------------------------------------------------------------------- 1 | /* 2 | HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | (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(); 5 | 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"; 6 | 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|| 7 | "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); 8 | if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;dn;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0!==a.cookie(b)?(a.cookie(b,"",a.extend({},c,{expires:-1})),!0):!1}}); 9 | -------------------------------------------------------------------------------- /assets/js/jquery.fittext.js: -------------------------------------------------------------------------------- 1 | /*global jQuery */ 2 | /*! 3 | * FitText.js 1.1 4 | * 5 | * Copyright 2011, Dave Rupert http://daverupert.com 6 | * Released under the WTFPL license 7 | * http://sam.zoy.org/wtfpl/ 8 | * 9 | * Date: Thu May 05 14:23:00 2011 -0600 10 | */ 11 | 12 | (function( $ ){ 13 | 14 | $.fn.fitText = function( kompressor, options ) { 15 | 16 | // Setup options 17 | var compressor = kompressor || 1, 18 | settings = $.extend({ 19 | 'minFontSize' : Number.NEGATIVE_INFINITY, 20 | 'maxFontSize' : Number.POSITIVE_INFINITY 21 | }, options); 22 | 23 | return this.each(function(){ 24 | 25 | // Store the object 26 | var $this = $(this); 27 | 28 | // Resizer() resizes items based on the object width divided by the compressor * 10 29 | var resizer = function () { 30 | $this.css('font-size', Math.max(Math.min($this.width() / (compressor*10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize))); 31 | }; 32 | 33 | // Call once to set. 34 | resizer(); 35 | 36 | // Call on resize. Opera debounces their resize by default. 37 | $(window).on('resize.fittext orientationchange.fittext', resizer); 38 | 39 | }); 40 | 41 | }; 42 | 43 | })( jQuery ); 44 | -------------------------------------------------------------------------------- /assets/js/jquery.fitvids.js: -------------------------------------------------------------------------------- 1 | /*global jQuery */ 2 | /*jshint multistr:true browser:true */ 3 | /*! 4 | * FitVids 1.0 5 | * 6 | * Copyright 2011, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com 7 | * Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ 8 | * Released under the WTFPL license - http://sam.zoy.org/wtfpl/ 9 | * 10 | * Date: Thu Sept 01 18:00:00 2011 -0500 11 | */ 12 | 13 | (function( $ ){ 14 | 15 | "use strict"; 16 | 17 | $.fn.fitVids = function( options ) { 18 | var settings = { 19 | customSelector: null 20 | }; 21 | 22 | if(!document.getElementById('fit-vids-style')) { 23 | 24 | var div = document.createElement('div'), 25 | ref = document.getElementsByTagName('base')[0] || document.getElementsByTagName('script')[0]; 26 | 27 | div.className = 'fit-vids-style'; 28 | div.id = 'fit-vids-style'; 29 | div.style.display = 'none'; 30 | div.innerHTML = '­'; 47 | 48 | ref.parentNode.insertBefore(div,ref); 49 | 50 | } 51 | 52 | if ( options ) { 53 | $.extend( settings, options ); 54 | } 55 | 56 | return this.each(function(){ 57 | var selectors = [ 58 | "iframe[src*='blip.tv']", 59 | "iframe[src*='dailymotion.com']", 60 | "iframe[src*='embed.ly']", 61 | "iframe[src*='flickr.com']", 62 | "iframe[src*='funnyordie.com']", 63 | "iframe[src*='hulu.com']", 64 | "iframe[src*='instagram.com']", 65 | "iframe[src*='qik.com']", 66 | "iframe[src*='photobucket.com']", 67 | "iframe[src*='polldaddy.com']", 68 | "iframe[src*='revision3.com']", 69 | "iframe[src*='scribd.com']", 70 | "iframe[src*='slideshare.net']", 71 | "iframe[src*='soundcloud.com']", 72 | "iframe[src*='smugmug.com']", 73 | "iframe[src*='twitter.com']", 74 | "iframe[src*='viddler.com']", 75 | "iframe[src*='vimeo.com']", 76 | "embed[src*='v.wordpress.com']", 77 | "iframe[src*='youtube.com']", 78 | "iframe[src*='youtube-nocookie.com']", 79 | "iframe[src*='youtube-nocookie.com']", 80 | "iframe[src*='kickstarter.com'][src*='video.html']", 81 | "object", 82 | "embed", 83 | ]; 84 | 85 | if (settings.customSelector) { 86 | selectors.push(settings.customSelector); 87 | } 88 | 89 | var $allVideos = $(this).find(selectors.join(',')); 90 | $allVideos = $allVideos.not("object object"); // SwfObj conflict patch 91 | 92 | $allVideos.each(function(){ 93 | var $this = $(this); 94 | if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; } 95 | if (this.tagName.toLowerCase() === 'embed' && $this.attr('src').indexOf('a.blip.tv') !== -1) { console.log('here');return; } 96 | 97 | var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(), 98 | width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(), 99 | aspectRatio = height / width; 100 | if(!$this.attr('id')){ 101 | var videoID = 'fitvid' + Math.floor(Math.random()*999999); 102 | $this.attr('id', videoID); 103 | } 104 | $this.wrap('
').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%"); 105 | $this.removeAttr('height').removeAttr('width'); 106 | }); 107 | }); 108 | }; 109 | })( jQuery ); 110 | -------------------------------------------------------------------------------- /assets/js/placeholder.js: -------------------------------------------------------------------------------- 1 | /*! http://mths.be/placeholder v2.0.7 by @mathias */ 2 | !function(a,b,c){function d(a){var b={},d=/^jQuery\d+$/;return c.each(a.attributes,function(a,c){c.specified&&!d.test(c.name)&&(b[c.name]=c.value)}),b}function e(a,d){var e=this,f=c(e);if(e.value==f.attr("placeholder")&&f.hasClass("placeholder"))if(f.data("placeholder-password")){if(f=f.hide().next().show().attr("id",f.removeAttr("id").data("placeholder-id")),a===!0)return f[0].value=d;f.focus()}else e.value="",f.removeClass("placeholder"),e==b.activeElement&&e.select()}function f(){var a,b=this,f=c(b),g=this.id;if(""==b.value){if("password"==b.type){if(!f.data("placeholder-textinput")){try{a=f.clone().attr({type:"text"})}catch(h){a=c("").attr(c.extend(d(this),{type:"text"}))}a.removeAttr("name").data({"placeholder-password":!0,"placeholder-id":g}).bind("focus.placeholder",e),f.data({"placeholder-textinput":a,"placeholder-id":g}).before(a)}f=f.removeAttr("id").hide().prev().attr("id",g).show()}f.addClass("placeholder"),f[0].value=f.attr("placeholder")}else f.removeClass("placeholder")}var g,h,i="placeholder"in b.createElement("input"),j="placeholder"in b.createElement("textarea"),k=c.fn,l=c.valHooks;i&&j?(h=k.placeholder=function(){return this},h.input=h.textarea=!0):(h=k.placeholder=function(){var a=this;return a.filter((i?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":e,"blur.placeholder":f}).data("placeholder-enabled",!0).trigger("blur.placeholder"),a},h.input=i,h.textarea=j,g={get:function(a){var b=c(a);return b.data("placeholder-enabled")&&b.hasClass("placeholder")?"":a.value},set:function(a,d){var g=c(a);return g.data("placeholder-enabled")?(""==d?(a.value=d,a!=b.activeElement&&f.call(a)):g.hasClass("placeholder")?e.call(a,!0,d)||(a.value=d):a.value=d,g):a.value=d}},i||(l.input=g),j||(l.textarea=g),c(function(){c(b).delegate("form","submit.placeholder",function(){var a=c(".placeholder",this).each(e);setTimeout(function(){a.each(f)},10)})}),c(a).bind("beforeunload.placeholder",function(){c(".placeholder").each(function(){this.value=""})}))}(this,document,jQuery); 3 | -------------------------------------------------------------------------------- /assets/js/respond.min.js: -------------------------------------------------------------------------------- 1 | /*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */ 2 | /*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */ 3 | window.matchMedia=window.matchMedia||function(a){"use strict";var c,d=a.documentElement,e=d.firstElementChild||d.firstChild,f=a.createElement("body"),g=a.createElement("div");return g.id="mq-test-1",g.style.cssText="position:absolute;top:-100em",f.style.background="none",f.appendChild(g),function(a){return g.innerHTML='­',d.insertBefore(f,e),c=42===g.offsetWidth,d.removeChild(f),{matches:c,media:a}}}(document); 4 | 5 | /*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ 6 | (function(a){"use strict";function x(){u(!0)}var b={};a.respond=b,b.update=function(){},b.mediaQueriesSupported=a.matchMedia&&a.matchMedia("only all").matches,b.mediaQueriesSupported;var q,r,t,c=a.document,d=c.documentElement,e=[],f=[],g=[],h={},i=30,j=c.getElementsByTagName("head")[0]||d,k=c.getElementsByTagName("base")[0],l=j.getElementsByTagName("link"),m=[],n=function(){for(var b=0;l.length>b;b++){var c=l[b],d=c.href,e=c.media,f=c.rel&&"stylesheet"===c.rel.toLowerCase();d&&f&&!h[d]&&(c.styleSheet&&c.styleSheet.rawCssText?(p(c.styleSheet.rawCssText,d,e),h[d]=!0):(!/^([a-zA-Z:]*\/\/)/.test(d)&&!k||d.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&m.push({href:d,media:e}))}o()},o=function(){if(m.length){var a=m.shift();v(a.href,function(b){p(b,a.href,a.media),h[a.href]=!0,setTimeout(function(){o()},0)})}},p=function(a,b,c){var d=a.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),g=d&&d.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+b+"$2$3")},i=!g&&c;b.length&&(b+="/"),i&&(g=1);for(var j=0;g>j;j++){var k,l,m,n;i?(k=c,f.push(h(a))):(k=d[j].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,f.push(RegExp.$2&&h(RegExp.$2))),m=k.split(","),n=m.length;for(var o=0;n>o;o++)l=m[o],e.push({media:l.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:f.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},s=function(){var a,b=c.createElement("div"),e=c.body,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",e||(e=f=c.createElement("body"),e.style.background="none"),e.appendChild(b),d.insertBefore(e,d.firstChild),a=b.offsetWidth,f?d.removeChild(e):e.removeChild(b),a=t=parseFloat(a)},u=function(a){var b="clientWidth",h=d[b],k="CSS1Compat"===c.compatMode&&h||c.body[b]||h,m={},n=l[l.length-1],o=(new Date).getTime();if(a&&q&&i>o-q)return clearTimeout(r),r=setTimeout(u,i),void 0;q=o;for(var p in e)if(e.hasOwnProperty(p)){var v=e[p],w=v.minw,x=v.maxw,y=null===w,z=null===x,A="em";w&&(w=parseFloat(w)*(w.indexOf(A)>-1?t||s():1)),x&&(x=parseFloat(x)*(x.indexOf(A)>-1?t||s():1)),v.hasquery&&(y&&z||!(y||k>=w)||!(z||x>=k))||(m[v.media]||(m[v.media]=[]),m[v.media].push(f[v.rules]))}for(var B in g)g.hasOwnProperty(B)&&g[B]&&g[B].parentNode===j&&j.removeChild(g[B]);for(var C in m)if(m.hasOwnProperty(C)){var D=c.createElement("style"),E=m[C].join("\n");D.type="text/css",D.media=C,j.insertBefore(D,n.nextSibling),D.styleSheet?D.styleSheet.cssText=E:D.appendChild(c.createTextNode(E)),g.push(D)}},v=function(a,b){var c=w();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},w=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}();n(),b.update=n,a.addEventListener?a.addEventListener("resize",x,!1):a.attachEvent&&a.attachEvent("onresize",x)})(this); 7 | -------------------------------------------------------------------------------- /assets/js/skip-link-focus-fix.js: -------------------------------------------------------------------------------- 1 | ( function() { 2 | var is_webkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1, 3 | is_opera = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1, 4 | is_ie = navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1; 5 | 6 | if ( ( is_webkit || is_opera || is_ie ) && document.getElementById && window.addEventListener ) { 7 | window.addEventListener( 'hashchange', function() { 8 | var element = document.getElementById( location.hash.substring( 1 ) ); 9 | 10 | if ( element ) { 11 | if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) 12 | element.tabIndex = -1; 13 | 14 | element.focus(); 15 | } 16 | }, false ); 17 | } 18 | })(); 19 | -------------------------------------------------------------------------------- /assets/vendor/jquery.cookie.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery Cookie Plugin v1.4.1 3 | * https://github.com/carhartl/jquery-cookie 4 | * 5 | * Copyright 2013 Klaus Hartl 6 | * Released under the MIT license 7 | */ 8 | !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}}); 9 | -------------------------------------------------------------------------------- /assets/vendor/jquery.isotope.sloppy-masonry.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Isotope custom layout mode that extends masonry in order to work with percentage-sized columns 3 | */ 4 | (function(l,e){e.extend(e.Isotope.prototype,{_sloppyMasonryReset:function(){var b=this.element.width(),d=this.options.sloppyMasonry&&this.options.sloppyMasonry.columnWidth||this.$filteredAtoms.outerWidth(!0)||b;this.sloppyMasonry={cols:Math.round(b/d),columnWidth:d};b=this.sloppyMasonry.cols;for(this.sloppyMasonry.colYs=[];b--;)this.sloppyMasonry.colYs.push(0)},_sloppyMasonryLayout:function(b){var d=this,c=d.sloppyMasonry;b.each(function(){var b=e(this),a=Math.round(b.outerWidth(!0)/c.columnWidth), 5 | a=Math.min(a,c.cols);if(1===a)d._sloppyMasonryPlaceBrick(b,c.colYs);else{var f=c.cols+1-a,h=[],k,g;for(g=0;g").attr(c.extend(d(this),{type:"text"}))}a.removeAttr("name").data({"placeholder-password":f,"placeholder-id":g}).bind("focus.placeholder",e),f.data({"placeholder-textinput":a,"placeholder-id":g}).before(a)}f=f.removeAttr("id").hide().prev().attr("id",g).show()}f.addClass("placeholder"),f[0].value=f.attr("placeholder")}else f.removeClass("placeholder")}function g(){try{return b.activeElement}catch(a){}}var h,i,j="[object OperaMini]"==Object.prototype.toString.call(a.operamini),k="placeholder"in b.createElement("input")&&!j,l="placeholder"in b.createElement("textarea")&&!j,m=c.fn,n=c.valHooks,o=c.propHooks;k&&l?(i=m.placeholder=function(){return this},i.input=i.textarea=!0):(i=m.placeholder=function(){var a=this;return a.filter((k?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":e,"blur.placeholder":f}).data("placeholder-enabled",!0).trigger("blur.placeholder"),a},i.input=k,i.textarea=l,h={get:function(a){var b=c(a),d=b.data("placeholder-password");return d?d[0].value:b.data("placeholder-enabled")&&b.hasClass("placeholder")?"":a.value},set:function(a,b){var d=c(a),h=d.data("placeholder-password");return h?h[0].value=b:d.data("placeholder-enabled")?(""==b?(a.value=b,a!=g()&&f.call(a)):d.hasClass("placeholder")?e.call(a,!0,b)||(a.value=b):a.value=b,d):a.value=b}},k||(n.input=h,o.value=h),l||(n.textarea=h,o.value=h),c(function(){c(b).delegate("form","submit.placeholder",function(){var a=c(".placeholder",this).each(e);setTimeout(function(){a.each(f)},10)})}),c(a).bind("beforeunload.placeholder",function(){c(".placeholder").each(function(){this.value=""})}))}(this,document,jQuery); 3 | -------------------------------------------------------------------------------- /attachment.php: -------------------------------------------------------------------------------- 1 | views->dependencies(); 9 | 10 | Maera()->views->header(); 11 | Maera()->views->render(); 12 | Maera()->views->footer(); 13 | -------------------------------------------------------------------------------- /author.php: -------------------------------------------------------------------------------- 1 | views->dependencies(); 8 | 9 | Maera()->views->header(); 10 | Maera()->views->render(); 11 | Maera()->views->footer(); 12 | -------------------------------------------------------------------------------- /bbpress.php: -------------------------------------------------------------------------------- 1 | views->dependencies(); 4 | 5 | $context = Maera()->cache->get_context(); 6 | $post = Timber::query_post(); 7 | $context['post'] = $post; 8 | $context['content'] = maera_get_echo( 'the_content' ); 9 | 10 | Maera()->views->header(); 11 | Maera()->views->render( 'bbp.twig', $context ); 12 | Maera()->views->footer(); 13 | -------------------------------------------------------------------------------- /buddypress.php: -------------------------------------------------------------------------------- 1 | views->dependencies(); 4 | 5 | $context = Maera()->cache->get_context(); 6 | $post = Timber::query_post(); 7 | $context['post'] = $post; 8 | $context['content'] = maera_get_echo( 'the_content' ); 9 | 10 | Maera()->views->header(); 11 | Maera()->views->render( 'bp.twig', $context ); 12 | Maera()->views->footer(); 13 | -------------------------------------------------------------------------------- /comments.php: -------------------------------------------------------------------------------- 1 | views->render( array( 21 | 'comments-' . $post->ID . '.twig', 22 | $post->post_type . '-comments.twig', 23 | 'comments.twig' 24 | )); 25 | -------------------------------------------------------------------------------- /content.php: -------------------------------------------------------------------------------- 1 | views->render( array( 8 | 'content-' . $post->ID . '.twig', 9 | 'content-' . $post->post_type . '.twig', 10 | 'content.twig' 11 | )); 12 | -------------------------------------------------------------------------------- /core-shell/assets/images/grid-back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/core-shell/assets/images/grid-back.png -------------------------------------------------------------------------------- /core-shell/assets/js/vendor/menu.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $(function() { 3 | $( ".menu-button" ).click( function() { 4 | $( "body" ).toggleClass( "show-menu" ); 5 | }); 6 | $( "#layout, .page-header" ).click( function() { 7 | $( "body" ).removeClass( "show-menu" ); 8 | }); 9 | }); 10 | })(jQuery); -------------------------------------------------------------------------------- /core-shell/views/base.twig: -------------------------------------------------------------------------------- 1 | {# 3 |
4 |
5 |
6 | {% do action( 'maera/wrap/before', post.ID ) %} 7 | {% do action( 'maera/content/before', post.ID ) %} 8 | {% do action( 'maera/main/before', post.ID ) %} 9 | {% block main %}{{ fn( 'esc_html__', 'Sorry, no content', 'maera' ) }}{% endblock %} 10 | {% do action( 'maera/main/after', post.ID ) %} 11 |
12 |
13 | 18 |
19 | {% do action( 'maera/content/after' ) %} 20 | {% do action( 'maera/footer/before', post.ID ) %} 21 |
22 | {% do action( 'maera/footer/start', post.ID ) %} 23 | {% include 'footer.twig' %} 24 | {% do action( 'maera/footer/end', post.ID ) %} 25 |
26 | {% do action( 'maera/footer/after', post.ID ) %} 27 |
28 | {{ function( 'wp_footer' ) }} 29 | 30 | -------------------------------------------------------------------------------- /core-shell/views/content-single-entry-header.twig: -------------------------------------------------------------------------------- 1 | {# 2 | This file is empty on purpose. 3 | #} 4 | -------------------------------------------------------------------------------- /core-shell/views/header.twig: -------------------------------------------------------------------------------- 1 | 2 | {% block head %} 3 | 4 | 5 | 6 | 7 | 8 | {% if wp_title %} 9 | {{ function( 'wp_title', '|', true, 'right' ) }} 10 | {% else %} 11 | {{ site.name }} 12 | {% endif %} 13 | 14 | 15 | 16 | {{ function( 'wp_head' ) }} 17 | 18 | 19 | {% endblock %} 20 | 21 | 22 | {{ fn('esc_html__', 'Skip to main content', 'maera') }} 23 | 24 | {% if function( 'has_nav_menu', 'primary_navigation' ) %} 25 | 26 | 36 | {% endif %} 37 | {% do action( 'get_header' ) %} 38 | {% do action( 'maera/header/before', post.ID ) %} 39 | 53 | {% do action( 'maera/header/after', post.ID ) %} 54 | -------------------------------------------------------------------------------- /core-shell/views/macros/column_classes.html.twig: -------------------------------------------------------------------------------- 1 | {% macro column_classes(sizes) %} 2 | {% if sizes is iterable %} 3 | {% for size in sizes %} 4 | {% if size.mobile %} u-1 u-sm-{{ size.mobile * 2 }}-24 {% endif %} 5 | {% if size.tablet %} u-1 u-sm-{{ size.tablet * 2 }}-24 {% endif %} 6 | {% if size.medium %} u-1 u-md-{{ size.medium * 2 }}-24 {% endif %} 7 | {% if size.large %} u-1 u-lg-{{ size.large * 2 }}-24 {% endif %} 8 | {% endfor %} 9 | {% endif %} 10 | {% endmacro %} 11 | -------------------------------------------------------------------------------- /core-shell/views/macros/grid_classes.html.twig: -------------------------------------------------------------------------------- 1 | {% macro container() %}g{% endmacro %} 2 | 3 | {% macro row() %}g{% endmacro %} 4 | 5 | {% macro column() %}u{% endmacro %} 6 | -------------------------------------------------------------------------------- /core-shell/views/pagination.twig: -------------------------------------------------------------------------------- 1 | {# 3 | {% if pagination.prev %} 4 |
  • 5 | {% endif %} 6 | 7 | {% for page in pagination.pages %} 8 |
  • 9 | {% if page.link %} 10 | {{ page.title }} 11 | {% else %} 12 | {{ page.title }} 13 | {% endif %} 14 |
  • 15 | {% endfor %} 16 | 17 | {% if pagination.next %} 18 |
  • 19 | {% endif %} 20 | 21 | -------------------------------------------------------------------------------- /edd_templates/widget-cart-checkout.php: -------------------------------------------------------------------------------- 1 | 2 |
  • " . edd_currency_filter( edd_format_amount( edd_get_cart_subtotal() ) ); ?>
  • 3 |
  • 4 | -------------------------------------------------------------------------------- /edd_templates/widget-cart-item.php: -------------------------------------------------------------------------------- 1 |
  • 2 |
    {item_title}
    3 |
     {item_amount} 
    4 |
    5 |
  • 6 | -------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | views->render( 'footer.twig' ); 9 | -------------------------------------------------------------------------------- /functions.php: -------------------------------------------------------------------------------- 1 | views->render( 'header.twig' ); 9 | -------------------------------------------------------------------------------- /includes/admin/tabs/docs.php: -------------------------------------------------------------------------------- 1 | 'General & FAQ', 5 | 'templating' => 'Templating', 6 | 'shells' => 'Shells', 7 | 'theme-supports' => 'Theme Supports', 8 | 'actions' => 'Actions & Hooks', 9 | 'filters' => 'Filters', 10 | ); 11 | ?> 12 |
    13 |

    Theme documentation.

    14 |

    You can also access the most recent docs in the Repository's Wiki on github.

    15 |
    16 | 17 |
    18 |
      19 | $docs_tab_label ) : ?> 20 |
    • 21 | 22 |
    23 | 24 | $docs_tab_label ) : ?> 25 |
    26 |

    27 | 28 |
    29 | 30 |
    31 | 32 | 37 | -------------------------------------------------------------------------------- /includes/admin/tabs/docs/actions.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |

    4 | Available Actions:

    5 | 6 |

    Below you can see a list of all the available actions in the Maera theme.

    7 | 8 |

    9 | Generic actions

    10 | 11 |

    maera/admin/save

    12 | 13 |

    This action is run when the admin page is saved. 14 | An example usage is when we import the customizer options in a shell that uses a compiler. In that case, when we perform the import we may want to trigger the shell's compiler so that the stylesheets get re-generated, caches dumped etc.

    15 | 16 |

    maera/shell/include_modules

    17 | 18 |

    This action is run when the shell is being initialized.

    19 | 20 |

    21 | Content-injecting actions

    22 | 23 |
      24 |
    • maera/wrap/before
    • 25 |
    • maera/wrap/after
    • 26 |
    • maera/content/before
    • 27 |
    • maera/content/after
    • 28 |
    • maera/main/before
    • 29 |
    • maera/main/after
    • 30 |
    • maera/page/pre_content
    • 31 |
    • maera/page/after_content
    • 32 |
    • maera/entry/footer
    • 33 |
    • maera/teaser/start
    • 34 |
    • maera/single/top
    • 35 |
    • maera/single/pre_content
    • 36 |
    • maera/single/after_content
    • 37 |
    • maera/in_article/top
    • 38 |
    • maera/footer/before
    • 39 |
    • maera/footer/start
    • 40 |
    • maera/footer/content
    • 41 |
    • maera/footer/end
    • 42 |
    • maera/footer/after
    • 43 |
    • maera/header/before
    • 44 |
    • maera/header/after
    • 45 |
    • maera/index/begin
    • 46 |
    • maera/index/end
    • 47 |
    • maera/in_loop/begin
    • 48 |
    • maera/in_loop/end
    • 49 |
    50 | 51 |
    52 | 53 |
    54 | -------------------------------------------------------------------------------- /includes/admin/tabs/docs/general.php: -------------------------------------------------------------------------------- 1 |

    Maera is a developer-friendly theme that allows you to quickly prototype sites and extend it with your own custom plugins.

    2 |

    It's a kick-ass open-minded theming framework.

    3 |

    It is completely open-source, licensed under the MIT license. 4 | In its heart it uses the twig templating engine and the WordPress Customizer.

    5 | 6 |

    With Maera we're introducing the concept of theme shells. An easy way to completely customize the theme with your own markup, css, scripts and functionality to meet your own needs!

    7 | -------------------------------------------------------------------------------- /includes/admin/tabs/docs/theme-supports.php: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |

    When building your own shell, you can activate parts of the Maera framework using theme supports.
    4 | Theme supports provide functionality and classes that you can use in your shells without requiring you to write your own code, thus taking advantage of Maera's structure.

    5 | 6 |

    Theme supports are usually loaded using the after_setup_theme action.
    7 | In addition to the default theme features Kirki includes the following extra features:

    8 | 9 |
    <?php
    10 | 
    11 | function my_theme_supports() {
    12 | 
    13 |     // Add breadcrumbs support.
    14 |     // prompts for the installation of the Breadcrumb Trail plugin: https://wordpress.org/plugins/breadcrumb-trail/
    15 |     // You will then have to configure them using this as an example: https://github.com/justintadlock/breadcrumb-trail#breadcrumb-trail
    16 |     add_theme_support( 'breadcrumbs' );
    17 | 
    18 |     // Add Less Compiler support
    19 |     // Prompts the user to install the compiler plugin: https://wordpress.org/plugins/lessphp/
    20 |     add_theme_support( 'less_compiler' )
    21 | 
    22 |     // Add SASS/SCSS Compiler support
    23 |     // Prompts the user to install the compiler plugin: https://wordpress.org/plugins/lessphp/
    24 |     add_theme_support( 'sass_compiler' )
    25 | 
    26 | }
    27 | add_action( 'after_setup_theme', 'my_theme_supports' );
    28 | 
    29 | ?>
    30 | 31 |
    32 | 33 |
    34 | -------------------------------------------------------------------------------- /includes/admin/tabs/general.php: -------------------------------------------------------------------------------- 1 |
    2 |

    Welcome to the Maera Theme

    3 |
    4 |

    Maera is one of the most versatile and modular WordPress Theme Frameworks, allowing both developers and novice users to build amazing sites and take advantage of its unique features.

    5 |
    6 |

    Maera introduces the concept of shells, essentially child themes built as plugins that can change and affect every aspect of your theme and presentation, allowing you to build a completely customized experience for your site and your users.

    7 | 8 |
    9 | 10 |
    11 | 12 |

    Modular in nature

    13 |

    The core of the theme is a set of libraries that allows you to extend it and use it however you like! Using Shells and plugins you can add or remove features and customize your site using just the bits and pieces that you need.

    14 |
    15 | 16 |
    17 | 18 |

    Plugins

    19 |

    Instead of bundling extra libraries in the plugin, we are requiring you to install some 3rd-party plugins. This way you can get updates for them without the need to update the core of your theme, while at the same time makes it easier for developers to tackle issues when the need arises.

    20 |
    21 | 22 |
    23 | 24 |

    Documentation

    25 |

    We have extended documentation both in the [repository wiki on github](https://github.com/presscodes/maera/wiki) as well as embeded in the theme options page. Just click on the Documentation tab on the top and you'll be able to learn more. 26 |

    27 | 28 |
    29 |
    30 | 31 |
    32 | 33 |

    Uses Twig

    34 |

    Twig is an amazing templating engine that uses a simple syntax, allowing non-php developers to understand and tweak their own templates, further customizing their own site. You can find these templates in the /views folder in your theme.

    35 |
    36 | 37 |
    38 | 39 |

    Fast and SEO Optimized

    40 |

    Taking advantage of internal caching and SEO Optimizations, you can be sure your site will be fast and performant for users as well as search engines.

    41 |
    42 | 43 |
    44 | 45 |

    Accessible

    46 |

    We designed this theme with accessibility standards in mind so everyone will be able to use your sites and try to educate developers so that all future shells will also be accessible. 47 |

    48 | 49 |
    50 | -------------------------------------------------------------------------------- /includes/admin/tabs/settings.php: -------------------------------------------------------------------------------- 1 | 'core', 6 | 'import_data' => '', 7 | 'dev_mode' => 1, 8 | 'cache' => '0', 9 | 'cache_mode' => 'default', 10 | ) ); 11 | 12 | // Get the available shells 13 | $available_shells = apply_filters( 'maera/shells/available', array() ); 14 | 15 | $cache_modes = array( 16 | array( 'value' => 'none', 'label' => esc_html__( 'No Caching', 'maera' ) ), 17 | array( 'value' => 'object', 'label' => esc_html__( 'WP Object Caching', 'maera' ) ), 18 | array( 'value' => 'transient', 'label' => esc_html__( 'Transients', 'maera' ) ), 19 | array( 'value' => 'default', 'label' => esc_html__( 'Default', 'maera' ) ), 20 | ); 21 | 22 | $settings = get_option( 'maera_admin_options', $maera_admin_options ); 23 | 24 | $settings['shell'] = ! isset( $settings['shell'] ) ? 'core' : $settings['shell']; 25 | $settings['import_data'] = ! isset( $settings['import_data'] ) ? '' : $settings['import_data']; 26 | $settings['dev_mode'] = ! isset( $settings['dev_mode'] ) ? 0 : $settings['dev_mode']; 27 | $settings['cache'] = ! isset( $settings['cache'] ) ? 0 : $settings['cache']; 28 | $settings['cache_mode'] = ! isset( $settings['cache_mode'] ) ? 'none' : $settings['cache_mode']; 29 | 30 | ?> 31 |
    32 | 33 | 34 | 35 | 36 |
    37 |

    38 |
    39 | 40 |
    41 | 42 | /> 43 |
    44 | 45 |
    46 |
    47 | 48 | 49 |
    50 |

    51 |
    52 |

    53 | value='1'> 54 | 55 |

    56 | 57 | 58 |
    59 |
    60 |

    61 | 62 | /> 63 | 64 | 65 |
    66 |
    67 | 68 |
    69 |

    70 |
    71 |

    72 | $value ) { 79 | $options[$theme_mod] = ( 'css_cache' != $theme_mod ) ? maybe_unserialize( $value ) : ''; 80 | } 81 | 82 | $json = json_encode( $options ); 83 | } else { 84 | $json = '[]'; 85 | } 86 | 87 | echo ''; 88 | ?> 89 | 90 |

    91 | 92 |
    93 |
    94 |

    95 | 96 |
    97 | -------------------------------------------------------------------------------- /includes/class-jetpack-color.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/includes/class-jetpack-color.php -------------------------------------------------------------------------------- /includes/class-maera-caching.php: -------------------------------------------------------------------------------- 1 | dev->dev_mode() ) { 24 | // Get our styles using the maera/styles filter 25 | $data = apply_filters( 'maera/styles', null ); 26 | } else { 27 | // Get the cached CSS from the database 28 | $cache = get_theme_mod( 'css_cache', '' ); 29 | // If the transient does not exist, then create it. 30 | if ( ! $cache || empty( $cache ) || '' == $cache ) { 31 | // Get our styles using the maera/styles filter 32 | $data = apply_filters( 'maera/styles', null ); 33 | // Set the transient for 24 hours. 34 | set_theme_mod( 'css_cache', $data ); 35 | } else { 36 | $data = $cache; 37 | } 38 | } 39 | 40 | // Add the CSS inline. 41 | // See http://codex.wordpress.org/Function_Reference/wp_add_inline_style#Examples 42 | wp_add_inline_style( 'maera', $data ); 43 | 44 | } 45 | 46 | /** 47 | * Apply global Timber customizations 48 | */ 49 | function timber_customizations() { 50 | 51 | // Early exit if Timber is not installed 52 | if ( ! class_exists( 'Timber' ) ) { 53 | return; 54 | } 55 | global $wp_customize; 56 | 57 | if ( ! Maera()->dev->dev_mode() ) { 58 | 59 | // Turn on Timber caching. 60 | // See https://github.com/jarednova/timber/wiki/Performance#cache-the-twig-file-but-not-the-data 61 | 62 | // This is a bit buggy right now on some hosts so we're disabling it. 63 | // Timber::$cache = true; 64 | $this->cache_mode(); 65 | 66 | 67 | } else { 68 | 69 | TimberLoader::CACHE_NONE; 70 | Timber::$cache = false; 71 | 72 | $_SERVER['QUICK_CACHE_ALLOWED'] = FALSE; 73 | Maera_Helper::define( 'DONOTCACHEPAGE', TRUE ); 74 | 75 | } 76 | 77 | } 78 | 79 | /** 80 | * Timber caching 81 | */ 82 | public function cache_duration() { 83 | 84 | $theme_options = get_option( 'maera_admin_options', array() ); 85 | 86 | $cache_int = isset( $theme_options['cache'] ) ? intval( $theme_options['cache'] ) : 0; 87 | 88 | if ( 0 == $cache_int ) { 89 | 90 | // No need to proceed if cache=0 91 | return false; 92 | 93 | } 94 | 95 | // Convert minutes to seconds 96 | return ( $cache_int * 60 ); 97 | 98 | } 99 | 100 | /** 101 | * Custom implementation for get_context method. 102 | * Implements caching 103 | */ 104 | public function get_context() { 105 | 106 | if ( Maera()->dev->dev_mode() ) { 107 | $cached = false; 108 | } else { 109 | $cache = wp_cache_get( 'context', 'maera' ); 110 | $cached = ( $cache ) ? true : false; 111 | } 112 | 113 | if ( $cached && $cache ) { 114 | return $cache; 115 | } else { 116 | $context = Maera()->timber->get_context(); 117 | wp_cache_set( 'context', $context, 'maera' ); 118 | return $context; 119 | } 120 | 121 | } 122 | 123 | public function cache_mode() { 124 | 125 | $options = get_option( 'maera_admin_options', array() ); 126 | $cache_mode = isset( $options['cache_mode'] ) ? $options['cache_mode'] : 'default'; 127 | 128 | if ( 'none' == $cache_mode ) { 129 | $mode = TimberLoader::CACHE_NONE; 130 | } else if ( 'object' == $cache_mode ) { 131 | $mode = TimberLoader::CACHE_OBJECT; 132 | } else if ( 'transient' == $cache_mode ) { 133 | $mode = TimberLoader::CACHE_TRANSIENT; 134 | } else { 135 | $mode = TimberLoader::CACHE_USE_DEFAULT; 136 | } 137 | 138 | return $mode; 139 | 140 | } 141 | 142 | /** 143 | * Change Timber's cache folder. 144 | * We want to use wp-content/cache/timber 145 | */ 146 | function change_twig_cache_dir() { 147 | return WP_CONTENT_DIR . '/cache/timber'; 148 | } 149 | 150 | } 151 | -------------------------------------------------------------------------------- /includes/class-maera-core-customizer.php: -------------------------------------------------------------------------------- 1 | add_section( 'maera_options', array( 21 | 'title' => esc_html__( 'Maera Options', 'maera' ), 22 | 'priority' => 1, 23 | ) ); 24 | 25 | } 26 | 27 | /** 28 | * Add the setting 29 | */ 30 | function add_settings( $wp_customize ) { 31 | 32 | $wp_customize->add_setting( 'maera_admin_options[shell]', array( 33 | 'default' => 'core', 34 | 'type' => 'option', 35 | 'capability' => 'edit_theme_options', 36 | 'sanitize_callback' => array( $this, 'sanitize_text_value' ), 37 | 38 | ) ); 39 | 40 | $wp_customize->add_setting( 'maera_admin_options[dev_mode]', array( 41 | 'default' => 'core', 42 | 'type' => 'option', 43 | 'capability' => 'edit_theme_options', 44 | 'sanitize_callback' => array( $this, 'sanitize_checkbox' ), 45 | ) ); 46 | 47 | $wp_customize->add_setting( 'maera_admin_options[cache]', array( 48 | 'default' => 'core', 49 | 'type' => 'option', 50 | 'capability' => 'edit_theme_options', 51 | 52 | ) ); 53 | 54 | $wp_customize->add_setting( 'maera_admin_options[cache_mode]', array( 55 | 'default' => 'core', 56 | 'type' => 'option', 57 | 'capability' => 'edit_theme_options', 58 | 'sanitize_callback' => array( $this, 'sanitize_text_value' ), 59 | ) ); 60 | 61 | $wp_customize->add_setting( 'maera_admin_options[reset]', array( 62 | 'default' => 'core', 63 | 'type' => 'option', 64 | 'capability' => 'edit_theme_options', 65 | 'sanitize_callback' => array( $this, 'reset_sanitize_callback' ), 66 | ) ); 67 | 68 | } 69 | 70 | /** 71 | * Add the controls 72 | */ 73 | function add_controls( $wp_customize ) { 74 | 75 | // Get the available shells and format the array properly 76 | $available_shells = apply_filters( 'maera/shells/available', array() ); 77 | $shells = array(); 78 | foreach ( $available_shells as $available_shell ) { 79 | $shells[$available_shell['value']] = $available_shell['label']; 80 | } 81 | 82 | $wp_customize->add_control( 'maera_shell', array( 83 | 'label' => esc_html__( 'Shell', 'maera' ), 84 | 'section' => 'maera_options', 85 | 'settings' => 'maera_admin_options[shell]', 86 | 'description' => esc_html__( 'You can change the active shell here. Please note that the changes will not take effect immediately. You will have to save and your selection and then refresh this page. All current options will be lost, so we advise you to first export them from the "Theme Options" page on your dashboard.', 'maera' ), 87 | 'type' => 'radio', 88 | 'choices' => $shells, 89 | ) ); 90 | 91 | $wp_customize->add_control( 'maera_dev_mode', array( 92 | 'label' => esc_html__( 'Enable Development Mode', 'maera' ), 93 | 'section' => 'maera_options', 94 | 'settings' => 'maera_admin_options[dev_mode]', 95 | 'type' => 'checkbox', 96 | ) ); 97 | 98 | $wp_customize->add_control( 'maera_cache_mode', array( 99 | 'label' => esc_html__( 'Cache mode.', 'maera' ), 100 | 'section' => 'maera_options', 101 | 'settings' => 'maera_admin_options[cache_mode]', 102 | 'type' => 'select', 103 | 'default' => 'none', 104 | 'choices' => array( 105 | 'none' => esc_html__( 'No Caching', 'maera' ), 106 | 'object' => esc_html__( 'WP Object Caching', 'maera' ), 107 | 'transient' => esc_html__( 'Transients', 'maera' ), 108 | 'default' => esc_html__( 'Default', 'maera' ), 109 | ), 110 | ) ); 111 | 112 | $wp_customize->add_control( 'maera_reset', array( 113 | 'label' => esc_html__( 'Reset', 'maera' ), 114 | 'section' => 'maera_options', 115 | 'description' => esc_html__( 'Please enter RESET to reset the theme mods.', 'maera' ), 116 | 'settings' => 'maera_admin_options[reset]', 117 | 'type' => 'text', 118 | 'default' => '', 119 | ) ); 120 | 121 | } 122 | 123 | public function reset_sanitize_callback( $input ) { 124 | 125 | if ( 'reset' == strtolower( $input ) ) { 126 | remove_theme_mods(); 127 | } 128 | 129 | return ''; 130 | 131 | } 132 | 133 | function sanitize_checkbox( $checked ) { 134 | return ( ( isset( $checked ) && true == $checked ) ? true : false ); 135 | } 136 | 137 | function sanitize_text_field( $input ) { 138 | return sanitize_text_field( $input ); 139 | } 140 | } 141 | -------------------------------------------------------------------------------- /includes/class-maera-development.php: -------------------------------------------------------------------------------- 1 | dev_mode() ) { 10 | $this->dev_mode = true; 11 | $this->jetpack_dev_mode(); 12 | } 13 | 14 | } 15 | 16 | /** 17 | * Detect if dev mode is active OR if we're on the customizer 18 | * @return bool 19 | */ 20 | public function dev_mode() { 21 | 22 | global $wp_customize; 23 | $options = get_option( 'maera_admin_options', array() ); 24 | 25 | // If we're on the customizer, return true. 26 | if ( isset( $wp_customize ) ) { 27 | return; 28 | } 29 | 30 | // If dev mode is enabled on the dashboard, return true; 31 | if ( isset( $options['dev_mode'] ) && 1 == $options['dev_mode'] ) { 32 | return true; 33 | } 34 | 35 | return false; 36 | 37 | } 38 | 39 | /** 40 | * set JETPACK_DEV_DEBUG to true if not already defined 41 | */ 42 | function jetpack_dev_mode() { 43 | 44 | if ( ! defined( 'JETPACK_DEV_DEBUG' ) ) { 45 | define( 'JETPACK_DEV_DEBUG', true); 46 | } 47 | 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /includes/class-maera-edd-compatibility.php: -------------------------------------------------------------------------------- 1 | ID, 'edd_coming_soon', true ); 23 | if ( $coming_soon ) { 24 | $classes[] = 'edd_coming_soon'; 25 | } 26 | 27 | } 28 | 29 | return $classes; 30 | 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /includes/class-maera-edd-customizer.php: -------------------------------------------------------------------------------- 1 | add_section( 'maera_edd', array( 24 | 'title' => esc_html__( 'Easy Digital Downloads', 'maera' ), 25 | 'priority' => 999, 26 | ) ); 27 | 28 | } 29 | 30 | /** 31 | * Create the customizer controls. 32 | * Depends on the Kirki Customizer plugin. 33 | */ 34 | function create_settings( $controls ) { 35 | 36 | global $edd_options; 37 | 38 | $controls[] = array( 39 | 'type' => 'select', 40 | 'setting' => 'checkout_color', 41 | 'label' => esc_html__( 'Button color', 'maera' ), 42 | 'subtitle' => esc_html__( 'Select the button color for the purchase/buynow button.', 'maera' ) . ' ' . esc_html__( 'Please note that this change will be applied after you save the options and refresh (no live-preview available).', 'maera' ), 43 | 'section' => 'maera_edd', 44 | 'priority' => 12, 45 | 'default' => $edd_options['checkout_color'], 46 | 'choices' => array( 47 | 'white' => esc_html__( 'White', 'edd' ), 48 | 'gray' => esc_html__( 'Gray', 'edd' ), 49 | 'blue' => esc_html__( 'Blue', 'edd' ), 50 | 'red' => esc_html__( 'Red', 'edd' ), 51 | 'green' => esc_html__( 'Green', 'edd' ), 52 | 'yellow' => esc_html__( 'Yellow', 'edd' ), 53 | 'orange' => esc_html__( 'Orange', 'edd' ), 54 | 'dark-gray' => esc_html__( 'Dark Gray', 'edd' ), 55 | ), 56 | 57 | ); 58 | 59 | $controls[] = array( 60 | 'type' => 'select', 61 | 'setting' => 'hover_type', 62 | 'label' => esc_html__( 'Hover Type', 'maera' ), 63 | 'subtitle' => esc_html__( 'Select the hover type for the grid display.', 'maera' ), 64 | 'section' => 'maera_edd', 65 | 'priority' => 13, 66 | 'default' => 'edd', 67 | 'choices' => array( 68 | 'edd' => esc_html__( 'EDD style', 'maera' ), 69 | 'zoe' => esc_html__( 'Zoe', 'maera' ), 70 | ), 71 | 72 | ); 73 | 74 | $controls[] = array( 75 | 'type' => 'checkbox', 76 | 'setting' => 'edd_variables_dropdown', 77 | 'label' => esc_html__( 'Replace variables radio select with a dropdown', 'maera' ), 78 | 'section' => 'maera_edd', 79 | 'default' => 0, 80 | 'priority' => 20, 81 | ); 82 | 83 | $controls[] = array( 84 | 'type' => 'radio', 85 | 'mode' => 'buttonset', 86 | 'setting' => 'filter_mode', 87 | 'label' => esc_html__( 'Downloads filter mode', 'maera' ), 88 | 'subtitle' => esc_html__( 'Please note that this change will be applied after you save the options and refresh (no live-preview available).', 'maera' ), 89 | 'section' => 'maera_edd', 90 | 'default' => 'php', 91 | 'priority' => 1, 92 | 'choices' => array( 93 | 'isotope' => esc_html__( 'Isotope', 'maera' ), 94 | 'php' => esc_html__( 'PHP', 'maera' ), 95 | ), 96 | ); 97 | 98 | return $controls; 99 | 100 | } 101 | 102 | function sync_edd_colors_options() { 103 | global $edd_options; 104 | 105 | $checkout_color = get_theme_mod( 'checkout_color' ); 106 | 107 | if ( $checkout_color != $edd_options['checkout_color'] ) { 108 | $edd_options['checkout_color'] = $checkout_color; 109 | update_option( 'edd_settings', $edd_options ); 110 | } 111 | } 112 | 113 | function sync_edd_colors_theme_mod() { 114 | global $edd_options; 115 | 116 | $checkout_color = get_theme_mod( 'checkout_color' ); 117 | 118 | if ( $checkout_color != $edd_options['checkout_color'] ) { 119 | set_theme_mod( 'checkout_color', $edd_options['checkout_color'] ); 120 | } 121 | } 122 | 123 | } 124 | -------------------------------------------------------------------------------- /includes/class-maera-edd-mods.php: -------------------------------------------------------------------------------- 1 | '; 62 | if ( $prices ) { 63 | echo ''; 78 | } 79 | do_action( 'edd_after_price_options_list', $download_id, $prices, $type ); 80 | 81 | echo ''; 82 | do_action( 'edd_after_price_options', $download_id ); 83 | 84 | } 85 | 86 | } 87 | -------------------------------------------------------------------------------- /includes/class-maera-edd-scripts.php: -------------------------------------------------------------------------------- 1 | post_id = $post_id; 14 | 15 | } 16 | 17 | /** 18 | * Build CSS from Tonesque 19 | * 20 | * @uses get_the_ID(), is_single(), get_post_meta(), colorposts_get_post_image(), update_post_meta(), apply_filters() 21 | * 22 | * @since Color Posts 1.0 23 | */ 24 | function colors() { 25 | 26 | $thumb_id = get_post_thumbnail_id( $this->post_id ); 27 | $thumb_url = wp_get_attachment_image_src( $thumb_id ); 28 | $thumb_url = $thumb_url[0]; 29 | $value = array(); 30 | 31 | if ( $thumb_url ) { 32 | // Grab color from post meta 33 | $tonesque = get_post_meta( $thumb_id, '_post_colors', true ); 34 | 35 | // No color? Let's get one 36 | if ( empty( $tonesque ) ) { 37 | $tonesque = new Tonesque( $thumb_url ); 38 | $tonesque = array( 39 | 'color' => $tonesque->color(), 40 | 'contrast' => $tonesque->contrast(), 41 | ); 42 | 43 | if ( $tonesque['color'] ) { 44 | update_post_meta( $this->post_id, '_post_colors', $tonesque ); 45 | } else { 46 | return; 47 | } 48 | } 49 | 50 | extract( $tonesque ); 51 | } 52 | if ( ! isset( $color ) || ! $color ) { 53 | $color = 'FFFFFF'; 54 | } 55 | 56 | $value['color'] = '#' . $color; 57 | 58 | $white = new Jetpack_Color( '#FFFFFF' ); 59 | $color = new Jetpack_Color( '#' . $color ); 60 | $value['luminosity'] = $color->toLuminosity(); 61 | 62 | $value['fontcolor'] = ( $value['luminosity'] < 0.5 ) ? '#FFFFFF' : '#222222'; 63 | $value['readable'] = '#' . $color->getReadableContrastingColor( $white, 6 )->toHex(); 64 | 65 | return $value; 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /includes/class-maera-edd.php: -------------------------------------------------------------------------------- 1 | esc_html__( 'Primary Navigation', 'maera' ) 71 | ) ); 72 | 73 | // Add post thumbnails ( http://codex.wordpress.org/Post_Thumbnails ) 74 | add_theme_support( 'post-thumbnails' ); 75 | 76 | // Add post formats ( http://codex.wordpress.org/Post_Formats ) 77 | add_theme_support( 'post-formats', array( 'aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat' ) ); 78 | 79 | // Enable support for HTML5 markup. 80 | add_theme_support( 'html5', array( 81 | 'comment-list', 82 | 'search-form', 83 | 'comment-form', 84 | 'gallery', 85 | 'caption', 86 | ) ); 87 | 88 | // Tell the TinyMCE editor to use a custom stylesheet 89 | add_editor_style( '/assets/css/editor-style.css' ); 90 | 91 | // Add title-tag support (introduced in WP 4.1) 92 | add_theme_support( 'title-tag' ); 93 | 94 | // Add WooCommerce support 95 | add_theme_support( 'woocommerce' ); 96 | 97 | // site-logo is included in Jetpack 3.2 and above 98 | add_theme_support( 'site-logo' ); 99 | 100 | $lang_dir = get_template_directory() . '/languages'; 101 | $custom_path = WP_LANG_DIR . '/maera-' . get_locale() . '.mo'; 102 | 103 | if ( file_exists( $custom_path ) ) { 104 | load_textdomain( 'maera', $custom_path ); 105 | } else { 106 | load_theme_textdomain( 'maera', false, $lang_dir ); 107 | } 108 | } 109 | 110 | function render_title() { 111 | if ( ! function_exists( '_wp_render_title_tag' ) ) : ?> 112 | <?php wp_title( '|', true, 'right' ); ?> 113 | plugins = $plugins; 10 | 11 | add_action( 'admin_notices', array( $this, 'required_plugins_notices' ) ); 12 | 13 | add_filter( 'maera/plugins/required', array( $this, 'add_filter' ) ); 14 | 15 | } 16 | 17 | function add_filter( $required_plugins ) { 18 | return array_merge( $required_plugins, $this->plugins ); 19 | } 20 | 21 | /** 22 | * Test if all required plugins are active or not. 23 | * If they are not, returns true; 24 | */ 25 | public function test_missing() { 26 | 27 | $plugins = apply_filters( 'maera/plugins/required', array() ); 28 | $status = get_transient( 'maera_required_plugins_status' ); 29 | 30 | // If the transient exists and is set to 'ok' then no need to proceed. 31 | if ( false === $status && 'ok' == $status ) { 32 | return 'ok'; 33 | } 34 | 35 | if ( ! function_exists( 'is_plugin_active' ) ) { 36 | include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); 37 | } 38 | 39 | foreach ( $plugins as $plugin ) { 40 | if ( ! is_plugin_active( $plugin['slug'] . '/' . $plugin['file'] ) ) { 41 | return 'bad'; 42 | } 43 | } 44 | 45 | // If we're good to go, set the transient value to 'ok' for 2 minutes 46 | set_transient( 'maera_required_plugins_status', 'ok', 60 * 2 ); 47 | 48 | return 'ok'; 49 | 50 | } 51 | 52 | /** 53 | * Add the admin notices for the required plugins 54 | */ 55 | function required_plugins_notices() { 56 | 57 | $plugin_messages = array(); 58 | 59 | include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); 60 | 61 | foreach ( $this->plugins as $plugin ) { 62 | $install_link = 'Install and activate ' . $plugin['name'] . ''; 63 | if ( ! is_plugin_active( $plugin['slug'] . '/' . $plugin['file'] ) ) { 64 | $plugin_url = 'https://wordpress.org/plugins/' . $plugin['slug'] . '/'; 65 | $install_url = self_admin_url( 'update.php?action=install-plugin&plugin=' . $plugin['slug'] . '&_wpnonce=install-plugin_' . $plugin['slug'] ); 66 | $plugin_messages[] = 'This theme requires you to install and activate the ' . $plugin['name'] . ' plugin, ' . $install_link . '.'; 67 | } 68 | } 69 | 70 | if ( 0 < count( $plugin_messages ) ) { 71 | echo '
    '; 72 | 73 | foreach( $plugin_messages as $message ) { 74 | echo '

    ' . $message . '

    '; 75 | } 76 | 77 | echo '
    '; 78 | } 79 | 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /includes/class-maera-styles.php: -------------------------------------------------------------------------------- 1 | plugins->test_missing() ) { 16 | get_template_part( 'lib/required-error' ); 17 | return; 18 | } 19 | 20 | } 21 | 22 | /** 23 | * Get the header. 24 | */ 25 | public function header() { 26 | get_header(); 27 | } 28 | 29 | /** 30 | * Old, naming, this is just a fallback to the render() method. 31 | */ 32 | public function main( $templates = null, $context = null ) { 33 | $this->render( $templates, $context ); 34 | } 35 | 36 | /** 37 | * Render a template 38 | * This will render the necessary twig template 39 | */ 40 | public function render( $templates = null, $context = null ) { 41 | 42 | if ( is_null( $templates ) ) { 43 | $templates = apply_filters( 'maera/templates', array() ); 44 | } 45 | 46 | if ( is_null( $context ) ) { 47 | $context = $this->context(); 48 | } 49 | 50 | Timber::render( 51 | $templates, 52 | $context, 53 | Maera()->cache->cache_duration(), 54 | Maera()->cache->cache_mode() 55 | ); 56 | 57 | } 58 | 59 | /** 60 | * Get the footer 61 | */ 62 | public function footer() { 63 | get_footer(); 64 | } 65 | 66 | /** 67 | * Determine the context that will be used by the content() method 68 | */ 69 | public function context() { 70 | 71 | global $wp_query; 72 | 73 | $context = Maera()->cache->get_context(); 74 | $post = new TimberPost(); 75 | $context['post'] = $post; 76 | $context['posts'] = Timber::get_posts(); 77 | 78 | // Compatibility hack or plugins that change the content. 79 | if ( $this->plugins_compatibility() ) { 80 | $context['content'] = maera_get_echo( 'the_content' ); 81 | } 82 | 83 | if ( is_singular() ) { 84 | $context['wp_title'] .= ' - ' . $post->title(); 85 | } 86 | 87 | if ( is_search() ) { 88 | $context['title'] = esc_html__( 'Search results for ', 'maera' ) . get_search_query(); 89 | } 90 | 91 | if ( is_archive() || is_home() ) { 92 | $context['posts'] = Timber::query_posts( false, 'TimberPost' ); 93 | $context['title'] = get_the_archive_title(); 94 | 95 | if ( is_author() ) { 96 | $author = new TimberUser( $wp_query->query_vars['author'] ); 97 | $context['author'] = $author; 98 | } 99 | 100 | } 101 | 102 | if ( class_exists( 'WooCommerce' ) ) { 103 | global $product; 104 | $context['product'] = $product; 105 | } 106 | 107 | return $context; 108 | } 109 | 110 | /** 111 | * Add compatibility for some plugins. 112 | */ 113 | public function plugins_compatibility() { 114 | 115 | $compatibility = false; 116 | 117 | // bbPress 118 | $compatibility = function_exists( 'is_bbpress' ) && is_bbpress() ? true : $compatibility; 119 | // BuddyPress 120 | $compatibility = function_exists( 'is_buddypress' ) && is_buddypress() ? true : $compatibility; 121 | 122 | return apply_filters( 'maera/template/plugin_compatibility', $compatibility ); 123 | 124 | } 125 | 126 | } 127 | -------------------------------------------------------------------------------- /includes/class-maera-timber.php: -------------------------------------------------------------------------------- 1 | 'ul', 'reply_text' => esc_html__('Reply','maera'), 'short_ping' => true, 'avatar_size' => 60); 46 | $context['site_logo'] = get_option( 'site_logo', false ); 47 | $context['content_width'] = $content_width; 48 | 49 | $context['sidebar_template'] = maera_templates_sidebar(); 50 | 51 | if ( class_exists( 'Easy_Digital_Downloads' ) ) { 52 | $data['edd_options'] = $edd_options; 53 | $data['download_categories'] = Timber::get_terms( 'download_category' ); 54 | $data['download_tags'] = Timber::get_terms( 'download_tag' ); 55 | $data['default_image'] = new TimberImage( get_template_directory_uri() . '/assets/images/default.png' ); 56 | 57 | } 58 | 59 | return apply_filters( 'maera/timber/context', $context ); 60 | 61 | } 62 | 63 | /** 64 | * An array of paths containing our twig files. 65 | * First we search in the childtheme if one is active. 66 | * Then we continue looking for the twig file in the active shell 67 | * and finally fallback to the core twig files. 68 | */ 69 | public function twig_locations() { 70 | 71 | $locations = array(); 72 | $location_roots = array(); 73 | 74 | // Are we using a child theme? 75 | // If yes, then first look in there. 76 | if ( is_child_theme() ) { 77 | $location_roots[] = get_stylesheet_directory(); 78 | } 79 | // Active shell 80 | $location_roots[] = MAERA_SHELL_PATH; 81 | // Core twig locations. 82 | $location_roots[] = get_template_directory(); 83 | // Allow modifying they location roots using a filter 84 | $location_roots = apply_filters( 'maera/timber/locations/roots', $location_roots ); 85 | 86 | foreach ( $location_roots as $location_root ) { 87 | if ( class_exists( 'Easy_Digital_Downloads' ) ) { 88 | $locations[] = $location_root . '/views/edd'; 89 | } 90 | if ( class_exists( 'WooCommerce' ) ) { 91 | $locations[] = $location_root . '/views/woocommerce'; 92 | } 93 | $locations[] = $location_root . '/macros'; 94 | $locations[] = $location_root . '/views/macros'; 95 | $locations[] = $location_root . '/views'; 96 | $locations[] = $location_root; 97 | } 98 | 99 | return apply_filters( 'maera/timber/locations', $locations ); 100 | 101 | } 102 | 103 | /** 104 | * Apply global Timber customizations 105 | */ 106 | function timber_customizations() { 107 | 108 | global $wp_customize; 109 | 110 | $locations = $this->twig_locations(); 111 | Timber::$locations = $locations; 112 | 113 | } 114 | 115 | /** 116 | * Enable Twig_Extension_StringLoader. 117 | * This allows us to use template_from_string() in our templates. 118 | * 119 | * See http://twig.sensiolabs.org/doc/functions/template_from_string.html for details 120 | */ 121 | function add_to_twig( $twig ){ 122 | $twig->addExtension( new Twig_Extension_StringLoader() ); 123 | return $twig; 124 | } 125 | 126 | } 127 | -------------------------------------------------------------------------------- /includes/class-maera-widget-dropdown-class.php: -------------------------------------------------------------------------------- 1 | 'maera_widget_width', 8 | * 'label' => esc_html__( 'Width', 'maera' ), 9 | * 'default' => 12, 10 | * 'choices' => array( 11 | * 12 => array( 'label' => 'Full', 'classes' => 'col s12' ), 12 | * 3 => array( 'label' => '1 Quarter', 'classes' => 'col s12 m12 l3' ), 13 | * 4 => array( 'label' => '1 Third', 'classes' => 'col s12 m12 l4' ), 14 | * 6 => array( 'label' => 'Half', 'classes' => 'col s12 m12 l6' ), 15 | * 8 => array( 'label' => '3 quarters', 'classes' => 'col s12 m12 l8' ), 16 | * 9 => array( 'label' => '2 Thirds', 'classes' => 'col s12 m12 l9' ), 17 | * ), 18 | * )); 19 | * 20 | */ 21 | 22 | /** 23 | * Creates a dropdown in each widget and then adds the selected options as a CSS class 24 | */ 25 | class Maera_Widget_Dropdown_Class { 26 | 27 | private $id; 28 | private $label; 29 | private $choices; 30 | private $default; 31 | 32 | function __construct( $args = array() ) { 33 | 34 | // Early exit if an argument is missing 35 | if ( ! isset( $args['id'] ) || ! isset( $args['label'] ) || ! isset( $args['choices'] ) || ! isset( $args['default'] ) ) { 36 | return; 37 | } 38 | 39 | $this->id = $args['id']; 40 | $this->label = $args['label']; 41 | $this->choices = $args['choices']; 42 | $this->default = $args['default']; 43 | 44 | add_action( 'in_widget_form', array( $this, 'in_widget_form' ), 10, 3 ); 45 | add_filter( 'widget_update_callback', array( $this, 'widget_update_callback' ), 10, 2 ); 46 | add_filter( 'dynamic_sidebar_params', array( $this, 'dynamic_sidebar_params' ) ); 47 | 48 | } 49 | 50 | function dynamic_sidebar_params( $params ) { 51 | 52 | global $wp_registered_widgets; 53 | 54 | $widget_id = $params[0]['widget_id']; 55 | $widget_obj = $wp_registered_widgets[$widget_id]; 56 | $widget_opt = get_option( $widget_obj['callback'][0]->option_name ); 57 | $widget_num = $widget_obj['params'][0]['number']; 58 | 59 | $option = ( isset( $widget_opt[$widget_num][$this->id] ) ) ? $widget_opt[$widget_num][$this->id] : $this->default; 60 | $value = isset( $this->choices[$option]['classes'] ) ? $this->choices[$option]['classes'] : ''; 61 | 62 | preg_match( '/(\<[a-zA-Z]+)(.*?)(\>)/', $params[0]['before_widget'], $mat ); 63 | 64 | if ( isset( $value ) && ! empty( $value ) && $value != -1 ) { 65 | if ( preg_match( '/class="/', $params[0]['before_widget'] ) ) { 66 | $params[0]['before_widget'] = preg_replace( '/class="/', "class=\"{$value} ", $params[0]['before_widget'], 1 ); 67 | }else{ 68 | $params[0]['before_widget'] = preg_replace( '/(\<[a-zA-Z]+)(.*?)(\>)/', "$1 $2 class=\"{$value}\" $3", $params[0]['before_widget'], 1 ); 69 | } 70 | } 71 | 72 | return $params; 73 | 74 | } 75 | 76 | function widget_update_callback( $instance, $new_instance ) { 77 | 78 | $instance[$this->id] = $new_instance[$this->id]; 79 | return $instance; 80 | 81 | } 82 | 83 | function in_widget_form( $widget, $return, $instance ) { 84 | 85 | $choices = $this->choices; 86 | 87 | $instance[$this->id] = ( ! isset( $instance[$this->id] ) ) ? $this->default : $instance[$this->id]; 88 | ?> 89 | 90 |
    91 | 92 | 99 |
    100 | shell = new Maera_Shell(); 27 | $this->timber = new Maera_Timber(); 28 | $this->styles = new Maera_Styles(); 29 | $this->dev = new Maera_Development(); 30 | $this->cache = new Maera_Caching(); 31 | $this->cc = new Maera_Core_Customizer(); 32 | $this->views = new Maera_Template(); 33 | $this->template = $this->views; 34 | $this->plugins = new Maera_Required_Plugins( $this->required_plugins() ); 35 | $this->admin = new Maera_Admin(); 36 | 37 | // This is not ready yet so hide it. 38 | // For dev you can add this line to your wp-config.php file: 39 | // define( 'MAERA_HIDE_CORE_CUSTOMIZER', false ); 40 | if ( ! defined( 'MAERA_HIDE_CORE_CUSTOMIZER' ) ) { 41 | define( 'MAERA_HIDE_CORE_CUSTOMIZER', true ); 42 | } 43 | 44 | add_action( 'wp', array( $this, 'updates' ) ); 45 | 46 | } 47 | 48 | public static function get_instance() { 49 | if ( null == self::$instance ) { 50 | self::$instance = new self; 51 | } 52 | 53 | return self::$instance; 54 | } 55 | 56 | /** 57 | * The configuration options for the Kirki Customizer 58 | */ 59 | function customizer_config() { 60 | 61 | $args = array( 62 | 'stylesheet_id' => 'maera', 63 | // 'color_active' => '#ffab00', 64 | // 'color_light' => '#ffc107', 65 | // 'color_select' => '#ff9800', 66 | // 'color_accent' => '#ff5722', 67 | // 'color_back' => '#222', 68 | ); 69 | 70 | return $args; 71 | 72 | } 73 | 74 | /** 75 | * Build the array of required plugins. 76 | * You can use the 'maera/required_plugins' filter to add or remove plugins. 77 | */ 78 | function required_plugins() { 79 | 80 | $plugins = array( 81 | array( 'name' => 'Timber', 'file' => 'timber.php', 'slug' => 'timber-library' ), 82 | array( 'name' => 'Jetpack', 'file' => 'jetpack.php', 'slug' => 'jetpack' ), 83 | ); 84 | 85 | if ( current_theme_supports( 'breadcrumbs' ) ) { 86 | $plugins[] = array( 'name' => 'Breadcrumb Trail', 'file' => 'breadcrumb-trail.php', 'slug' => 'breadcrumb-trail' ); 87 | } 88 | 89 | if ( current_theme_supports( 'less_compiler' ) || current_theme_supports( 'sass_compiler' ) ) { 90 | $plugins[] = array( 'name' => 'Less & scss compilers', 'file' => 'less-plugin.php', 'slug' => 'lessphp' ); 91 | } 92 | 93 | $jetpack_active_modules = get_option( 'jetpack_active_modules' ); 94 | if ( isset( $jetpack_active_modules['photon'] ) && $jetpack_active_modules['photon'] ) { 95 | $plugins[] = array( 'name' => 'Timber with Jetpack Photon', 'file' => 'TimberPhoton.php', 'slug' => 'timber-with-jetpack-photon' ); 96 | } 97 | 98 | return $plugins; 99 | 100 | } 101 | 102 | 103 | /** 104 | * We can handle any db updates here for backwards-compatibility 105 | */ 106 | function updates() { 107 | 108 | $options = get_option( 'maera_admin_options', array() ); 109 | if ( !isset( $options['maera_version'] ) ) { 110 | $options['maera_version'] = MAERA_VERSION; 111 | update_option( 'maera_admin_options', $options ); 112 | } 113 | 114 | if( get_option( 'maera_version' ) ) { 115 | delete_option( 'maera_version' ); 116 | } 117 | 118 | } 119 | 120 | } 121 | -------------------------------------------------------------------------------- /includes/required-error.php: -------------------------------------------------------------------------------- 1 | 18 | 19 |
    20 | 21 |
    22 | -------------------------------------------------------------------------------- /includes/widgets.php: -------------------------------------------------------------------------------- 1 | ' ); 10 | $after_title = apply_filters( 'maera/widgets/title/after', '' ); 11 | 12 | // Sidebars 13 | register_sidebar( array( 14 | 'name' => esc_html__( 'Primary Sidebar', 'maera' ), 15 | 'id' => 'sidebar_primary', 16 | 'before_widget' => apply_filters( 'maera/widgets/before', '
    ' ), 17 | 'after_widget' => apply_filters( 'maera/widgets/after', '
    ' ), 18 | 'before_title' => $before_title, 19 | 'after_title' => $after_title, 20 | ) ); 21 | 22 | } 23 | add_action( 'widgets_init', 'maera_widgets_init' ); 24 | -------------------------------------------------------------------------------- /includes/widgets/extended-posts/assets/script.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | // Inside of this function, $() will work as an alias for jQuery() 3 | // and other libraries also using $ will not be accessible under this shortcut 4 | })(jQuery); -------------------------------------------------------------------------------- /includes/widgets/extended-posts/assets/style.css: -------------------------------------------------------------------------------- 1 | /** 2 | * For modern browsers 3 | * 1. The space content is one way to avoid an Opera bug when the 4 | * contenteditable attribute is included anywhere else in the document. 5 | * Otherwise it causes space to appear at the top and bottom of elements 6 | * that are clearfixed. 7 | * 2. The use of `table` rather than `block` is only necessary if using 8 | * `:before` to contain the top-margins of child elements. 9 | */ 10 | .clearfix:before, 11 | .clearfix:after { 12 | content: " "; /* 1 */ 13 | display: table; /* 2 */ 14 | } 15 | 16 | .clearfix:after { 17 | clear: both; 18 | } 19 | 20 | /** 21 | * For IE 6/7 only 22 | * Include this rule to trigger hasLayout and contain floats. 23 | */ 24 | .clearfix { 25 | *zoom: 1; 26 | } 27 | 28 | .pull-left { 29 | float: left; 30 | } 31 | -------------------------------------------------------------------------------- /includes/widgets/extended-posts/extended-posts.php: -------------------------------------------------------------------------------- 1 | esc_html__( 'Maera logo widget.', 'maera' ) ) 25 | ); 26 | } 27 | 28 | 29 | /** 30 | * Render the widget on the back end. 31 | * @todo TODO 32 | * @since 1.0.0 33 | */ 34 | function form( $instance ) { 35 | ?> 36 |

    37 | views->render( 'site-logo.twig' ); 53 | 54 | echo $args['after_widget']; 55 | 56 | } 57 | 58 | 59 | /** 60 | * Widget instance update. 61 | * @todo TODO 62 | * @since 1.0.0 63 | */ 64 | function update( $new_instance, $old_instance ) { 65 | $instance = array(); 66 | $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : ''; 67 | return $instance; 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /includes/widgets/logo/logo.php: -------------------------------------------------------------------------------- 1 | views->dependencies(); 15 | 16 | Maera()->views->header(); 17 | Maera()->views->render(); 18 | Maera()->views->footer(); 19 | -------------------------------------------------------------------------------- /languages/maera-en_US.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/languages/maera-en_US.mo -------------------------------------------------------------------------------- /page.php: -------------------------------------------------------------------------------- 1 | views->dependencies(); 21 | 22 | Maera()->views->header(); 23 | Maera()->views->render(); 24 | Maera()->views->footer(); 25 | -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | === Maera === 2 | 3 | [Maera](#) is a developer-friendly theme that allows you to quickly prototype sites and extend it with your own custom plugins. 4 | 5 | == Instructions == 6 | 7 | Maera includes a blogging shell. You can get more shells from https://press.codes/ 8 | 9 | == Limitations == 10 | 11 | Maera Requires you to install these plugins: 12 | * [Timber Library](https://wordpress.org/plugins/timber-library/) 13 | * [Jetpack](https://wordpress.org/plugins/jetpack/) 14 | * [Kirki](https://wordpress.org/plugins/kirki/) 15 | 16 | Additional plugins may depend on other plugins and in that case you will be notified from your dashboard 17 | 18 | == Credits == 19 | 20 | * [_s](https://github.com/Automattic/_s) theme by Automattic, and released under the GPL v2.0. 21 | * [html5shiv](http://code.google.com/p/html5shiv/) script by Remy Sharp, and is dual-licensed under the MIT or GPL Version 2 licenses. 22 | 23 | == Browser Support == 24 | 25 | Chrome, Firefox, Safari and IE10+ are supported. IE7, IE8 and IE9 are not supported. 26 | 27 | == Changelog == 28 | 29 | = 2.0 = 30 | 31 | * Fix Multiple DB options 32 | * Fix Template Tag Archive function 33 | * Fix styling of categories when there are 20+ resulting in grouped up categories 34 | * Add post tag display 35 | * Fix Attachment Pages 36 | * Add styling for [audio] and [video] shortcodes 37 | * Fix password protected posts 38 | * Add styling for quote tags 39 | * Fix readability of Byline 40 | * Fix archive page titles 41 | * Add styling for [gallery] shortcode 42 | * Fix multiple responsive issues 43 | * Modify/Fix script registration 44 | * Fix translation and strings 45 | * Fix hardcoding of some scripts 46 | * Add extra sanitzation checks to edd templates and core shell 47 | * Fix missing sanitization for theme Customizer options 48 | * Fix wrong filenames 49 | * Fix multiple issues with translations and textdomains using incorrect functions and missing text domain 50 | * Add support for core WordPress CSS classes 51 | * Fix styling on comments 52 | * Fix styling on widgets 53 | 54 | = 1.4 = 55 | 56 | * Fix searchform.twig causing internal server errors 57 | * Remove search filter breaking external search plugins 58 | * Fix use correct function for locating files 59 | * Fix multiple warnings 60 | * Modification: No Longer require Kirki for the core framework 61 | * Remove admin notice about the add-ons tabs that was removed in prior versions 62 | * Modification: Stop auto-activating plugins 63 | * Remove un-needed jQuery enqueue 64 | * Remove Kirki as an embedded plugin 65 | * Remove Timber as an embedded plugin 66 | 67 | = 1.3 = 68 | 69 | * Bug Fixes 70 | 71 | = 1.2 = 72 | 73 | * New: Kirki & Timber plugins as well as some Jetpack classes are now embedded. Installing external plugins is no longer required for the core theme. 74 | * New: Easy-Digital-Downloads integration 75 | * New: WooCommerce integration 76 | * Fix: Core shell CSS tweaks 77 | * Fix: Change sr-only class to screen-reader-text 78 | * New: Implemented a class autoloader 79 | * Tweak: Deactivate auto-installer 80 | * Tweak: Use dashicons instead of elusive icons 81 | * Tweak: Keep pagination links as anchors 82 | * Fix: Properly use add_query_arg() 83 | * Tweak: Comments template 84 | * Fix: fix incorrect path URLs 85 | * Tweak: better template-hierarchy.php 86 | * Tweak: WordPress coding standards 87 | * Fix: Other minor bugfixes 88 | * Tweak: Add before_widget & after_widget to the logo widget 89 | * Fix: Align left images on the extended-posts widget 90 | 91 | = 1.1.1 = 92 | 93 | * Fix: Added a default license key 94 | * New: More OOP design 95 | * New: Change the Timber cache folder (soon to be supported by Timber core) 96 | * Fix: Undefined index messages on the admin settings screen 97 | * New: Introducing Maera_Widget_Dropdown_Class.php 98 | * Fix: Move core styles to style.css 99 | 100 | = 1.1.0 = 101 | 102 | * Fix: Most methods are not non-static. 103 | * New: The theme is now more OOP. 104 | * New: You can now choose a caching method from the admin options. 105 | * Fix: Disabling file caches (there were issues on sites hosted on WPEngine). 106 | * Fix: Updating the Maera_Logo_Widget rendering method. 107 | * Fix: Typo preventing proper template rendering for tag archives. 108 | * Fix: Added check for MAERA_VERSION constant. 109 | * Fix: Code cleanup. 110 | * New: Introducing a Maera_Helper class. 111 | * Fix: Move file requires outside the main Maera object. 112 | * Fix: Moved test_missing method to the Maera_Required_Plugins class. 113 | * Fix: Moved get_search_form method to the Maera_Template class. 114 | * Fix: Moved body_class method to the Maera_Styles class. 115 | * Fix: Renamed the Maera_Template->main method to Maera_Template->render. 116 | * New: Introducing new "screen-reader-text" classes as per https://make.wordpress.org/accessibility/2015/01/27/test-chat-summary-januari-26/ 117 | 118 | = 1.0.3 = 119 | 120 | * Fix: Jetpack was being forced to Dev mode some hosts even when dev mode was disabled from the theme options dashboard. 121 | 122 | = 1.0.2 = 123 | 124 | * Fix: remote-installer scripts were not loading properly 125 | 126 | = 1.0.1 = 127 | 128 | * Fix: typo preventing automatic updates 129 | 130 | = 1.0.0 = 131 | 132 | * Initial release 133 | -------------------------------------------------------------------------------- /rtl.css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: maera 3 | 4 | Adding support for language written in a Right To Left (RTL) direction is easy - 5 | it's just a matter of overwriting all the horizontal positioning attributes 6 | of your CSS stylesheet in a separate stylesheet file named rtl.css. 7 | 8 | http://codex.wordpress.org/Right_to_Left_Language_Support 9 | 10 | */ 11 | 12 | /* 13 | body { 14 | direction: rtl; 15 | unicode-bidi: embed; 16 | } 17 | */ -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/screenshot.png -------------------------------------------------------------------------------- /search.php: -------------------------------------------------------------------------------- 1 | 2 | views->dependencies(); 10 | 11 | Maera()->views->header(); 12 | Maera()->views->render(); 13 | Maera()->views->footer(); 14 | -------------------------------------------------------------------------------- /single.php: -------------------------------------------------------------------------------- 1 | views->dependencies(); 9 | 10 | Maera()->views->header(); 11 | Maera()->views->render(); 12 | Maera()->views->footer(); 13 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: Maera 3 | Theme URI: https://wpsatchel.com 4 | Description: Advanced WordPress theme based on Bootstrap. 5 | Version: 2.0 6 | Author: WPSatchel 7 | Contributers: aristath, fovoc 8 | Author URI: https://wpsatchel.com 9 | License: GPL v2 License 10 | License URI: http://www.gnu.org/licenses/gpl.html 11 | Tags: dark, light, one-column, two-columns, left-sidebar, right-sidebar, fluid-layout, custom-background, custom-colors, custom-header, custom-menu, editor-style, microformats, rtl-language-support, holiday, seasonal 12 | Text Domain: maera 13 | */ 14 | 15 | /* =WordPress Core 16 | -------------------------------------------------------------- */ 17 | .alignnone { 18 | margin: 5px 20px 20px 0; 19 | } 20 | 21 | .aligncenter, 22 | div.aligncenter { 23 | display: block; 24 | margin: 5px auto 5px auto; 25 | } 26 | 27 | .alignright { 28 | float:right; 29 | margin: 5px 0 20px 20px; 30 | } 31 | 32 | .alignleft { 33 | float: left; 34 | margin: 5px 20px 20px 0; 35 | } 36 | 37 | a img.alignright { 38 | float: right; 39 | margin: 5px 0 20px 20px; 40 | } 41 | 42 | a img.alignnone { 43 | margin: 5px 20px 20px 0; 44 | } 45 | 46 | a img.alignleft { 47 | float: left; 48 | margin: 5px 20px 20px 0; 49 | } 50 | 51 | a img.aligncenter { 52 | display: block; 53 | margin-left: auto; 54 | margin-right: auto 55 | } 56 | 57 | .wp-caption { 58 | background: #fff; 59 | border: 1px solid #f0f0f0; 60 | max-width: 96%; /* Image does not overflow the content area */ 61 | padding: 5px 3px 10px; 62 | text-align: center; 63 | } 64 | 65 | .wp-caption.alignnone { 66 | margin: 5px 20px 20px 0; 67 | } 68 | 69 | .wp-caption.alignleft { 70 | margin: 5px 20px 20px 0; 71 | } 72 | 73 | .wp-caption.alignright { 74 | margin: 5px 0 20px 20px; 75 | } 76 | 77 | .wp-caption img { 78 | border: 0 none; 79 | height: auto; 80 | margin: 0; 81 | max-width: 98.5%; 82 | padding: 0; 83 | width: auto; 84 | } 85 | 86 | .wp-caption p.wp-caption-text { 87 | font-size: 11px; 88 | line-height: 17px; 89 | margin: 0; 90 | padding: 0 4px 5px; 91 | } 92 | 93 | /* Text meant only for screen readers. */ 94 | .screen-reader-text { 95 | clip: rect(1px, 1px, 1px, 1px); 96 | position: absolute !important; 97 | height: 1px; 98 | width: 1px; 99 | overflow: hidden; 100 | } 101 | 102 | .screen-reader-text:hover, 103 | .screen-reader-text:active, 104 | .screen-reader-text:focus { 105 | background-color: #f1f1f1; 106 | border-radius: 3px; 107 | box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); 108 | clip: auto !important; 109 | color: #21759b; 110 | display: block; 111 | font-size: 14px; 112 | font-size: 0.875rem; 113 | font-weight: bold; 114 | height: auto; 115 | left: 5px; 116 | line-height: normal; 117 | padding: 15px 23px 14px; 118 | text-decoration: none; 119 | top: 5px; 120 | width: auto; 121 | z-index: 100000; /* Above WP toolbar. */ 122 | } 123 | 124 | .clearfix:before, 125 | .clearfix:after { 126 | content: " "; 127 | display: table; 128 | } 129 | .clearfix:after { 130 | clear: both; 131 | } 132 | .pp_woocommerce { 133 | top: 0 !important; 134 | } 135 | 136 | 137 | .sticky {} 138 | .gallery-caption {} 139 | .bypostauthor {} 140 | -------------------------------------------------------------------------------- /taxonomy-download_category.php: -------------------------------------------------------------------------------- 1 | 5 | {% for post in posts %} 6 | {% if fn('post_password_required', post.ID) %} 7 | {% include ['content-protected.twig'] %} 8 | {% else %} 9 | {% include ['content-'~post.ID~'.twig', 'content-'~post.post_type~'.twig', 'content.twig'] %} 10 | {% endif %} 11 | {{ function( 'wp_link_pages', { 'before': '' }) }} 12 |
    13 | {% endfor %} 14 | 15 | 16 | {% endblock %} 17 | -------------------------------------------------------------------------------- /views/attachment.twig: -------------------------------------------------------------------------------- 1 | {% extends "main.twig" %} 2 | {% block content %} 3 | 4 |
    5 | {% for post in posts %} 6 | {% include ['content-attachment-'~post.ID~'.twig', 'content-attachment-'~post.post_type~'.twig', 'content-attachment.twig'] %} 7 | {{ function( 'wp_link_pages', { 'before': '' }) }} 8 |
    9 | {% endfor %} 10 |
    11 | 12 | {% endblock %} 13 | -------------------------------------------------------------------------------- /views/author.twig: -------------------------------------------------------------------------------- 1 | {# 8 | {% do action( 'maera/content/before', post.ID ) %} 9 |
    10 |
    11 |
    12 | {% do action( 'maera/main/before', post.ID ) %} 13 | {% block main %}{{ fn( 'esc_html__', 'Sorry, no content', 'maera' ) }}{% endblock %} 14 | {% do action( 'maera/main/after', post.ID ) %} 15 | {% include 'sidebar.twig'|apply_filters('maera/sidebar_template') %} 16 |
    17 |
    18 |
    19 |
    20 | {% do action( 'maera/content/after' ) %} 21 | 22 | -------------------------------------------------------------------------------- /views/bbp.twig: -------------------------------------------------------------------------------- 1 | {# 7 | 8 |
    9 | 10 | {{ content }} 11 | {% do action( 'maera/page/after_content' ) %} 12 | 13 |
    14 | 15 | 16 | 17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /views/bp.twig: -------------------------------------------------------------------------------- 1 | {# 7 | 8 |
    9 | 10 | {{ content }} 11 | {% do action( 'maera/page/after_content' ) %} 12 | 13 |
    14 | 15 | 16 | 17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /views/comments.twig: -------------------------------------------------------------------------------- 1 | {# 5 | 6 | {% if post.comment_status == 'closed' %} 7 | {{ alert('warning', fn( 'esc_html__', 'Comments are closed.', 'maera' ), false, 'comments-disabled', false) }} 8 | {% endif %} 9 | 10 |
    11 |

    {{ fn( 'esc_html__', 'Comments', 'maera' ) }}

    12 | 13 | {% if post.comments %} 14 | {{ function( 'wp_list_comments', comments_args ) }} 15 | {% endif %} 16 | 17 | {{ comment_form }} 18 |
    19 | 20 | 21 | -------------------------------------------------------------------------------- /views/content-attachment-entry-content.twig: -------------------------------------------------------------------------------- 1 |
    2 | {% do action( 'maera/attachment/pre_content', post.ID ) %} 3 | {{ post.content }} 4 | {% do action( 'maera/attachment/after_content', post.ID ) %} 5 |
    6 | -------------------------------------------------------------------------------- /views/content-attachment-entry-download-meta.twig: -------------------------------------------------------------------------------- 1 | {# This file is empty on purpose. #} 2 | -------------------------------------------------------------------------------- /views/content-attachment-entry-footer.twig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/views/content-attachment-entry-footer.twig -------------------------------------------------------------------------------- /views/content-attachment-entry-header.twig: -------------------------------------------------------------------------------- 1 |
    2 | {{ fn( 'esc_attr', post.title ) }} 3 |

    {{ post.title|apply_filters( 'maera/title' ) }}

    4 |
    5 | -------------------------------------------------------------------------------- /views/content-attachment-entry-meta.twig: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /views/content-attachment.twig: -------------------------------------------------------------------------------- 1 |
    2 | {% do action( 'maera/attachment/top', post.ID ) %} 3 | {% include ['content-attachment-entry-'~post.ID~'-header.twig', 'content-attachment-entry-'~post.post_type~'-header.twig', 'content-attachment-entry-header.twig'] %} 4 | {% include ['content-attachment-entry-'~post.ID~'-meta.twig', 'content-attachment-entry-'~post.post_type~'-meta.twig', 'content-attachment-entry-meta.twig'] %} 5 | {% include ['content-attachment-entry-'~post.ID~'-content.twig', 'content-attachment-entry-'~post.post_type~'-content.twig', 'content-attachment-entry-content.twig'] %} 6 | {% include ['content-attachment-entry-'~post.ID~'-footer.twig', 'content-attachment-entry-'~post.post_type~'-footer.twig', 'content-attachment-entry-footer.twig'] %} 7 |
    8 | -------------------------------------------------------------------------------- /views/content-entry-content-protected.twig: -------------------------------------------------------------------------------- 1 |
    2 |

    This content is password-protected.

    3 | Click here to input the password 4 |
    5 |
    6 | -------------------------------------------------------------------------------- /views/content-entry-content.twig: -------------------------------------------------------------------------------- 1 |
    2 | {% if post.thumbnail %} 3 | 4 | 5 | 6 | {% endif %} 7 | 8 | {% if teaser_mode == 'full' %} 9 | {{ post.content }} 10 | {% else %} 11 | {{ post.get_preview }} 12 | {% endif %} 13 |
    14 |
    15 | -------------------------------------------------------------------------------- /views/content-entry-footer.twig: -------------------------------------------------------------------------------- 1 |
    2 | {% do action('maera/entry/footer', post.ID) %} 3 |
    4 | -------------------------------------------------------------------------------- /views/content-entry-header.twig: -------------------------------------------------------------------------------- 1 |
    2 | {% do action( 'maera/teaser/start', post.ID ) %} 3 | {{ fn( 'esc_attr', post.title ) }} 4 |

    {{ post.title|apply_filters( 'maera/title' ) }}

    5 | {% if post.post_type == 'post' %} 6 | {% include ['content-single-entry-'~post.ID~'-meta.twig', 'content-single-entry-'~post.post_type~'-meta.twig', 'content-single-entry-meta.twig'] %} 7 | {% endif %} 8 |
    9 | -------------------------------------------------------------------------------- /views/content-page.twig: -------------------------------------------------------------------------------- 1 | {# 3 | {% include ['content-single-entry-'~post.ID~'-header.twig', 'content-single-entry-header.twig'] %} 4 | {% do action( 'maera/page/pre_content' ) %} 5 | {{ post.content }} 6 | {% do action( 'maera/page/after_content' ) %} 7 | 8 | -------------------------------------------------------------------------------- /views/content-protected.twig: -------------------------------------------------------------------------------- 1 | {# 3 | {% block content %} 4 | {% do action('maera/in_article/top', post.ID) %} 5 | {% include ['content-entry-'~post.ID~'-header.twig', 'content-entry-'~post.post_type~'-header.twig', 'content-entry-header.twig'] %} 6 | {% include ['content-entry-'~post.ID~'-content.twig', 'content-entry-'~post.post_type~'-content.twig', 'content-entry-content-protected.twig'] %} 7 | {% include ['content-entry-'~post.ID~'-footer.twig', 'content-entry-'~post.post_type~'-footer.twig', 'content-entry-footer.twig'] %} 8 | {% endblock %} 9 | 10 | -------------------------------------------------------------------------------- /views/content-single-entry-content.twig: -------------------------------------------------------------------------------- 1 |
    2 | {% do action( 'maera/single/pre_content', post.ID ) %} 3 | {{ post.content }} 4 | {% do action( 'maera/single/after_content', post.ID ) %} 5 |
    6 | -------------------------------------------------------------------------------- /views/content-single-entry-download-meta.twig: -------------------------------------------------------------------------------- 1 | {# This file is empty on purpose. #} 2 | -------------------------------------------------------------------------------- /views/content-single-entry-footer.twig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codemonkey-jack/maera/70530cfab1a4ed1b59af96ee43de7dedfac418bc/views/content-single-entry-footer.twig -------------------------------------------------------------------------------- /views/content-single-entry-header.twig: -------------------------------------------------------------------------------- 1 |
    2 | {{ fn( 'esc_attr', post.title ) }} 3 |

    {{ post.title|apply_filters( 'maera/title' ) }}

    4 |
    5 | -------------------------------------------------------------------------------- /views/content-single-entry-meta.twig: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /views/content-single-entry-tag.twig: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /views/content-single.twig: -------------------------------------------------------------------------------- 1 |
    2 | {% do action( 'maera/single/top', post.ID ) %} 3 | {% include ['content-single-entry-'~post.ID~'-header.twig', 'content-single-entry-'~post.post_type~'-header.twig', 'content-single-entry-header.twig'] %} 4 | {% include ['content-single-entry-'~post.ID~'-meta.twig', 'content-single-entry-'~post.post_type~'-meta.twig', 'content-single-entry-meta.twig'] %} 5 | {% include ['content-single-entry-'~post.ID~'-content.twig', 'content-single-entry-'~post.post_type~'-content.twig', 'content-single-entry-content.twig'] %} 6 | {% include ['content-single-entry-'~post.ID~'-tag.twig', 'content-single-entry-'~post.post_type~'-tag.twig', 'content-single-entry-tag.twig'] %} 7 | {% include ['content-single-entry-'~post.ID~'-footer.twig', 'content-single-entry-'~post.post_type~'-footer.twig', 'content-single-entry-footer.twig'] %} 8 |
    9 | -------------------------------------------------------------------------------- /views/content.twig: -------------------------------------------------------------------------------- 1 | {# 3 | {% block content %} 4 | {% do action('maera/in_article/top', post.ID) %} 5 | {% include ['content-entry-'~post.ID~'-header.twig', 'content-entry-'~post.post_type~'-header.twig', 'content-entry-header.twig'] %} 6 | {% include ['content-entry-'~post.ID~'-content.twig', 'content-entry-'~post.post_type~'-content.twig', 'content-entry-content.twig'] %} 7 | {% include ['content-entry-'~post.ID~'-footer.twig', 'content-entry-'~post.post_type~'-footer.twig', 'content-entry-footer.twig'] %} 8 | {% endblock %} 9 | 10 | -------------------------------------------------------------------------------- /views/edd/archive-download.twig: -------------------------------------------------------------------------------- 1 | {% extends "main.twig" %} 2 | {% block content %} 3 |
    4 | 5 | {% include ['filter-'~theme.theme_mod('filter_mode', 'php')~'.twig', 'filter-php.twig'] %} 6 | 7 |
    8 | 9 | {% do action( 'maera/page/pre_content' ) %} 10 | {% filter shortcodes %}[downloads columns="2"]{% endfilter %} 11 | {{ shell.clearfix }} 12 | {{ function( 'wp_link_pages', { 13 | 'before': '' 15 | }) }} 16 | {{ shell.clearfix }} 17 | {% do action( 'maera/page/after_content' ) %} 18 | 19 |
    20 | 21 |
    22 | 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /views/edd/content-download-content.twig: -------------------------------------------------------------------------------- 1 | {% from 'panel_open.html.twig' import panel_open as panel_open %} 2 | {% from 'panel_close.html.twig' import panel_close as panel_close %} 3 | {% from 'panel_heading_open.html.twig' import panel_heading_open as panel_heading_open %} 4 | {% from 'panel_heading_close.html.twig' import panel_heading_close as panel_heading_close %} 5 | 6 | {{ panel_open('content') }} 7 | {{ panel_heading_open() }} 8 | {{ fn( 'esc_attr', post.title ) }} 9 | {{ panel_heading_close }} 10 | {{ post.get_preview(20|apply_filters(excerpt_length)) }} 11 |
    12 | {{ function('edd_get_purchase_link', [{'download_id':post.ID}]) }} 13 |
    14 | {{ panel_close() }} 15 | -------------------------------------------------------------------------------- /views/edd/content-download-footer.twig: -------------------------------------------------------------------------------- 1 | {# This file is empty on purpose. #} 2 | -------------------------------------------------------------------------------- /views/edd/content-download-header.twig: -------------------------------------------------------------------------------- 1 | {% set width = content_width // 3 %} 2 | {% set height = width // 1.618 %} 3 | 4 | 5 | {% if post.thumbnail %} 6 | {% else %}{% endif %} 7 | 8 | -------------------------------------------------------------------------------- /views/edd/shortcode-content-price.twig: -------------------------------------------------------------------------------- 1 | {% if not function('edd_has_variable_prices', post.ID) %} 2 |
    3 |
    4 | {{ function('edd_price', post.ID) }} 5 |
    6 |
    7 | {% endif %} 8 | -------------------------------------------------------------------------------- /views/edd/shortcode-download-content-grid.twig: -------------------------------------------------------------------------------- 1 | {# Multiply image dimentions x2 to compensate for retina displays #} 2 | {% set width = content_width * 2 // columns %} 3 | {% set height = width // 1.618 %} 4 | 5 |
    6 | {% if display_buy_btn == 'yes' %} 7 | {% endif %} 29 |
    30 | {# The title of the download #} 31 |

    {{ post.title|striptags }}

    32 | {# Excerpt and Content #} 33 | {% if display_excerpt %} 34 | {{ post.get_preview(20|apply_filters(excerpt_length)) }} 35 | {% elseif display_full %} 36 | {{ post.content }} 37 | {% endif %} 38 |
    39 |
    40 | -------------------------------------------------------------------------------- /views/edd/shortcode-download-content-list.twig: -------------------------------------------------------------------------------- 1 | {% set width = content_width // columns %} 2 | {% set height = width // 1.618 %} 3 | 4 |
    5 | [maera_grid_row_open] 6 | 15 |
    16 | {% if display_buy_btn == 'yes' %} 17 | [maera_grid_row_open] 18 |
    19 | {% endif %} 20 |
    21 |
    {{ post.title|striptags }}
    22 | {% if display_excerpt == 'yes' %} 23 | {{ post.get_preview(20|apply_filters(excerpt_length)) }} 24 | {% elseif display_full == 'yes' %} 25 | {{ post.content }} 26 | {% endif %} 27 | {% if display_buy_btn == 'yes' %} 28 |
    29 |
    30 |
    31 |
    32 | {% if post.edd_coming_soon %} 33 | 34 | {% if post.edd_coming_soon_text %}{{ post.edd_coming_soon_text }} 35 | {% else %}{{ fn( 'esc_html__','Coming Soon', 'maera') }}{% endif %} 36 | 37 | {% else %} 38 | {% if variable_priced %} 39 | {{ fn( 'esc_html__','Details', 'maera') }} 40 | {% else %} 41 | {{ function('edd_get_purchase_link', [{'download_id':post.ID}]) }} 42 | {% endif %} 43 | {% endif %} 44 |
    45 |
    46 | {% endif %} 47 |
    48 |
    49 | 50 | 51 |
    52 | -------------------------------------------------------------------------------- /views/edd/shortcode-download-content-zoe.twig: -------------------------------------------------------------------------------- 1 | {% set width = content_width // columns %} 2 | {% set height = width // 1.618 %} 3 | 4 |
    5 | 6 | {% if post.thumbnail %} 7 | {% else %}{% endif %} 8 | 9 |
    10 |
    {{ fn( 'esc_attr', post.title ) }}
    11 | 27 |
    28 | 29 |
    30 | -------------------------------------------------------------------------------- /views/edd/shortcode-download-image.twig: -------------------------------------------------------------------------------- 1 | {% set width = content_width // columns %} 2 | {% set height = width // 1.618 %} 3 | 4 | {% if post.thumbnail %} 5 | 6 | {% else %} 7 | 8 | {% endif %} 9 | 10 | -------------------------------------------------------------------------------- /views/edd/tease-download-meta.twig: -------------------------------------------------------------------------------- 1 | {# This file is empty on purpose. #} 2 | -------------------------------------------------------------------------------- /views/edd/tease-download-open.twig: -------------------------------------------------------------------------------- 1 |
    2 | -------------------------------------------------------------------------------- /views/filter-isotope.twig: -------------------------------------------------------------------------------- 1 | {% from 'button_group_classes.html.twig' import button_group_classes as button_group_classes %} 2 | {% from 'button_classes.html.twig' import button_classes as button_classes %} 3 | {% from 'clearfix.html.twig' import clearfix as clearfix %} 4 | 5 |
    6 | 7 |
    8 | 9 | {{ fn( 'esc_html__', 'All', 'maera' ) }} 10 | 11 | {% for download_category in download_categories %} 12 | {% if download_category.get_posts %} 13 | 14 | {{ download_category.name }} 15 | 16 | {% endif %} 17 | {% endfor %} 18 | {% for download_tag in download_tags %} 19 | {% if download_tag.get_posts %} 20 | 21 | {{ download_tag.name }} 22 | 23 | {% endif %} 24 | {% endfor %} 25 |
    26 | 27 | 33 | 34 |
    35 | {{ clearfix() }} 36 | -------------------------------------------------------------------------------- /views/filter-php.twig: -------------------------------------------------------------------------------- 1 | {# 9 | 21 | 22 | 23 |
    24 | 36 |
    37 | 38 | {{ row_close('form') }} 39 | 80 | {{ clearfix() }} -------------------------------------------------------------------------------- /views/footer.twig: -------------------------------------------------------------------------------- 1 | {# 8 | {% do action( 'maera/footer/start', post.ID ) %} 9 | 12 | {% do action( 'maera/footer/end', post.ID ) %} 13 | 14 | {% do action( 'maera/footer/after', post.ID ) %} 15 | {{ function( 'wp_footer' ) }} 16 | 17 | 18 | -------------------------------------------------------------------------------- /views/head.twig: -------------------------------------------------------------------------------- 1 | 2 | {% block head %} 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {{ function( 'wp_head' ) }} 11 | 12 | {% endblock %} 13 | -------------------------------------------------------------------------------- /views/header.twig: -------------------------------------------------------------------------------- 1 | {# 3 | {% include 'head.twig' %} 4 | 5 | 6 | 7 | 8 | {% do action( 'get_header' ) %} 9 | 10 | {% do action( 'maera/header/before', post.ID ) %} 11 |
    12 | {% block header %} 13 |
    14 | 15 |

    16 | {{ bloginfo( 'name' ) }} 17 |

    18 | 27 | 28 |
    29 | {% endblock %} 30 |
    31 | {% do action( 'maera/header/after', post.ID ) %} 32 | -------------------------------------------------------------------------------- /views/index.twig: -------------------------------------------------------------------------------- 1 | {# 3 | {% if close|default(false) %} 4 | 5 | {% endif %} 6 | {{ message|raw }} 7 | 8 | {% endmacro %} 9 | -------------------------------------------------------------------------------- /views/macros/button_classes.html.twig: -------------------------------------------------------------------------------- 1 | {% macro button_classes(color, size, type, extra) %} 2 | 3 | {% if color == 'info' %} 4 | button-secondary 5 | {% else %} 6 | button-{{ color }} 7 | {% endif %} 8 | 9 | {% if size == 'extra-small' %}button-xsmall{% endif %} 10 | {% if size == 'small' %}button-small{% endif %} 11 | {% if size == 'medium' %}{# No need for an extra class #}{% endif %} 12 | {% if size == 'large' %}button-large{% endif %} 13 | {% if size == 'extra-large' %}button-xlarge{% endif %} 14 | 15 | {{ type }} 16 | {{ extra }} 17 | 18 | {% endmacro %} 19 | -------------------------------------------------------------------------------- /views/macros/button_dropdown.html.twig: -------------------------------------------------------------------------------- 1 | {% from 'button_classes.html.twig' import button_classes as button_classes %} 2 | {% macro button_dropdown(color, size, type, extra, label, content) %} 3 | 4 |
    5 | 8 | 9 | 10 |
    11 | 12 | {% endmacro %} 13 | -------------------------------------------------------------------------------- /views/macros/button_group_classes.html.twig: -------------------------------------------------------------------------------- 1 | {% macro button_group_classes(size, type, extra_classes) %} 2 | 3 | btn-group 4 | {% if size == 'xsmall' %}btn-group-xs{% endif %} 5 | {% if size == 'small' %}btn-group-sm{% endif %} 6 | {% if size == 'medium' %}{# No need for an extra class #}{% endif %} 7 | {% if size == 'large' %}btn-group-lg{% endif %} 8 | {% if size == 'xlarge' %}btn-group-lg{% endif %} 9 | {{ type }} 10 | {{ extra_classes }} 11 | 12 | {% endmacro %} 13 | -------------------------------------------------------------------------------- /views/macros/clearfix.html.twig: -------------------------------------------------------------------------------- 1 | {% macro clearfix() %} 2 |
    3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /views/macros/column_classes.html.twig: -------------------------------------------------------------------------------- 1 | {% macro column_classes(sizes) %} 2 | {% if sizes is iterable %} 3 | {% for size in sizes %} 4 | {% if size.mobile %}column column-xs-{{ size.mobile }}{% endif %} 5 | {% if size.tablet %}column column-sm-{{ size.tablet }}{% endif %} 6 | {% if size.medium %}column column-md-{{ size.medium }}{% endif %} 7 | {% if size.large %}column column-lg-{{ size.large }}{% endif %} 8 | {% endfor %} 9 | {% endif %} 10 | {% endmacro %} 11 | -------------------------------------------------------------------------------- /views/macros/column_close.html.twig: -------------------------------------------------------------------------------- 1 | {% macro column_close(element) %} 2 | 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /views/macros/column_open.html.twig: -------------------------------------------------------------------------------- 1 | {% from 'column_classes.html.twig' import column_classes as column_classes %} 2 | {% macro column_open(element, sizes, id, extra_classes, properties) %} 3 | <{{ element|default('div') }} class="{{ column_classes( sizes ) }}{{ extra_classes ? ' '~extra_classes : '' }}"{{ id ? ' id="'~id~'"' : '' }}{{ properties ? ' '~properties : '' }}> 4 | {% endmacro %} 5 | -------------------------------------------------------------------------------- /views/macros/container_close.html.twig: -------------------------------------------------------------------------------- 1 | {% macro container_close(element) %} 2 | 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /views/macros/container_open.html.twig: -------------------------------------------------------------------------------- 1 | {% import 'grid_classes.html.twig' as grid %} 2 | {% macro container_open(element, id, extra_classes, properties) %} 3 | <{{ element|default('div') }} class="{{ grid.container()|apply_filters( 'maera/container_class' ) }}{{ extra_classes ? ' '~extra_classes : '' }}"{{ id ? ' id="'~id~'"' : '' }}{{ properties ? ' '~properties : '' }}> 4 | {% endmacro %} 5 | -------------------------------------------------------------------------------- /views/macros/float_class.html.twig: -------------------------------------------------------------------------------- 1 | {% macro float_class(alignment) %} 2 | pull-{{ alignment }} 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /views/macros/grid_classes.html.twig: -------------------------------------------------------------------------------- 1 | {% macro container() %}container{% endmacro %} 2 | 3 | {% macro row() %}row{% endmacro %} 4 | 5 | {% macro column() %}column{% endmacro %} 6 | -------------------------------------------------------------------------------- /views/macros/icon.html.twig: -------------------------------------------------------------------------------- 1 | {% macro icon(symbol) %} 2 | 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /views/macros/pagination_ul_class.html.twig: -------------------------------------------------------------------------------- 1 | {% macro pagination_ul_class() %} 2 | paginator 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /views/macros/panel_body_close.html.twig: -------------------------------------------------------------------------------- 1 | {% macro panel_body_close() %} 2 | 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /views/macros/panel_body_open.html.twig: -------------------------------------------------------------------------------- 1 | {% macro panel_body_open(extra_classes) %} 2 |
    3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /views/macros/panel_close.html.twig: -------------------------------------------------------------------------------- 1 | {% macro panel_close() %} 2 |
    3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /views/macros/panel_footer_close.html.twig: -------------------------------------------------------------------------------- 1 | {% macro panel_footer_close() %} 2 | 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /views/macros/panel_footer_open.html.twig: -------------------------------------------------------------------------------- 1 | {% macro panel_footer_open(extra_classes) %} 2 |
    3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /views/macros/panel_heading_close.html.twig: -------------------------------------------------------------------------------- 1 | {% macro panel_heading_close() %} 2 |
    3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /views/macros/panel_heading_open.html.twig: -------------------------------------------------------------------------------- 1 | {% macro panel_heading_open(extra_classes) %} 2 |
    3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /views/macros/panel_open.html.twig: -------------------------------------------------------------------------------- 1 | {% macro panel_open(extra_classes, id) %} 2 |
    3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /views/macros/row_close.html.twig: -------------------------------------------------------------------------------- 1 | {% macro row_close(element) %} 2 | 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /views/macros/row_open.html.twig: -------------------------------------------------------------------------------- 1 | {% macro row_open(element, id, extra_classes, properties) %} 2 | <{{ element|default('div') }} class="row{{ extra_classes ? ' '~extra_classes : '' }}"{{ id ? ' id="'~id~'"' : '' }}{{ properties ? ' '~properties : '' }}> 3 | {% endmacro %} 4 | -------------------------------------------------------------------------------- /views/main.twig: -------------------------------------------------------------------------------- 1 | {% extends "base.twig" %} 2 | {% block main %} 3 |
    4 | {% if title %}

    {{ title }}

    {% endif %} 5 | {% block content %} 6 | {{ fn( 'esc_html__', 'Sorry, no content', 'maera' ) }} 7 | {% endblock %} 8 | 9 | {# If comments are open or we have at least one comment, load up the comment template #} 10 | {% if post.post_type != 'product' and ( function('comments_open') or function('get_comments_number', post.ID ) ) > 0 %} 11 | {{ function('comments_template') }} 12 | {% endif %} 13 |
    14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /views/page.twig: -------------------------------------------------------------------------------- 1 | {% extends "main.twig" %} 2 | {% block content %} 3 | 4 |
    5 | {% for post in posts %} 6 | {% if fn('post_password_required', post.ID) %} 7 |

    The content of this page is password-protected

    8 |
    9 | 10 | 11 | 12 |
    13 | {% else %} 14 | 15 | {% include 'content-page.twig' %} 16 | {{ function( 'wp_link_pages', { 'before': '' }) }} 17 | 18 | {% endif %} 19 | {% endfor %} 20 |
    21 | {% endblock %} 22 | -------------------------------------------------------------------------------- /views/pagination.twig: -------------------------------------------------------------------------------- 1 | {# 3 | {% if pagination.prev %} 4 |
  • 5 | {% endif %} 6 | 7 | {% for page in pagination.pages %} 8 |
  • 9 | {% if page.link %} 10 | {{ fn( 'esc_html', page.title ) }} 11 | {% else %} 12 | {{ fn( 'esc_html', page.title ) }} 13 | {% endif %} 14 |
  • 15 | {% endfor %} 16 | 17 | {% if pagination.next %} 18 |
  • 19 | {% endif %} 20 | 21 | -------------------------------------------------------------------------------- /views/sidebar.twig: -------------------------------------------------------------------------------- 1 | {# PRIMARY SIDEBAR #} 2 | 5 | -------------------------------------------------------------------------------- /views/single.twig: -------------------------------------------------------------------------------- 1 | {% extends "main.twig" %} 2 | {% block content %} 3 | 4 |
    5 | 6 | {% for post in posts %} 7 | {% if fn('post_password_required', post.ID) %} 8 |

    The content of this page is password-protected

    9 |
    10 | 11 | 12 | 13 |
    14 | {% else %} 15 | {% include ['content-single-'~post.ID~'.twig', 'content-single-'~post.post_type~'.twig', 'content-single.twig'] %} 16 | {{ function( 'wp_link_pages', { 'before': '' }) }} 17 | {% endif %} 18 |
    19 | {% endfor %} 20 |
    21 | 22 | {% endblock %} 23 | -------------------------------------------------------------------------------- /views/site-logo.twig: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /views/widget-extended-posts.twig: -------------------------------------------------------------------------------- 1 | {# 9 | {% for post in posts %} 10 | 25 |
    26 | {% endfor %} 27 |
    28 | {{ widget.after_widget }} 29 | -------------------------------------------------------------------------------- /views/woocommerce/archive-product.twig: -------------------------------------------------------------------------------- 1 | {% extends "base.twig" %} 2 | {% block main %} 3 |
    4 | {% do action( 'woocommerce_before_main_content' ) %} 5 | {% if true|apply_filters('woocommerce_show_page_title') %} 6 |

    {{ function('woocommerce_page_title') }}

    7 | {% endif %} 8 | 9 | {% do action( 'woocommerce_archive_description' ) %} 10 | 11 | {% if function('have_posts') %} 12 | 13 | {% do action( 'woocommerce_before_shop_loop' ) %} 14 | {{ function('woocommerce_product_loop_start') }} 15 | {{ function('woocommerce_product_subcategories') }} 16 | 17 | {% for post in posts %} 18 | {{ function('wc_get_template_part', 'content', 'product') }} 19 | {% endfor %} 20 | {{ function('woocommerce_product_loop_end') }} 21 | {% do action( 'woocommerce_after_shop_loop' ) %} 22 | 23 | {% else %} 24 | {{ function('wc_get_template', 'loop/no-products-found.php') }} 25 | {% endif %} 26 | {% do action( 'woocommerce_after_main_content' ) %} 27 |
    28 | {% endblock %} 29 | -------------------------------------------------------------------------------- /views/woocommerce/content-single-product.twig: -------------------------------------------------------------------------------- 1 |
    2 | {% do action( 'maera/single/top', post.ID ) %} 3 | {% include ['content-single-entry-'~post.ID~'-header.twig', 'content-single-entry-'~post.post_type~'-header.twig', 'content-single-entry-header.twig'] %} 4 | {% include ['content-single-entry-'~post.ID~'-meta.twig', 'content-single-entry-'~post.post_type~'-meta.twig', 'content-single-entry-meta.twig'] %} 5 | {% include ['content-single-entry-'~post.ID~'-content.twig', 'content-single-entry-'~post.post_type~'-content.twig', 'content-single-entry-content.twig'] %} 6 | {% include ['content-single-entry-'~post.ID~'-footer.twig', 'content-single-entry-'~post.post_type~'-footer.twig', 'content-single-entry-footer.twig'] %} 7 |
    8 | -------------------------------------------------------------------------------- /views/woocommerce/loop/add-to-cart.twig: -------------------------------------------------------------------------------- 1 | {% set add_to_cart = '%s'|format( 2 | function('esc_url', product.add_to_cart_url), 3 | function('esc_attr', product.id), 4 | function('esc_attr', product.get_sku), 5 | function('esc_attr', quantity ? quantity : 1), 6 | product.is_purchasable and product.is_in_stock ? 'add_to_cart_button' : '', 7 | function('esc_attr', product.product_type), 8 | function('esc_html', product.add_to_cart_text) 9 | ) %} 10 | 11 | {{ add_to_cart|apply_filters('woocommerce_loop_add_to_cart_link', product) }} 12 | -------------------------------------------------------------------------------- /views/woocommerce/single-product.twig: -------------------------------------------------------------------------------- 1 | {% extends "main.twig" %} 2 | {% block content %} 3 | 4 | {% do action( 'woocommerce_before_main_content' ) %} 5 | 6 | {% for post in posts %} 7 | {% do action( 'woocommerce_before_single_product' ) %} 8 | {% if function('post_password_required') %} 9 | {{ function('get_the_password_form') }} 10 | {% else %} 11 |
    12 | {% do action( 'woocommerce_before_single_product_summary' ) %} 13 |
    14 | {% do action( 'woocommerce_single_product_summary' ) %} 15 |
    16 | {% do action( 'woocommerce_after_single_product_summary' ) %} 17 | 18 |
    19 | {% do action( 'woocommerce_after_single_product' ) %} 20 | {% endif %} 21 | {% endfor %} 22 | {% do action( 'woocommerce_after_main_content' ) %} 23 | 24 | {% endblock %} 25 | -------------------------------------------------------------------------------- /views/woocommerce/single-product/add-to-cart/button-external.twig: -------------------------------------------------------------------------------- 1 | {{ button_text }} 2 | -------------------------------------------------------------------------------- /views/woocommerce/single-product/add-to-cart/button.twig: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /woocommerce.php: -------------------------------------------------------------------------------- 1 | ID ); 5 | 6 | $template = ( is_singular( 'product' ) ) ? 'single-product.twig' : 'archive-product.twig'; 7 | 8 | Maera()->views->dependencies(); 9 | 10 | Maera()->views->header(); 11 | Maera()->views->render( $template ); 12 | Maera()->views->footer(); 13 | -------------------------------------------------------------------------------- /woocommerce/archive-product.php: -------------------------------------------------------------------------------- 1 | ID ); 5 | 6 | Maera()->views->dependencies(); 7 | 8 | Maera()->views->header(); 9 | Maera()->views->render( 'archive-product.twig' ); 10 | Maera()->views->footer(); 11 | -------------------------------------------------------------------------------- /woocommerce/loop/add-to-cart.php: -------------------------------------------------------------------------------- 1 | $product, 18 | 'quantity' => $quantity, 19 | ); 20 | Maera()->views->render( 'loop/add-to-cart.twig', $context ); 21 | -------------------------------------------------------------------------------- /woocommerce/single-product.php: -------------------------------------------------------------------------------- 1 | ID ); 5 | 6 | Maera()->views->dependencies(); 7 | 8 | Maera()->views->header(); 9 | Maera()->views->render( 'single-product.twig' ); 10 | Maera()->views->footer(); 11 | -------------------------------------------------------------------------------- /woocommerce/single-product/add-to-cart/external.php: -------------------------------------------------------------------------------- 1 | esc_url( $product_url ), 16 | 'button_text' => $button_text 17 | ); 18 | ?> 19 | 20 | 21 | 22 |

    23 | views->render( 'single-product/add-to-cart/button-external.twig' ); ?> 24 | 25 |

    26 | 27 | 28 | -------------------------------------------------------------------------------- /woocommerce/single-product/add-to-cart/grouped.php: -------------------------------------------------------------------------------- 1 | 19 | 20 |
    21 | 22 | 23 | is_in_stock() ) { 28 | continue; 29 | } 30 | 31 | $post = $product->post; 32 | setup_postdata( $post ); 33 | ?> 34 | 35 | 45 | 46 | 51 | 52 | 53 | 54 | 64 | 65 | ID ); 71 | setup_postdata( $parent_product_post ); 72 | ?> 73 | 74 |
    36 | is_sold_individually() || ! $product->is_purchasable() ) : ?> 37 | 38 | 39 | 'quantity[' . $product_id . ']', 'input_value' => '0', 'min_value' => apply_filters( 'woocommerce_quantity_input_min', 0, $product ), 'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->backorders_allowed() ? '' : $product->get_stock_quantity(), $product ) ) ); 42 | ?> 43 | 44 | 47 | 50 | 55 | get_price_html(); 57 | 58 | if ( $availability = $product->get_availability() ) { 59 | $availability_html = empty( $availability['availability'] ) ? '' : '

    ' . esc_html( $availability['availability'] ) . '

    '; 60 | echo apply_filters( 'woocommerce_stock_html', $availability_html, $availability['availability'], $product ); 61 | } 62 | ?> 63 |
    75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | views->render( 'single-product/add-to-cart/button.twig' ); ?> 83 | 84 | 85 | 86 | 87 |
    88 | 89 | 90 | -------------------------------------------------------------------------------- /woocommerce/single-product/add-to-cart/simple.php: -------------------------------------------------------------------------------- 1 | is_purchasable() ) { 17 | return; 18 | } 19 | 20 | ?> 21 | 22 | get_availability(); 25 | $availability_html = empty( $availability['availability'] ) ? '' : '

    ' . esc_html( $availability['availability'] ) . '

    '; 26 | 27 | echo apply_filters( 'woocommerce_stock_html', $availability_html, $availability['availability'], $product ); 28 | ?> 29 | 30 | is_in_stock() ) : ?> 31 | 32 | 33 | 34 |
    35 | 36 | 37 | is_sold_individually() ) 39 | woocommerce_quantity_input( array( 40 | 'min_value' => apply_filters( 'woocommerce_quantity_input_min', 1, $product ), 41 | 'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->backorders_allowed() ? '' : $product->get_stock_quantity(), $product ) 42 | ) ); 43 | ?> 44 | 45 | 46 | 47 | views->render( 'single-product/add-to-cart/button.twig' ); ?> 48 | 49 | 50 |
    51 | 52 | 53 | 54 | 16 | 17 | 18 | 19 |
    20 | 21 | 22 | 23 | $options ) : $loop++; ?> 24 | 25 | 26 | 65 | 66 | 67 | 68 |
    ' . esc_html__( 'Clear selection', 'maera' ) . ''; 63 | } 64 | ?>
    69 | 70 | 71 | 72 | 88 | 89 | 90 | 91 | 92 | 93 |

    94 | 95 | 96 | 97 |
    98 | 99 | get_upsells(); 17 | 18 | if ( sizeof( $upsells ) == 0 ) { 19 | return; 20 | } 21 | 22 | $meta_query = WC()->query->get_meta_query(); 23 | 24 | $args = array( 25 | 'post_type' => 'product', 26 | 'ignore_sticky_posts' => 1, 27 | 'no_found_rows' => 1, 28 | // 'posts_per_page' => $posts_per_page, 29 | 'orderby' => $orderby, 30 | 'post__in' => $upsells, 31 | 'post__not_in' => array( $product->id ), 32 | 'meta_query' => $meta_query 33 | ); 34 | 35 | $products = new WP_Query( $args ); 36 | 37 | $woocommerce_loop['columns'] = $columns; 38 | 39 | if ( $products->have_posts() ) : ?> 40 | 41 |
    42 | 43 |

    44 | 45 | 46 | 47 | have_posts() ) : $products->the_post(); ?> 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 |
    56 | 57 | ID ); 5 | 6 | Maera()->views->dependencies(); 7 | 8 | Maera()->views->header(); 9 | Maera()->views->render( 'archive-product.twig' ); 10 | Maera()->views->footer(); 11 | -------------------------------------------------------------------------------- /woocommerce/taxonomy-product_tag.php: -------------------------------------------------------------------------------- 1 | ID ); 5 | 6 | Maera()->views->dependencies(); 7 | 8 | Maera()->views->header(); 9 | Maera()->views->render( 'archive-product.twig' ); 10 | Maera()->views->footer(); 11 | --------------------------------------------------------------------------------