This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * CSS image crop. Forces image to 4:3 aspect ratio cropping at the middle. | |
| * http://dabblet.com/gist/4711695 | |
| */ | |
| .img-crop, | |
| .img-crop img{ | |
| width: 100%; /* gotta be responsive these days */ | |
| } | |
| .img-crop{ | |
| background-color: #ededed; /* some background color for short images */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //How to edit a user profile on the front end? | |
| //http://wordpress.stackexchange.com/questions/9775/how-to-edit-a-user-profile-on-the-front-end | |
| //Forcing nickname as display_name in custom edit profile template | |
| //http://wordpress.stackexchange.com/questions/35403/forcing-nickname-as-display-name-in-custom-edit-profile-template | |
| /////// | |
| <?php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| # Register custom post types on the 'init' hook. | |
| add_action( 'init', 'my_register_post_types' ); | |
| /** | |
| * Registers post types needed by the plugin. | |
| * | |
| * @since 1.0.0 | |
| * @access public |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Get The Page ID You Need | |
| get_option( 'woocommerce_shop_page_id' ); | |
| get_option( 'woocommerce_cart_page_id' ); | |
| get_option( 'woocommerce_checkout_page_id' ); | |
| get_option( 'woocommerce_pay_page_id' ); | |
| get_option( 'woocommerce_thanks_page_id' ); | |
| get_option( 'woocommerce_myaccount_page_id' ); | |
| get_option( 'woocommerce_edit_address_page_id' ); | |
| get_option( 'woocommerce_view_order_page_id' ); | |
| get_option( 'woocommerce_terms_page_id' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Works everywere ( IE7+, FF, Chrome, Safari, Opera ) | |
| * Example: http://jsbin.com/afAQAWA/2/ | |
| */ | |
| .rotated-text { | |
| display: inline-block; | |
| overflow: hidden; | |
| width: 1.5em; | |
| } | |
| .rotated-text__inner { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Clamps a block of text to a certain number of lines, | |
| // followed by an ellipsis in Webkit and Blink based browsers | |
| // Reference: http://dropshado.ws/post/1015351370/webkit-line-clamp | |
| @mixin text-clamp($lines: 2, $line-height: false) { | |
| overflow: hidden; | |
| display: -webkit-box; | |
| -webkit-box-orient: vertical; | |
| -webkit-line-clamp: $lines; | |
| // Fallback for non-Webkit browsers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // MultiExporter.jsx | |
| // Version 0.1 | |
| // Version 0.2 Adds PNG and EPS exports | |
| // Version 0.3 Adds support for exporting at different resolutions | |
| // Version 0.4 Adds support for SVG, changed EPS behaviour to minimise output filesize | |
| // Version 0.5 Fixed cropping issues | |
| // Version 0.6 Added inner padding mode to prevent circular bounds clipping | |
| // | |
| // Copyright 2013 Tom Byrne | |
| // Comments or suggestions to tom@tbyrne.org |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #301 Redirect Local Images to Live | |
| RedirectMatch 301 ^/wp-content/uploads/(.*) http://livewebsite.com/wp-content/uploads/$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: Grunt Sitemap Generator | |
| * Plugin URI: http://www.github.com/lgladdy | |
| * Description: Generate a JSON list of every page on a site so it can be used with grunt and uncss. Create a folder in /wp-content called mu-plugins, and drop this code into that folder, as grunt-sitemap.php | |
| * Author: Liam Gladdy | |
| * Author URI: http://gladdy.co.uk | |
| * Version: 1.0 | |
| */ | |